diff --git a/lib/lib.dom.iterable.d.ts b/lib/lib.dom.iterable.d.ts index 95bb1465d3950..382099148f66c 100644 --- a/lib/lib.dom.iterable.d.ts +++ b/lib/lib.dom.iterable.d.ts @@ -41,6 +41,22 @@ interface FormData { [Symbol.iterator](): IterableIterator; } +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + interface NodeList { /** * Returns an array of key, value pairs for every entry in the list @@ -90,3 +106,22 @@ interface NodeListOf { [Symbol.iterator](): IterableIterator; } + +interface URLSearchParams { + /** + * Returns an array of key, value pairs for every entry in the search params + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params + */ + values(): IterableIterator; + /** + * iterate over key/value pairs + */ + [Symbol.iterator](): IterableIterator<[string, string]>; +} diff --git a/lib/lib.es2016.full.d.ts b/lib/lib.es2016.full.d.ts index cb197dd49a487..737357fef6d92 100644 --- a/lib/lib.es2016.full.d.ts +++ b/lib/lib.es2016.full.d.ts @@ -15382,6 +15382,22 @@ interface FormData { [Symbol.iterator](): IterableIterator; } +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + interface NodeList { /** * Returns an array of key, value pairs for every entry in the list @@ -15431,3 +15447,22 @@ interface NodeListOf { [Symbol.iterator](): IterableIterator; } + +interface URLSearchParams { + /** + * Returns an array of key, value pairs for every entry in the search params + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params + */ + values(): IterableIterator; + /** + * iterate over key/value pairs + */ + [Symbol.iterator](): IterableIterator<[string, string]>; +} diff --git a/lib/lib.es2017.full.d.ts b/lib/lib.es2017.full.d.ts index 03b60d95def5a..dae59bc9ae32d 100644 --- a/lib/lib.es2017.full.d.ts +++ b/lib/lib.es2017.full.d.ts @@ -15384,6 +15384,22 @@ interface FormData { [Symbol.iterator](): IterableIterator; } +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + interface NodeList { /** * Returns an array of key, value pairs for every entry in the list @@ -15433,3 +15449,22 @@ interface NodeListOf { [Symbol.iterator](): IterableIterator; } + +interface URLSearchParams { + /** + * Returns an array of key, value pairs for every entry in the search params + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params + */ + values(): IterableIterator; + /** + * iterate over key/value pairs + */ + [Symbol.iterator](): IterableIterator<[string, string]>; +} diff --git a/lib/lib.es6.d.ts b/lib/lib.es6.d.ts index 4bc7e03e3415f..76dc84306ed10 100644 --- a/lib/lib.es6.d.ts +++ b/lib/lib.es6.d.ts @@ -21400,6 +21400,22 @@ interface FormData { [Symbol.iterator](): IterableIterator; } +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + interface NodeList { /** * Returns an array of key, value pairs for every entry in the list @@ -21449,3 +21465,22 @@ interface NodeListOf { [Symbol.iterator](): IterableIterator; } + +interface URLSearchParams { + /** + * Returns an array of key, value pairs for every entry in the search params + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params + */ + values(): IterableIterator; + /** + * iterate over key/value pairs + */ + [Symbol.iterator](): IterableIterator<[string, string]>; +} diff --git a/lib/lib.esnext.full.d.ts b/lib/lib.esnext.full.d.ts index 0dae85ac266b7..d285df3f4db7a 100644 --- a/lib/lib.esnext.full.d.ts +++ b/lib/lib.esnext.full.d.ts @@ -15383,6 +15383,22 @@ interface FormData { [Symbol.iterator](): IterableIterator; } +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + interface NodeList { /** * Returns an array of key, value pairs for every entry in the list @@ -15432,3 +15448,22 @@ interface NodeListOf { [Symbol.iterator](): IterableIterator; } + +interface URLSearchParams { + /** + * Returns an array of key, value pairs for every entry in the search params + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params + */ + values(): IterableIterator; + /** + * iterate over key/value pairs + */ + [Symbol.iterator](): IterableIterator<[string, string]>; +} diff --git a/lib/tsc.js b/lib/tsc.js index 9ca9a64dabe3b..79448fddc1cd9 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -2950,6 +2950,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -3308,135 +3309,135 @@ var ts; var ts; (function (ts) { function tokenIsIdentifierOrKeyword(token) { - return token >= 70; + return token >= 71; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116, - "any": 118, - "as": 117, - "boolean": 121, - "break": 71, - "case": 72, - "catch": 73, - "class": 74, - "continue": 76, - "const": 75, - "constructor": 122, - "debugger": 77, - "declare": 123, - "default": 78, - "delete": 79, - "do": 80, - "else": 81, - "enum": 82, - "export": 83, - "extends": 84, - "false": 85, - "finally": 86, - "for": 87, - "from": 139, - "function": 88, - "get": 124, - "if": 89, - "implements": 107, - "import": 90, - "in": 91, - "instanceof": 92, - "interface": 108, - "is": 125, - "keyof": 126, - "let": 109, - "module": 127, - "namespace": 128, - "never": 129, - "new": 93, - "null": 94, - "number": 132, - "object": 133, - "package": 110, - "private": 111, - "protected": 112, - "public": 113, - "readonly": 130, - "require": 131, - "global": 140, - "return": 95, - "set": 134, - "static": 114, - "string": 135, - "super": 96, - "switch": 97, - "symbol": 136, - "this": 98, - "throw": 99, - "true": 100, - "try": 101, - "type": 137, - "typeof": 102, - "undefined": 138, - "var": 103, - "void": 104, - "while": 105, - "with": 106, - "yield": 115, - "async": 119, - "await": 120, - "of": 141, - "{": 16, - "}": 17, - "(": 18, - ")": 19, - "[": 20, - "]": 21, - ".": 22, - "...": 23, - ";": 24, - ",": 25, - "<": 26, - ">": 28, - "<=": 29, - ">=": 30, - "==": 31, - "!=": 32, - "===": 33, - "!==": 34, - "=>": 35, - "+": 36, - "-": 37, - "**": 39, - "*": 38, - "/": 40, - "%": 41, - "++": 42, - "--": 43, - "<<": 44, - ">": 45, - ">>>": 46, - "&": 47, - "|": 48, - "^": 49, - "!": 50, - "~": 51, - "&&": 52, - "||": 53, - "?": 54, - ":": 55, - "=": 57, - "+=": 58, - "-=": 59, - "*=": 60, - "**=": 61, - "/=": 62, - "%=": 63, - "<<=": 64, - ">>=": 65, - ">>>=": 66, - "&=": 67, - "|=": 68, - "^=": 69, - "@": 56, + "abstract": 117, + "any": 119, + "as": 118, + "boolean": 122, + "break": 72, + "case": 73, + "catch": 74, + "class": 75, + "continue": 77, + "const": 76, + "constructor": 123, + "debugger": 78, + "declare": 124, + "default": 79, + "delete": 80, + "do": 81, + "else": 82, + "enum": 83, + "export": 84, + "extends": 85, + "false": 86, + "finally": 87, + "for": 88, + "from": 140, + "function": 89, + "get": 125, + "if": 90, + "implements": 108, + "import": 91, + "in": 92, + "instanceof": 93, + "interface": 109, + "is": 126, + "keyof": 127, + "let": 110, + "module": 128, + "namespace": 129, + "never": 130, + "new": 94, + "null": 95, + "number": 133, + "object": 134, + "package": 111, + "private": 112, + "protected": 113, + "public": 114, + "readonly": 131, + "require": 132, + "global": 141, + "return": 96, + "set": 135, + "static": 115, + "string": 136, + "super": 97, + "switch": 98, + "symbol": 137, + "this": 99, + "throw": 100, + "true": 101, + "try": 102, + "type": 138, + "typeof": 103, + "undefined": 139, + "var": 104, + "void": 105, + "while": 106, + "with": 107, + "yield": 116, + "async": 120, + "await": 121, + "of": 142, + "{": 17, + "}": 18, + "(": 19, + ")": 20, + "[": 21, + "]": 22, + ".": 23, + "...": 24, + ";": 25, + ",": 26, + "<": 27, + ">": 29, + "<=": 30, + ">=": 31, + "==": 32, + "!=": 33, + "===": 34, + "!==": 35, + "=>": 36, + "+": 37, + "-": 38, + "**": 40, + "*": 39, + "/": 41, + "%": 42, + "++": 43, + "--": 44, + "<<": 45, + ">": 46, + ">>>": 47, + "&": 48, + "|": 49, + "^": 50, + "!": 51, + "~": 52, + "&&": 53, + "||": 54, + "?": 55, + ":": 56, + "=": 58, + "+=": 59, + "-=": 60, + "*=": 61, + "**=": 62, + "/=": 63, + "%=": 64, + "<<=": 65, + ">>=": 66, + ">>>=": 67, + "&=": 68, + "|=": 69, + "^=": 70, + "@": 57, }); var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 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, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 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, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 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, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 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, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; @@ -3548,10 +3549,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; function isWhiteSpaceSingleLine(ch) { return ch === 32 || ch === 9 || @@ -3667,7 +3668,7 @@ var ts; } break; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -3801,7 +3802,7 @@ var ts; } break scan; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -3899,8 +3900,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 || token > 106; }, - isReservedWord: function () { return token >= 71 && token <= 106; }, + isIdentifier: function () { return token === 71 || token > 107; }, + isReservedWord: function () { return token >= 72 && token <= 107; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -4038,20 +4039,20 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } var currChar = text.charCodeAt(pos); if (currChar === 96) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 : 14; + resultingToken = startedWithBacktick ? 14 : 15; break; } if (currChar === 92) { @@ -4216,7 +4217,7 @@ var ts; } } } - return token = 70; + return token = 71; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -4292,12 +4293,12 @@ var ts; case 33: if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 34; + return pos += 3, token = 35; } - return pos += 2, token = 32; + return pos += 2, token = 33; } pos++; - return token = 50; + return token = 51; case 34: case 39: tokenValue = scanString(); @@ -4306,68 +4307,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 63; + return pos += 2, token = 64; } pos++; - return token = 41; + return token = 42; case 38: if (text.charCodeAt(pos + 1) === 38) { - return pos += 2, token = 52; + return pos += 2, token = 53; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 67; + return pos += 2, token = 68; } pos++; - return token = 47; + return token = 48; case 40: pos++; - return token = 18; + return token = 19; case 41: pos++; - return token = 19; + return token = 20; case 42: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 60; + return pos += 2, token = 61; } if (text.charCodeAt(pos + 1) === 42) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 61; + return pos += 3, token = 62; } - return pos += 2, token = 39; + return pos += 2, token = 40; } pos++; - return token = 38; + return token = 39; case 43: if (text.charCodeAt(pos + 1) === 43) { - return pos += 2, token = 42; + return pos += 2, token = 43; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 58; + return pos += 2, token = 59; } pos++; - return token = 36; + return token = 37; case 44: pos++; - return token = 25; + return token = 26; case 45: if (text.charCodeAt(pos + 1) === 45) { - return pos += 2, token = 43; + return pos += 2, token = 44; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 59; + return pos += 2, token = 60; } pos++; - return token = 37; + return token = 38; case 46: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { - return pos += 3, token = 23; + return pos += 3, token = 24; } pos++; - return token = 22; + return token = 23; case 47: if (text.charCodeAt(pos + 1) === 47) { pos += 2; @@ -4411,10 +4412,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 62; + return pos += 2, token = 63; } pos++; - return token = 40; + return token = 41; case 48: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; @@ -4467,10 +4468,10 @@ var ts; return token = 8; case 58: pos++; - return token = 55; + return token = 56; case 59: pos++; - return token = 24; + return token = 25; case 60: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4483,20 +4484,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 64; + return pos += 3, token = 65; } - return pos += 2, token = 44; + return pos += 2, token = 45; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 29; + return pos += 2, token = 30; } if (languageVariant === 1 && text.charCodeAt(pos + 1) === 47 && text.charCodeAt(pos + 2) !== 42) { - return pos += 2, token = 27; + return pos += 2, token = 28; } pos++; - return token = 26; + return token = 27; case 61: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4509,15 +4510,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 33; + return pos += 3, token = 34; } - return pos += 2, token = 31; + return pos += 2, token = 32; } if (text.charCodeAt(pos + 1) === 62) { - return pos += 2, token = 35; + return pos += 2, token = 36; } pos++; - return token = 57; + return token = 58; case 62: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4529,43 +4530,43 @@ var ts; } } pos++; - return token = 28; + return token = 29; case 63: pos++; - return token = 54; + return token = 55; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 94: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 69; + return pos += 2, token = 70; } pos++; - return token = 49; + return token = 50; case 123: pos++; - return token = 16; + return token = 17; case 124: if (text.charCodeAt(pos + 1) === 124) { - return pos += 2, token = 53; + return pos += 2, token = 54; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 68; + return pos += 2, token = 69; } pos++; - return token = 48; + return token = 49; case 125: pos++; - return token = 17; + return token = 18; case 126: pos++; - return token = 51; + return token = 52; case 64: pos++; - return token = 56; + return token = 57; case 92: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -4603,29 +4604,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28) { + if (token === 29) { if (text.charCodeAt(pos) === 62) { if (text.charCodeAt(pos + 1) === 62) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 66; + return pos += 3, token = 67; } - return pos += 2, token = 46; + return pos += 2, token = 47; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 65; + return pos += 2, token = 66; } pos++; - return token = 45; + return token = 46; } if (text.charCodeAt(pos) === 61) { pos++; - return token = 30; + return token = 31; } } return token; } function reScanSlashToken() { - if (token === 40 || token === 62) { + if (token === 41 || token === 63) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -4664,12 +4665,12 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11; + token = 12; } return token; } function reScanTemplateToken() { - ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -4686,17 +4687,17 @@ var ts; if (char === 60) { if (text.charCodeAt(pos + 1) === 47) { pos += 2; - return token = 27; + return token = 28; } pos++; - return token = 26; + return token = 27; } if (char === 123) { pos++; - return token = 16; + return token = 17; } + var firstNonWhitespace = 0; while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123) { break; @@ -4708,8 +4709,15 @@ var ts; } break; } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10; + return firstNonWhitespace === -1 ? 11 : 10; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -4756,42 +4764,42 @@ var ts; return token = 5; case 64: pos++; - return token = 56; + return token = 57; case 10: case 13: pos++; return token = 4; case 42: pos++; - return token = 38; + return token = 39; case 123: pos++; - return token = 16; + return token = 17; case 125: pos++; - return token = 17; + return token = 18; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 61: pos++; - return token = 57; + return token = 58; case 44: pos++; - return token = 25; + return token = 26; case 46: pos++; - return token = 22; + return token = 23; } if (isIdentifierStart(ch, 5)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) { pos++; } - return token = 70; + return token = 71; } else { return pos += 1, token = 0; @@ -5005,7 +5013,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 264) { + while (node && node.kind !== 265) { node = node.parent; } return node; @@ -5013,11 +5021,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: return true; } return false; @@ -5073,7 +5081,7 @@ var ts; } ts.nodeIsPresent = nodeIsPresent; function isToken(n) { - return n.kind >= 0 && n.kind <= 141; + return n.kind >= 0 && n.kind <= 142; } ts.isToken = isToken; function getTokenPosOfNode(node, sourceFile, includeJsDoc) { @@ -5086,18 +5094,18 @@ var ts; if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) { return getTokenPosOfNode(node.jsDoc[0]); } - if (node.kind === 293 && node._children.length > 0) { + if (node.kind === 294 && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; function isJSDocNode(node) { - return node.kind >= 266 && node.kind <= 292; + return node.kind >= 267 && node.kind <= 293; } ts.isJSDocNode = isJSDocNode; function isJSDocTag(node) { - return node.kind >= 282 && node.kind <= 292; + return node.kind >= 283 && node.kind <= 293; } ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { @@ -5135,13 +5143,13 @@ var ts; switch (node.kind) { case 9: return getQuotedEscapedLiteralText('"', node.text, '"'); - case 12: - return getQuotedEscapedLiteralText("`", node.text, "`"); case 13: - return getQuotedEscapedLiteralText("`", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "`"); case 14: - return getQuotedEscapedLiteralText("}", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "${"); case 15: + return getQuotedEscapedLiteralText("}", node.text, "${"); + case 16: return getQuotedEscapedLiteralText("}", node.text, "`"); case 8: return node.text; @@ -5167,11 +5175,11 @@ var ts; ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isCatchClauseVariableDeclarationOrBindingElement(declaration) { var node = getRootDeclaration(declaration); - return node.kind === 225 && node.parent.kind === 259; + return node.kind === 226 && node.parent.kind === 260; } ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement; function isAmbientModule(node) { - return node && node.kind === 232 && + return node && node.kind === 233 && (node.name.kind === 9 || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; @@ -5180,11 +5188,11 @@ var ts; } ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; function isShorthandAmbientModule(node) { - return node && node.kind === 232 && (!node.body); + return node && node.kind === 233 && (!node.body); } function isBlockScopedContainerTopLevel(node) { - return node.kind === 264 || - node.kind === 232 || + return node.kind === 265 || + node.kind === 233 || isFunctionLike(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; @@ -5197,9 +5205,9 @@ var ts; return false; } switch (node.parent.kind) { - case 264: + case 265: return ts.isExternalModule(node.parent); - case 233: + case 234: return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; @@ -5211,22 +5219,22 @@ var ts; ts.isEffectiveExternalModule = isEffectiveExternalModule; function isBlockScope(node, parentNode) { switch (node.kind) { - case 264: - case 234: - case 259: - case 232: - case 213: + case 265: + case 235: + case 260: + case 233: case 214: case 215: - case 151: - case 150: + case 216: case 152: + case 151: case 153: - case 227: - case 185: + case 154: + case 228: case 186: + case 187: return true; - case 206: + case 207: return parentNode && !isFunctionLike(parentNode); } return false; @@ -5252,12 +5260,12 @@ var ts; ts.getNameFromIndexInfo = getNameFromIndexInfo; function getTextOfPropertyName(name) { switch (name.kind) { - case 70: + case 71: return name.text; case 9: case 8: return name.text; - case 143: + case 144: if (isStringOrNumericLiteral(name.expression)) { return name.expression.text; } @@ -5267,11 +5275,11 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { - case 70: + case 71: return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name); - case 142: + case 143: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 178: + case 179: return entityNameToString(name.expression) + "." + entityNameToString(name.name); } } @@ -5308,7 +5316,7 @@ var ts; ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; function getErrorSpanForArrowFunction(sourceFile, node) { var pos = ts.skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 206) { + if (node.body && node.body.kind === 207) { var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; if (startLine < endLine) { @@ -5320,29 +5328,29 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 264: + case 265: var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); if (pos_1 === sourceFile.text.length) { return ts.createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 225: - case 175: - case 228: - case 198: + case 226: + case 176: case 229: + case 199: + case 230: + case 233: case 232: - case 231: - case 263: - case 227: - case 185: - case 150: - case 152: + case 264: + case 228: + case 186: + case 151: case 153: - case 230: + case 154: + case 231: errorNode = node.name; break; - case 186: + case 187: return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { @@ -5363,7 +5371,7 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 231 && isConst(node); + return node.kind === 232 && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isConst(node) { @@ -5376,11 +5384,11 @@ var ts; } ts.isLet = isLet; function isSuperCall(n) { - return n.kind === 180 && n.expression.kind === 96; + return n.kind === 181 && n.expression.kind === 97; } ts.isSuperCall = isSuperCall; function isPrologueDirective(node) { - return node.kind === 209 + return node.kind === 210 && node.expression.kind === 9; } ts.isPrologueDirective = isPrologueDirective; @@ -5393,10 +5401,10 @@ var ts; } ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJSDocCommentRanges(node, text) { - var commentRanges = (node.kind === 145 || - node.kind === 144 || - node.kind === 185 || - node.kind === 186) ? + var commentRanges = (node.kind === 146 || + node.kind === 145 || + node.kind === 186 || + node.kind === 187) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, function (comment) { @@ -5410,69 +5418,69 @@ var ts; ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (157 <= node.kind && node.kind <= 172) { + if (158 <= node.kind && node.kind <= 173) { return true; } switch (node.kind) { - case 118: - case 132: - case 135: - case 121: + case 119: + case 133: case 136: - case 138: - case 129: + case 122: + case 137: + case 139: + case 130: return true; - case 104: - return node.parent.kind !== 189; - case 200: + case 105: + return node.parent.kind !== 190; + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 70: - if (node.parent.kind === 142 && node.parent.right === node) { + case 71: + if (node.parent.kind === 143 && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 178 && node.parent.name === node) { + else if (node.parent.kind === 179 && node.parent.name === node) { node = node.parent; } - ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - case 142: - case 178: - case 98: + ts.Debug.assert(node.kind === 71 || node.kind === 143 || node.kind === 179, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + case 143: + case 179: + case 99: var parent = node.parent; - if (parent.kind === 161) { + if (parent.kind === 162) { return false; } - if (157 <= parent.kind && parent.kind <= 172) { + if (158 <= parent.kind && parent.kind <= 173) { return true; } switch (parent.kind) { - case 200: + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 144: + case 145: return node === parent.constraint; + case 149: case 148: - case 147: - case 145: - case 225: + case 146: + case 226: return node === parent.type; - case 227: - case 185: + case 228: case 186: + case 187: + case 152: case 151: case 150: - case 149: - case 152: case 153: - return node === parent.type; case 154: + return node === parent.type; case 155: case 156: + case 157: return node === parent.type; - case 183: + case 184: return node === parent.type; - case 180: case 181: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 182: + return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + case 183: return false; } } @@ -5490,30 +5498,30 @@ var ts; } ts.isChildOfNodeWithKind = isChildOfNodeWithKind; function isPrefixUnaryExpression(node) { - return node.kind === 191; + return node.kind === 192; } ts.isPrefixUnaryExpression = isPrefixUnaryExpression; function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 218: + case 219: return visitor(node); - case 234: - case 206: - case 210: + case 235: + case 207: case 211: case 212: case 213: case 214: case 215: - case 219: + case 216: case 220: - case 256: - case 257: case 221: - case 223: - case 259: + case 257: + case 258: + case 222: + case 224: + case 260: return ts.forEachChild(node, traverse); } } @@ -5523,24 +5531,24 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 196: + case 197: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } return; - case 231: - case 229: case 232: case 230: - case 228: - case 198: + case 233: + case 231: + case 229: + case 199: return; default: if (isFunctionLike(node)) { var name = node.name; - if (name && name.kind === 143) { + if (name && name.kind === 144) { traverse(name.expression); return; } @@ -5553,10 +5561,10 @@ var ts; } ts.forEachYieldExpression = forEachYieldExpression; function getRestParameterElementType(node) { - if (node && node.kind === 163) { + if (node && node.kind === 164) { return node.elementType; } - else if (node && node.kind === 158) { + else if (node && node.kind === 159) { return ts.singleOrUndefined(node.typeArguments); } else { @@ -5567,14 +5575,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 175: - case 263: - case 145: - case 260: - case 148: - case 147: + case 176: + case 264: + case 146: case 261: - case 225: + case 149: + case 148: + case 262: + case 226: return true; } } @@ -5582,11 +5590,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 152 || node.kind === 153); + return node && (node.kind === 153 || node.kind === 154); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 228 || node.kind === 198); + return node && (node.kind === 229 || node.kind === 199); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -5595,19 +5603,19 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 151: - case 185: - case 227: + case 152: case 186: + case 228: + case 187: + case 151: case 150: - case 149: - case 152: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return true; } return false; @@ -5615,13 +5623,13 @@ var ts; ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: + case 186: return true; } return false; @@ -5629,13 +5637,13 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 213: case 214: case 215: - case 211: + case 216: case 212: + case 213: return true; - case 221: + case 222: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -5646,7 +5654,7 @@ var ts; if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 221) { + if (node.statement.kind !== 222) { return node.statement; } node = node.statement; @@ -5654,17 +5662,17 @@ var ts; } ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel; function isFunctionBlock(node) { - return node && node.kind === 206 && isFunctionLike(node.parent); + return node && node.kind === 207 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 150 && node.parent.kind === 177; + return node && node.kind === 151 && node.parent.kind === 178; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isObjectLiteralOrClassExpressionMethod(node) { - return node.kind === 150 && - (node.parent.kind === 177 || - node.parent.kind === 198); + return node.kind === 151 && + (node.parent.kind === 178 || + node.parent.kind === 199); } ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod; function isIdentifierTypePredicate(predicate) { @@ -5700,39 +5708,39 @@ var ts; return undefined; } switch (node.kind) { - case 143: + case 144: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 186: + case 187: if (!includeArrowFunctions) { continue; } - case 227: - case 185: - case 232: - case 148: - case 147: - case 150: + case 228: + case 186: + case 233: case 149: + case 148: case 151: + case 150: case 152: case 153: case 154: case 155: case 156: - case 231: - case 264: + case 157: + case 232: + case 265: return node; } } @@ -5742,9 +5750,9 @@ var ts; var container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 151: - case 227: - case 185: + case 152: + case 228: + case 186: return container; } } @@ -5758,25 +5766,25 @@ var ts; return node; } switch (node.kind) { - case 143: + case 144: node = node.parent; break; - case 227: - case 185: + case 228: case 186: + case 187: if (!stopOnFunctions) { continue; } - case 148: - case 147: - case 150: case 149: + case 148: case 151: + case 150: case 152: case 153: + case 154: return node; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { @@ -5788,14 +5796,14 @@ var ts; } ts.getSuperContainer = getSuperContainer; function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 185 || func.kind === 186) { + if (func.kind === 186 || func.kind === 187) { var prev = func; var parent = func.parent; - while (parent.kind === 184) { + while (parent.kind === 185) { prev = parent; parent = parent.parent; } - if (parent.kind === 180 && parent.expression === prev) { + if (parent.kind === 181 && parent.expression === prev) { return parent; } } @@ -5803,21 +5811,21 @@ var ts; ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression; function isSuperProperty(node) { var kind = node.kind; - return (kind === 178 || kind === 179) - && node.expression.kind === 96; + return (kind === 179 || kind === 180) + && node.expression.kind === 97; } ts.isSuperProperty = isSuperProperty; function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 158: - case 276: + case 159: + case 277: return node.typeName; - case 200: + case 201: return isEntityNameExpression(node.expression) ? node.expression : undefined; - case 70: - case 142: + case 71: + case 143: return node; } return undefined; @@ -5825,12 +5833,12 @@ var ts; ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function isCallLikeExpression(node) { switch (node.kind) { + case 251: case 250: - case 249: - case 180: case 181: case 182: - case 146: + case 183: + case 147: return true; default: return false; @@ -5838,7 +5846,7 @@ var ts; } ts.isCallLikeExpression = isCallLikeExpression; function getInvokedExpression(node) { - if (node.kind === 182) { + if (node.kind === 183) { return node.tag; } else if (isJsxOpeningLikeElement(node)) { @@ -5849,21 +5857,21 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 228: + case 229: return true; - case 148: - return node.parent.kind === 228; - case 152: + case 149: + return node.parent.kind === 229; case 153: - case 150: + case 154: + case 151: return node.body !== undefined - && node.parent.kind === 228; - case 145: + && node.parent.kind === 229; + case 146: return node.parent.body !== undefined - && (node.parent.kind === 151 - || node.parent.kind === 150 - || node.parent.kind === 153) - && node.parent.parent.kind === 228; + && (node.parent.kind === 152 + || node.parent.kind === 151 + || node.parent.kind === 154) + && node.parent.parent.kind === 229; } return false; } @@ -5879,19 +5887,19 @@ var ts; ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; function childIsDecorated(node) { switch (node.kind) { - case 228: + case 229: return ts.forEach(node.members, nodeOrChildIsDecorated); - case 150: - case 153: + case 151: + case 154: return ts.forEach(node.parameters, nodeIsDecorated); } } ts.childIsDecorated = childIsDecorated; function isJSXTagName(node) { var parent = node.parent; - if (parent.kind === 250 || - parent.kind === 249 || - parent.kind === 251) { + if (parent.kind === 251 || + parent.kind === 250 || + parent.kind === 252) { return parent.tagName === node; } return false; @@ -5899,99 +5907,99 @@ var ts; ts.isJSXTagName = isJSXTagName; function isPartOfExpression(node) { switch (node.kind) { - case 98: - case 96: - case 94: - case 100: - case 85: - case 11: - case 176: + case 99: + case 97: + case 95: + case 101: + case 86: + case 12: case 177: case 178: case 179: case 180: case 181: case 182: - case 201: case 183: case 202: case 184: + case 203: case 185: - case 198: case 186: - case 189: + case 199: case 187: + case 190: case 188: - case 191: + case 189: case 192: case 193: case 194: - case 197: case 195: - case 12: - case 199: - case 248: - case 249: + case 198: case 196: - case 190: - case 203: + case 13: + case 200: + case 249: + case 250: + case 197: + case 191: + case 204: return true; - case 142: - while (node.parent.kind === 142) { + case 143: + while (node.parent.kind === 143) { node = node.parent; } - return node.parent.kind === 161 || isJSXTagName(node); - case 70: - if (node.parent.kind === 161 || isJSXTagName(node)) { + return node.parent.kind === 162 || isJSXTagName(node); + case 71: + if (node.parent.kind === 162 || isJSXTagName(node)) { return true; } case 8: case 9: - case 98: + case 99: var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 263: - case 260: - case 175: + case 264: + case 261: + case 176: return parent.initializer === node; - case 209: case 210: case 211: case 212: - case 218: + case 213: case 219: case 220: - case 256: - case 222: - case 220: + case 221: + case 257: + case 223: + case 221: return parent.expression === node; - case 213: + case 214: var forStatement = parent; - return (forStatement.initializer === node && forStatement.initializer.kind !== 226) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 227) || forStatement.condition === node || forStatement.incrementor === node; - case 214: case 215: + case 216: var forInStatement = parent; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 227) || forInStatement.expression === node; - case 183: - case 201: + case 184: + case 202: return node === parent.expression; - case 204: + case 205: return node === parent.expression; - case 143: + case 144: return node === parent.expression; - case 146: + case 147: + case 256: case 255: - case 254: - case 262: + case 263: return true; - case 200: + case 201: return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent); default: if (isPartOfExpression(parent)) { @@ -6009,7 +6017,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind === 247; + return node.kind === 237 && node.moduleReference.kind === 248; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -6018,7 +6026,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind !== 247; + return node.kind === 237 && node.moduleReference.kind !== 248; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -6030,18 +6038,18 @@ var ts; } ts.isInJavaScriptFile = isInJavaScriptFile; function isRequireCall(callExpression, checkArgumentIsStringLiteral) { - if (callExpression.kind !== 180) { + if (callExpression.kind !== 181) { return false; } var _a = callExpression, expression = _a.expression, args = _a.arguments; - if (expression.kind !== 70 || expression.text !== "require") { + if (expression.kind !== 71 || expression.text !== "require") { return false; } if (args.length !== 1) { return false; } var arg = args[0]; - return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12; + return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 13; } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -6049,9 +6057,9 @@ var ts; } ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote; function isDeclarationOfFunctionOrClassExpression(s) { - if (s.valueDeclaration && s.valueDeclaration.kind === 225) { + if (s.valueDeclaration && s.valueDeclaration.kind === 226) { var declaration = s.valueDeclaration; - return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198); + return declaration.initializer && (declaration.initializer.kind === 186 || declaration.initializer.kind === 199); } return false; } @@ -6076,11 +6084,11 @@ var ts; return 0; } var expr = expression; - if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) { + if (expr.operatorToken.kind !== 58 || expr.left.kind !== 179) { return 0; } var lhs = expr.left; - if (lhs.expression.kind === 70) { + if (lhs.expression.kind === 71) { var lhsId = lhs.expression; if (lhsId.text === "exports") { return 1; @@ -6092,12 +6100,12 @@ var ts; return 5; } } - else if (lhs.expression.kind === 98) { + else if (lhs.expression.kind === 99) { return 4; } - else if (lhs.expression.kind === 178) { + else if (lhs.expression.kind === 179) { var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 70) { + if (innerPropertyAccess.expression.kind === 71) { var innerPropertyAccessIdentifier = innerPropertyAccess.expression; if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { return 1; @@ -6111,35 +6119,35 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 237) { + if (node.kind === 238) { return node.moduleSpecifier; } - if (node.kind === 236) { + if (node.kind === 237) { var reference = node.moduleReference; - if (reference.kind === 247) { + if (reference.kind === 248) { return reference.expression; } } - if (node.kind === 243) { + if (node.kind === 244) { return node.moduleSpecifier; } - if (node.kind === 232 && node.name.kind === 9) { + if (node.kind === 233 && node.name.kind === 9) { return node.name; } } ts.getExternalModuleName = getExternalModuleName; function getNamespaceDeclarationNode(node) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 240) { return importClause.namedBindings; } } ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode; function isDefaultImport(node) { - return node.kind === 237 + return node.kind === 238 && node.importClause && !!node.importClause.name; } @@ -6147,13 +6155,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 145: + case 146: + case 151: case 150: - case 149: + case 262: case 261: - case 260: + case 149: case 148: - case 147: return node.questionToken !== undefined; } } @@ -6161,9 +6169,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 278 && + return node.kind === 279 && node.parameters.length > 0 && - node.parameters[0].type.kind === 280; + node.parameters[0].type.kind === 281; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getCommentsFromJSDoc(node) { @@ -6171,7 +6179,7 @@ var ts; } ts.getCommentsFromJSDoc = getCommentsFromJSDoc; function hasJSDocParameterTags(node) { - var parameterTags = getJSDocTags(node, 285); + var parameterTags = getJSDocTags(node, 286); return parameterTags && parameterTags.length > 0; } ts.hasJSDocParameterTags = hasJSDocParameterTags; @@ -6181,7 +6189,7 @@ var ts; var result = []; for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) { var doc = docs_1[_i]; - if (doc.kind === 285) { + if (doc.kind === 286) { if (doc.kind === kind) { result.push(doc); } @@ -6210,9 +6218,9 @@ var ts; var parent = node.parent; var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) && parent.initializer === node && - parent.parent.parent.kind === 207; + parent.parent.parent.kind === 208; var isVariableOfVariableDeclarationStatement = isVariableLike(node) && - parent.parent.kind === 207; + parent.parent.kind === 208; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent : isVariableOfVariableDeclarationStatement ? parent.parent : undefined; @@ -6220,19 +6228,19 @@ var ts; getJSDocsWorker(variableStatementNode); } var isSourceOfAssignmentExpressionStatement = parent && parent.parent && - parent.kind === 193 && - parent.operatorToken.kind === 57 && - parent.parent.kind === 209; + parent.kind === 194 && + parent.operatorToken.kind === 58 && + parent.parent.kind === 210; if (isSourceOfAssignmentExpressionStatement) { getJSDocsWorker(parent.parent); } - var isModuleDeclaration = node.kind === 232 && - parent && parent.kind === 232; - var isPropertyAssignmentExpression = parent && parent.kind === 260; + var isModuleDeclaration = node.kind === 233 && + parent && parent.kind === 233; + var isPropertyAssignmentExpression = parent && parent.kind === 261; if (isModuleDeclaration || isPropertyAssignmentExpression) { getJSDocsWorker(parent); } - if (node.kind === 145) { + if (node.kind === 146) { cache = ts.concatenate(cache, getJSDocParameterTags(node)); } if (isVariableLike(node) && node.initializer) { @@ -6247,17 +6255,17 @@ var ts; return undefined; } var func = param.parent; - var tags = getJSDocTags(func, 285); + var tags = getJSDocTags(func, 286); if (!param.name) { var i = func.parameters.indexOf(param); - var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; }); + var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; }); if (paramTags && 0 <= i && i < paramTags.length) { return [paramTags[i]]; } } - else if (param.name.kind === 70) { + else if (param.name.kind === 71) { var name_1 = param.name.text; - return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; }); + return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; }); } else { return undefined; @@ -6265,8 +6273,8 @@ var ts; } ts.getJSDocParameterTags = getJSDocParameterTags; function getJSDocType(node) { - var tag = getFirstJSDocTag(node, 287); - if (!tag && node.kind === 145) { + var tag = getFirstJSDocTag(node, 288); + if (!tag && node.kind === 146) { var paramTags = getJSDocParameterTags(node); if (paramTags) { tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; }); @@ -6276,15 +6284,15 @@ var ts; } ts.getJSDocType = getJSDocType; function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, 284); + return getFirstJSDocTag(node, 285); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, 286); + return getFirstJSDocTag(node, 287); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, 288); + return getFirstJSDocTag(node, 289); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function hasRestParameter(s) { @@ -6297,8 +6305,8 @@ var ts; ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { if (node && (node.flags & 65536)) { - if (node.type && node.type.kind === 279 || - ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) { + if (node.type && node.type.kind === 280 || + ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 280; })) { return true; } } @@ -6313,30 +6321,30 @@ var ts; var parent = node.parent; while (true) { switch (parent.kind) { - case 193: + case 194: var binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? - binaryOperator === 57 ? 1 : 2 : + binaryOperator === 58 ? 1 : 2 : 0; - case 191: case 192: + case 193: var unaryOperator = parent.operator; - return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0; - case 214: + return unaryOperator === 43 || unaryOperator === 44 ? 2 : 0; case 215: + case 216: return parent.initializer === node ? 1 : 0; - case 184: - case 176: - case 197: + case 185: + case 177: + case 198: node = parent; break; - case 261: + case 262: if (parent.name !== node) { return 0; } node = parent.parent; break; - case 260: + case 261: if (parent.name === node) { return 0; } @@ -6354,14 +6362,14 @@ var ts; } ts.isAssignmentTarget = isAssignmentTarget; function isDeleteTarget(node) { - if (node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 179 && node.kind !== 180) { return false; } node = node.parent; - while (node && node.kind === 184) { + while (node && node.kind === 185) { node = node.parent; } - return node && node.kind === 187; + return node && node.kind === 188; } ts.isDeleteTarget = isDeleteTarget; function isNodeDescendantOf(node, ancestor) { @@ -6375,7 +6383,7 @@ var ts; ts.isNodeDescendantOf = isNodeDescendantOf; function isInAmbientContext(node) { while (node) { - if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) { + if (hasModifier(node, 2) || (node.kind === 265 && node.isDeclarationFile)) { return true; } node = node.parent; @@ -6384,11 +6392,11 @@ var ts; } ts.isInAmbientContext = isInAmbientContext; function isDeclarationName(name) { - if (name.kind !== 70 && name.kind !== 9 && name.kind !== 8) { + if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) { return false; } var parent = name.parent; - if (parent.kind === 241 || parent.kind === 245) { + if (parent.kind === 242 || parent.kind === 246) { if (parent.propertyName) { return true; } @@ -6401,48 +6409,48 @@ var ts; ts.isDeclarationName = isDeclarationName; function isLiteralComputedPropertyDeclarationName(node) { return (node.kind === 9 || node.kind === 8) && - node.parent.kind === 143 && + node.parent.kind === 144 && isDeclaration(node.parent.parent); } ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 152: case 153: - case 263: - case 260: - case 178: + case 154: + case 264: + case 261: + case 179: return parent.name === node; - case 142: + case 143: if (parent.right === node) { - while (parent.kind === 142) { + while (parent.kind === 143) { parent = parent.parent; } - return parent.kind === 161; + return parent.kind === 162; } return false; - case 175: - case 241: + case 176: + case 242: return parent.propertyName === node; - case 245: + case 246: return true; } return false; } ts.isIdentifierName = isIdentifierName; function isAliasSymbolDeclaration(node) { - return node.kind === 236 || - node.kind === 235 || - node.kind === 238 && !!node.name || - node.kind === 239 || - node.kind === 241 || - node.kind === 245 || - node.kind === 242 && exportAssignmentIsAlias(node); + return node.kind === 237 || + node.kind === 236 || + node.kind === 239 && !!node.name || + node.kind === 240 || + node.kind === 242 || + node.kind === 246 || + node.kind === 243 && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function exportAssignmentIsAlias(node) { @@ -6450,17 +6458,17 @@ var ts; } ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 107); + var heritageClause = getHeritageClause(node.heritageClauses, 108); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause ? heritageClause.types : undefined; } ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; @@ -6528,7 +6536,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 71 <= token && token <= 141; + return 72 <= token && token <= 142; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -6538,13 +6546,13 @@ var ts; function getFunctionFlags(node) { var flags = 0; switch (node.kind) { - case 227: - case 185: - case 150: + case 228: + case 186: + case 151: if (node.asteriskToken) { flags |= 1; } - case 186: + case 187: if (hasModifier(node, 256)) { flags |= 2; } @@ -6558,10 +6566,10 @@ var ts; ts.getFunctionFlags = getFunctionFlags; function isAsyncFunction(node) { switch (node.kind) { - case 227: - case 185: + case 228: case 186: - case 150: + case 187: + case 151: return node.body !== undefined && node.asteriskToken === undefined && hasModifier(node, 256); @@ -6584,7 +6592,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 143 && + return name.kind === 144 && !isStringOrNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } @@ -6594,10 +6602,10 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) { + if (name.kind === 71 || name.kind === 9 || name.kind === 8 || name.kind === 146) { return name.text; } - if (name.kind === 143) { + if (name.kind === 144) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -6615,7 +6623,7 @@ var ts; } ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; function isESSymbolIdentifier(node) { - return node.kind === 70 && node.text === "Symbol"; + return node.kind === 71 && node.text === "Symbol"; } ts.isESSymbolIdentifier = isESSymbolIdentifier; function isPushOrUnshiftIdentifier(node) { @@ -6624,17 +6632,17 @@ var ts; ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier; function isModifierKind(token) { switch (token) { - case 116: - case 119: - case 75: - case 123: - case 78: - case 83: - case 113: - case 111: - case 112: - case 130: + case 117: + case 120: + case 76: + case 124: + case 79: + case 84: case 114: + case 112: + case 113: + case 131: + case 115: return true; } return false; @@ -6642,11 +6650,11 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 145; + return root.kind === 146; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 175) { + while (node.kind === 176) { node = node.parent.parent; } return node; @@ -6654,15 +6662,15 @@ var ts; ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(node) { var kind = node.kind; - return kind === 151 - || kind === 185 - || kind === 227 + return kind === 152 || kind === 186 - || kind === 150 - || kind === 152 + || kind === 228 + || kind === 187 + || kind === 151 || kind === 153 - || kind === 232 - || kind === 264; + || kind === 154 + || kind === 233 + || kind === 265; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function nodeIsSynthesized(node) { @@ -6671,7 +6679,7 @@ var ts; } ts.nodeIsSynthesized = nodeIsSynthesized; function getOriginalSourceFileOrBundle(sourceFileOrBundle) { - if (sourceFileOrBundle.kind === 265) { + if (sourceFileOrBundle.kind === 266) { return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile)); } return getOriginalSourceFile(sourceFileOrBundle); @@ -6691,38 +6699,38 @@ var ts; ts.getOriginalNodeId = getOriginalNodeId; function getExpressionAssociativity(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorAssociativity(expression.kind, operator, hasArguments); } ts.getExpressionAssociativity = getExpressionAssociativity; function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 181: + case 182: return hasArguments ? 0 : 1; - case 191: - case 188: + case 192: case 189: - case 187: case 190: - case 194: - case 196: + case 188: + case 191: + case 195: + case 197: return 1; - case 193: + case 194: switch (operator) { - case 39: - case 57: + case 40: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 1; } } @@ -6731,15 +6739,15 @@ var ts; ts.getOperatorAssociativity = getOperatorAssociativity; function getExpressionPrecedence(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorPrecedence(expression.kind, operator, hasArguments); } ts.getExpressionPrecedence = getExpressionPrecedence; function getOperator(expression) { - if (expression.kind === 193) { + if (expression.kind === 194) { return expression.operatorToken.kind; } - else if (expression.kind === 191 || expression.kind === 192) { + else if (expression.kind === 192 || expression.kind === 193) { return expression.operator; } else { @@ -6749,106 +6757,106 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 98: - case 96: - case 70: - case 94: - case 100: - case 85: + case 99: + case 97: + case 71: + case 95: + case 101: + case 86: case 8: case 9: - case 176: case 177: - case 185: + case 178: case 186: - case 198: - case 248: + case 187: + case 199: case 249: - case 11: + case 250: case 12: - case 195: - case 184: - case 199: + case 13: + case 196: + case 185: + case 200: return 19; - case 182: - case 178: + case 183: case 179: + case 180: return 18; - case 181: + case 182: return hasArguments ? 18 : 17; - case 180: + case 181: return 17; - case 192: + case 193: return 16; - case 191: - case 188: + case 192: case 189: - case 187: case 190: + case 188: + case 191: return 15; - case 193: + case 194: switch (operatorKind) { - case 50: case 51: + case 52: return 15; - case 39: - case 38: case 40: + case 39: case 41: + case 42: return 14; - case 36: case 37: + case 38: return 13; - case 44: case 45: case 46: + case 47: return 12; - case 26: - case 29: - case 28: + case 27: case 30: - case 91: + case 29: + case 31: case 92: + case 93: return 11; - case 31: - case 33: case 32: case 34: + case 33: + case 35: return 10; - case 47: + case 48: return 9; - case 49: + case 50: return 8; - case 48: + case 49: return 7; - case 52: - return 6; case 53: + return 6; + case 54: return 5; - case 57: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 3; - case 25: + case 26: return 0; default: return -1; } - case 194: + case 195: return 4; - case 196: - return 2; case 197: + return 2; + case 198: return 1; default: return -1; @@ -7164,7 +7172,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 151 && nodeIsPresent(member.body)) { + if (member.kind === 152 && nodeIsPresent(member.body)) { return member; } }); @@ -7191,11 +7199,11 @@ var ts; } ts.parameterIsThisKeyword = parameterIsThisKeyword; function isThisIdentifier(node) { - return node && node.kind === 70 && identifierIsThisKeyword(node); + return node && node.kind === 71 && identifierIsThisKeyword(node); } ts.isThisIdentifier = isThisIdentifier; function identifierIsThisKeyword(id) { - return id.originalKeywordKind === 98; + return id.originalKeywordKind === 99; } ts.identifierIsThisKeyword = identifierIsThisKeyword; function getAllAccessorDeclarations(declarations, accessor) { @@ -7205,10 +7213,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 152) { + if (accessor.kind === 153) { getAccessor = accessor; } - else if (accessor.kind === 153) { + else if (accessor.kind === 154) { setAccessor = accessor; } else { @@ -7217,7 +7225,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 152 || member.kind === 153) + if ((member.kind === 153 || member.kind === 154) && hasModifier(member, 32) === hasModifier(accessor, 32)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -7228,10 +7236,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 152 && !getAccessor) { + if (member.kind === 153 && !getAccessor) { getAccessor = member; } - if (member.kind === 153 && !setAccessor) { + if (member.kind === 154 && !setAccessor) { setAccessor = member; } } @@ -7414,7 +7422,7 @@ var ts; flags |= modifierToFlag(modifier.kind); } } - if (node.flags & 4 || (node.kind === 70 && node.isInJSDocNamespace)) { + if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) { flags |= 1; } node.modifierFlagsCache = flags | 536870912; @@ -7423,34 +7431,34 @@ var ts; ts.getModifierFlags = getModifierFlags; function modifierToFlag(token) { switch (token) { - case 114: return 32; - case 113: return 4; - case 112: return 16; - case 111: return 8; - case 116: return 128; - case 83: return 1; - case 123: return 2; - case 75: return 2048; - case 78: return 512; - case 119: return 256; - case 130: return 64; + case 115: return 32; + case 114: return 4; + case 113: return 16; + case 112: return 8; + case 117: return 128; + case 84: return 1; + case 124: return 2; + case 76: return 2048; + case 79: return 512; + case 120: return 256; + case 131: return 64; } return 0; } ts.modifierToFlag = modifierToFlag; function isLogicalOperator(token) { - return token === 53 - || token === 52 - || token === 50; + return token === 54 + || token === 53 + || token === 51; } ts.isLogicalOperator = isLogicalOperator; function isAssignmentOperator(token) { - return token >= 57 && token <= 69; + return token >= 58 && token <= 70; } ts.isAssignmentOperator = isAssignmentOperator; function tryGetClassExtendingExpressionWithTypeArguments(node) { - if (node.kind === 200 && - node.parent.token === 84 && + if (node.kind === 201 && + node.parent.token === 85 && isClassLike(node.parent.parent)) { return node.parent.parent; } @@ -7459,7 +7467,7 @@ var ts; function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment - ? node.operatorToken.kind === 57 + ? node.operatorToken.kind === 58 : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } @@ -7467,8 +7475,8 @@ var ts; function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { var kind = node.left.kind; - return kind === 177 - || kind === 176; + return kind === 178 + || kind === 177; } return false; } @@ -7478,7 +7486,7 @@ var ts; } ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 70) { + if (node.kind === 71) { return true; } else if (isPropertyAccessExpression(node)) { @@ -7493,31 +7501,31 @@ var ts; } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; function isExpressionWithTypeArgumentsInClassImplementsClause(node) { - return node.kind === 200 + return node.kind === 201 && isEntityNameExpression(node.expression) && node.parent - && node.parent.token === 107 + && node.parent.token === 108 && node.parent.parent && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause; function isEntityNameExpression(node) { - return node.kind === 70 || - node.kind === 178 && isEntityNameExpression(node.expression); + return node.kind === 71 || + node.kind === 179 && isEntityNameExpression(node.expression); } ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 142 && node.parent.right === node) || - (node.parent.kind === 178 && node.parent.name === node); + return (node.parent.kind === 143 && node.parent.right === node) || + (node.parent.kind === 179 && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteral(expression) { - return expression.kind === 177 && + return expression.kind === 178 && expression.properties.length === 0; } ts.isEmptyObjectLiteral = isEmptyObjectLiteral; function isEmptyArrayLiteral(expression) { - return expression.kind === 176 && + return expression.kind === 177 && expression.elements.length === 0; } ts.isEmptyArrayLiteral = isEmptyArrayLiteral; @@ -7609,49 +7617,49 @@ var ts; var kind = node.kind; if (kind === 9 || kind === 8 - || kind === 11 || kind === 12 - || kind === 70 - || kind === 98 - || kind === 96 - || kind === 100 - || kind === 85 - || kind === 94) { + || kind === 13 + || kind === 71 + || kind === 99 + || kind === 97 + || kind === 101 + || kind === 86 + || kind === 95) { return true; } - else if (kind === 178) { + else if (kind === 179) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 179) { + else if (kind === 180) { return isSimpleExpressionWorker(node.expression, depth + 1) && isSimpleExpressionWorker(node.argumentExpression, depth + 1); } - else if (kind === 191 - || kind === 192) { + else if (kind === 192 + || kind === 193) { return isSimpleExpressionWorker(node.operand, depth + 1); } - else if (kind === 193) { - return node.operatorToken.kind !== 39 + else if (kind === 194) { + return node.operatorToken.kind !== 40 && isSimpleExpressionWorker(node.left, depth + 1) && isSimpleExpressionWorker(node.right, depth + 1); } - else if (kind === 194) { + else if (kind === 195) { return isSimpleExpressionWorker(node.condition, depth + 1) && isSimpleExpressionWorker(node.whenTrue, depth + 1) && isSimpleExpressionWorker(node.whenFalse, depth + 1); } - else if (kind === 189 - || kind === 188 - || kind === 187) { + else if (kind === 190 + || kind === 189 + || kind === 188) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 176) { + else if (kind === 177) { return node.elements.length === 0; } - else if (kind === 177) { + else if (kind === 178) { return node.properties.length === 0; } - else if (kind === 180) { + else if (kind === 181) { if (!isSimpleExpressionWorker(node.expression, depth + 1)) { return false; } @@ -7772,8 +7780,8 @@ var ts; var parseNode = ts.getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 231: case 232: + case 233: return parseNode === parseNode.parent.name; } } @@ -7791,7 +7799,7 @@ var ts; if (node.symbol) { for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 228 && declaration !== node) { + if (declaration.kind === 229 && declaration !== node) { return true; } } @@ -7809,15 +7817,15 @@ var ts; } ts.isNodeArray = isNodeArray; function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 12; + return node.kind === 13; } ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral; function isLiteralKind(kind) { - return 8 <= kind && kind <= 12; + return 8 <= kind && kind <= 13; } ts.isLiteralKind = isLiteralKind; function isTextualLiteralKind(kind) { - return kind === 9 || kind === 12; + return kind === 9 || kind === 13; } ts.isTextualLiteralKind = isTextualLiteralKind; function isLiteralExpression(node) { @@ -7825,25 +7833,25 @@ var ts; } ts.isLiteralExpression = isLiteralExpression; function isTemplateLiteralKind(kind) { - return 12 <= kind && kind <= 15; + return 13 <= kind && kind <= 16; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isTemplateHead(node) { - return node.kind === 13; + return node.kind === 14; } ts.isTemplateHead = isTemplateHead; function isTemplateMiddleOrTemplateTail(node) { var kind = node.kind; - return kind === 14 - || kind === 15; + return kind === 15 + || kind === 16; } ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail; function isIdentifier(node) { - return node.kind === 70; + return node.kind === 71; } ts.isIdentifier = isIdentifier; function isVoidExpression(node) { - return node.kind === 189; + return node.kind === 190; } ts.isVoidExpression = isVoidExpression; function isGeneratedIdentifier(node) { @@ -7855,135 +7863,135 @@ var ts; } ts.isModifier = isModifier; function isQualifiedName(node) { - return node.kind === 142; + return node.kind === 143; } ts.isQualifiedName = isQualifiedName; function isComputedPropertyName(node) { - return node.kind === 143; + return node.kind === 144; } ts.isComputedPropertyName = isComputedPropertyName; function isEntityName(node) { var kind = node.kind; - return kind === 142 - || kind === 70; + return kind === 143 + || kind === 71; } ts.isEntityName = isEntityName; function isPropertyName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9 || kind === 8 - || kind === 143; + || kind === 144; } ts.isPropertyName = isPropertyName; function isModuleName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9; } ts.isModuleName = isModuleName; function isBindingName(node) { var kind = node.kind; - return kind === 70 - || kind === 173 - || kind === 174; + return kind === 71 + || kind === 174 + || kind === 175; } ts.isBindingName = isBindingName; function isTypeParameter(node) { - return node.kind === 144; + return node.kind === 145; } ts.isTypeParameter = isTypeParameter; function isParameter(node) { - return node.kind === 145; + return node.kind === 146; } ts.isParameter = isParameter; function isDecorator(node) { - return node.kind === 146; + return node.kind === 147; } ts.isDecorator = isDecorator; function isMethodDeclaration(node) { - return node.kind === 150; + return node.kind === 151; } ts.isMethodDeclaration = isMethodDeclaration; function isClassElement(node) { var kind = node.kind; - return kind === 151 - || kind === 148 - || kind === 150 - || kind === 152 + return kind === 152 + || kind === 149 + || kind === 151 || kind === 153 - || kind === 156 - || kind === 205; + || kind === 154 + || kind === 157 + || kind === 206; } ts.isClassElement = isClassElement; function isObjectLiteralElementLike(node) { var kind = node.kind; - return kind === 260 - || kind === 261 + return kind === 261 || kind === 262 - || kind === 150 - || kind === 152 + || kind === 263 + || kind === 151 || kind === 153 - || kind === 246; + || kind === 154 + || kind === 247; } ts.isObjectLiteralElementLike = isObjectLiteralElementLike; function isTypeNodeKind(kind) { - return (kind >= 157 && kind <= 172) - || kind === 118 - || kind === 132 + return (kind >= 158 && kind <= 173) + || kind === 119 || kind === 133 - || kind === 121 - || kind === 135 + || kind === 134 + || kind === 122 || kind === 136 - || kind === 98 - || kind === 104 - || kind === 138 - || kind === 94 - || kind === 129 - || kind === 200; + || kind === 137 + || kind === 99 + || kind === 105 + || kind === 139 + || kind === 95 + || kind === 130 + || kind === 201; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } ts.isTypeNode = isTypeNode; function isArrayBindingPattern(node) { - return node.kind === 174; + return node.kind === 175; } ts.isArrayBindingPattern = isArrayBindingPattern; function isObjectBindingPattern(node) { - return node.kind === 173; + return node.kind === 174; } ts.isObjectBindingPattern = isObjectBindingPattern; function isBindingPattern(node) { if (node) { var kind = node.kind; - return kind === 174 - || kind === 173; + return kind === 175 + || kind === 174; } return false; } ts.isBindingPattern = isBindingPattern; function isAssignmentPattern(node) { var kind = node.kind; - return kind === 176 - || kind === 177; + return kind === 177 + || kind === 178; } ts.isAssignmentPattern = isAssignmentPattern; function isBindingElement(node) { - return node.kind === 175; + return node.kind === 176; } ts.isBindingElement = isBindingElement; function isArrayBindingElement(node) { var kind = node.kind; - return kind === 175 - || kind === 199; + return kind === 176 + || kind === 200; } ts.isArrayBindingElement = isArrayBindingElement; function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 225: - case 145: - case 175: + case 226: + case 146: + case 176: return true; } return false; @@ -7996,8 +8004,8 @@ var ts; ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern; function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 173: - case 177: + case 174: + case 178: return true; } return false; @@ -8005,100 +8013,100 @@ var ts; ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern; function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: + case 175: + case 177: return true; } return false; } ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern; function isArrayLiteralExpression(node) { - return node.kind === 176; + return node.kind === 177; } ts.isArrayLiteralExpression = isArrayLiteralExpression; function isObjectLiteralExpression(node) { - return node.kind === 177; + return node.kind === 178; } ts.isObjectLiteralExpression = isObjectLiteralExpression; function isPropertyAccessExpression(node) { - return node.kind === 178; + return node.kind === 179; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isPropertyAccessOrQualifiedName(node) { var kind = node.kind; - return kind === 178 - || kind === 142; + return kind === 179 + || kind === 143; } ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName; function isElementAccessExpression(node) { - return node.kind === 179; + return node.kind === 180; } ts.isElementAccessExpression = isElementAccessExpression; function isBinaryExpression(node) { - return node.kind === 193; + return node.kind === 194; } ts.isBinaryExpression = isBinaryExpression; function isConditionalExpression(node) { - return node.kind === 194; + return node.kind === 195; } ts.isConditionalExpression = isConditionalExpression; function isCallExpression(node) { - return node.kind === 180; + return node.kind === 181; } ts.isCallExpression = isCallExpression; function isTemplateLiteral(node) { var kind = node.kind; - return kind === 195 - || kind === 12; + return kind === 196 + || kind === 13; } ts.isTemplateLiteral = isTemplateLiteral; function isSpreadExpression(node) { - return node.kind === 197; + return node.kind === 198; } ts.isSpreadExpression = isSpreadExpression; function isExpressionWithTypeArguments(node) { - return node.kind === 200; + return node.kind === 201; } ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments; function isLeftHandSideExpressionKind(kind) { - return kind === 178 - || kind === 179 - || kind === 181 + return kind === 179 || kind === 180 - || kind === 248 - || kind === 249 || kind === 182 - || kind === 176 - || kind === 184 + || kind === 181 + || kind === 249 + || kind === 250 + || kind === 183 || kind === 177 - || kind === 198 || kind === 185 - || kind === 70 - || kind === 11 + || kind === 178 + || kind === 199 + || kind === 186 + || kind === 71 + || kind === 12 || kind === 8 || kind === 9 - || kind === 12 - || kind === 195 - || kind === 85 - || kind === 94 - || kind === 98 - || kind === 100 - || kind === 96 - || kind === 202 - || kind === 203; + || kind === 13 + || kind === 196 + || kind === 86 + || kind === 95 + || kind === 99 + || kind === 101 + || kind === 97 + || kind === 203 + || kind === 204; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind); } ts.isLeftHandSideExpression = isLeftHandSideExpression; function isUnaryExpressionKind(kind) { - return kind === 191 - || kind === 192 - || kind === 187 + return kind === 192 + || kind === 193 || kind === 188 || kind === 189 || kind === 190 - || kind === 183 + || kind === 191 + || kind === 184 || isLeftHandSideExpressionKind(kind); } function isUnaryExpression(node) { @@ -8106,13 +8114,13 @@ var ts; } ts.isUnaryExpression = isUnaryExpression; function isExpressionKind(kind) { - return kind === 194 - || kind === 196 - || kind === 186 - || kind === 193 + return kind === 195 || kind === 197 - || kind === 201 - || kind === 199 + || kind === 187 + || kind === 194 + || kind === 198 + || kind === 202 + || kind === 200 || isUnaryExpressionKind(kind); } function isExpression(node) { @@ -8121,16 +8129,16 @@ var ts; ts.isExpression = isExpression; function isAssertionExpression(node) { var kind = node.kind; - return kind === 183 - || kind === 201; + return kind === 184 + || kind === 202; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 295; + return node.kind === 296; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 294; + return node.kind === 295; } ts.isNotEmittedStatement = isNotEmittedStatement; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -8139,15 +8147,15 @@ var ts; } ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode; function isOmittedExpression(node) { - return node.kind === 199; + return node.kind === 200; } ts.isOmittedExpression = isOmittedExpression; function isTemplateSpan(node) { - return node.kind === 204; + return node.kind === 205; } ts.isTemplateSpan = isTemplateSpan; function isBlock(node) { - return node.kind === 206; + return node.kind === 207; } ts.isBlock = isBlock; function isConciseBody(node) { @@ -8165,135 +8173,135 @@ var ts; } ts.isForInitializer = isForInitializer; function isVariableDeclaration(node) { - return node.kind === 225; + return node.kind === 226; } ts.isVariableDeclaration = isVariableDeclaration; function isVariableDeclarationList(node) { - return node.kind === 226; + return node.kind === 227; } ts.isVariableDeclarationList = isVariableDeclarationList; function isCaseBlock(node) { - return node.kind === 234; + return node.kind === 235; } ts.isCaseBlock = isCaseBlock; function isModuleBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232 - || kind === 70; + return kind === 234 + || kind === 233 + || kind === 71; } ts.isModuleBody = isModuleBody; function isNamespaceBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232; + return kind === 234 + || kind === 233; } ts.isNamespaceBody = isNamespaceBody; function isJSDocNamespaceBody(node) { var kind = node.kind; - return kind === 70 - || kind === 232; + return kind === 71 + || kind === 233; } ts.isJSDocNamespaceBody = isJSDocNamespaceBody; function isImportEqualsDeclaration(node) { - return node.kind === 236; + return node.kind === 237; } ts.isImportEqualsDeclaration = isImportEqualsDeclaration; function isImportClause(node) { - return node.kind === 238; + return node.kind === 239; } ts.isImportClause = isImportClause; function isNamedImportBindings(node) { var kind = node.kind; - return kind === 240 - || kind === 239; + return kind === 241 + || kind === 240; } ts.isNamedImportBindings = isNamedImportBindings; function isImportSpecifier(node) { - return node.kind === 241; + return node.kind === 242; } ts.isImportSpecifier = isImportSpecifier; function isNamedExports(node) { - return node.kind === 244; + return node.kind === 245; } ts.isNamedExports = isNamedExports; function isExportSpecifier(node) { - return node.kind === 245; + return node.kind === 246; } ts.isExportSpecifier = isExportSpecifier; function isModuleOrEnumDeclaration(node) { - return node.kind === 232 || node.kind === 231; + return node.kind === 233 || node.kind === 232; } ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration; function isDeclarationKind(kind) { - return kind === 186 - || kind === 175 + return kind === 187 + || kind === 176 + || kind === 229 + || kind === 199 + || kind === 152 + || kind === 232 + || kind === 264 + || kind === 246 || kind === 228 - || kind === 198 + || kind === 186 + || kind === 153 + || kind === 239 + || kind === 237 + || kind === 242 + || kind === 230 + || kind === 253 || kind === 151 - || kind === 231 - || kind === 263 - || kind === 245 - || kind === 227 - || kind === 185 - || kind === 152 - || kind === 238 - || kind === 236 - || kind === 241 - || kind === 229 - || kind === 252 || kind === 150 + || kind === 233 + || kind === 236 + || kind === 240 + || kind === 146 + || kind === 261 || kind === 149 - || kind === 232 - || kind === 235 - || kind === 239 - || kind === 145 - || kind === 260 || kind === 148 - || kind === 147 - || kind === 153 - || kind === 261 - || kind === 230 - || kind === 144 - || kind === 225 - || kind === 289; + || kind === 154 + || kind === 262 + || kind === 231 + || kind === 145 + || kind === 226 + || kind === 290; } function isDeclarationStatementKind(kind) { - return kind === 227 - || kind === 246 - || kind === 228 + return kind === 228 + || kind === 247 || kind === 229 || kind === 230 || kind === 231 || kind === 232 + || kind === 233 + || kind === 238 || kind === 237 - || kind === 236 + || kind === 244 || kind === 243 - || kind === 242 - || kind === 235; + || kind === 236; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 217 + return kind === 218 + || kind === 217 + || kind === 225 + || kind === 212 + || kind === 210 + || kind === 209 + || kind === 215 || kind === 216 - || kind === 224 + || kind === 214 || kind === 211 - || kind === 209 + || kind === 222 + || kind === 219 + || kind === 221 + || kind === 223 + || kind === 224 || kind === 208 - || kind === 214 - || kind === 215 || kind === 213 - || kind === 210 - || kind === 221 - || kind === 218 || kind === 220 - || kind === 222 - || kind === 223 - || kind === 207 - || kind === 212 - || kind === 219 - || kind === 294 - || kind === 297 - || kind === 296; + || kind === 295 + || kind === 298 + || kind === 297; } function isDeclaration(node) { return isDeclarationKind(node.kind); @@ -8311,98 +8319,98 @@ var ts; var kind = node.kind; return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) - || kind === 206; + || kind === 207; } ts.isStatement = isStatement; function isModuleReference(node) { var kind = node.kind; - return kind === 247 - || kind === 142 - || kind === 70; + return kind === 248 + || kind === 143 + || kind === 71; } ts.isModuleReference = isModuleReference; function isJsxOpeningElement(node) { - return node.kind === 250; + return node.kind === 251; } ts.isJsxOpeningElement = isJsxOpeningElement; function isJsxClosingElement(node) { - return node.kind === 251; + return node.kind === 252; } ts.isJsxClosingElement = isJsxClosingElement; function isJsxTagNameExpression(node) { var kind = node.kind; - return kind === 98 - || kind === 70 - || kind === 178; + return kind === 99 + || kind === 71 + || kind === 179; } ts.isJsxTagNameExpression = isJsxTagNameExpression; function isJsxChild(node) { var kind = node.kind; - return kind === 248 - || kind === 255 - || kind === 249 + return kind === 249 + || kind === 256 + || kind === 250 || kind === 10; } ts.isJsxChild = isJsxChild; function isJsxAttributes(node) { var kind = node.kind; - return kind === 253; + return kind === 254; } ts.isJsxAttributes = isJsxAttributes; function isJsxAttributeLike(node) { var kind = node.kind; - return kind === 252 - || kind === 254; + return kind === 253 + || kind === 255; } ts.isJsxAttributeLike = isJsxAttributeLike; function isJsxSpreadAttribute(node) { - return node.kind === 254; + return node.kind === 255; } ts.isJsxSpreadAttribute = isJsxSpreadAttribute; function isJsxAttribute(node) { - return node.kind === 252; + return node.kind === 253; } ts.isJsxAttribute = isJsxAttribute; function isStringLiteralOrJsxExpression(node) { var kind = node.kind; return kind === 9 - || kind === 255; + || kind === 256; } ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression; function isJsxOpeningLikeElement(node) { var kind = node.kind; - return kind === 250 - || kind === 249; + return kind === 251 + || kind === 250; } ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement; function isCaseOrDefaultClause(node) { var kind = node.kind; - return kind === 256 - || kind === 257; + return kind === 257 + || kind === 258; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isHeritageClause(node) { - return node.kind === 258; + return node.kind === 259; } ts.isHeritageClause = isHeritageClause; function isCatchClause(node) { - return node.kind === 259; + return node.kind === 260; } ts.isCatchClause = isCatchClause; function isPropertyAssignment(node) { - return node.kind === 260; + return node.kind === 261; } ts.isPropertyAssignment = isPropertyAssignment; function isShorthandPropertyAssignment(node) { - return node.kind === 261; + return node.kind === 262; } ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment; function isEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } ts.isEnumMember = isEnumMember; function isSourceFile(node) { - return node.kind === 264; + return node.kind === 265; } ts.isSourceFile = isSourceFile; function isWatchSet(options) { @@ -8542,9 +8550,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 144) { + if (d && d.kind === 145) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) { return current; } } @@ -8552,11 +8560,11 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent); + return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 175 || ts.isBindingPattern(node))) { + while (node && (node.kind === 176 || ts.isBindingPattern(node))) { node = node.parent; } return node; @@ -8564,14 +8572,14 @@ var ts; function getCombinedModifierFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = ts.getModifierFlags(node); - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= ts.getModifierFlags(node); node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= ts.getModifierFlags(node); } return flags; @@ -8580,14 +8588,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= node.flags; } return flags; @@ -8748,7 +8756,7 @@ var ts; return node; } function createIdentifier(text) { - var node = createSynthesizedNode(70); + var node = createSynthesizedNode(71); node.text = ts.escapeIdentifier(text); node.originalKeywordKind = text ? ts.stringToToken(text) : 0; node.autoGenerateKind = 0; @@ -8798,27 +8806,27 @@ var ts; } ts.createToken = createToken; function createSuper() { - return createSynthesizedNode(96); + return createSynthesizedNode(97); } ts.createSuper = createSuper; function createThis() { - return createSynthesizedNode(98); + return createSynthesizedNode(99); } ts.createThis = createThis; function createNull() { - return createSynthesizedNode(94); + return createSynthesizedNode(95); } ts.createNull = createNull; function createTrue() { - return createSynthesizedNode(100); + return createSynthesizedNode(101); } ts.createTrue = createTrue; function createFalse() { - return createSynthesizedNode(85); + return createSynthesizedNode(86); } ts.createFalse = createFalse; function createQualifiedName(left, right) { - var node = createSynthesizedNode(142); + var node = createSynthesizedNode(143); node.left = left; node.right = asName(right); return node; @@ -8832,7 +8840,7 @@ var ts; } ts.updateQualifiedName = updateQualifiedName; function createComputedPropertyName(expression) { - var node = createSynthesizedNode(143); + var node = createSynthesizedNode(144); node.expression = expression; return node; } @@ -8859,7 +8867,7 @@ var ts; : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(159, typeParameters, parameters, type); + return createSignatureDeclaration(160, typeParameters, parameters, type); } ts.createFunctionTypeNode = createFunctionTypeNode; function updateFunctionTypeNode(node, typeParameters, parameters, type) { @@ -8867,7 +8875,7 @@ var ts; } ts.updateFunctionTypeNode = updateFunctionTypeNode; function createConstructorTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(160, typeParameters, parameters, type); + return createSignatureDeclaration(161, typeParameters, parameters, type); } ts.createConstructorTypeNode = createConstructorTypeNode; function updateConstructorTypeNode(node, typeParameters, parameters, type) { @@ -8875,7 +8883,7 @@ var ts; } ts.updateConstructorTypeNode = updateConstructorTypeNode; function createCallSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(154, typeParameters, parameters, type); + return createSignatureDeclaration(155, typeParameters, parameters, type); } ts.createCallSignatureDeclaration = createCallSignatureDeclaration; function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { @@ -8883,7 +8891,7 @@ var ts; } ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration; function createConstructSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(155, typeParameters, parameters, type); + return createSignatureDeclaration(156, typeParameters, parameters, type); } ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration; function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { @@ -8891,7 +8899,7 @@ var ts; } ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration; function createMethodSignature(typeParameters, parameters, type, name, questionToken) { - var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type); + var methodSignature = createSignatureDeclaration(150, typeParameters, parameters, type); methodSignature.name = asName(name); methodSignature.questionToken = questionToken; return methodSignature; @@ -8912,11 +8920,11 @@ var ts; } ts.createKeywordTypeNode = createKeywordTypeNode; function createThisTypeNode() { - return createSynthesizedNode(168); + return createSynthesizedNode(169); } ts.createThisTypeNode = createThisTypeNode; function createLiteralTypeNode(literal) { - var literalTypeNode = createSynthesizedNode(172); + var literalTypeNode = createSynthesizedNode(173); literalTypeNode.literal = literal; return literalTypeNode; } @@ -8928,7 +8936,7 @@ var ts; } ts.updateLiteralTypeNode = updateLiteralTypeNode; function createTypeReferenceNode(typeName, typeArguments) { - var typeReference = createSynthesizedNode(158); + var typeReference = createSynthesizedNode(159); typeReference.typeName = asName(typeName); typeReference.typeArguments = asNodeArray(typeArguments); return typeReference; @@ -8942,7 +8950,7 @@ var ts; } ts.updateTypeReferenceNode = updateTypeReferenceNode; function createTypePredicateNode(parameterName, type) { - var typePredicateNode = createSynthesizedNode(157); + var typePredicateNode = createSynthesizedNode(158); typePredicateNode.parameterName = asName(parameterName); typePredicateNode.type = type; return typePredicateNode; @@ -8956,7 +8964,7 @@ var ts; } ts.updateTypePredicateNode = updateTypePredicateNode; function createTypeQueryNode(exprName) { - var typeQueryNode = createSynthesizedNode(161); + var typeQueryNode = createSynthesizedNode(162); typeQueryNode.exprName = exprName; return typeQueryNode; } @@ -8966,7 +8974,7 @@ var ts; } ts.updateTypeQueryNode = updateTypeQueryNode; function createArrayTypeNode(elementType) { - var arrayTypeNode = createSynthesizedNode(163); + var arrayTypeNode = createSynthesizedNode(164); arrayTypeNode.elementType = elementType; return arrayTypeNode; } @@ -8990,7 +8998,7 @@ var ts; } ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode; function createTypeLiteralNode(members) { - var typeLiteralNode = createSynthesizedNode(162); + var typeLiteralNode = createSynthesizedNode(163); typeLiteralNode.members = createNodeArray(members); return typeLiteralNode; } @@ -9002,7 +9010,7 @@ var ts; } ts.updateTypeLiteralNode = updateTypeLiteralNode; function createTupleTypeNode(elementTypes) { - var tupleTypeNode = createSynthesizedNode(164); + var tupleTypeNode = createSynthesizedNode(165); tupleTypeNode.elementTypes = createNodeArray(elementTypes); return tupleTypeNode; } @@ -9014,7 +9022,7 @@ var ts; } ts.updateTypleTypeNode = updateTypleTypeNode; function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) { - var mappedTypeNode = createSynthesizedNode(171); + var mappedTypeNode = createSynthesizedNode(172); mappedTypeNode.readonlyToken = readonlyToken; mappedTypeNode.typeParameter = typeParameter; mappedTypeNode.questionToken = questionToken; @@ -9032,8 +9040,8 @@ var ts; } ts.updateMappedTypeNode = updateMappedTypeNode; function createTypeOperatorNode(type) { - var typeOperatorNode = createSynthesizedNode(169); - typeOperatorNode.operator = 126; + var typeOperatorNode = createSynthesizedNode(170); + typeOperatorNode.operator = 127; typeOperatorNode.type = type; return typeOperatorNode; } @@ -9043,7 +9051,7 @@ var ts; } ts.updateTypeOperatorNode = updateTypeOperatorNode; function createIndexedAccessTypeNode(objectType, indexType) { - var indexedAccessTypeNode = createSynthesizedNode(170); + var indexedAccessTypeNode = createSynthesizedNode(171); indexedAccessTypeNode.objectType = objectType; indexedAccessTypeNode.indexType = indexType; return indexedAccessTypeNode; @@ -9057,7 +9065,7 @@ var ts; } ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode; function createTypeParameterDeclaration(name, constraint, defaultType) { - var typeParameter = createSynthesizedNode(144); + var typeParameter = createSynthesizedNode(145); typeParameter.name = asName(name); typeParameter.constraint = constraint; typeParameter.default = defaultType; @@ -9073,7 +9081,7 @@ var ts; } ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration; function createPropertySignature(name, questionToken, type, initializer) { - var propertySignature = createSynthesizedNode(147); + var propertySignature = createSynthesizedNode(148); propertySignature.name = asName(name); propertySignature.questionToken = questionToken; propertySignature.type = type; @@ -9091,7 +9099,7 @@ var ts; } ts.updatePropertySignature = updatePropertySignature; function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) { - var indexSignature = createSynthesizedNode(156); + var indexSignature = createSynthesizedNode(157); indexSignature.decorators = asNodeArray(decorators); indexSignature.modifiers = asNodeArray(modifiers); indexSignature.parameters = createNodeArray(parameters); @@ -9109,7 +9117,7 @@ var ts; } ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration; function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - var node = createSynthesizedNode(145); + var node = createSynthesizedNode(146); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; @@ -9133,7 +9141,7 @@ var ts; } ts.updateParameter = updateParameter; function createDecorator(expression) { - var node = createSynthesizedNode(146); + var node = createSynthesizedNode(147); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -9145,7 +9153,7 @@ var ts; } ts.updateDecorator = updateDecorator; function createProperty(decorators, modifiers, name, questionToken, type, initializer) { - var node = createSynthesizedNode(148); + var node = createSynthesizedNode(149); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -9166,7 +9174,7 @@ var ts; } ts.updateProperty = updateProperty; function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(150); + var node = createSynthesizedNode(151); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -9193,7 +9201,7 @@ var ts; } ts.updateMethod = updateMethod; function createConstructor(decorators, modifiers, parameters, body) { - var node = createSynthesizedNode(151); + var node = createSynthesizedNode(152); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.typeParameters = undefined; @@ -9213,7 +9221,7 @@ var ts; } ts.updateConstructor = updateConstructor; function createGetAccessor(decorators, modifiers, name, parameters, type, body) { - var node = createSynthesizedNode(152); + var node = createSynthesizedNode(153); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -9236,7 +9244,7 @@ var ts; } ts.updateGetAccessor = updateGetAccessor; function createSetAccessor(decorators, modifiers, name, parameters, body) { - var node = createSynthesizedNode(153); + var node = createSynthesizedNode(154); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -9257,7 +9265,7 @@ var ts; } ts.updateSetAccessor = updateSetAccessor; function createObjectBindingPattern(elements) { - var node = createSynthesizedNode(173); + var node = createSynthesizedNode(174); node.elements = createNodeArray(elements); return node; } @@ -9269,7 +9277,7 @@ var ts; } ts.updateObjectBindingPattern = updateObjectBindingPattern; function createArrayBindingPattern(elements) { - var node = createSynthesizedNode(174); + var node = createSynthesizedNode(175); node.elements = createNodeArray(elements); return node; } @@ -9281,7 +9289,7 @@ var ts; } ts.updateArrayBindingPattern = updateArrayBindingPattern; function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - var node = createSynthesizedNode(175); + var node = createSynthesizedNode(176); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -9299,7 +9307,7 @@ var ts; } ts.updateBindingElement = updateBindingElement; function createArrayLiteral(elements, multiLine) { - var node = createSynthesizedNode(176); + var node = createSynthesizedNode(177); node.elements = ts.parenthesizeListElements(createNodeArray(elements)); if (multiLine) { node.multiLine = true; @@ -9314,7 +9322,7 @@ var ts; } ts.updateArrayLiteral = updateArrayLiteral; function createObjectLiteral(properties, multiLine) { - var node = createSynthesizedNode(177); + var node = createSynthesizedNode(178); node.properties = createNodeArray(properties); if (multiLine) { node.multiLine = true; @@ -9329,7 +9337,7 @@ var ts; } ts.updateObjectLiteral = updateObjectLiteral; function createPropertyAccess(expression, name) { - var node = createSynthesizedNode(178); + var node = createSynthesizedNode(179); node.expression = ts.parenthesizeForAccess(expression); node.name = asName(name); setEmitFlags(node, 65536); @@ -9344,7 +9352,7 @@ var ts; } ts.updatePropertyAccess = updatePropertyAccess; function createElementAccess(expression, index) { - var node = createSynthesizedNode(179); + var node = createSynthesizedNode(180); node.expression = ts.parenthesizeForAccess(expression); node.argumentExpression = asExpression(index); return node; @@ -9358,7 +9366,7 @@ var ts; } ts.updateElementAccess = updateElementAccess; function createCall(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(180); + var node = createSynthesizedNode(181); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray)); @@ -9374,7 +9382,7 @@ var ts; } ts.updateCall = updateCall; function createNew(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(181); + var node = createSynthesizedNode(182); node.expression = ts.parenthesizeForNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined; @@ -9390,7 +9398,7 @@ var ts; } ts.updateNew = updateNew; function createTaggedTemplate(tag, template) { - var node = createSynthesizedNode(182); + var node = createSynthesizedNode(183); node.tag = ts.parenthesizeForAccess(tag); node.template = template; return node; @@ -9404,7 +9412,7 @@ var ts; } ts.updateTaggedTemplate = updateTaggedTemplate; function createTypeAssertion(type, expression) { - var node = createSynthesizedNode(183); + var node = createSynthesizedNode(184); node.type = type; node.expression = ts.parenthesizePrefixOperand(expression); return node; @@ -9418,7 +9426,7 @@ var ts; } ts.updateTypeAssertion = updateTypeAssertion; function createParen(expression) { - var node = createSynthesizedNode(184); + var node = createSynthesizedNode(185); node.expression = expression; return node; } @@ -9430,7 +9438,7 @@ var ts; } ts.updateParen = updateParen; function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(185); + var node = createSynthesizedNode(186); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -9454,12 +9462,12 @@ var ts; } ts.updateFunctionExpression = updateFunctionExpression; function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - var node = createSynthesizedNode(186); + var node = createSynthesizedNode(187); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35); + node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(36); node.body = ts.parenthesizeConciseBody(body); return node; } @@ -9475,7 +9483,7 @@ var ts; } ts.updateArrowFunction = updateArrowFunction; function createDelete(expression) { - var node = createSynthesizedNode(187); + var node = createSynthesizedNode(188); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -9487,7 +9495,7 @@ var ts; } ts.updateDelete = updateDelete; function createTypeOf(expression) { - var node = createSynthesizedNode(188); + var node = createSynthesizedNode(189); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -9499,7 +9507,7 @@ var ts; } ts.updateTypeOf = updateTypeOf; function createVoid(expression) { - var node = createSynthesizedNode(189); + var node = createSynthesizedNode(190); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -9511,7 +9519,7 @@ var ts; } ts.updateVoid = updateVoid; function createAwait(expression) { - var node = createSynthesizedNode(190); + var node = createSynthesizedNode(191); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -9523,7 +9531,7 @@ var ts; } ts.updateAwait = updateAwait; function createPrefix(operator, operand) { - var node = createSynthesizedNode(191); + var node = createSynthesizedNode(192); node.operator = operator; node.operand = ts.parenthesizePrefixOperand(operand); return node; @@ -9536,7 +9544,7 @@ var ts; } ts.updatePrefix = updatePrefix; function createPostfix(operand, operator) { - var node = createSynthesizedNode(192); + var node = createSynthesizedNode(193); node.operand = ts.parenthesizePostfixOperand(operand); node.operator = operator; return node; @@ -9549,7 +9557,7 @@ var ts; } ts.updatePostfix = updatePostfix; function createBinary(left, operator, right) { - var node = createSynthesizedNode(193); + var node = createSynthesizedNode(194); var operatorToken = asToken(operator); var operatorKind = operatorToken.kind; node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined); @@ -9566,11 +9574,11 @@ var ts; } ts.updateBinary = updateBinary; function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) { - var node = createSynthesizedNode(194); + var node = createSynthesizedNode(195); node.condition = ts.parenthesizeForConditionalHead(condition); - node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54); + node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(55); node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue); - node.colonToken = whenFalse ? colonToken : createToken(55); + node.colonToken = whenFalse ? colonToken : createToken(56); node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse); return node; } @@ -9584,7 +9592,7 @@ var ts; } ts.updateConditional = updateConditional; function createTemplateExpression(head, templateSpans) { - var node = createSynthesizedNode(195); + var node = createSynthesizedNode(196); node.head = head; node.templateSpans = createNodeArray(templateSpans); return node; @@ -9598,9 +9606,9 @@ var ts; } ts.updateTemplateExpression = updateTemplateExpression; function createYield(asteriskTokenOrExpression, expression) { - var node = createSynthesizedNode(196); - node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined; - node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression; + var node = createSynthesizedNode(197); + node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 39 ? asteriskTokenOrExpression : undefined; + node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 39 ? asteriskTokenOrExpression : expression; return node; } ts.createYield = createYield; @@ -9612,7 +9620,7 @@ var ts; } ts.updateYield = updateYield; function createSpread(expression) { - var node = createSynthesizedNode(197); + var node = createSynthesizedNode(198); node.expression = ts.parenthesizeExpressionForList(expression); return node; } @@ -9624,7 +9632,7 @@ var ts; } ts.updateSpread = updateSpread; function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(198); + var node = createSynthesizedNode(199); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -9645,11 +9653,11 @@ var ts; } ts.updateClassExpression = updateClassExpression; function createOmittedExpression() { - return createSynthesizedNode(199); + return createSynthesizedNode(200); } ts.createOmittedExpression = createOmittedExpression; function createExpressionWithTypeArguments(typeArguments, expression) { - var node = createSynthesizedNode(200); + var node = createSynthesizedNode(201); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); return node; @@ -9663,7 +9671,7 @@ var ts; } ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments; function createAsExpression(expression, type) { - var node = createSynthesizedNode(201); + var node = createSynthesizedNode(202); node.expression = expression; node.type = type; return node; @@ -9677,7 +9685,7 @@ var ts; } ts.updateAsExpression = updateAsExpression; function createNonNullExpression(expression) { - var node = createSynthesizedNode(202); + var node = createSynthesizedNode(203); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -9689,7 +9697,7 @@ var ts; } ts.updateNonNullExpression = updateNonNullExpression; function createTemplateSpan(expression, literal) { - var node = createSynthesizedNode(204); + var node = createSynthesizedNode(205); node.expression = expression; node.literal = literal; return node; @@ -9703,7 +9711,7 @@ var ts; } ts.updateTemplateSpan = updateTemplateSpan; function createBlock(statements, multiLine) { - var block = createSynthesizedNode(206); + var block = createSynthesizedNode(207); block.statements = createNodeArray(statements); if (multiLine) block.multiLine = multiLine; @@ -9717,7 +9725,7 @@ var ts; } ts.updateBlock = updateBlock; function createVariableStatement(modifiers, declarationList) { - var node = createSynthesizedNode(207); + var node = createSynthesizedNode(208); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; @@ -9732,7 +9740,7 @@ var ts; } ts.updateVariableStatement = updateVariableStatement; function createVariableDeclarationList(declarations, flags) { - var node = createSynthesizedNode(226); + var node = createSynthesizedNode(227); node.flags |= flags; node.declarations = createNodeArray(declarations); return node; @@ -9745,7 +9753,7 @@ var ts; } ts.updateVariableDeclarationList = updateVariableDeclarationList; function createVariableDeclaration(name, type, initializer) { - var node = createSynthesizedNode(225); + var node = createSynthesizedNode(226); node.name = asName(name); node.type = type; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -9761,11 +9769,11 @@ var ts; } ts.updateVariableDeclaration = updateVariableDeclaration; function createEmptyStatement() { - return createSynthesizedNode(208); + return createSynthesizedNode(209); } ts.createEmptyStatement = createEmptyStatement; function createStatement(expression) { - var node = createSynthesizedNode(209); + var node = createSynthesizedNode(210); node.expression = ts.parenthesizeExpressionForExpressionStatement(expression); return node; } @@ -9777,7 +9785,7 @@ var ts; } ts.updateStatement = updateStatement; function createIf(expression, thenStatement, elseStatement) { - var node = createSynthesizedNode(210); + var node = createSynthesizedNode(211); node.expression = expression; node.thenStatement = thenStatement; node.elseStatement = elseStatement; @@ -9793,7 +9801,7 @@ var ts; } ts.updateIf = updateIf; function createDo(statement, expression) { - var node = createSynthesizedNode(211); + var node = createSynthesizedNode(212); node.statement = statement; node.expression = expression; return node; @@ -9807,7 +9815,7 @@ var ts; } ts.updateDo = updateDo; function createWhile(expression, statement) { - var node = createSynthesizedNode(212); + var node = createSynthesizedNode(213); node.expression = expression; node.statement = statement; return node; @@ -9821,7 +9829,7 @@ var ts; } ts.updateWhile = updateWhile; function createFor(initializer, condition, incrementor, statement) { - var node = createSynthesizedNode(213); + var node = createSynthesizedNode(214); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -9839,7 +9847,7 @@ var ts; } ts.updateFor = updateFor; function createForIn(initializer, expression, statement) { - var node = createSynthesizedNode(214); + var node = createSynthesizedNode(215); node.initializer = initializer; node.expression = expression; node.statement = statement; @@ -9855,7 +9863,7 @@ var ts; } ts.updateForIn = updateForIn; function createForOf(awaitModifier, initializer, expression, statement) { - var node = createSynthesizedNode(215); + var node = createSynthesizedNode(216); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; @@ -9873,7 +9881,7 @@ var ts; } ts.updateForOf = updateForOf; function createContinue(label) { - var node = createSynthesizedNode(216); + var node = createSynthesizedNode(217); node.label = asName(label); return node; } @@ -9885,7 +9893,7 @@ var ts; } ts.updateContinue = updateContinue; function createBreak(label) { - var node = createSynthesizedNode(217); + var node = createSynthesizedNode(218); node.label = asName(label); return node; } @@ -9897,7 +9905,7 @@ var ts; } ts.updateBreak = updateBreak; function createReturn(expression) { - var node = createSynthesizedNode(218); + var node = createSynthesizedNode(219); node.expression = expression; return node; } @@ -9909,7 +9917,7 @@ var ts; } ts.updateReturn = updateReturn; function createWith(expression, statement) { - var node = createSynthesizedNode(219); + var node = createSynthesizedNode(220); node.expression = expression; node.statement = statement; return node; @@ -9923,7 +9931,7 @@ var ts; } ts.updateWith = updateWith; function createSwitch(expression, caseBlock) { - var node = createSynthesizedNode(220); + var node = createSynthesizedNode(221); node.expression = ts.parenthesizeExpressionForList(expression); node.caseBlock = caseBlock; return node; @@ -9937,7 +9945,7 @@ var ts; } ts.updateSwitch = updateSwitch; function createLabel(label, statement) { - var node = createSynthesizedNode(221); + var node = createSynthesizedNode(222); node.label = asName(label); node.statement = statement; return node; @@ -9951,7 +9959,7 @@ var ts; } ts.updateLabel = updateLabel; function createThrow(expression) { - var node = createSynthesizedNode(222); + var node = createSynthesizedNode(223); node.expression = expression; return node; } @@ -9963,7 +9971,7 @@ var ts; } ts.updateThrow = updateThrow; function createTry(tryBlock, catchClause, finallyBlock) { - var node = createSynthesizedNode(223); + var node = createSynthesizedNode(224); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -9979,7 +9987,7 @@ var ts; } ts.updateTry = updateTry; function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(227); + var node = createSynthesizedNode(228); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -10005,7 +10013,7 @@ var ts; } ts.updateFunctionDeclaration = updateFunctionDeclaration; function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(228); + var node = createSynthesizedNode(229); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -10027,7 +10035,7 @@ var ts; } ts.updateClassDeclaration = updateClassDeclaration; function createEnumDeclaration(decorators, modifiers, name, members) { - var node = createSynthesizedNode(231); + var node = createSynthesizedNode(232); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -10045,7 +10053,7 @@ var ts; } ts.updateEnumDeclaration = updateEnumDeclaration; function createModuleDeclaration(decorators, modifiers, name, body, flags) { - var node = createSynthesizedNode(232); + var node = createSynthesizedNode(233); node.flags |= flags; node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); @@ -10064,7 +10072,7 @@ var ts; } ts.updateModuleDeclaration = updateModuleDeclaration; function createModuleBlock(statements) { - var node = createSynthesizedNode(233); + var node = createSynthesizedNode(234); node.statements = createNodeArray(statements); return node; } @@ -10076,7 +10084,7 @@ var ts; } ts.updateModuleBlock = updateModuleBlock; function createCaseBlock(clauses) { - var node = createSynthesizedNode(234); + var node = createSynthesizedNode(235); node.clauses = createNodeArray(clauses); return node; } @@ -10088,7 +10096,7 @@ var ts; } ts.updateCaseBlock = updateCaseBlock; function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) { - var node = createSynthesizedNode(236); + var node = createSynthesizedNode(237); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -10106,7 +10114,7 @@ var ts; } ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration; function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) { - var node = createSynthesizedNode(237); + var node = createSynthesizedNode(238); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; @@ -10123,7 +10131,7 @@ var ts; } ts.updateImportDeclaration = updateImportDeclaration; function createImportClause(name, namedBindings) { - var node = createSynthesizedNode(238); + var node = createSynthesizedNode(239); node.name = name; node.namedBindings = namedBindings; return node; @@ -10137,7 +10145,7 @@ var ts; } ts.updateImportClause = updateImportClause; function createNamespaceImport(name) { - var node = createSynthesizedNode(239); + var node = createSynthesizedNode(240); node.name = name; return node; } @@ -10149,7 +10157,7 @@ var ts; } ts.updateNamespaceImport = updateNamespaceImport; function createNamedImports(elements) { - var node = createSynthesizedNode(240); + var node = createSynthesizedNode(241); node.elements = createNodeArray(elements); return node; } @@ -10161,7 +10169,7 @@ var ts; } ts.updateNamedImports = updateNamedImports; function createImportSpecifier(propertyName, name) { - var node = createSynthesizedNode(241); + var node = createSynthesizedNode(242); node.propertyName = propertyName; node.name = name; return node; @@ -10175,7 +10183,7 @@ var ts; } ts.updateImportSpecifier = updateImportSpecifier; function createExportAssignment(decorators, modifiers, isExportEquals, expression) { - var node = createSynthesizedNode(242); + var node = createSynthesizedNode(243); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; @@ -10192,7 +10200,7 @@ var ts; } ts.updateExportAssignment = updateExportAssignment; function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) { - var node = createSynthesizedNode(243); + var node = createSynthesizedNode(244); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.exportClause = exportClause; @@ -10210,7 +10218,7 @@ var ts; } ts.updateExportDeclaration = updateExportDeclaration; function createNamedExports(elements) { - var node = createSynthesizedNode(244); + var node = createSynthesizedNode(245); node.elements = createNodeArray(elements); return node; } @@ -10222,7 +10230,7 @@ var ts; } ts.updateNamedExports = updateNamedExports; function createExportSpecifier(propertyName, name) { - var node = createSynthesizedNode(245); + var node = createSynthesizedNode(246); node.propertyName = asName(propertyName); node.name = asName(name); return node; @@ -10236,7 +10244,7 @@ var ts; } ts.updateExportSpecifier = updateExportSpecifier; function createExternalModuleReference(expression) { - var node = createSynthesizedNode(247); + var node = createSynthesizedNode(248); node.expression = expression; return node; } @@ -10248,7 +10256,7 @@ var ts; } ts.updateExternalModuleReference = updateExternalModuleReference; function createJsxElement(openingElement, children, closingElement) { - var node = createSynthesizedNode(248); + var node = createSynthesizedNode(249); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -10264,7 +10272,7 @@ var ts; } ts.updateJsxElement = updateJsxElement; function createJsxSelfClosingElement(tagName, attributes) { - var node = createSynthesizedNode(249); + var node = createSynthesizedNode(250); node.tagName = tagName; node.attributes = attributes; return node; @@ -10278,7 +10286,7 @@ var ts; } ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement; function createJsxOpeningElement(tagName, attributes) { - var node = createSynthesizedNode(250); + var node = createSynthesizedNode(251); node.tagName = tagName; node.attributes = attributes; return node; @@ -10292,7 +10300,7 @@ var ts; } ts.updateJsxOpeningElement = updateJsxOpeningElement; function createJsxClosingElement(tagName) { - var node = createSynthesizedNode(251); + var node = createSynthesizedNode(252); node.tagName = tagName; return node; } @@ -10304,7 +10312,7 @@ var ts; } ts.updateJsxClosingElement = updateJsxClosingElement; function createJsxAttributes(properties) { - var jsxAttributes = createSynthesizedNode(253); + var jsxAttributes = createSynthesizedNode(254); jsxAttributes.properties = createNodeArray(properties); return jsxAttributes; } @@ -10317,7 +10325,7 @@ var ts; } ts.updateJsxAttributes = updateJsxAttributes; function createJsxAttribute(name, initializer) { - var node = createSynthesizedNode(252); + var node = createSynthesizedNode(253); node.name = name; node.initializer = initializer; return node; @@ -10331,7 +10339,7 @@ var ts; } ts.updateJsxAttribute = updateJsxAttribute; function createJsxSpreadAttribute(expression) { - var node = createSynthesizedNode(254); + var node = createSynthesizedNode(255); node.expression = expression; return node; } @@ -10343,7 +10351,7 @@ var ts; } ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute; function createJsxExpression(dotDotDotToken, expression) { - var node = createSynthesizedNode(255); + var node = createSynthesizedNode(256); node.dotDotDotToken = dotDotDotToken; node.expression = expression; return node; @@ -10356,7 +10364,7 @@ var ts; } ts.updateJsxExpression = updateJsxExpression; function createHeritageClause(token, types) { - var node = createSynthesizedNode(258); + var node = createSynthesizedNode(259); node.token = token; node.types = createNodeArray(types); return node; @@ -10370,7 +10378,7 @@ var ts; } ts.updateHeritageClause = updateHeritageClause; function createCaseClause(expression, statements) { - var node = createSynthesizedNode(256); + var node = createSynthesizedNode(257); node.expression = ts.parenthesizeExpressionForList(expression); node.statements = createNodeArray(statements); return node; @@ -10384,7 +10392,7 @@ var ts; } ts.updateCaseClause = updateCaseClause; function createDefaultClause(statements) { - var node = createSynthesizedNode(257); + var node = createSynthesizedNode(258); node.statements = createNodeArray(statements); return node; } @@ -10397,7 +10405,7 @@ var ts; } ts.updateDefaultClause = updateDefaultClause; function createCatchClause(variableDeclaration, block) { - var node = createSynthesizedNode(259); + var node = createSynthesizedNode(260); node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration; node.block = block; return node; @@ -10411,7 +10419,7 @@ var ts; } ts.updateCatchClause = updateCatchClause; function createPropertyAssignment(name, initializer) { - var node = createSynthesizedNode(260); + var node = createSynthesizedNode(261); node.name = asName(name); node.questionToken = undefined; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -10426,7 +10434,7 @@ var ts; } ts.updatePropertyAssignment = updatePropertyAssignment; function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - var node = createSynthesizedNode(261); + var node = createSynthesizedNode(262); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined; return node; @@ -10440,7 +10448,7 @@ var ts; } ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment; function createSpreadAssignment(expression) { - var node = createSynthesizedNode(262); + var node = createSynthesizedNode(263); node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined; return node; } @@ -10453,7 +10461,7 @@ var ts; } ts.updateSpreadAssignment = updateSpreadAssignment; function createEnumMember(name, initializer) { - var node = createSynthesizedNode(263); + var node = createSynthesizedNode(264); node.name = asName(name); node.initializer = initializer && ts.parenthesizeExpressionForList(initializer); return node; @@ -10468,7 +10476,7 @@ var ts; ts.updateEnumMember = updateEnumMember; function updateSourceFileNode(node, statements) { if (node.statements !== statements) { - var updated = createSynthesizedNode(264); + var updated = createSynthesizedNode(265); updated.flags |= node.flags; updated.statements = createNodeArray(statements); updated.endOfFileToken = node.endOfFileToken; @@ -10537,28 +10545,28 @@ var ts; } ts.getMutableClone = getMutableClone; function createNotEmittedStatement(original) { - var node = createSynthesizedNode(294); + var node = createSynthesizedNode(295); node.original = original; setTextRange(node, original); return node; } ts.createNotEmittedStatement = createNotEmittedStatement; function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(297); + var node = createSynthesizedNode(298); node.emitNode = {}; node.original = original; return node; } ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker; function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(296); + var node = createSynthesizedNode(297); node.emitNode = {}; node.original = original; return node; } ts.createMergeDeclarationMarker = createMergeDeclarationMarker; function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(295); + var node = createSynthesizedNode(296); node.expression = expression; node.original = original; setTextRange(node, original); @@ -10573,7 +10581,7 @@ var ts; } ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function createBundle(sourceFiles) { - var node = ts.createNode(265); + var node = ts.createNode(266); node.sourceFiles = sourceFiles; return node; } @@ -10586,47 +10594,47 @@ var ts; } ts.updateBundle = updateBundle; function createComma(left, right) { - return createBinary(left, 25, right); + return createBinary(left, 26, right); } ts.createComma = createComma; function createLessThan(left, right) { - return createBinary(left, 26, right); + return createBinary(left, 27, right); } ts.createLessThan = createLessThan; function createAssignment(left, right) { - return createBinary(left, 57, right); + return createBinary(left, 58, right); } ts.createAssignment = createAssignment; function createStrictEquality(left, right) { - return createBinary(left, 33, right); + return createBinary(left, 34, right); } ts.createStrictEquality = createStrictEquality; function createStrictInequality(left, right) { - return createBinary(left, 34, right); + return createBinary(left, 35, right); } ts.createStrictInequality = createStrictInequality; function createAdd(left, right) { - return createBinary(left, 36, right); + return createBinary(left, 37, right); } ts.createAdd = createAdd; function createSubtract(left, right) { - return createBinary(left, 37, right); + return createBinary(left, 38, right); } ts.createSubtract = createSubtract; function createPostfixIncrement(operand) { - return createPostfix(operand, 42); + return createPostfix(operand, 43); } ts.createPostfixIncrement = createPostfixIncrement; function createLogicalAnd(left, right) { - return createBinary(left, 52, right); + return createBinary(left, 53, right); } ts.createLogicalAnd = createLogicalAnd; function createLogicalOr(left, right) { - return createBinary(left, 53, right); + return createBinary(left, 54, right); } ts.createLogicalOr = createLogicalOr; function createLogicalNot(operand) { - return createPrefix(50, operand); + return createPrefix(51, operand); } ts.createLogicalNot = createLogicalNot; function createVoidZero() { @@ -10668,7 +10676,7 @@ var ts; function getOrCreateEmitNode(node) { if (!node.emitNode) { if (ts.isParseTreeNode(node)) { - if (node.kind === 264) { + if (node.kind === 265) { return node.emitNode = { annotatedNodes: [node] }; } var sourceFile = ts.getSourceFileOfNode(node); @@ -11037,7 +11045,7 @@ var ts; if (!outermostLabeledStatement) { return node; } - var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 + var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 222 ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node); if (afterRestoreLabelCallback) { @@ -11049,19 +11057,19 @@ var ts; function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { var target = skipParentheses(node); switch (target.kind) { - case 70: + case 71: return cacheIdentifiers; - case 98: + case 99: case 8: case 9: return false; - case 176: + case 177: var elements = target.elements; if (elements.length === 0) { return false; } return true; - case 177: + case 178: return target.properties.length > 0; default: return true; @@ -11075,7 +11083,7 @@ var ts; thisArg = ts.createThis(); target = callee; } - else if (callee.kind === 96) { + else if (callee.kind === 97) { thisArg = ts.createThis(); target = languageVersion < 2 ? ts.setTextRange(ts.createIdentifier("_super"), callee) @@ -11087,7 +11095,7 @@ var ts; } else { switch (callee.kind) { - case 178: { + case 179: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name); @@ -11099,7 +11107,7 @@ var ts; } break; } - case 179: { + case 180: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression); @@ -11150,14 +11158,14 @@ var ts; ts.createExpressionForPropertyName = createExpressionForPropertyName; function createExpressionForObjectLiteralElementLike(node, property, receiver) { switch (property.kind) { - case 152: case 153: + case 154: return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine); - case 260: - return createExpressionForPropertyAssignment(property, receiver); case 261: + return createExpressionForPropertyAssignment(property, receiver); + case 262: return createExpressionForShorthandPropertyAssignment(property, receiver); - case 150: + case 151: return createExpressionForMethodDeclaration(property, receiver); } } @@ -11335,7 +11343,7 @@ var ts; } ts.ensureUseStrict = ensureUseStrict; function parenthesizeConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -11346,7 +11354,7 @@ var ts; ts.parenthesizeConditionalHead = parenthesizeConditionalHead; function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { var skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 184) { + if (skipped.kind === 185) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) @@ -11355,15 +11363,15 @@ var ts; } ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand; function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator); - var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator); + var binaryOperatorPrecedence = ts.getOperatorPrecedence(194, binaryOperator); + var binaryOperatorAssociativity = ts.getOperatorAssociativity(194, binaryOperator); var emittedOperand = skipPartiallyEmittedExpressions(operand); var operandPrecedence = ts.getExpressionPrecedence(emittedOperand); switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1: if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 - && operand.kind === 196) { + && operand.kind === 197) { return false; } return true; @@ -11379,7 +11387,7 @@ var ts; if (operatorHasAssociativeProperty(binaryOperator)) { return false; } - if (binaryOperator === 36) { + if (binaryOperator === 37) { var leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0; if (ts.isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { return false; @@ -11392,17 +11400,17 @@ var ts; } } function operatorHasAssociativeProperty(binaryOperator) { - return binaryOperator === 38 + return binaryOperator === 39 + || binaryOperator === 49 || binaryOperator === 48 - || binaryOperator === 47 - || binaryOperator === 49; + || binaryOperator === 50; } function getLiteralKindOfBinaryPlusOperand(node) { node = skipPartiallyEmittedExpressions(node); if (ts.isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 193 && node.operatorToken.kind === 36) { + if (node.kind === 194 && node.operatorToken.kind === 37) { if (node.cachedLiteralKind !== undefined) { return node.cachedLiteralKind; } @@ -11417,7 +11425,7 @@ var ts; return 0; } function parenthesizeForConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -11427,7 +11435,7 @@ var ts; } ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead; function parenthesizeSubexpressionOfConditionalExpression(e) { - return e.kind === 193 && e.operatorToken.kind === 25 + return e.kind === 194 && e.operatorToken.kind === 26 ? ts.createParen(e) : e; } @@ -11435,9 +11443,9 @@ var ts; function parenthesizeForNew(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); switch (emittedExpression.kind) { - case 180: - return ts.createParen(expression); case 181: + return ts.createParen(expression); + case 182: return emittedExpression.arguments ? expression : ts.createParen(expression); @@ -11448,7 +11456,7 @@ var ts; function parenthesizeForAccess(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); if (ts.isLeftHandSideExpression(emittedExpression) - && (emittedExpression.kind !== 181 || emittedExpression.arguments)) { + && (emittedExpression.kind !== 182 || emittedExpression.arguments)) { return expression; } return ts.setTextRange(ts.createParen(expression), expression); @@ -11486,7 +11494,7 @@ var ts; function parenthesizeExpressionForList(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression); - var commaPrecedence = ts.getOperatorPrecedence(193, 25); + var commaPrecedence = ts.getOperatorPrecedence(194, 26); return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(ts.createParen(expression), expression); @@ -11497,7 +11505,7 @@ var ts; if (ts.isCallExpression(emittedExpression)) { var callee = emittedExpression.expression; var kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 185 || kind === 186) { + if (kind === 186 || kind === 187) { var mutableCall = ts.getMutableClone(emittedExpression); mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee); return recreatePartiallyEmittedExpressions(expression, mutableCall); @@ -11505,7 +11513,7 @@ var ts; } else { var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind; - if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) { + if (leftmostExpressionKind === 178 || leftmostExpressionKind === 186) { return ts.setTextRange(ts.createParen(expression), expression); } } @@ -11523,21 +11531,21 @@ var ts; function getLeftmostExpression(node) { while (true) { switch (node.kind) { - case 192: + case 193: node = node.operand; continue; - case 193: + case 194: node = node.left; continue; - case 194: + case 195: node = node.condition; continue; + case 181: case 180: case 179: - case 178: node = node.expression; continue; - case 295: + case 296: node = node.expression; continue; } @@ -11545,7 +11553,7 @@ var ts; } } function parenthesizeConciseBody(body) { - if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) { + if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 178) { return ts.setTextRange(ts.createParen(body), body); } return body; @@ -11570,7 +11578,7 @@ var ts; } ts.skipOuterExpressions = skipOuterExpressions; function skipParentheses(node) { - while (node.kind === 184) { + while (node.kind === 185) { node = node.expression; } return node; @@ -11584,7 +11592,7 @@ var ts; } ts.skipAssertions = skipAssertions; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 295) { + while (node.kind === 296) { node = node.expression; } return node; @@ -11627,10 +11635,10 @@ var ts; var name = namespaceDeclaration.name; return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name)); } - if (node.kind === 237 && node.importClause) { + if (node.kind === 238 && node.importClause) { return ts.getGeneratedNameForNode(node); } - if (node.kind === 243 && node.moduleSpecifier) { + if (node.kind === 244 && node.moduleSpecifier) { return ts.getGeneratedNameForNode(node); } return undefined; @@ -11692,11 +11700,11 @@ var ts; } if (ts.isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 260: - return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 261: - return bindingElement.name; + return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 262: + return bindingElement.name; + case 263: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return undefined; @@ -11712,11 +11720,11 @@ var ts; ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement; function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 145: - case 175: + case 146: + case 176: return bindingElement.dotDotDotToken; - case 197: - case 262: + case 198: + case 263: return bindingElement; } return undefined; @@ -11724,7 +11732,7 @@ var ts; ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement; function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 175: + case 176: if (bindingElement.propertyName) { var propertyName = bindingElement.propertyName; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -11732,7 +11740,7 @@ var ts; : propertyName; } break; - case 260: + case 261: if (bindingElement.name) { var propertyName = bindingElement.name; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -11740,7 +11748,7 @@ var ts; : propertyName; } break; - case 262: + case 263: return bindingElement.name; } var target = getTargetOfBindingOrAssignmentElement(bindingElement); @@ -11754,11 +11762,11 @@ var ts; ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 173: case 174: - case 176: - return name.elements; + case 175: case 177: + return name.elements; + case 178: return name.properties; } } @@ -11797,11 +11805,11 @@ var ts; ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement; function convertToAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: - return convertToArrayAssignmentPattern(node); - case 173: + case 175: case 177: + return convertToArrayAssignmentPattern(node); + case 174: + case 178: return convertToObjectAssignmentPattern(node); } } @@ -11847,15 +11855,15 @@ var ts; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { - case 237: + case 238: externalImports.push(node); break; - case 236: - if (node.moduleReference.kind === 247) { + case 237: + if (node.moduleReference.kind === 248) { externalImports.push(node); } break; - case 243: + case 244: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -11882,12 +11890,12 @@ var ts; } } break; - case 242: + case 243: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 207: + case 208: if (ts.hasModifier(node, 1)) { for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) { var decl = _e[_d]; @@ -11895,7 +11903,7 @@ var ts; } } break; - case 227: + case 228: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -11913,7 +11921,7 @@ var ts; } } break; - case 228: + case 229: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -11971,13 +11979,13 @@ var ts; var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 264) { + if (kind === 265) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - else if (kind === 70) { + else if (kind === 71) { return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); } - else if (kind < 142) { + else if (kind < 143) { return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); } else { @@ -12013,29 +12021,29 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 142: + case 143: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 144: + case 145: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.default) || visitNode(cbNode, node.expression); - case 261: + case 262: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 262: + case 263: return visitNode(cbNode, node.expression); - case 145: + case 146: + case 149: case 148: - case 147: - case 260: - case 225: - case 175: + case 261: + case 226: + case 176: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -12044,24 +12052,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 159: case 160: - case 154: + case 161: case 155: case 156: + case 157: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: + case 228: + case 187: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -12072,326 +12080,326 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 158: + case 159: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 157: + case 158: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 161: - return visitNode(cbNode, node.exprName); case 162: - return visitNodes(cbNodes, node.members); + return visitNode(cbNode, node.exprName); case 163: - return visitNode(cbNode, node.elementType); + return visitNodes(cbNodes, node.members); case 164: - return visitNodes(cbNodes, node.elementTypes); + return visitNode(cbNode, node.elementType); case 165: + return visitNodes(cbNodes, node.elementTypes); case 166: - return visitNodes(cbNodes, node.types); case 167: - case 169: - return visitNode(cbNode, node.type); + return visitNodes(cbNodes, node.types); + case 168: case 170: + return visitNode(cbNode, node.type); + case 171: return visitNode(cbNode, node.objectType) || visitNode(cbNode, node.indexType); - case 171: + case 172: return visitNode(cbNode, node.readonlyToken) || visitNode(cbNode, node.typeParameter) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type); - case 172: - return visitNode(cbNode, node.literal); case 173: + return visitNode(cbNode, node.literal); case 174: - return visitNodes(cbNodes, node.elements); - case 176: + case 175: return visitNodes(cbNodes, node.elements); case 177: - return visitNodes(cbNodes, node.properties); + return visitNodes(cbNodes, node.elements); case 178: + return visitNodes(cbNodes, node.properties); + case 179: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.name); - case 179: + case 180: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 180: case 181: + case 182: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 182: + case 183: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 183: + case 184: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 184: - return visitNode(cbNode, node.expression); - case 187: + case 185: return visitNode(cbNode, node.expression); case 188: return visitNode(cbNode, node.expression); case 189: return visitNode(cbNode, node.expression); - case 191: - return visitNode(cbNode, node.operand); - case 196: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); case 190: return visitNode(cbNode, node.expression); case 192: return visitNode(cbNode, node.operand); + case 197: + return visitNode(cbNode, node.asteriskToken) || + visitNode(cbNode, node.expression); + case 191: + return visitNode(cbNode, node.expression); case 193: + return visitNode(cbNode, node.operand); + case 194: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 201: + case 202: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 202: - return visitNode(cbNode, node.expression); case 203: + return visitNode(cbNode, node.expression); + case 204: return visitNode(cbNode, node.name); - case 194: + case 195: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 197: + case 198: return visitNode(cbNode, node.expression); - case 206: - case 233: + case 207: + case 234: return visitNodes(cbNodes, node.statements); - case 264: + case 265: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 207: + case 208: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 226: + case 227: return visitNodes(cbNodes, node.declarations); - case 209: - return visitNode(cbNode, node.expression); case 210: + return visitNode(cbNode, node.expression); + case 211: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 211: + case 212: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 212: + case 213: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 213: + case 214: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 214: + case 215: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 215: + case 216: return visitNode(cbNode, node.awaitModifier) || visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 216: case 217: - return visitNode(cbNode, node.label); case 218: - return visitNode(cbNode, node.expression); + return visitNode(cbNode, node.label); case 219: + return visitNode(cbNode, node.expression); + case 220: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 220: + case 221: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 234: + case 235: return visitNodes(cbNodes, node.clauses); - case 256: + case 257: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 257: + case 258: return visitNodes(cbNodes, node.statements); - case 221: + case 222: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 222: - return visitNode(cbNode, node.expression); case 223: + return visitNode(cbNode, node.expression); + case 224: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 259: + case 260: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 146: + case 147: return visitNode(cbNode, node.expression); - case 228: - case 198: + case 229: + case 199: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 229: + case 230: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 230: + case 231: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 231: + case 232: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 263: + case 264: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 232: + case 233: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 236: + case 237: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 237: + case 238: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 238: + case 239: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 235: - return visitNode(cbNode, node.name); - case 239: + case 236: return visitNode(cbNode, node.name); case 240: - case 244: + return visitNode(cbNode, node.name); + case 241: + case 245: return visitNodes(cbNodes, node.elements); - case 243: + case 244: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 241: - case 245: + case 242: + case 246: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 242: + case 243: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 195: + case 196: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 204: + case 205: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 143: + case 144: return visitNode(cbNode, node.expression); - case 258: + case 259: return visitNodes(cbNodes, node.types); - case 200: + case 201: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 247: + case 248: return visitNode(cbNode, node.expression); - case 246: + case 247: return visitNodes(cbNodes, node.decorators); - case 248: + case 249: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 249: case 250: + case 251: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.attributes); - case 253: + case 254: return visitNodes(cbNodes, node.properties); - case 252: + case 253: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 254: - return visitNode(cbNode, node.expression); case 255: + return visitNode(cbNode, node.expression); + case 256: return visitNode(cbNode, node.dotDotDotToken) || visitNode(cbNode, node.expression); - case 251: + case 252: return visitNode(cbNode, node.tagName); - case 266: + case 267: return visitNode(cbNode, node.type); - case 270: - return visitNodes(cbNodes, node.types); case 271: return visitNodes(cbNodes, node.types); - case 269: + case 272: + return visitNodes(cbNodes, node.types); + case 270: return visitNode(cbNode, node.elementType); - case 273: + case 274: return visitNode(cbNode, node.type); - case 272: + case 273: return visitNode(cbNode, node.type); - case 274: + case 275: return visitNode(cbNode, node.literal); - case 276: + case 277: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 277: - return visitNode(cbNode, node.type); case 278: + return visitNode(cbNode, node.type); + case 279: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 279: - return visitNode(cbNode, node.type); case 280: return visitNode(cbNode, node.type); case 281: return visitNode(cbNode, node.type); - case 275: + case 282: + return visitNode(cbNode, node.type); + case 276: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 282: + case 283: return visitNodes(cbNodes, node.tags); - case 285: + case 286: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 286: - return visitNode(cbNode, node.typeExpression); case 287: return visitNode(cbNode, node.typeExpression); - case 284: - return visitNode(cbNode, node.typeExpression); case 288: - return visitNodes(cbNodes, node.typeParameters); + return visitNode(cbNode, node.typeExpression); + case 285: + return visitNode(cbNode, node.typeExpression); case 289: + return visitNodes(cbNodes, node.typeParameters); + case 290: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.name) || visitNode(cbNode, node.jsDocTypeLiteral); - case 291: + case 292: return visitNodes(cbNodes, node.jsDocPropertyTags); - case 290: + case 291: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name); - case 295: + case 296: return visitNode(cbNode, node.expression); - case 292: + case 293: return visitNode(cbNode, node.literal); } } @@ -12555,7 +12563,7 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion, scriptKind) { - var sourceFile = new SourceFileConstructor(264, 0, sourceText.length); + var sourceFile = new SourceFileConstructor(265, 0, sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -12711,16 +12719,16 @@ var ts; return speculationHelper(callback, false); } function isIdentifier() { - if (token() === 70) { + if (token() === 71) { return true; } - if (token() === 115 && inYieldContext()) { + if (token() === 116 && inYieldContext()) { return false; } - if (token() === 120 && inAwaitContext()) { + if (token() === 121 && inAwaitContext()) { return false; } - return token() > 106; + return token() > 107; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } @@ -12761,20 +12769,20 @@ var ts; return finishNode(node); } function canParseSemicolon() { - if (token() === 24) { + if (token() === 25) { return true; } - return token() === 17 || token() === 1 || scanner.hasPrecedingLineBreak(); + return token() === 18 || token() === 1 || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token() === 24) { + if (token() === 25) { nextToken(); } return true; } else { - return parseExpected(24); + return parseExpected(25); } } function createNode(kind, pos) { @@ -12782,8 +12790,8 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return kind >= 142 ? new NodeConstructor(kind, pos, pos) : - kind === 70 ? new IdentifierConstructor(kind, pos, pos) : + return kind >= 143 ? new NodeConstructor(kind, pos, pos) : + kind === 71 ? new IdentifierConstructor(kind, pos, pos) : new TokenConstructor(kind, pos, pos); } function createNodeArray(elements, pos) { @@ -12828,15 +12836,15 @@ var ts; function createIdentifier(isIdentifier, diagnosticMessage) { identifierCount++; if (isIdentifier) { - var node = createNode(70); - if (token() !== 70) { + var node = createNode(71); + if (token() !== 71) { node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } - return createMissingNode(70, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); + return createMissingNode(71, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); } function parseIdentifier(diagnosticMessage) { return createIdentifier(isIdentifier(), diagnosticMessage); @@ -12853,7 +12861,7 @@ var ts; if (token() === 9 || token() === 8) { return parseLiteralNode(true); } - if (allowComputedPropertyNames && token() === 20) { + if (allowComputedPropertyNames && token() === 21) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -12868,10 +12876,10 @@ var ts; return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token()); } function parseComputedPropertyName() { - var node = createNode(143); - parseExpected(20); - node.expression = allowInAnd(parseExpression); + var node = createNode(144); parseExpected(21); + node.expression = allowInAnd(parseExpression); + parseExpected(22); return finishNode(node); } function parseContextualModifier(t) { @@ -12885,20 +12893,20 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token() === 75) { - return nextToken() === 82; + if (token() === 76) { + return nextToken() === 83; } - if (token() === 83) { + if (token() === 84) { nextToken(); - if (token() === 78) { + if (token() === 79) { return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token() !== 38 && token() !== 117 && token() !== 16 && canFollowModifier(); + return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier(); } - if (token() === 78) { + if (token() === 79) { return nextTokenIsClassOrFunctionOrAsync(); } - if (token() === 114) { + if (token() === 115) { nextToken(); return canFollowModifier(); } @@ -12908,17 +12916,17 @@ var ts; return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 20 - || token() === 16 - || token() === 38 - || token() === 23 + return token() === 21 + || token() === 17 + || token() === 39 + || token() === 24 || isLiteralPropertyName(); } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token() === 74 || token() === 88 || - (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || - (token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); + return token() === 75 || token() === 89 || + (token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || + (token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -12929,23 +12937,23 @@ var ts; case 0: case 1: case 3: - return !(token() === 24 && inErrorRecovery) && isStartOfStatement(); + return !(token() === 25 && inErrorRecovery) && isStartOfStatement(); case 2: - return token() === 72 || token() === 78; + return token() === 73 || token() === 79; case 4: return lookAhead(isTypeMemberStart); case 5: - return lookAhead(isClassMemberStart) || (token() === 24 && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 25 && !inErrorRecovery); case 6: - return token() === 20 || isLiteralPropertyName(); + return token() === 21 || isLiteralPropertyName(); case 12: - return token() === 20 || token() === 38 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 39 || token() === 24 || isLiteralPropertyName(); case 17: return isLiteralPropertyName(); case 9: - return token() === 20 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 24 || isLiteralPropertyName(); case 7: - if (token() === 16) { + if (token() === 17) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -12957,23 +12965,23 @@ var ts; case 8: return isIdentifierOrPattern(); case 10: - return token() === 25 || token() === 23 || isIdentifierOrPattern(); + return token() === 26 || token() === 24 || isIdentifierOrPattern(); case 18: return isIdentifier(); case 11: case 15: - return token() === 25 || token() === 23 || isStartOfExpression(); + return token() === 26 || token() === 24 || isStartOfExpression(); case 16: return isStartOfParameter(); case 19: case 20: - return token() === 25 || isStartOfType(); + return token() === 26 || isStartOfType(); case 21: return isHeritageClause(); case 22: return ts.tokenIsIdentifierOrKeyword(token()); case 13: - return ts.tokenIsIdentifierOrKeyword(token()) || token() === 16; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 17; case 14: return true; case 23: @@ -12986,10 +12994,10 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token() === 16); - if (nextToken() === 17) { + ts.Debug.assert(token() === 17); + if (nextToken() === 18) { var next = nextToken(); - return next === 25 || next === 16 || next === 84 || next === 107; + return next === 26 || next === 17 || next === 85 || next === 108; } return true; } @@ -13002,8 +13010,8 @@ var ts; return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 107 || - token() === 84) { + if (token() === 108 || + token() === 85) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -13025,40 +13033,40 @@ var ts; case 12: case 9: case 22: - return token() === 17; + return token() === 18; case 3: - return token() === 17 || token() === 72 || token() === 78; + return token() === 18 || token() === 73 || token() === 79; case 7: - return token() === 16 || token() === 84 || token() === 107; + return token() === 17 || token() === 85 || token() === 108; case 8: return isVariableDeclaratorListTerminator(); case 18: - return token() === 28 || token() === 18 || token() === 16 || token() === 84 || token() === 107; + return token() === 29 || token() === 19 || token() === 17 || token() === 85 || token() === 108; case 11: - return token() === 19 || token() === 24; + return token() === 20 || token() === 25; case 15: case 20: case 10: - return token() === 21; + return token() === 22; case 16: case 17: - return token() === 19 || token() === 21; + return token() === 20 || token() === 22; case 19: - return token() !== 25; + return token() !== 26; case 21: - return token() === 16 || token() === 17; + return token() === 17 || token() === 18; case 13: - return token() === 28 || token() === 40; + return token() === 29 || token() === 41; case 14: - return token() === 26 && lookAhead(nextTokenIsSlash); + return token() === 27 && lookAhead(nextTokenIsSlash); case 23: - return token() === 19 || token() === 55 || token() === 17; + return token() === 20 || token() === 56 || token() === 18; case 24: - return token() === 28 || token() === 17; + return token() === 29 || token() === 18; case 26: - return token() === 21 || token() === 17; + return token() === 22 || token() === 18; case 25: - return token() === 17; + return token() === 18; } } function isVariableDeclaratorListTerminator() { @@ -13068,7 +13076,7 @@ var ts; if (isInOrOfKeyword(token())) { return true; } - if (token() === 35) { + if (token() === 36) { return true; } return false; @@ -13174,17 +13182,17 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 151: - case 156: case 152: + case 157: case 153: - case 148: - case 205: + case 154: + case 149: + case 206: return true; - case 150: + case 151: var methodDeclaration = node; - var nameIsConstructor = methodDeclaration.name.kind === 70 && - methodDeclaration.name.originalKeywordKind === 122; + var nameIsConstructor = methodDeclaration.name.kind === 71 && + methodDeclaration.name.originalKeywordKind === 123; return !nameIsConstructor; } } @@ -13193,8 +13201,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 256: case 257: + case 258: return true; } } @@ -13203,65 +13211,65 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 227: + case 228: + case 208: case 207: - case 206: + case 211: case 210: - case 209: - case 222: + case 223: + case 219: + case 221: case 218: - case 220: case 217: + case 215: case 216: case 214: - case 215: case 213: - case 212: - case 219: - case 208: - case 223: - case 221: - case 211: + case 220: + case 209: case 224: + case 222: + case 212: + case 225: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 232: - case 228: + case 233: case 229: - case 231: case 230: + case 232: + case 231: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 155: - case 149: case 156: - case 147: - case 154: + case 150: + case 157: + case 148: + case 155: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 225) { + if (node.kind !== 226) { return false; } var variableDeclarator = node; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 145) { + if (node.kind !== 146) { return false; } var parameter = node; @@ -13315,15 +13323,15 @@ var ts; if (isListElement(kind, false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); - if (parseOptional(25)) { + if (parseOptional(26)) { continue; } commaStart = -1; if (isListTerminator(kind)) { break; } - parseExpected(25); - if (considerSemicolonAsDelimiter && token() === 24 && !scanner.hasPrecedingLineBreak()) { + parseExpected(26); + if (considerSemicolonAsDelimiter && token() === 25 && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -13355,8 +13363,8 @@ var ts; } function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(22)) { - var node = createNode(142, entity.pos); + while (parseOptional(23)) { + var node = createNode(143, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -13367,33 +13375,33 @@ var ts; if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token())) { var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { - return createMissingNode(70, true, ts.Diagnostics.Identifier_expected); + return createMissingNode(71, true, ts.Diagnostics.Identifier_expected); } } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(195); + var template = createNode(196); template.head = parseTemplateHead(); - ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(template.head.kind === 14, "Template head has wrong token kind"); var templateSpans = createNodeArray(); do { templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 14); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 15); templateSpans.end = getNodeEnd(); template.templateSpans = templateSpans; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(204); + var span = createNode(205); span.expression = allowInAnd(parseExpression); var literal; - if (token() === 17) { + if (token() === 18) { reScanTemplateToken(); literal = parseTemplateMiddleOrTemplateTail(); } else { - literal = parseExpectedToken(15, false, ts.Diagnostics._0_expected, ts.tokenToString(17)); + literal = parseExpectedToken(16, false, ts.Diagnostics._0_expected, ts.tokenToString(18)); } span.literal = literal; return finishNode(span); @@ -13403,12 +13411,12 @@ var ts; } function parseTemplateHead() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(fragment.kind === 14, "Template head has wrong token kind"); return fragment; } function parseTemplateMiddleOrTemplateTail() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 14 || fragment.kind === 15, "Template fragment has wrong token kind"); + ts.Debug.assert(fragment.kind === 15 || fragment.kind === 16, "Template fragment has wrong token kind"); return fragment; } function parseLiteralLikeNode(kind, internName) { @@ -13429,35 +13437,35 @@ var ts; return node; } function parseTypeReference() { - var node = createNode(158); + var node = createNode(159); node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (!scanner.hasPrecedingLineBreak() && token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (!scanner.hasPrecedingLineBreak() && token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(157, lhs.pos); + var node = createNode(158, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(168); + var node = createNode(169); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(161); - parseExpected(102); + var node = createNode(162); + parseExpected(103); node.exprName = parseEntityName(true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - if (parseOptional(84)) { + if (parseOptional(85)) { if (isStartOfType() || !isStartOfExpression()) { node.constraint = parseType(); } @@ -13465,40 +13473,40 @@ var ts; node.expression = parseUnaryExpressionOrHigher(); } } - if (parseOptional(57)) { + if (parseOptional(58)) { node.default = parseType(); } return finishNode(node); } function parseTypeParameters() { - if (token() === 26) { - return parseBracketedList(18, parseTypeParameter, 26, 28); + if (token() === 27) { + return parseBracketedList(18, parseTypeParameter, 27, 29); } } function parseParameterType() { - if (parseOptional(55)) { + if (parseOptional(56)) { return parseType(); } return undefined; } function isStartOfParameter() { - return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98; + return token() === 24 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 57 || token() === 99; } function parseParameter() { - var node = createNode(145); - if (token() === 98) { + var node = createNode(146); + if (token() === 99) { node.name = createIdentifier(true); node.type = parseParameterType(); return finishNode(node); } node.decorators = parseDecorators(); node.modifiers = parseModifiers(); - node.dotDotDotToken = parseOptionalToken(23); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); if (ts.getFullWidth(node.name) === 0 && !ts.hasModifiers(node) && ts.isModifierKind(token())) { nextToken(); } - node.questionToken = parseOptionalToken(54); + node.questionToken = parseOptionalToken(55); node.type = parseParameterType(); node.initializer = parseBindingElementInitializer(true); return addJSDocComment(finishNode(node)); @@ -13510,7 +13518,7 @@ var ts; return parseInitializer(true); } function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 35; + var returnTokenRequired = returnToken === 36; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { @@ -13522,7 +13530,7 @@ var ts; } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { - if (parseExpected(18)) { + if (parseExpected(19)) { var savedYieldContext = inYieldContext(); var savedAwaitContext = inAwaitContext(); setYieldContext(yieldContext); @@ -13530,7 +13538,7 @@ var ts; var result = parseDelimitedList(16, parseParameter); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); - if (!parseExpected(19) && requireCompleteParameterList) { + if (!parseExpected(20) && requireCompleteParameterList) { return undefined; } return result; @@ -13538,29 +13546,29 @@ var ts; return requireCompleteParameterList ? undefined : createMissingList(); } function parseTypeMemberSemicolon() { - if (parseOptional(25)) { + if (parseOptional(26)) { return; } parseSemicolon(); } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 155) { - parseExpected(93); + if (kind === 156) { + parseExpected(94); } - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(node)); } function isIndexSignature() { - if (token() !== 20) { + if (token() !== 21) { return false; } return lookAhead(isUnambiguouslyIndexSignature); } function isUnambiguouslyIndexSignature() { nextToken(); - if (token() === 23 || token() === 21) { + if (token() === 24 || token() === 22) { return true; } if (ts.isModifierKind(token())) { @@ -13575,43 +13583,43 @@ var ts; else { nextToken(); } - if (token() === 55 || token() === 25) { + if (token() === 56 || token() === 26) { return true; } - if (token() !== 54) { + if (token() !== 55) { return false; } nextToken(); - return token() === 55 || token() === 25 || token() === 21; + return token() === 56 || token() === 26 || token() === 22; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(156, fullStart); + var node = createNode(157, fullStart); node.decorators = decorators; node.modifiers = modifiers; - node.parameters = parseBracketedList(16, parseParameter, 20, 21); + node.parameters = parseBracketedList(16, parseParameter, 21, 22); node.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); return finishNode(node); } function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (token() === 18 || token() === 26) { - var method = createNode(149, fullStart); + var questionToken = parseOptionalToken(55); + if (token() === 19 || token() === 27) { + var method = createNode(150, fullStart); method.modifiers = modifiers; method.name = name; method.questionToken = questionToken; - fillSignature(55, false, false, false, method); + fillSignature(56, false, false, false, method); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(method)); } else { - var property = createNode(147, fullStart); + var property = createNode(148, fullStart); property.modifiers = modifiers; property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token() === 57) { + if (token() === 58) { property.initializer = parseNonParameterInitializer(); } parseTypeMemberSemicolon(); @@ -13619,7 +13627,7 @@ var ts; } } function isTypeMemberStart() { - if (token() === 18 || token() === 26) { + if (token() === 19 || token() === 27) { return true; } var idToken; @@ -13627,7 +13635,7 @@ var ts; idToken = true; nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (isLiteralPropertyName()) { @@ -13635,22 +13643,22 @@ var ts; nextToken(); } if (idToken) { - return token() === 18 || - token() === 26 || - token() === 54 || + return token() === 19 || + token() === 27 || token() === 55 || - token() === 25 || + token() === 56 || + token() === 26 || canParseSemicolon(); } return false; } function parseTypeMember() { - if (token() === 18 || token() === 26) { - return parseSignatureMember(154); - } - if (token() === 93 && lookAhead(isStartOfConstructSignature)) { + if (token() === 19 || token() === 27) { return parseSignatureMember(155); } + if (token() === 94 && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(156); + } var fullStart = getNodePos(); var modifiers = parseModifiers(); if (isIndexSignature()) { @@ -13660,18 +13668,18 @@ var ts; } function isStartOfConstructSignature() { nextToken(); - return token() === 18 || token() === 26; + return token() === 19 || token() === 27; } function parseTypeLiteral() { - var node = createNode(162); + var node = createNode(163); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers() { var members; - if (parseExpected(16)) { + if (parseExpected(17)) { members = parseList(4, parseTypeMember); - parseExpected(17); + parseExpected(18); } else { members = createMissingList(); @@ -13680,57 +13688,57 @@ var ts; } function isStartOfMappedType() { nextToken(); - if (token() === 130) { + if (token() === 131) { nextToken(); } - return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91; + return token() === 21 && nextTokenIsIdentifier() && nextToken() === 92; } function parseMappedTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - parseExpected(91); + parseExpected(92); node.constraint = parseType(); return finishNode(node); } function parseMappedType() { - var node = createNode(171); - parseExpected(16); - node.readonlyToken = parseOptionalToken(130); - parseExpected(20); - node.typeParameter = parseMappedTypeParameter(); + var node = createNode(172); + parseExpected(17); + node.readonlyToken = parseOptionalToken(131); parseExpected(21); - node.questionToken = parseOptionalToken(54); + node.typeParameter = parseMappedTypeParameter(); + parseExpected(22); + node.questionToken = parseOptionalToken(55); node.type = parseTypeAnnotation(); parseSemicolon(); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseTupleType() { - var node = createNode(164); - node.elementTypes = parseBracketedList(20, parseType, 20, 21); + var node = createNode(165); + node.elementTypes = parseBracketedList(20, parseType, 21, 22); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(167); - parseExpected(18); - node.type = parseType(); + var node = createNode(168); parseExpected(19); + node.type = parseType(); + parseExpected(20); return finishNode(node); } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 160) { - parseExpected(93); + if (kind === 161) { + parseExpected(94); } - fillSignature(35, false, false, false, node); + fillSignature(36, false, false, false, node); return finishNode(node); } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token() === 22 ? undefined : node; + return token() === 23 ? undefined : node; } function parseLiteralTypeNode() { - var node = createNode(172); + var node = createNode(173); node.literal = parseSimpleUnaryExpression(); finishNode(node); return node; @@ -13740,42 +13748,42 @@ var ts; } function parseNonArrayType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 138: - case 129: case 133: + case 122: + case 137: + case 139: + case 130: + case 134: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseLiteralTypeNode(); - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); - case 104: - case 94: + case 105: + case 95: return parseTokenNode(); - case 98: { + case 99: { var thisKeyword = parseThisTypeNode(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 102: + case 103: return parseTypeQuery(); - case 16: + case 17: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 20: + case 21: return parseTupleType(); - case 18: + case 19: return parseParenthesizedType(); default: return parseTypeReference(); @@ -13783,32 +13791,32 @@ var ts; } function isStartOfType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 138: - case 94: - case 98: - case 102: - case 129: - case 16: - case 20: - case 26: + case 133: + case 122: + case 137: + case 105: + case 139: + case 95: + case 99: + case 103: + case 130: + case 17: + case 21: + case 27: + case 49: case 48: - case 47: - case 93: + case 94: case 9: case 8: - case 100: - case 85: - case 133: + case 101: + case 86: + case 134: return true; - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral); - case 18: + case 19: return lookAhead(isStartOfParenthesizedOrFunctionType); default: return isIdentifier(); @@ -13816,29 +13824,29 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token() === 19 || isStartOfParameter() || isStartOfType(); + return token() === 20 || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) { + while (!scanner.hasPrecedingLineBreak() && parseOptional(21)) { if (isStartOfType()) { - var node = createNode(170, type.pos); + var node = createNode(171, type.pos); node.objectType = type; node.indexType = parseType(); - parseExpected(21); + parseExpected(22); type = finishNode(node); } else { - var node = createNode(163, type.pos); + var node = createNode(164, type.pos); node.elementType = type; - parseExpected(21); + parseExpected(22); type = finishNode(node); } } return type; } function parseTypeOperator(operator) { - var node = createNode(169); + var node = createNode(170); parseExpected(operator); node.operator = operator; node.type = parseTypeOperatorOrHigher(); @@ -13846,8 +13854,8 @@ var ts; } function parseTypeOperatorOrHigher() { switch (token()) { - case 126: - return parseTypeOperator(126); + case 127: + return parseTypeOperator(127); } return parseArrayTypeOrHigher(); } @@ -13867,26 +13875,26 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47); + return parseUnionOrIntersectionType(167, parseTypeOperatorOrHigher, 48); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48); + return parseUnionOrIntersectionType(166, parseIntersectionTypeOrHigher, 49); } function isStartOfFunctionType() { - if (token() === 26) { + if (token() === 27) { return true; } - return token() === 18 && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 19 && lookAhead(isUnambiguouslyStartOfFunctionType); } function skipParameterStart() { if (ts.isModifierKind(token())) { parseModifiers(); } - if (isIdentifier() || token() === 98) { + if (isIdentifier() || token() === 99) { nextToken(); return true; } - if (token() === 20 || token() === 16) { + if (token() === 21 || token() === 17) { var previousErrorCount = parseDiagnostics.length; parseIdentifierOrPattern(); return previousErrorCount === parseDiagnostics.length; @@ -13895,17 +13903,17 @@ var ts; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token() === 19 || token() === 23) { + if (token() === 20 || token() === 24) { return true; } if (skipParameterStart()) { - if (token() === 55 || token() === 25 || - token() === 54 || token() === 57) { + if (token() === 56 || token() === 26 || + token() === 55 || token() === 58) { return true; } - if (token() === 19) { + if (token() === 20) { nextToken(); - if (token() === 35) { + if (token() === 36) { return true; } } @@ -13916,7 +13924,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(157, typePredicateVariable.pos); + var node = createNode(158, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -13927,7 +13935,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -13937,36 +13945,36 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(159); - } - if (token() === 93) { return parseFunctionOrConstructorType(160); } + if (token() === 94) { + return parseFunctionOrConstructorType(161); + } return parseUnionTypeOrHigher(); } function parseTypeAnnotation() { - return parseOptional(55) ? parseType() : undefined; + return parseOptional(56) ? parseType() : undefined; } function isStartOfLeftHandSideExpression() { switch (token()) { - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: case 8: case 9: - case 12: case 13: - case 18: - case 20: - case 16: - case 88: - case 74: - case 93: - case 40: - case 62: - case 70: + case 14: + case 19: + case 21: + case 17: + case 89: + case 75: + case 94: + case 41: + case 63: + case 71: return true; default: return isIdentifier(); @@ -13977,18 +13985,18 @@ var ts; return true; } switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 42: + case 80: + case 103: + case 105: case 43: - case 26: - case 120: - case 115: + case 44: + case 27: + case 121: + case 116: return true; default: if (isBinaryOperator()) { @@ -13998,10 +14006,10 @@ var ts; } } function isStartOfExpressionStatement() { - return token() !== 16 && - token() !== 88 && - token() !== 74 && - token() !== 56 && + return token() !== 17 && + token() !== 89 && + token() !== 75 && + token() !== 57 && isStartOfExpression(); } function parseExpression() { @@ -14011,7 +14019,7 @@ var ts; } var expr = parseAssignmentExpressionOrHigher(); var operatorToken; - while ((operatorToken = parseOptionalToken(25))) { + while ((operatorToken = parseOptionalToken(26))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } if (saveDecoratorContext) { @@ -14020,12 +14028,12 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token() !== 57) { - if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 16) || !isStartOfExpression()) { + if (token() !== 58) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 17) || !isStartOfExpression()) { return undefined; } } - parseExpected(57); + parseExpected(58); return parseAssignmentExpressionOrHigher(); } function parseAssignmentExpressionOrHigher() { @@ -14037,7 +14045,7 @@ var ts; return arrowExpression; } var expr = parseBinaryExpressionOrHigher(0); - if (expr.kind === 70 && token() === 35) { + if (expr.kind === 71 && token() === 36) { return parseSimpleArrowFunctionExpression(expr); } if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { @@ -14046,7 +14054,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token() === 115) { + if (token() === 116) { if (inYieldContext()) { return true; } @@ -14059,11 +14067,11 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(196); + var node = createNode(197); nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token() === 38 || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(38); + (token() === 39 || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(39); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -14072,21 +14080,21 @@ var ts; } } function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { - ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + ts.Debug.assert(token() === 36, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); var node; if (asyncModifier) { - node = createNode(186, asyncModifier.pos); + node = createNode(187, asyncModifier.pos); node.modifiers = asyncModifier; } else { - node = createNode(186, identifier.pos); + node = createNode(187, identifier.pos); } - var parameter = createNode(145, identifier.pos); + var parameter = createNode(146, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = createNodeArray([parameter], parameter.pos); node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(!!asyncModifier); return addJSDocComment(finishNode(node)); } @@ -14103,78 +14111,78 @@ var ts; } var isAsync = !!(ts.getModifierFlags(arrowFunction) & 256); var lastToken = token(); - arrowFunction.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 35 || lastToken === 16) + arrowFunction.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 36 || lastToken === 17) ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return addJSDocComment(finishNode(arrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 18 || token() === 26 || token() === 119) { + if (token() === 19 || token() === 27 || token() === 120) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token() === 35) { + if (token() === 36) { return 1; } return 0; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0; } - if (token() !== 18 && token() !== 26) { + if (token() !== 19 && token() !== 27) { return 0; } } var first = token(); var second = nextToken(); - if (first === 18) { - if (second === 19) { + if (first === 19) { + if (second === 20) { var third = nextToken(); switch (third) { - case 35: - case 55: - case 16: + case 36: + case 56: + case 17: return 1; default: return 0; } } - if (second === 20 || second === 16) { + if (second === 21 || second === 17) { return 2; } - if (second === 23) { + if (second === 24) { return 1; } if (!isIdentifier()) { return 0; } - if (nextToken() === 55) { + if (nextToken() === 56) { return 1; } return 2; } else { - ts.Debug.assert(first === 26); + ts.Debug.assert(first === 27); if (!isIdentifier()) { return 0; } if (sourceFile.languageVariant === 1) { var isArrowFunctionInJsx = lookAhead(function () { var third = nextToken(); - if (third === 84) { + if (third === 85) { var fourth = nextToken(); switch (fourth) { - case 57: - case 28: + case 58: + case 29: return false; default: return true; } } - else if (third === 25) { + else if (third === 26) { return true; } return false; @@ -14191,7 +14199,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(false); } function tryParseAsyncSimpleArrowFunctionExpression() { - if (token() === 119) { + if (token() === 120) { var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); if (isUnParenthesizedAsyncArrowFunction === 1) { var asyncModifier = parseModifiersForArrowFunction(); @@ -14202,38 +14210,38 @@ var ts; return undefined; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); - if (scanner.hasPrecedingLineBreak() || token() === 35) { + if (scanner.hasPrecedingLineBreak() || token() === 36) { return 0; } var expr = parseBinaryExpressionOrHigher(0); - if (!scanner.hasPrecedingLineBreak() && expr.kind === 70 && token() === 35) { + if (!scanner.hasPrecedingLineBreak() && expr.kind === 71 && token() === 36) { return 1; } } return 0; } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(186); + var node = createNode(187); node.modifiers = parseModifiersForArrowFunction(); var isAsync = !!(ts.getModifierFlags(node) & 256); - fillSignature(55, false, isAsync, !allowAmbiguity, node); + fillSignature(56, false, isAsync, !allowAmbiguity, node); if (!node.parameters) { return undefined; } - if (!allowAmbiguity && token() !== 35 && token() !== 16) { + if (!allowAmbiguity && token() !== 36 && token() !== 17) { return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token() === 16) { + if (token() === 17) { return parseFunctionBlock(false, isAsync, false); } - if (token() !== 24 && - token() !== 88 && - token() !== 74 && + if (token() !== 25 && + token() !== 89 && + token() !== 75 && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(false, isAsync, true); @@ -14243,15 +14251,15 @@ var ts; : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); } function parseConditionalExpressionRest(leftOperand) { - var questionToken = parseOptionalToken(54); + var questionToken = parseOptionalToken(55); if (!questionToken) { return leftOperand; } - var node = createNode(194, leftOperand.pos); + var node = createNode(195, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(55, false, ts.Diagnostics._0_expected, ts.tokenToString(55)); + node.colonToken = parseExpectedToken(56, false, ts.Diagnostics._0_expected, ts.tokenToString(56)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -14260,22 +14268,22 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 91 || t === 141; + return t === 92 || t === 142; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { reScanGreaterToken(); var newPrecedence = getBinaryOperatorPrecedence(); - var consumeCurrentOperator = token() === 39 ? + var consumeCurrentOperator = token() === 40 ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token() === 91 && inDisallowInContext()) { + if (token() === 92 && inDisallowInContext()) { break; } - if (token() === 117) { + if (token() === 118) { if (scanner.hasPrecedingLineBreak()) { break; } @@ -14291,92 +14299,92 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token() === 91) { + if (inDisallowInContext() && token() === 92) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { switch (token()) { - case 53: + case 54: return 1; - case 52: + case 53: return 2; - case 48: - return 3; case 49: + return 3; + case 50: return 4; - case 47: + case 48: return 5; - case 31: case 32: case 33: case 34: + case 35: return 6; - case 26: - case 28: + case 27: case 29: case 30: + case 31: + case 93: case 92: - case 91: - case 117: + case 118: return 7; - case 44: case 45: case 46: + case 47: return 8; - case 36: case 37: - return 9; case 38: - case 40: + return 9; + case 39: case 41: + case 42: return 10; - case 39: + case 40: return 11; } return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(193, left.pos); + var node = createNode(194, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(201, left.pos); + var node = createNode(202, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(191); + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(187); + var node = createNode(188); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(188); + var node = createNode(189); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(189); + var node = createNode(190); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token() === 120) { + if (token() === 121) { if (inAwaitContext()) { return true; } @@ -14385,7 +14393,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(190); + var node = createNode(191); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -14393,15 +14401,15 @@ var ts; function parseUnaryExpressionOrHigher() { if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token() === 39 ? + return token() === 40 ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 39) { + if (token() === 40) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 183) { + if (simpleUnaryExpression.kind === 184) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -14412,20 +14420,20 @@ var ts; } function parseSimpleUnaryExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: return parsePrefixUnaryExpression(); - case 79: + case 80: return parseDeleteExpression(); - case 102: + case 103: return parseTypeOfExpression(); - case 104: + case 105: return parseVoidExpression(); - case 26: + case 27: return parseTypeAssertion(); - case 120: + case 121: if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -14435,16 +14443,16 @@ var ts; } function isUpdateExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 120: + case 80: + case 103: + case 105: + case 121: return false; - case 26: + case 27: if (sourceFile.languageVariant !== 1) { return false; } @@ -14453,20 +14461,20 @@ var ts; } } function parseIncrementExpression() { - if (token() === 42 || token() === 43) { - var node = createNode(191); + if (token() === 43 || token() === 44) { + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 && token() === 26 && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 && token() === 27 && lookAhead(nextTokenIsIdentifierOrKeyword)) { return parseJsxElementOrSelfClosingElement(true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(192, expression.pos); + if ((token() === 43 || token() === 44) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(193, expression.pos); node.operand = expression; node.operator = token(); nextToken(); @@ -14475,7 +14483,7 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token() === 96 + var expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); @@ -14486,12 +14494,12 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token() === 18 || token() === 22 || token() === 20) { + if (token() === 19 || token() === 23 || token() === 21) { return expression; } - var node = createNode(178, expression.pos); + var node = createNode(179, expression.pos); node.expression = expression; - parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(23, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -14499,10 +14507,10 @@ var ts; if (lhs.kind !== rhs.kind) { return false; } - if (lhs.kind === 70) { + if (lhs.kind === 71) { return lhs.text === rhs.text; } - if (lhs.kind === 98) { + if (lhs.kind === 99) { return true; } return lhs.name.text === rhs.name.text && @@ -14511,8 +14519,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 250) { - var node = createNode(248, opening.pos); + if (opening.kind === 251) { + var node = createNode(249, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -14522,18 +14530,18 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 249); + ts.Debug.assert(opening.kind === 250); result = opening; } - if (inExpressionContext && token() === 26) { + if (inExpressionContext && token() === 27) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(193, result.pos); + var badNode = createNode(194, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(25, false, undefined); + badNode.operatorToken = createMissingNode(26, false, undefined); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } @@ -14542,16 +14550,18 @@ var ts; } function parseJsxText() { var node = createNode(10, scanner.getStartPos()); + node.containsOnlyWhiteSpaces = currentToken === 11; currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token()) { case 10: + case 11: return parseJsxText(); - case 16: + case 17: return parseJsxExpression(false); - case 26: + case 27: return parseJsxElementOrSelfClosingElement(false); } ts.Debug.fail("Unknown JSX child kind " + token()); @@ -14562,7 +14572,7 @@ var ts; parsingContext |= 1 << 14; while (true) { currentToken = scanner.reScanJsxToken(); - if (token() === 27) { + if (token() === 28) { break; } else if (token() === 1) { @@ -14572,37 +14582,40 @@ var ts; else if (token() === 7) { break; } - result.push(parseJsxChild()); + var child = parseJsxChild(); + if (child) { + result.push(child); + } } result.end = scanner.getTokenPos(); parsingContext = saveParsingContext; return result; } function parseJsxAttributes() { - var jsxAttributes = createNode(253); + var jsxAttributes = createNode(254); jsxAttributes.properties = parseList(13, parseJsxAttribute); return finishNode(jsxAttributes); } function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { var fullStart = scanner.getStartPos(); - parseExpected(26); + parseExpected(27); var tagName = parseJsxElementName(); var attributes = parseJsxAttributes(); var node; - if (token() === 28) { - node = createNode(250, fullStart); + if (token() === 29) { + node = createNode(251, fullStart); scanJsxText(); } else { - parseExpected(40); + parseExpected(41); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } - node = createNode(249, fullStart); + node = createNode(250, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -14610,10 +14623,10 @@ var ts; } function parseJsxElementName() { scanJsxIdentifier(); - var expression = token() === 98 ? + var expression = token() === 99 ? parseTokenNode() : parseIdentifierName(); - while (parseOptional(22)) { - var propertyAccess = createNode(178, expression.pos); + while (parseOptional(23)) { + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); @@ -14621,29 +14634,29 @@ var ts; return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(255); - parseExpected(16); - if (token() !== 17) { - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(256); + parseExpected(17); + if (token() !== 18) { + node.dotDotDotToken = parseOptionalToken(24); node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { - parseExpected(17); + parseExpected(18); } else { - parseExpected(17, undefined, false); + parseExpected(18, undefined, false); scanJsxText(); } return finishNode(node); } function parseJsxAttribute() { - if (token() === 16) { + if (token() === 17) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(252); + var node = createNode(253); node.name = parseIdentifierName(); - if (token() === 57) { + if (token() === 58) { switch (scanJsxAttributeValue()) { case 9: node.initializer = parseLiteralNode(); @@ -14656,69 +14669,69 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(254); - parseExpected(16); - parseExpected(23); - node.expression = parseExpression(); + var node = createNode(255); parseExpected(17); + parseExpected(24); + node.expression = parseExpression(); + parseExpected(18); return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(251); - parseExpected(27); + var node = createNode(252); + parseExpected(28); node.tagName = parseJsxElementName(); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } return finishNode(node); } function parseTypeAssertion() { - var node = createNode(183); - parseExpected(26); + var node = createNode(184); + parseExpected(27); node.type = parseType(); - parseExpected(28); + parseExpected(29); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseMemberExpressionRest(expression) { while (true) { - var dotToken = parseOptionalToken(22); + var dotToken = parseOptionalToken(23); if (dotToken) { - var propertyAccess = createNode(178, expression.pos); + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; } - if (token() === 50 && !scanner.hasPrecedingLineBreak()) { + if (token() === 51 && !scanner.hasPrecedingLineBreak()) { nextToken(); - var nonNullExpression = createNode(202, expression.pos); + var nonNullExpression = createNode(203, expression.pos); nonNullExpression.expression = expression; expression = finishNode(nonNullExpression); continue; } - if (!inDecoratorContext() && parseOptional(20)) { - var indexedAccess = createNode(179, expression.pos); + if (!inDecoratorContext() && parseOptional(21)) { + var indexedAccess = createNode(180, expression.pos); indexedAccess.expression = expression; - if (token() !== 21) { + if (token() !== 22) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 || indexedAccess.argumentExpression.kind === 8) { var literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } - parseExpected(21); + parseExpected(22); expression = finishNode(indexedAccess); continue; } - if (token() === 12 || token() === 13) { - var tagExpression = createNode(182, expression.pos); + if (token() === 13 || token() === 14) { + var tagExpression = createNode(183, expression.pos); tagExpression.tag = expression; - tagExpression.template = token() === 12 + tagExpression.template = token() === 13 ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -14730,20 +14743,20 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token() === 26) { + if (token() === 27) { var typeArguments = tryParse(parseTypeArgumentsInExpression); if (!typeArguments) { return expression; } - var callExpr = createNode(180, expression.pos); + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token() === 18) { - var callExpr = createNode(180, expression.pos); + else if (token() === 19) { + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -14753,17 +14766,17 @@ var ts; } } function parseArgumentList() { - parseExpected(18); - var result = parseDelimitedList(11, parseArgumentExpression); parseExpected(19); + var result = parseDelimitedList(11, parseArgumentExpression); + parseExpected(20); return result; } function parseTypeArgumentsInExpression() { - if (!parseOptional(26)) { + if (!parseOptional(27)) { return undefined; } var typeArguments = parseDelimitedList(19, parseType); - if (!parseExpected(28)) { + if (!parseExpected(29)) { return undefined; } return typeArguments && canFollowTypeArgumentsInExpression() @@ -14772,27 +14785,27 @@ var ts; } function canFollowTypeArgumentsInExpression() { switch (token()) { - case 18: - case 22: case 19: - case 21: + case 23: + case 20: + case 22: + case 56: + case 25: case 55: - case 24: - case 54: - case 31: - case 33: case 32: case 34: - case 52: + case 33: + case 35: case 53: - case 49: - case 47: + case 54: + case 50: case 48: - case 17: + case 49: + case 18: case 1: return true; - case 25: - case 16: + case 26: + case 17: default: return false; } @@ -14801,87 +14814,87 @@ var ts; switch (token()) { case 8: case 9: - case 12: + case 13: return parseLiteralNode(); - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: return parseTokenNode(); - case 18: + case 19: return parseParenthesizedExpression(); - case 20: + case 21: return parseArrayLiteralExpression(); - case 16: + case 17: return parseObjectLiteralExpression(); - case 119: + case 120: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); - case 74: + case 75: return parseClassExpression(); - case 88: + case 89: return parseFunctionExpression(); - case 93: + case 94: return parseNewExpression(); - case 40: - case 62: - if (reScanSlashToken() === 11) { + case 41: + case 63: + if (reScanSlashToken() === 12) { return parseLiteralNode(); } break; - case 13: + case 14: return parseTemplateExpression(); } return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(184); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(185); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); return finishNode(node); } function parseSpreadElement() { - var node = createNode(197); - parseExpected(23); + var node = createNode(198); + parseExpected(24); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token() === 23 ? parseSpreadElement() : - token() === 25 ? createNode(199) : + return token() === 24 ? parseSpreadElement() : + token() === 26 ? createNode(200) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(176); - parseExpected(20); + var node = createNode(177); + parseExpected(21); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.elements = parseDelimitedList(15, parseArgumentOrArrayLiteralElement); - parseExpected(21); + parseExpected(22); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(124)) { - return parseAccessorDeclaration(152, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(134)) { + if (parseContextualModifier(125)) { return parseAccessorDeclaration(153, fullStart, decorators, modifiers); } + else if (parseContextualModifier(135)) { + return parseAccessorDeclaration(154, fullStart, decorators, modifiers); + } return undefined; } function parseObjectLiteralElement() { var fullStart = scanner.getStartPos(); - var dotDotDotToken = parseOptionalToken(23); + var dotDotDotToken = parseOptionalToken(24); if (dotDotDotToken) { - var spreadElement = createNode(262, fullStart); + var spreadElement = createNode(263, fullStart); spreadElement.expression = parseAssignmentExpressionOrHigher(); return addJSDocComment(finishNode(spreadElement)); } @@ -14891,19 +14904,19 @@ var ts; if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 26 || token() === 18 || token() === 58); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(261, fullStart); + var shorthandDeclaration = createNode(262, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(57); + var equalsToken = parseOptionalToken(58); if (equalsToken) { shorthandDeclaration.equalsToken = equalsToken; shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); @@ -14911,23 +14924,23 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(260, fullStart); + var propertyAssignment = createNode(261, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; - parseExpected(55); + parseExpected(56); propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); return addJSDocComment(finishNode(propertyAssignment)); } } function parseObjectLiteralExpression() { - var node = createNode(177); - parseExpected(16); + var node = createNode(178); + parseExpected(17); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.properties = parseDelimitedList(12, parseObjectLiteralElement, true); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseFunctionExpression() { @@ -14935,10 +14948,10 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(false); } - var node = createNode(185); + var node = createNode(186); node.modifiers = parseModifiers(); - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); var isGenerator = !!node.asteriskToken; var isAsync = !!(ts.getModifierFlags(node) & 256); node.name = @@ -14946,7 +14959,7 @@ var ts; isGenerator ? doInYieldContext(parseOptionalIdentifier) : isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlock(isGenerator, isAsync, false); if (saveDecoratorContext) { setDecoratorContext(true); @@ -14958,29 +14971,29 @@ var ts; } function parseNewExpression() { var fullStart = scanner.getStartPos(); - parseExpected(93); - if (parseOptional(22)) { - var node_1 = createNode(203, fullStart); - node_1.keywordToken = 93; + parseExpected(94); + if (parseOptional(23)) { + var node_1 = createNode(204, fullStart); + node_1.keywordToken = 94; node_1.name = parseIdentifierName(); return finishNode(node_1); } - var node = createNode(181, fullStart); + var node = createNode(182, fullStart); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token() === 18) { + if (node.typeArguments || token() === 19) { node.arguments = parseArgumentList(); } return finishNode(node); } function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(206); - if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) { + var node = createNode(207); + if (parseExpected(17, diagnosticMessage) || ignoreMissingOpenBrace) { if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -15005,48 +15018,48 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(208); - parseExpected(24); + var node = createNode(209); + parseExpected(25); return finishNode(node); } function parseIfStatement() { - var node = createNode(210); - parseExpected(89); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(211); + parseExpected(90); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(81) ? parseStatement() : undefined; + node.elseStatement = parseOptional(82) ? parseStatement() : undefined; return finishNode(node); } function parseDoStatement() { - var node = createNode(211); - parseExpected(80); + var node = createNode(212); + parseExpected(81); node.statement = parseStatement(); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + parseExpected(106); parseExpected(19); - parseOptional(24); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + parseOptional(25); return finishNode(node); } function parseWhileStatement() { - var node = createNode(212); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(213); + parseExpected(106); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseForOrForInOrForOfStatement() { var pos = getNodePos(); - parseExpected(87); - var awaitToken = parseOptionalToken(120); - parseExpected(18); + parseExpected(88); + var awaitToken = parseOptionalToken(121); + parseExpected(19); var initializer = undefined; - if (token() !== 24) { - if (token() === 103 || token() === 109 || token() === 75) { + if (token() !== 25) { + if (token() === 104 || token() === 110 || token() === 76) { initializer = parseVariableDeclarationList(true); } else { @@ -15054,33 +15067,33 @@ var ts; } } var forOrForInOrForOfStatement; - if (awaitToken ? parseExpected(141) : parseOptional(141)) { - var forOfStatement = createNode(215, pos); + if (awaitToken ? parseExpected(142) : parseOptional(142)) { + var forOfStatement = createNode(216, pos); forOfStatement.awaitModifier = awaitToken; forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forOfStatement; } - else if (parseOptional(91)) { - var forInStatement = createNode(214, pos); + else if (parseOptional(92)) { + var forInStatement = createNode(215, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forInStatement; } else { - var forStatement = createNode(213, pos); + var forStatement = createNode(214, pos); forStatement.initializer = initializer; - parseExpected(24); - if (token() !== 24 && token() !== 19) { + parseExpected(25); + if (token() !== 25 && token() !== 20) { forStatement.condition = allowInAnd(parseExpression); } - parseExpected(24); - if (token() !== 19) { + parseExpected(25); + if (token() !== 20) { forStatement.incrementor = allowInAnd(parseExpression); } - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forStatement; } forOrForInOrForOfStatement.statement = parseStatement(); @@ -15088,7 +15101,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 217 ? 71 : 76); + parseExpected(kind === 218 ? 72 : 77); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -15096,8 +15109,8 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(218); - parseExpected(95); + var node = createNode(219); + parseExpected(96); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); } @@ -15105,90 +15118,90 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(219); - parseExpected(106); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(220); + parseExpected(107); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseCaseClause() { - var node = createNode(256); - parseExpected(72); + var node = createNode(257); + parseExpected(73); node.expression = allowInAnd(parseExpression); - parseExpected(55); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseDefaultClause() { - var node = createNode(257); - parseExpected(78); - parseExpected(55); + var node = createNode(258); + parseExpected(79); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token() === 72 ? parseCaseClause() : parseDefaultClause(); + return token() === 73 ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(220); - parseExpected(97); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(221); + parseExpected(98); parseExpected(19); - var caseBlock = createNode(234, scanner.getStartPos()); - parseExpected(16); - caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + var caseBlock = createNode(235, scanner.getStartPos()); parseExpected(17); + caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + parseExpected(18); node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { - var node = createNode(222); - parseExpected(99); + var node = createNode(223); + parseExpected(100); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } function parseTryStatement() { - var node = createNode(223); - parseExpected(101); + var node = createNode(224); + parseExpected(102); node.tryBlock = parseBlock(false); - node.catchClause = token() === 73 ? parseCatchClause() : undefined; - if (!node.catchClause || token() === 86) { - parseExpected(86); + node.catchClause = token() === 74 ? parseCatchClause() : undefined; + if (!node.catchClause || token() === 87) { + parseExpected(87); node.finallyBlock = parseBlock(false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(259); - parseExpected(73); - if (parseExpected(18)) { + var result = createNode(260); + parseExpected(74); + if (parseExpected(19)) { result.variableDeclaration = parseVariableDeclaration(); } - parseExpected(19); + parseExpected(20); result.block = parseBlock(false); return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(224); - parseExpected(77); + var node = createNode(225); + parseExpected(78); parseSemicolon(); return finishNode(node); } function parseExpressionOrLabeledStatement() { var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); - if (expression.kind === 70 && parseOptional(55)) { - var labeledStatement = createNode(221, fullStart); + if (expression.kind === 71 && parseOptional(56)) { + var labeledStatement = createNode(222, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(209, fullStart); + var expressionStatement = createNode(210, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -15200,11 +15213,11 @@ var ts; } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 74 && !scanner.hasPrecedingLineBreak(); + return token() === 75 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 88 && !scanner.hasPrecedingLineBreak(); + return token() === 89 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); @@ -15213,47 +15226,47 @@ var ts; function isDeclaration() { while (true) { switch (token()) { - case 103: - case 109: + case 104: + case 110: + case 76: + case 89: case 75: - case 88: - case 74: - case 82: + case 83: return true; - case 108: - case 137: + case 109: + case 138: return nextTokenIsIdentifierOnSameLine(); - case 127: case 128: + case 129: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 116: - case 119: - case 123: - case 111: + case 117: + case 120: + case 124: case 112: case 113: - case 130: + case 114: + case 131: nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 140: + case 141: nextToken(); - return token() === 16 || token() === 70 || token() === 83; - case 90: + return token() === 17 || token() === 71 || token() === 84; + case 91: nextToken(); - return token() === 9 || token() === 38 || - token() === 16 || ts.tokenIsIdentifierOrKeyword(token()); - case 83: + return token() === 9 || token() === 39 || + token() === 17 || ts.tokenIsIdentifierOrKeyword(token()); + case 84: nextToken(); - if (token() === 57 || token() === 38 || - token() === 16 || token() === 78 || - token() === 117) { + if (token() === 58 || token() === 39 || + token() === 17 || token() === 79 || + token() === 118) { return true; } continue; - case 114: + case 115: nextToken(); continue; default: @@ -15266,46 +15279,46 @@ var ts; } function isStartOfStatement() { switch (token()) { - case 56: - case 24: - case 16: - case 103: - case 109: - case 88: - case 74: - case 82: + case 57: + case 25: + case 17: + case 104: + case 110: case 89: - case 80: - case 105: - case 87: - case 76: - case 71: - case 95: - case 106: - case 97: - case 99: - case 101: - case 77: - case 73: - case 86: - return true; case 75: case 83: case 90: + case 81: + case 106: + case 88: + case 77: + case 72: + case 96: + case 107: + case 98: + case 100: + case 102: + case 78: + case 74: + case 87: + return true; + case 76: + case 84: + case 91: return isStartOfDeclaration(); - case 119: - case 123: - case 108: - case 127: + case 120: + case 124: + case 109: case 128: - case 137: - case 140: + case 129: + case 138: + case 141: return true; - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -15313,73 +15326,73 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token() === 16 || token() === 20; + return isIdentifier() || token() === 17 || token() === 21; } function isLetDeclaration() { return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); } function parseStatement() { switch (token()) { - case 24: + case 25: return parseEmptyStatement(); - case 16: + case 17: return parseBlock(false); - case 103: + case 104: return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 109: + case 110: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined, undefined); } break; - case 88: + case 89: return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 74: + case 75: return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 89: + case 90: return parseIfStatement(); - case 80: + case 81: return parseDoStatement(); - case 105: + case 106: return parseWhileStatement(); - case 87: + case 88: return parseForOrForInOrForOfStatement(); - case 76: - return parseBreakOrContinueStatement(216); - case 71: + case 77: return parseBreakOrContinueStatement(217); - case 95: + case 72: + return parseBreakOrContinueStatement(218); + case 96: return parseReturnStatement(); - case 106: + case 107: return parseWithStatement(); - case 97: + case 98: return parseSwitchStatement(); - case 99: + case 100: return parseThrowStatement(); - case 101: - case 73: - case 86: + case 102: + case 74: + case 87: return parseTryStatement(); - case 77: + case 78: return parseDebuggerStatement(); - case 56: + case 57: return parseDeclaration(); - case 119: - case 108: - case 137: - case 127: + case 120: + case 109: + case 138: case 128: - case 123: - case 75: - case 82: + case 129: + case 124: + case 76: case 83: - case 90: - case 111: + case 84: + case 91: case 112: case 113: - case 116: case 114: - case 130: - case 140: + case 117: + case 115: + case 131: + case 141: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -15392,40 +15405,40 @@ var ts; var decorators = parseDecorators(); var modifiers = parseModifiers(); switch (token()) { - case 103: - case 109: - case 75: + case 104: + case 110: + case 76: return parseVariableStatement(fullStart, decorators, modifiers); - case 88: + case 89: return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 74: + case 75: return parseClassDeclaration(fullStart, decorators, modifiers); - case 108: + case 109: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 137: + case 138: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 82: + case 83: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 140: - case 127: + case 141: case 128: + case 129: return parseModuleDeclaration(fullStart, decorators, modifiers); - case 90: + case 91: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 83: + case 84: nextToken(); switch (token()) { - case 78: - case 57: + case 79: + case 58: return parseExportAssignment(fullStart, decorators, modifiers); - case 117: + case 118: return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); default: return parseExportDeclaration(fullStart, decorators, modifiers); } default: if (decorators || modifiers) { - var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(247, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; node.modifiers = modifiers; @@ -15438,32 +15451,32 @@ var ts; return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token() !== 16 && canParseSemicolon()) { + if (token() !== 17 && canParseSemicolon()) { parseSemicolon(); return; } return parseFunctionBlock(isGenerator, isAsync, false, diagnosticMessage); } function parseArrayBindingElement() { - if (token() === 25) { - return createNode(199); + if (token() === 26) { + return createNode(200); } - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token() !== 55) { + if (tokenIsIdentifier && token() !== 56) { node.name = propertyName; } else { - parseExpected(55); + parseExpected(56); node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } @@ -15471,33 +15484,33 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(173); - parseExpected(16); - node.elements = parseDelimitedList(9, parseObjectBindingElement); + var node = createNode(174); parseExpected(17); + node.elements = parseDelimitedList(9, parseObjectBindingElement); + parseExpected(18); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(174); - parseExpected(20); - node.elements = parseDelimitedList(10, parseArrayBindingElement); + var node = createNode(175); parseExpected(21); + node.elements = parseDelimitedList(10, parseArrayBindingElement); + parseExpected(22); return finishNode(node); } function isIdentifierOrPattern() { - return token() === 16 || token() === 20 || isIdentifier(); + return token() === 17 || token() === 21 || isIdentifier(); } function parseIdentifierOrPattern() { - if (token() === 20) { + if (token() === 21) { return parseArrayBindingPattern(); } - if (token() === 16) { + if (token() === 17) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(225); + var node = createNode(226); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token())) { @@ -15506,21 +15519,21 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(226); + var node = createNode(227); switch (token()) { - case 103: + case 104: break; - case 109: + case 110: node.flags |= 1; break; - case 75: + case 76: node.flags |= 2; break; default: ts.Debug.fail(); } nextToken(); - if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 142 && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -15532,10 +15545,10 @@ var ts; return finishNode(node); } function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 19; + return nextTokenIsIdentifier() && nextToken() === 20; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(207, fullStart); + var node = createNode(208, fullStart); node.decorators = decorators; node.modifiers = modifiers; node.declarationList = parseVariableDeclarationList(false); @@ -15543,29 +15556,29 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(227, fullStart); + var node = createNode(228, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); node.name = ts.hasModifier(node, 512) ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = ts.hasModifier(node, 256); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(151, pos); + var node = createNode(152, pos); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(122); - fillSignature(55, false, false, false, node); + parseExpected(123); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(150, fullStart); + var method = createNode(151, fullStart); method.decorators = decorators; method.modifiers = modifiers; method.asteriskToken = asteriskToken; @@ -15573,12 +15586,12 @@ var ts; method.questionToken = questionToken; var isGenerator = !!asteriskToken; var isAsync = ts.hasModifier(method, 256); - fillSignature(55, isGenerator, isAsync, false, method); + fillSignature(56, isGenerator, isAsync, false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(148, fullStart); + var property = createNode(149, fullStart); property.decorators = decorators; property.modifiers = modifiers; property.name = name; @@ -15591,10 +15604,10 @@ var ts; return addJSDocComment(finishNode(property)); } function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -15609,17 +15622,17 @@ var ts; node.decorators = decorators; node.modifiers = modifiers; node.name = parsePropertyName(); - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false); return addJSDocComment(finishNode(node)); } function isClassMemberModifier(idToken) { switch (idToken) { - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return true; default: return false; @@ -15627,7 +15640,7 @@ var ts; } function isClassMemberStart() { var idToken; - if (token() === 56) { + if (token() === 57) { return true; } while (ts.isModifierKind(token())) { @@ -15637,26 +15650,26 @@ var ts; } nextToken(); } - if (token() === 38) { + if (token() === 39) { return true; } if (isLiteralPropertyName()) { idToken = token(); nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) { + if (!ts.isKeyword(idToken) || idToken === 135 || idToken === 125) { return true; } switch (token()) { - case 18: - case 26: + case 19: + case 27: + case 56: + case 58: case 55: - case 57: - case 54: return true; default: return canParseSemicolon(); @@ -15668,10 +15681,10 @@ var ts; var decorators; while (true) { var decoratorStart = getNodePos(); - if (!parseOptional(56)) { + if (!parseOptional(57)) { break; } - var decorator = createNode(146, decoratorStart); + var decorator = createNode(147, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); finishNode(decorator); if (!decorators) { @@ -15691,7 +15704,7 @@ var ts; while (true) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); - if (token() === 75 && permitInvalidConstAsModifier) { + if (token() === 76 && permitInvalidConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { break; } @@ -15716,7 +15729,7 @@ var ts; } function parseModifiersForArrowFunction() { var modifiers; - if (token() === 119) { + if (token() === 120) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); nextToken(); @@ -15727,8 +15740,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token() === 24) { - var result = createNode(205); + if (token() === 25) { + var result = createNode(206); nextToken(); return finishNode(result); } @@ -15739,7 +15752,7 @@ var ts; if (accessor) { return accessor; } - if (token() === 122) { + if (token() === 123) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -15748,33 +15761,33 @@ var ts; if (ts.tokenIsIdentifierOrKeyword(token()) || token() === 9 || token() === 8 || - token() === 38 || - token() === 20) { + token() === 39 || + token() === 21) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { - var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected); + var name = createMissingNode(71, true, ts.Diagnostics.Declaration_expected); return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined); } ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198); + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 199); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 229); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(74); + parseExpected(75); node.name = parseNameOfClassDeclarationOrExpression(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseClassMembers(); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -15787,7 +15800,7 @@ var ts; : undefined; } function isImplementsClause() { - return token() === 107 && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 108 && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause()) { @@ -15797,8 +15810,8 @@ var ts; } function parseHeritageClause() { var tok = token(); - if (tok === 84 || tok === 107) { - var node = createNode(258); + if (tok === 85 || tok === 108) { + var node = createNode(259); node.token = tok; nextToken(); node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); @@ -15807,24 +15820,24 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(200); + var node = createNode(201); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function isHeritageClause() { - return token() === 84 || token() === 107; + return token() === 85 || token() === 108; } function parseClassMembers() { return parseList(5, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(229, fullStart); + var node = createNode(230, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(108); + parseExpected(109); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); @@ -15832,32 +15845,32 @@ var ts; return addJSDocComment(finishNode(node)); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230, fullStart); + var node = createNode(231, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(137); + parseExpected(138); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); - parseExpected(57); + parseExpected(58); node.type = parseType(); parseSemicolon(); return addJSDocComment(finishNode(node)); } function parseEnumMember() { - var node = createNode(263, scanner.getStartPos()); + var node = createNode(264, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return addJSDocComment(finishNode(node)); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231, fullStart); + var node = createNode(232, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(82); + parseExpected(83); node.name = parseIdentifier(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseDelimitedList(6, parseEnumMember); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -15865,10 +15878,10 @@ var ts; return addJSDocComment(finishNode(node)); } function parseModuleBlock() { - var node = createNode(233, scanner.getStartPos()); - if (parseExpected(16)) { + var node = createNode(234, scanner.getStartPos()); + if (parseExpected(17)) { node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -15876,29 +15889,29 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); var namespaceFlag = flags & 16; node.decorators = decorators; node.modifiers = modifiers; node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(22) + node.body = parseOptional(23) ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 4 | namespaceFlag) : parseModuleBlock(); return addJSDocComment(finishNode(node)); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (token() === 140) { + if (token() === 141) { node.name = parseIdentifier(); node.flags |= 512; } else { node.name = parseLiteralNode(true); } - if (token() === 16) { + if (token() === 17) { node.body = parseModuleBlock(); } else { @@ -15908,14 +15921,14 @@ var ts; } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = 0; - if (token() === 140) { + if (token() === 141) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } - else if (parseOptional(128)) { + else if (parseOptional(129)) { flags |= 16; } else { - parseExpected(127); + parseExpected(128); if (token() === 9) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } @@ -15923,66 +15936,66 @@ var ts; return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token() === 131 && + return token() === 132 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { - return nextToken() === 18; + return nextToken() === 19; } function nextTokenIsSlash() { - return nextToken() === 40; + return nextToken() === 41; } function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { - var exportDeclaration = createNode(235, fullStart); + var exportDeclaration = createNode(236, fullStart); exportDeclaration.decorators = decorators; exportDeclaration.modifiers = modifiers; - parseExpected(117); - parseExpected(128); + parseExpected(118); + parseExpected(129); exportDeclaration.name = parseIdentifier(); parseSemicolon(); return finishNode(exportDeclaration); } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(90); + parseExpected(91); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token() !== 25 && token() !== 139) { + if (token() !== 26 && token() !== 140) { return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier); } } - var importDeclaration = createNode(237, fullStart); + var importDeclaration = createNode(238, fullStart); importDeclaration.decorators = decorators; importDeclaration.modifiers = modifiers; if (identifier || - token() === 38 || - token() === 16) { + token() === 39 || + token() === 17) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(139); + parseExpected(140); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) { - var importEqualsDeclaration = createNode(236, fullStart); + var importEqualsDeclaration = createNode(237, fullStart); importEqualsDeclaration.decorators = decorators; importEqualsDeclaration.modifiers = modifiers; importEqualsDeclaration.name = identifier; - parseExpected(57); + parseExpected(58); importEqualsDeclaration.moduleReference = parseModuleReference(); parseSemicolon(); return addJSDocComment(finishNode(importEqualsDeclaration)); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(238, fullStart); + var importClause = createNode(239, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || - parseOptional(25)) { - importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240); + parseOptional(26)) { + importClause.namedBindings = token() === 39 ? parseNamespaceImport() : parseNamedImportsOrExports(241); } return finishNode(importClause); } @@ -15992,11 +16005,11 @@ var ts; : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(247); - parseExpected(131); - parseExpected(18); - node.expression = parseModuleSpecifier(); + var node = createNode(248); + parseExpected(132); parseExpected(19); + node.expression = parseModuleSpecifier(); + parseExpected(20); return finishNode(node); } function parseModuleSpecifier() { @@ -16010,22 +16023,22 @@ var ts; } } function parseNamespaceImport() { - var namespaceImport = createNode(239); - parseExpected(38); - parseExpected(117); + var namespaceImport = createNode(240); + parseExpected(39); + parseExpected(118); namespaceImport.name = parseIdentifier(); return finishNode(namespaceImport); } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17); + node.elements = parseBracketedList(22, kind === 241 ? parseImportSpecifier : parseExportSpecifier, 17, 18); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(245); + return parseImportOrExportSpecifier(246); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(241); + return parseImportOrExportSpecifier(242); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -16033,9 +16046,9 @@ var ts; var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token() === 117) { + if (token() === 118) { node.propertyName = identifierName; - parseExpected(117); + parseExpected(118); checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); @@ -16044,23 +16057,23 @@ var ts; else { node.name = identifierName; } - if (kind === 241 && checkIdentifierIsKeyword) { + if (kind === 242 && checkIdentifierIsKeyword) { parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(243, fullStart); + var node = createNode(244, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(38)) { - parseExpected(139); + if (parseOptional(39)) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(244); - if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { - parseExpected(139); + node.exportClause = parseNamedImportsOrExports(245); + if (token() === 140 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -16068,14 +16081,14 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(242, fullStart); + var node = createNode(243, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(57)) { + if (parseOptional(58)) { node.isExportEquals = true; } else { - parseExpected(78); + parseExpected(79); } node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); @@ -16162,10 +16175,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return ts.hasModifier(node, 1) - || node.kind === 236 && node.moduleReference.kind === 247 - || node.kind === 237 - || node.kind === 242 + || node.kind === 237 && node.moduleReference.kind === 248 + || node.kind === 238 || node.kind === 243 + || node.kind === 244 ? node : undefined; }); @@ -16174,16 +16187,16 @@ var ts; (function (JSDocParser) { function isJSDocType() { switch (token()) { - case 38: - case 54: - case 18: - case 20: - case 50: - case 16: - case 88: - case 23: - case 93: - case 98: + case 39: + case 55: + case 19: + case 21: + case 51: + case 17: + case 89: + case 24: + case 94: + case 99: return true; } return ts.tokenIsIdentifierOrKeyword(token()); @@ -16201,23 +16214,23 @@ var ts; } JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; function parseJSDocTypeExpression() { - var result = createNode(266, scanner.getTokenPos()); - parseExpected(16); - result.type = parseJSDocTopLevelType(); + var result = createNode(267, scanner.getTokenPos()); parseExpected(17); + result.type = parseJSDocTopLevelType(); + parseExpected(18); fixupParentReferences(result); return finishNode(result); } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token() === 48) { - var unionType = createNode(270, type.pos); + if (token() === 49) { + var unionType = createNode(271, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token() === 57) { - var optionalType = createNode(277, type.pos); + if (token() === 58) { + var optionalType = createNode(278, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -16227,21 +16240,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token() === 20) { - var arrayType = createNode(269, type.pos); + if (token() === 21) { + var arrayType = createNode(270, type.pos); arrayType.elementType = type; nextToken(); - parseExpected(21); + parseExpected(22); type = finishNode(arrayType); } - else if (token() === 54) { - var nullableType = createNode(272, type.pos); + else if (token() === 55) { + var nullableType = createNode(273, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token() === 50) { - var nonNullableType = createNode(273, type.pos); + else if (token() === 51) { + var nonNullableType = createNode(274, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -16254,95 +16267,95 @@ var ts; } function parseBasicTypeExpression() { switch (token()) { - case 38: + case 39: return parseJSDocAllType(); - case 54: + case 55: return parseJSDocUnknownOrNullableType(); - case 18: + case 19: return parseJSDocUnionType(); - case 20: + case 21: return parseJSDocTupleType(); - case 50: + case 51: return parseJSDocNonNullableType(); - case 16: + case 17: return parseJSDocRecordType(); - case 88: + case 89: return parseJSDocFunctionType(); - case 23: + case 24: return parseJSDocVariadicType(); - case 93: + case 94: return parseJSDocConstructorType(); - case 98: + case 99: return parseJSDocThisType(); - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 94: - case 138: - case 129: case 133: + case 122: + case 137: + case 105: + case 95: + case 139: + case 130: + case 134: return parseTokenNode(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseJSDocLiteralType(); } return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(281); + var result = createNode(282); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(280); + var result = createNode(281); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(279); + var result = createNode(280); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(278); + var result = createNode(279); nextToken(); - parseExpected(18); + parseExpected(19); result.parameters = parseDelimitedList(23, parseJSDocParameter); checkForTrailingComma(result.parameters); - parseExpected(19); - if (token() === 55) { + parseExpected(20); + if (token() === 56) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(145); + var parameter = createNode(146); parameter.type = parseJSDocType(); - if (parseOptional(57)) { - parameter.questionToken = createNode(57); + if (parseOptional(58)) { + parameter.questionToken = createNode(58); } return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(276); + var result = createNode(277); result.name = parseSimplePropertyName(); - if (token() === 26) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); } else { - while (parseOptional(22)) { - if (token() === 26) { + while (parseOptional(23)) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); break; } @@ -16358,7 +16371,7 @@ var ts; var typeArguments = parseDelimitedList(24, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); - parseExpected(28); + parseExpected(29); return typeArguments; } function checkForEmptyTypeArgumentList(typeArguments) { @@ -16369,28 +16382,28 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(142, left.pos); + var result = createNode(143, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(274); + var result = createNode(275); result.literal = parseTypeLiteral(); return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(273); + var result = createNode(274); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(271); + var result = createNode(272); nextToken(); result.types = parseDelimitedList(26, parseJSDocType); checkForTrailingComma(result.types); - parseExpected(21); + parseExpected(22); return finishNode(result); } function checkForTrailingComma(list) { @@ -16400,45 +16413,45 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(270); + var result = createNode(271); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(19); + parseExpected(20); return finishNode(result); } function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = createNodeArray([firstType], firstType.pos); - while (parseOptional(48)) { + while (parseOptional(49)) { types.push(parseJSDocType()); } types.end = scanner.getStartPos(); return types; } function parseJSDocAllType() { - var result = createNode(267); + var result = createNode(268); nextToken(); return finishNode(result); } function parseJSDocLiteralType() { - var result = createNode(292); + var result = createNode(293); result.literal = parseLiteralTypeNode(); return finishNode(result); } function parseJSDocUnknownOrNullableType() { var pos = scanner.getStartPos(); nextToken(); - if (token() === 25 || - token() === 17 || - token() === 19 || - token() === 28 || - token() === 57 || - token() === 48) { - var result = createNode(268, pos); + if (token() === 26 || + token() === 18 || + token() === 20 || + token() === 29 || + token() === 58 || + token() === 49) { + var result = createNode(269, pos); return finishNode(result); } else { - var result = createNode(272, pos); + var result = createNode(273, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -16503,7 +16516,7 @@ var ts; } while (token() !== 1) { switch (token()) { - case 56: + case 57: if (state === 0 || state === 1) { removeTrailingNewlines(comments); parseTag(indent); @@ -16521,7 +16534,7 @@ var ts; state = 0; indent = 0; break; - case 38: + case 39: var asterisk = scanner.getTokenText(); if (state === 1 || state === 2) { state = 2; @@ -16532,7 +16545,7 @@ var ts; indent += asterisk.length; } break; - case 70: + case 71: pushComment(scanner.getTokenText()); state = 2; break; @@ -16582,7 +16595,7 @@ var ts; content.charCodeAt(start + 3) !== 42; } function createJSDocComment() { - var result = createNode(282, start); + var result = createNode(283, start); result.tags = tags; result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -16593,8 +16606,8 @@ var ts; } } function parseTag(indent) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getTokenPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -16648,7 +16661,7 @@ var ts; comments.push(text); indent += text.length; } - while (token() !== 56 && token() !== 1) { + while (token() !== 57 && token() !== 1) { switch (token()) { case 4: if (state >= 1) { @@ -16657,7 +16670,7 @@ var ts; } indent = 0; break; - case 56: + case 57: break; case 5: if (state === 2) { @@ -16671,7 +16684,7 @@ var ts; indent += whitespace.length; } break; - case 38: + case 39: if (state === 0) { state = 1; indent += scanner.getTokenText().length; @@ -16682,7 +16695,7 @@ var ts; pushComment(scanner.getTokenText()); break; } - if (token() === 56) { + if (token() === 57) { break; } nextJSDocToken(); @@ -16692,7 +16705,7 @@ var ts; return comments; } function parseUnknownTag(atToken, tagName) { - var result = createNode(283, atToken.pos); + var result = createNode(284, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -16710,7 +16723,7 @@ var ts; function tryParseTypeExpression() { return tryParse(function () { skipWhitespace(); - if (token() !== 16) { + if (token() !== 17) { return undefined; } return parseJSDocTypeExpression(); @@ -16721,14 +16734,14 @@ var ts; skipWhitespace(); var name; var isBracketed; - if (parseOptionalToken(20)) { + if (parseOptionalToken(21)) { name = parseJSDocIdentifierName(); skipWhitespace(); isBracketed = true; - if (parseOptionalToken(57)) { + if (parseOptionalToken(58)) { parseExpression(); } - parseExpected(21); + parseExpected(22); } else if (ts.tokenIsIdentifierOrKeyword(token())) { name = parseJSDocIdentifierName(); @@ -16747,7 +16760,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(285, atToken.pos); + var result = createNode(286, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -16758,20 +16771,20 @@ var ts; return finishNode(result); } function parseReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 286; })) { + if (ts.forEach(tags, function (t) { return t.kind === 287; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(286, atToken.pos); + var result = createNode(287, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function parseTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 287; })) { + if (ts.forEach(tags, function (t) { return t.kind === 288; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(287, atToken.pos); + var result = createNode(288, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); @@ -16786,7 +16799,7 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var result = createNode(290, atToken.pos); + var result = createNode(291, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.name = name; @@ -16795,7 +16808,7 @@ var ts; } function parseAugmentsTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); - var result = createNode(284, atToken.pos); + var result = createNode(285, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = typeExpression; @@ -16804,15 +16817,15 @@ var ts; function parseTypedefTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); - var typedefTag = createNode(289, atToken.pos); + var typedefTag = createNode(290, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(0); if (typedefTag.fullName) { var rightNode = typedefTag.fullName; while (true) { - if (rightNode.kind === 70 || !rightNode.body) { - typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name; + if (rightNode.kind === 71 || !rightNode.body) { + typedefTag.name = rightNode.kind === 71 ? rightNode : rightNode.name; break; } rightNode = rightNode.body; @@ -16821,9 +16834,9 @@ var ts; typedefTag.typeExpression = typeExpression; skipWhitespace(); if (typeExpression) { - if (typeExpression.type.kind === 276) { + if (typeExpression.type.kind === 277) { var jsDocTypeReference = typeExpression.type; - if (jsDocTypeReference.name.kind === 70) { + if (jsDocTypeReference.name.kind === 71) { var name = jsDocTypeReference.name; if (name.text === "Object") { typedefTag.jsDocTypeLiteral = scanChildTags(); @@ -16839,7 +16852,7 @@ var ts; } return finishNode(typedefTag); function scanChildTags() { - var jsDocTypeLiteral = createNode(291, scanner.getStartPos()); + var jsDocTypeLiteral = createNode(292, scanner.getStartPos()); var resumePos = scanner.getStartPos(); var canParseTag = true; var seenAsterisk = false; @@ -16847,7 +16860,7 @@ var ts; while (token() !== 1 && !parentTagTerminated) { nextJSDocToken(); switch (token()) { - case 56: + case 57: if (canParseTag) { parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); if (!parentTagTerminated) { @@ -16861,13 +16874,13 @@ var ts; canParseTag = true; seenAsterisk = false; break; - case 38: + case 39: if (seenAsterisk) { canParseTag = false; } seenAsterisk = true; break; - case 70: + case 71: canParseTag = false; break; case 1: @@ -16880,8 +16893,8 @@ var ts; function parseJSDocTypeNameWithNamespace(flags) { var pos = scanner.getTokenPos(); var typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (typeNameOrNamespaceName && parseOptional(22)) { - var jsDocNamespaceNode = createNode(232, pos); + if (typeNameOrNamespaceName && parseOptional(23)) { + var jsDocNamespaceNode = createNode(233, pos); jsDocNamespaceNode.flags |= flags; jsDocNamespaceNode.name = typeNameOrNamespaceName; jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4); @@ -16894,8 +16907,8 @@ var ts; } } function tryParseChildTag(parentTag) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getStartPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getStartPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -16925,7 +16938,7 @@ var ts; return false; } function parseTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 288; })) { + if (ts.forEach(tags, function (t) { return t.kind === 289; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } var typeParameters = createNodeArray(); @@ -16936,11 +16949,11 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(144, name.pos); + var typeParameter = createNode(145, name.pos); typeParameter.name = name; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token() === 25) { + if (token() === 26) { nextJSDocToken(); skipWhitespace(); } @@ -16948,7 +16961,7 @@ var ts; break; } } - var result = createNode(288, atToken.pos); + var result = createNode(289, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -16969,7 +16982,7 @@ var ts; } var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); - var result = createNode(70, pos); + var result = createNode(71, pos); result.text = content.substring(pos, end); finishNode(result, end); nextJSDocToken(); @@ -17050,7 +17063,7 @@ var ts; switch (node.kind) { case 9: case 8: - case 70: + case 71: return true; } return false; @@ -17267,16 +17280,16 @@ var ts; var ts; (function (ts) { function getModuleInstanceState(node) { - if (node.kind === 229 || node.kind === 230) { + if (node.kind === 230 || node.kind === 231) { return 0; } else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) { + else if ((node.kind === 238 || node.kind === 237) && !(ts.hasModifier(node, 1))) { return 0; } - else if (node.kind === 233) { + else if (node.kind === 234) { var state_1 = 0; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -17292,11 +17305,11 @@ var ts; }); return state_1; } - else if (node.kind === 232) { + else if (node.kind === 233) { var body = node.body; return body ? getModuleInstanceState(body) : 1; } - else if (node.kind === 70 && node.isInJSDocNamespace) { + else if (node.kind === 71 && node.isInJSDocNamespace) { return 0; } else { @@ -17401,7 +17414,7 @@ var ts; if (symbolFlags & 107455) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 233)) { symbol.valueDeclaration = node; } } @@ -17411,7 +17424,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 143) { + if (node.name.kind === 144) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression)) { return nameExpression.text; @@ -17422,21 +17435,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 151: + case 152: return "__constructor"; - case 159: - case 154: - return "__call"; case 160: case 155: - return "__new"; + return "__call"; + case 161: case 156: + return "__new"; + case 157: return "__index"; - case 243: + case 244: return "__export"; - case 242: + case 243: return node.isExportEquals ? "export=" : "default"; - case 193: + case 194: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2: return "export="; @@ -17449,23 +17462,23 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 227: case 228: + case 229: return ts.hasModifier(node, 512) ? "default" : undefined; - case 278: + case 279: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 145: - ts.Debug.assert(node.parent.kind === 278); + case 146: + ts.Debug.assert(node.parent.kind === 279); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "arg" + index; - case 289: + case 290: var parentNode = node.parent && node.parent.parent; var nameFromParentNode = void 0; - if (parentNode && parentNode.kind === 207) { + if (parentNode && parentNode.kind === 208) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70) { + if (nameIdentifier.kind === 71) { nameFromParentNode = nameIdentifier.text; } } @@ -17509,7 +17522,7 @@ var ts; } else { if (symbol.declarations && symbol.declarations.length && - (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) { + (isDefaultExport || (node.kind === 243 && !node.isExportEquals))) { message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; } } @@ -17529,7 +17542,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedModifierFlags(node) & 1; if (symbolFlags & 8388608) { - if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) { + if (node.kind === 246 || (node.kind === 237 && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -17537,9 +17550,9 @@ var ts; } } else { - var isJSDocTypedefInJSDocNamespace = node.kind === 289 && + var isJSDocTypedefInJSDocNamespace = node.kind === 290 && node.name && - node.name.kind === 70 && + node.name.kind === 71 && node.name.isInJSDocNamespace; if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32)) || isJSDocTypedefInJSDocNamespace) { var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | @@ -17598,7 +17611,7 @@ var ts; if (hasExplicitReturn) node.flags |= 256; } - if (node.kind === 264) { + if (node.kind === 265) { node.flags |= emitFlags; } if (isIIFE) { @@ -17674,70 +17687,70 @@ var ts; return; } switch (node.kind) { - case 212: + case 213: bindWhileStatement(node); break; - case 211: + case 212: bindDoStatement(node); break; - case 213: + case 214: bindForStatement(node); break; - case 214: case 215: + case 216: bindForInOrForOfStatement(node); break; - case 210: + case 211: bindIfStatement(node); break; - case 218: - case 222: + case 219: + case 223: bindReturnOrThrow(node); break; + case 218: case 217: - case 216: bindBreakOrContinueStatement(node); break; - case 223: + case 224: bindTryStatement(node); break; - case 220: + case 221: bindSwitchStatement(node); break; - case 234: + case 235: bindCaseBlock(node); break; - case 256: + case 257: bindCaseClause(node); break; - case 221: + case 222: bindLabeledStatement(node); break; - case 191: + case 192: bindPrefixUnaryExpressionFlow(node); break; - case 192: + case 193: bindPostfixUnaryExpressionFlow(node); break; - case 193: + case 194: bindBinaryExpressionFlow(node); break; - case 187: + case 188: bindDeleteExpressionFlow(node); break; - case 194: + case 195: bindConditionalExpressionFlow(node); break; - case 225: + case 226: bindVariableDeclarationFlow(node); break; - case 180: + case 181: bindCallExpressionFlow(node); break; - case 282: + case 283: bindJSDocComment(node); break; - case 289: + case 290: bindJSDocTypedefTag(node); break; default: @@ -17747,26 +17760,26 @@ var ts; } function isNarrowingExpression(expr) { switch (expr.kind) { - case 70: - case 98: - case 178: + case 71: + case 99: + case 179: return isNarrowableReference(expr); - case 180: + case 181: return hasNarrowableArgument(expr); - case 184: + case 185: return isNarrowingExpression(expr.expression); - case 193: + case 194: return isNarrowingBinaryExpression(expr); - case 191: - return expr.operator === 50 && isNarrowingExpression(expr.operand); + case 192: + return expr.operator === 51 && isNarrowingExpression(expr.operand); } return false; } function isNarrowableReference(expr) { - return expr.kind === 70 || - expr.kind === 98 || - expr.kind === 96 || - expr.kind === 178 && isNarrowableReference(expr.expression); + return expr.kind === 71 || + expr.kind === 99 || + expr.kind === 97 || + expr.kind === 179 && isNarrowableReference(expr.expression); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -17777,41 +17790,41 @@ var ts; } } } - if (expr.expression.kind === 178 && + if (expr.expression.kind === 179 && isNarrowableReference(expr.expression.expression)) { return true; } return false; } function isNarrowingTypeofOperands(expr1, expr2) { - return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; + return expr1.kind === 189 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; } function isNarrowingBinaryExpression(expr) { switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableReference(expr.left); - case 31: case 32: case 33: case 34: + case 35: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 92: + case 93: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowingExpression(expr.right); } return false; } function isNarrowableOperand(expr) { switch (expr.kind) { - case 184: + case 185: return isNarrowableOperand(expr.expression); - case 193: + case 194: switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowableOperand(expr.right); } } @@ -17845,8 +17858,8 @@ var ts; if (!expression) { return flags & 32 ? antecedent : unreachableFlow; } - if (expression.kind === 100 && flags & 64 || - expression.kind === 85 && flags & 32) { + if (expression.kind === 101 && flags & 64 || + expression.kind === 86 && flags & 32) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -17901,34 +17914,34 @@ var ts; function isStatementCondition(node) { var parent = node.parent; switch (parent.kind) { - case 210: - case 212: case 211: - return parent.expression === node; case 213: - case 194: + case 212: + return parent.expression === node; + case 214: + case 195: return parent.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 184) { + if (node.kind === 185) { node = node.expression; } - else if (node.kind === 191 && node.operator === 50) { + else if (node.kind === 192 && node.operator === 51) { node = node.operand; } else { - return node.kind === 193 && (node.operatorToken.kind === 52 || - node.operatorToken.kind === 53); + return node.kind === 194 && (node.operatorToken.kind === 53 || + node.operatorToken.kind === 54); } } } function isTopLevelLogicalExpression(node) { - while (node.parent.kind === 184 || - node.parent.kind === 191 && - node.parent.operator === 50) { + while (node.parent.kind === 185 || + node.parent.kind === 192 && + node.parent.operator === 51) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent); @@ -17969,7 +17982,7 @@ var ts; } function bindDoStatement(node) { var preDoLabel = createLoopLabel(); - var enclosingLabeledStatement = node.parent.kind === 221 + var enclosingLabeledStatement = node.parent.kind === 222 ? ts.lastOrUndefined(activeLabels) : undefined; var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel(); @@ -18001,13 +18014,13 @@ var ts; var postLoopLabel = createBranchLabel(); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 215) { + if (node.kind === 216) { bind(node.awaitModifier); } bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 226) { + if (node.initializer.kind !== 227) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -18029,7 +18042,7 @@ var ts; } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 218) { + if (node.kind === 219) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -18049,7 +18062,7 @@ var ts; return undefined; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - var flowLabel = node.kind === 217 ? breakTarget : continueTarget; + var flowLabel = node.kind === 218 ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -18112,7 +18125,7 @@ var ts; preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; }); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 258; }); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -18177,13 +18190,13 @@ var ts; if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); } - if (!node.statement || node.statement.kind !== 211) { + if (!node.statement || node.statement.kind !== 212) { addAntecedent(postStatementLabel, currentFlow); currentFlow = finishFlowLabel(postStatementLabel); } } function bindDestructuringTargetFlow(node) { - if (node.kind === 193 && node.operatorToken.kind === 57) { + if (node.kind === 194 && node.operatorToken.kind === 58) { bindAssignmentTargetFlow(node.left); } else { @@ -18194,10 +18207,10 @@ var ts; if (isNarrowableReference(node)) { currentFlow = createFlowAssignment(currentFlow, node); } - else if (node.kind === 176) { + else if (node.kind === 177) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { var e = _a[_i]; - if (e.kind === 197) { + if (e.kind === 198) { bindAssignmentTargetFlow(e.expression); } else { @@ -18205,16 +18218,16 @@ var ts; } } } - else if (node.kind === 177) { + else if (node.kind === 178) { for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { var p = _c[_b]; - if (p.kind === 260) { + if (p.kind === 261) { bindDestructuringTargetFlow(p.initializer); } - else if (p.kind === 261) { + else if (p.kind === 262) { bindAssignmentTargetFlow(p.name); } - else if (p.kind === 262) { + else if (p.kind === 263) { bindAssignmentTargetFlow(p.expression); } } @@ -18222,7 +18235,7 @@ var ts; } function bindLogicalExpression(node, trueTarget, falseTarget) { var preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { bindCondition(node.left, preRightLabel, falseTarget); } else { @@ -18233,7 +18246,7 @@ var ts; bindCondition(node.right, trueTarget, falseTarget); } function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 50) { + if (node.operator === 51) { var saveTrueTarget = currentTrueTarget; currentTrueTarget = currentFalseTarget; currentFalseTarget = saveTrueTarget; @@ -18243,20 +18256,20 @@ var ts; } else { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } } function bindPostfixUnaryExpressionFlow(node) { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } function bindBinaryExpressionFlow(node) { var operator = node.operatorToken.kind; - if (operator === 52 || operator === 53) { + if (operator === 53 || operator === 54) { if (isTopLevelLogicalExpression(node)) { var postExpressionLabel = createBranchLabel(); bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); @@ -18270,7 +18283,7 @@ var ts; bindEachChild(node); if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 57 && node.left.kind === 179) { + if (operator === 58 && node.left.kind === 180) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -18281,7 +18294,7 @@ var ts; } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { bindAssignmentTargetFlow(node.expression); } } @@ -18314,20 +18327,20 @@ var ts; } function bindVariableDeclarationFlow(node) { bindEachChild(node); - if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) { + if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) { bindInitializedVariableFlow(node); } } function bindJSDocComment(node) { ts.forEachChild(node, function (n) { - if (n.kind !== 289) { + if (n.kind !== 290) { bind(n); } }); } function bindJSDocTypedefTag(node) { ts.forEachChild(node, function (n) { - if (node.fullName && n === node.name && node.fullName.kind !== 70) { + if (node.fullName && n === node.name && node.fullName.kind !== 71) { return; } bind(n); @@ -18335,10 +18348,10 @@ var ts; } function bindCallExpressionFlow(node) { var expr = node.expression; - while (expr.kind === 184) { + while (expr.kind === 185) { expr = expr.expression; } - if (expr.kind === 185 || expr.kind === 186) { + if (expr.kind === 186 || expr.kind === 187) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -18346,7 +18359,7 @@ var ts; else { bindEachChild(node); } - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -18355,53 +18368,53 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 198: - case 228: - case 231: - case 177: - case 162: - case 291: - case 274: - case 253: - return 1; + case 199: case 229: - return 1 | 64; - case 278: case 232: + case 178: + case 163: + case 292: + case 275: + case 254: + return 1; case 230: - case 171: + return 1 | 64; + case 279: + case 233: + case 231: + case 172: return 1 | 32; - case 264: + case 265: return 1 | 4 | 32; - case 150: + case 151: if (ts.isObjectLiteralOrClassExpressionMethod(node)) { return 1 | 4 | 32 | 8 | 128; } - case 151: - case 227: - case 149: case 152: + case 228: + case 150: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return 1 | 4 | 32 | 8; - case 185: case 186: + case 187: return 1 | 4 | 32 | 8 | 16; - case 233: + case 234: return 4; - case 148: + case 149: return node.initializer ? 4 : 0; - case 259: - case 213: + case 260: case 214: case 215: - case 234: + case 216: + case 235: return 2; - case 206: + case 207: return ts.isFunctionLike(node.parent) ? 0 : 2; } return 0; @@ -18417,38 +18430,38 @@ var ts; } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 232: + case 233: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 264: + case 265: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 198: - case 228: + case 199: + case 229: return declareClassMember(node, symbolFlags, symbolExcludes); - case 231: + case 232: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 162: - case 177: - case 229: - case 274: - case 291: - case 253: + case 163: + case 178: + case 230: + case 275: + case 292: + case 254: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 159: case 160: - case 154: + case 161: case 155: case 156: - case 150: - case 149: + case 157: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: case 186: - case 278: - case 230: - case 171: + case 187: + case 279: + case 231: + case 172: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } } @@ -18463,11 +18476,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 264 ? node : node.body; - if (body && (body.kind === 264 || body.kind === 233)) { + var body = node.kind === 265 ? node : node.body; + if (body && (body.kind === 265 || body.kind === 234)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 243 || stat.kind === 242) { + if (stat.kind === 244 || stat.kind === 243) { return true; } } @@ -18545,11 +18558,11 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 || prop.name.kind !== 70) { + if (prop.kind === 263 || prop.name.kind !== 71) { continue; } var identifier = prop.name; - var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150 + var currentKind = prop.kind === 261 || prop.kind === 262 || prop.kind === 151 ? 1 : 2; var existingKind = seen.get(identifier.text); @@ -18577,10 +18590,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 232: + case 233: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 264: + case 265: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -18598,8 +18611,8 @@ var ts; } function checkStrictModeIdentifier(node) { if (inStrictMode && - node.originalKeywordKind >= 107 && - node.originalKeywordKind <= 115 && + node.originalKeywordKind >= 108 && + node.originalKeywordKind <= 116 && !ts.isIdentifierName(node) && !ts.isInAmbientContext(node)) { if (!file.parseDiagnostics.length) { @@ -18627,17 +18640,17 @@ var ts; } } function checkStrictModeDeleteExpression(node) { - if (inStrictMode && node.expression.kind === 70) { + if (inStrictMode && node.expression.kind === 71) { var span_2 = ts.getErrorSpanForNode(file, node.expression); file.bindDiagnostics.push(ts.createFileDiagnostic(file, span_2.start, span_2.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); } } function isEvalOrArgumentsIdentifier(node) { - return node.kind === 70 && + return node.kind === 71 && (node.text === "eval" || node.text === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 70) { + if (name && name.kind === 71) { var identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { var span_3 = ts.getErrorSpanForNode(file, name); @@ -18670,8 +18683,8 @@ var ts; } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2) { - if (blockScopeContainer.kind !== 264 && - blockScopeContainer.kind !== 232 && + if (blockScopeContainer.kind !== 265 && + blockScopeContainer.kind !== 233 && !ts.isFunctionLike(blockScopeContainer)) { var errorSpan = ts.getErrorSpanForNode(file, node); file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); @@ -18690,7 +18703,7 @@ var ts; } function checkStrictModePrefixUnaryExpression(node) { if (inStrictMode) { - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { checkStrictModeEvalOrArguments(node, node.operand); } } @@ -18717,7 +18730,7 @@ var ts; bindJSDocTypedefTagIfAny(node); } bindWorker(node); - if (node.kind > 141) { + if (node.kind > 142) { var saveParent = parent; parent = node; var containerFlags = getContainerFlags(node); @@ -18745,7 +18758,7 @@ var ts; } for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) { var tag = _c[_b]; - if (tag.kind === 289) { + if (tag.kind === 290) { var savedParent = parent; parent = jsDoc; bind(tag); @@ -18774,26 +18787,26 @@ var ts; } function bindWorker(node) { switch (node.kind) { - case 70: + case 71: if (node.isInJSDocNamespace) { var parentNode = node.parent; - while (parentNode && parentNode.kind !== 289) { + while (parentNode && parentNode.kind !== 290) { parentNode = parentNode.parent; } bindBlockScopedDeclaration(parentNode, 524288, 793064); break; } - case 98: - if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) { + case 99: + if (currentFlow && (ts.isExpression(node) || parent.kind === 262)) { node.flowNode = currentFlow; } return checkStrictModeIdentifier(node); - case 178: + case 179: if (currentFlow && isNarrowableReference(node)) { node.flowNode = currentFlow; } break; - case 193: + case 194: var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { case 1: @@ -18817,49 +18830,49 @@ var ts; ts.Debug.fail("Unknown special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 259: + case 260: return checkStrictModeCatchClause(node); - case 187: + case 188: return checkStrictModeDeleteExpression(node); case 8: return checkStrictModeNumericLiteral(node); - case 192: + case 193: return checkStrictModePostfixUnaryExpression(node); - case 191: + case 192: return checkStrictModePrefixUnaryExpression(node); - case 219: + case 220: return checkStrictModeWithStatement(node); - case 168: + case 169: seenThisKeyword = true; return; - case 157: + case 158: return checkTypePredicate(node); - case 144: - return declareSymbolAndAddToSymbolTable(node, 262144, 530920); case 145: + return declareSymbolAndAddToSymbolTable(node, 262144, 530920); + case 146: return bindParameter(node); - case 225: - case 175: + case 226: + case 176: return bindVariableDeclarationOrBindingElement(node); + case 149: case 148: - case 147: - case 275: + case 276: return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0); - case 290: + case 291: return bindJSDocProperty(node); - case 260: case 261: + case 262: return bindPropertyOrMethodOrAccessor(node, 4, 0); - case 263: + case 264: return bindPropertyOrMethodOrAccessor(node, 8, 900095); - case 262: - case 254: + case 263: + case 255: var root = container; var hasRest = false; while (root.parent) { - if (root.kind === 177 && - root.parent.kind === 193 && - root.parent.operatorToken.kind === 57 && + if (root.kind === 178 && + root.parent.kind === 194 && + root.parent.operatorToken.kind === 58 && root.parent.left === root) { hasRest = true; break; @@ -18867,91 +18880,91 @@ var ts; root = root.parent; } return; - case 154: case 155: case 156: + case 157: return declareSymbolAndAddToSymbolTable(node, 131072, 0); + case 151: case 150: - case 149: return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263); - case 227: + case 228: return bindFunctionDeclaration(node); - case 151: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 152: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 153: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 154: return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 159: case 160: - case 278: + case 161: + case 279: return bindFunctionOrConstructorType(node); - case 162: - case 171: - case 291: - case 274: + case 163: + case 172: + case 292: + case 275: return bindAnonymousDeclaration(node, 2048, "__type"); - case 177: + case 178: return bindObjectLiteralExpression(node); - case 185: case 186: + case 187: return bindFunctionExpression(node); - case 180: + case 181: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; - case 198: - case 228: + case 199: + case 229: inStrictMode = true; return bindClassLikeDeclaration(node); - case 229: + case 230: return bindBlockScopedDeclaration(node, 64, 792968); - case 289: - if (!node.fullName || node.fullName.kind === 70) { + case 290: + if (!node.fullName || node.fullName.kind === 71) { return bindBlockScopedDeclaration(node, 524288, 793064); } break; - case 230: - return bindBlockScopedDeclaration(node, 524288, 793064); case 231: - return bindEnumDeclaration(node); + return bindBlockScopedDeclaration(node, 524288, 793064); case 232: + return bindEnumDeclaration(node); + case 233: return bindModuleDeclaration(node); - case 253: + case 254: return bindJsxAttributes(node); - case 252: + case 253: return bindJsxAttribute(node, 4, 0); - case 236: - case 239: - case 241: - case 245: + case 237: + case 240: + case 242: + case 246: return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 235: + case 236: return bindNamespaceExportDeclaration(node); - case 238: + case 239: return bindImportClause(node); - case 243: + case 244: return bindExportDeclaration(node); - case 242: + case 243: return bindExportAssignment(node); - case 264: + case 265: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 206: + case 207: if (!ts.isFunctionLike(node.parent)) { return; } - case 233: + case 234: return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { var parameterName = node.parameterName, type = node.type; - if (parameterName && parameterName.kind === 70) { + if (parameterName && parameterName.kind === 71) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 168) { + if (parameterName && parameterName.kind === 169) { seenThisKeyword = true; } bind(type); @@ -18970,7 +18983,7 @@ var ts; bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } else { - var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node) + var flags = node.kind === 243 && ts.exportAssignmentIsAlias(node) ? 8388608 : 4; declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16); @@ -18980,7 +18993,7 @@ var ts; if (node.modifiers && node.modifiers.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); } - if (node.parent.kind !== 264) { + if (node.parent.kind !== 265) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); return; } @@ -19029,9 +19042,9 @@ var ts; isNameOfExportsOrModuleExportsAliasDeclaration(node); } function isNameOfExportsOrModuleExportsAliasDeclaration(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = lookupSymbolForName(node.text); - if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) { + if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 226) { var declaration = symbol.valueDeclaration; if (declaration.initializer) { return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer); @@ -19057,16 +19070,16 @@ var ts; ts.Debug.assert(ts.isInJavaScriptFile(node)); var container = ts.getThisContainer(node, false); switch (container.kind) { - case 227: - case 185: + case 228: + case 186: container.symbol.members = container.symbol.members || ts.createMap(); declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4); break; - case 151: - case 148: - case 150: case 152: + case 149: + case 151: case 153: + case 154: var containingClass = container.parent; var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0); if (symbol) { @@ -19118,7 +19131,7 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 228) { + if (node.kind === 229) { bindBlockScopedDeclaration(node, 32, 899519); } else { @@ -19229,15 +19242,15 @@ var ts; return false; } if (currentFlow === unreachableFlow) { - var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) || - node.kind === 228 || - (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 209) || + node.kind === 229 || + (node.kind === 233 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 232 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentFlow = reportedUnreachableFlow; var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 207 || + (node.kind !== 208 || ts.getCombinedNodeFlags(node.declarationList) & 3 || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -19251,56 +19264,56 @@ var ts; function computeTransformFlagsForNode(node, subtreeFlags) { var kind = node.kind; switch (kind) { - case 180: - return computeCallExpression(node, subtreeFlags); case 181: + return computeCallExpression(node, subtreeFlags); + case 182: return computeNewExpression(node, subtreeFlags); - case 232: + case 233: return computeModuleDeclaration(node, subtreeFlags); - case 184: + case 185: return computeParenthesizedExpression(node, subtreeFlags); - case 193: + case 194: return computeBinaryExpression(node, subtreeFlags); - case 209: + case 210: return computeExpressionStatement(node, subtreeFlags); - case 145: + case 146: return computeParameter(node, subtreeFlags); - case 186: + case 187: return computeArrowFunction(node, subtreeFlags); - case 185: + case 186: return computeFunctionExpression(node, subtreeFlags); - case 227: + case 228: return computeFunctionDeclaration(node, subtreeFlags); - case 225: - return computeVariableDeclaration(node, subtreeFlags); case 226: + return computeVariableDeclaration(node, subtreeFlags); + case 227: return computeVariableDeclarationList(node, subtreeFlags); - case 207: + case 208: return computeVariableStatement(node, subtreeFlags); - case 221: + case 222: return computeLabeledStatement(node, subtreeFlags); - case 228: + case 229: return computeClassDeclaration(node, subtreeFlags); - case 198: + case 199: return computeClassExpression(node, subtreeFlags); - case 258: - return computeHeritageClause(node, subtreeFlags); case 259: + return computeHeritageClause(node, subtreeFlags); + case 260: return computeCatchClause(node, subtreeFlags); - case 200: + case 201: return computeExpressionWithTypeArguments(node, subtreeFlags); - case 151: + case 152: return computeConstructor(node, subtreeFlags); - case 148: + case 149: return computePropertyDeclaration(node, subtreeFlags); - case 150: + case 151: return computeMethod(node, subtreeFlags); - case 152: case 153: + case 154: return computeAccessor(node, subtreeFlags); - case 236: + case 237: return computeImportEquals(node, subtreeFlags); - case 178: + case 179: return computePropertyAccess(node, subtreeFlags); default: return computeOther(node, kind, subtreeFlags); @@ -19323,13 +19336,13 @@ var ts; } function isSuperOrSuperProperty(node, kind) { switch (kind) { - case 96: + case 97: return true; - case 178: case 179: + case 180: var expression = node.expression; var expressionKind = expression.kind; - return expressionKind === 96; + return expressionKind === 97; } return false; } @@ -19348,14 +19361,14 @@ var ts; var transformFlags = subtreeFlags; var operatorTokenKind = node.operatorToken.kind; var leftKind = node.left.kind; - if (operatorTokenKind === 57 && leftKind === 177) { + if (operatorTokenKind === 58 && leftKind === 178) { transformFlags |= 8 | 192 | 3072; } - else if (operatorTokenKind === 57 && leftKind === 176) { + else if (operatorTokenKind === 58 && leftKind === 177) { transformFlags |= 192 | 3072; } - else if (operatorTokenKind === 39 - || operatorTokenKind === 61) { + else if (operatorTokenKind === 40 + || operatorTokenKind === 62) { transformFlags |= 32; } node.transformFlags = transformFlags | 536870912; @@ -19390,8 +19403,8 @@ var ts; var expression = node.expression; var expressionKind = expression.kind; var expressionTransformFlags = expression.transformFlags; - if (expressionKind === 201 - || expressionKind === 183) { + if (expressionKind === 202 + || expressionKind === 184) { transformFlags |= 3; } if (expressionTransformFlags & 1024) { @@ -19434,10 +19447,10 @@ var ts; function computeHeritageClause(node, subtreeFlags) { var transformFlags = subtreeFlags; switch (node.token) { - case 84: + case 85: transformFlags |= 192; break; - case 107: + case 108: transformFlags |= 3; break; default: @@ -19593,7 +19606,7 @@ var ts; var transformFlags = subtreeFlags; var expression = node.expression; var expressionKind = expression.kind; - if (expressionKind === 96) { + if (expressionKind === 97) { transformFlags |= 16384; } node.transformFlags = transformFlags | 536870912; @@ -19676,44 +19689,44 @@ var ts; var transformFlags = subtreeFlags; var excludeFlags = 536872257; switch (kind) { - case 119: - case 190: + case 120: + case 191: transformFlags |= 8 | 16; break; - case 113: - case 111: + case 114: case 112: - case 116: - case 123: - case 75: - case 231: - case 263: - case 183: - case 201: + case 113: + case 117: + case 124: + case 76: + case 232: + case 264: + case 184: case 202: - case 130: + case 203: + case 131: transformFlags |= 3; break; - case 248: case 249: case 250: - case 10: case 251: + case 10: case 252: case 253: case 254: case 255: + case 256: transformFlags |= 4; break; - case 12: case 13: case 14: case 15: - case 195: - case 182: - case 261: - case 114: - case 203: + case 16: + case 196: + case 183: + case 262: + case 115: + case 204: transformFlags |= 192; break; case 9: @@ -19726,27 +19739,26 @@ var ts; transformFlags |= 192; } break; - case 215: + case 216: if (node.awaitModifier) { transformFlags |= 8; } transformFlags |= 192; break; - case 196: + case 197: transformFlags |= 8 | 192 | 16777216; break; - case 118: - case 132: - case 129: + case 119: case 133: - case 135: - case 121: + case 130: + case 134: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: case 157: @@ -19760,55 +19772,56 @@ var ts; case 165: case 166: case 167: - case 229: - case 230: case 168: + case 230: + case 231: case 169: case 170: case 171: case 172: + case 173: transformFlags = 3; excludeFlags = -3; break; - case 143: + case 144: transformFlags |= 2097152; if (subtreeFlags & 16384) { transformFlags |= 65536; } break; - case 197: + case 198: transformFlags |= 192 | 524288; break; - case 262: + case 263: transformFlags |= 8 | 1048576; break; - case 96: + case 97: transformFlags |= 192; break; - case 98: + case 99: transformFlags |= 16384; break; - case 173: + case 174: transformFlags |= 192 | 8388608; if (subtreeFlags & 524288) { transformFlags |= 8 | 1048576; } excludeFlags = 537396545; break; - case 174: + case 175: transformFlags |= 192 | 8388608; excludeFlags = 537396545; break; - case 175: + case 176: transformFlags |= 192; if (node.dotDotDotToken) { transformFlags |= 524288; } break; - case 146: + case 147: transformFlags |= 3 | 4096; break; - case 177: + case 178: excludeFlags = 540087617; if (subtreeFlags & 2097152) { transformFlags |= 192; @@ -19820,29 +19833,29 @@ var ts; transformFlags |= 8; } break; - case 176: - case 181: + case 177: + case 182: excludeFlags = 537396545; if (subtreeFlags & 524288) { transformFlags |= 192; } break; - case 211: case 212: case 213: case 214: + case 215: if (subtreeFlags & 4194304) { transformFlags |= 192; } break; - case 264: + case 265: if (subtreeFlags & 32768) { transformFlags |= 192; } break; - case 218: - case 216: + case 219: case 217: + case 218: transformFlags |= 33554432; break; } @@ -19850,57 +19863,57 @@ var ts; return transformFlags & ~excludeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 157 && kind <= 172) { + if (kind >= 158 && kind <= 173) { return -3; } switch (kind) { - case 180: case 181: - case 176: + case 182: + case 177: return 537396545; - case 232: + case 233: return 574674241; - case 145: + case 146: return 536872257; - case 186: + case 187: return 601249089; - case 185: - case 227: + case 186: + case 228: return 601281857; - case 226: + case 227: return 546309441; - case 228: - case 198: + case 229: + case 199: return 539358529; - case 151: - return 601015617; - case 150: case 152: + return 601015617; + case 151: case 153: + case 154: return 601015617; - case 118: - case 132: - case 129: - case 135: + case 119: case 133: - case 121: + case 130: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 134: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: - case 229: + case 157: case 230: + case 231: return -3; - case 177: + case 178: return 540087617; - case 259: + case 260: return 537920833; - case 173: case 174: + case 175: return 537396545; default: return 536872257; @@ -20976,12 +20989,17 @@ var ts; var typeofType = createTypeofType(); var _jsxNamespace; var _jsxFactoryEntity; + var _jsxElementPropertiesName; + var _hasComputedJsxElementPropertiesName = false; + var _jsxElementChildrenPropertyName; + var _hasComputedJsxElementChildrenPropertyName = false; var jsxTypes = ts.createMap(); var JsxNames = { JSX: "JSX", IntrinsicElements: "IntrinsicElements", ElementClass: "ElementClass", ElementAttributesPropertyNameContainer: "ElementAttributesProperty", + ElementChildrenAttributeNameContainer: "ElementChildrenAttribute", Element: "Element", IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" @@ -20997,7 +21015,7 @@ var ts; initializeTypeChecker(); return checker; function getJsxNamespace() { - if (_jsxNamespace === undefined) { + if (!_jsxNamespace) { _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); @@ -21096,7 +21114,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) { + (target.valueDeclaration.kind === 233 && source.valueDeclaration.kind !== 233))) { target.valueDeclaration = source.valueDeclaration; } ts.addRange(target.declarations, source.declarations); @@ -21199,7 +21217,7 @@ var ts; return symbol.flags & 134217728 ? symbol.checkFlags : 0; } function isGlobalSourceFile(node) { - return node.kind === 264 && !ts.isExternalOrCommonJsModule(node); + return node.kind === 265 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -21243,20 +21261,20 @@ var ts; return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile); } if (declaration.pos <= usage.pos) { - if (declaration.kind === 175) { - var errorBindingElement = ts.getAncestor(usage, 175); + if (declaration.kind === 176) { + var errorBindingElement = ts.getAncestor(usage, 176); if (errorBindingElement) { return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage); + return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 226), usage); } - else if (declaration.kind === 225) { + else if (declaration.kind === 226) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } return true; } - if (usage.parent.kind === 245) { + if (usage.parent.kind === 246) { return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); @@ -21264,17 +21282,17 @@ var ts; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { - case 207: - case 213: - case 215: + case 208: + case 214: + case 216: if (isSameScopeDescendentOf(usage, declaration, container)) { return true; } break; } switch (declaration.parent.parent.kind) { - case 214: case 215: + case 216: if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { return true; } @@ -21290,16 +21308,16 @@ var ts; return true; } var initializerOfProperty = current.parent && - current.parent.kind === 148 && + current.parent.kind === 149 && current.parent.initializer === current; if (initializerOfProperty) { if (ts.getModifierFlags(current.parent) & 32) { - if (declaration.kind === 150) { + if (declaration.kind === 151) { return true; } } else { - var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32); + var isDeclarationInstanceProperty = declaration.kind === 149 && !(ts.getModifierFlags(declaration) & 32); if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) { return true; } @@ -21320,18 +21338,18 @@ var ts; if (result = getSymbol(location.locals, name, meaning)) { var useResult = true; if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 793064 && lastLocation.kind !== 282) { + if (meaning & result.flags & 793064 && lastLocation.kind !== 283) { useResult = result.flags & 262144 ? lastLocation === location.type || - lastLocation.kind === 145 || - lastLocation.kind === 144 + lastLocation.kind === 146 || + lastLocation.kind === 145 : false; } if (meaning & 107455 && result.flags & 1) { useResult = - lastLocation.kind === 145 || + lastLocation.kind === 146 || (lastLocation === location.type && - result.valueDeclaration.kind === 145); + result.valueDeclaration.kind === 146); } } if (useResult) { @@ -21343,13 +21361,13 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 232: + case 233: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 264 || ts.isAmbientModule(location)) { + if (location.kind === 265 || ts.isAmbientModule(location)) { if (result = moduleExports.get("default")) { var localSymbol = ts.getLocalSymbolForExportDefault(result); if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { @@ -21360,7 +21378,7 @@ var ts; var moduleExport = moduleExports.get(name); if (moduleExport && moduleExport.flags === 8388608 && - ts.getDeclarationOfKind(moduleExport, 245)) { + ts.getDeclarationOfKind(moduleExport, 246)) { break; } } @@ -21368,13 +21386,13 @@ var ts; break loop; } break; - case 231: + case 232: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) { break loop; } break; + case 149: case 148: - case 147: if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -21384,9 +21402,9 @@ var ts; } } break; - case 228: - case 198: case 229: + case 199: + case 230: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = undefined; @@ -21398,7 +21416,7 @@ var ts; } break loop; } - if (location.kind === 198 && meaning & 32) { + if (location.kind === 199 && meaning & 32) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -21406,28 +21424,28 @@ var ts; } } break; - case 143: + case 144: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 229) { + if (ts.isClassLike(grandparent) || grandparent.kind === 230) { if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 186: + case 154: + case 228: + case 187: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 185: + case 186: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; @@ -21440,8 +21458,8 @@ var ts; } } break; - case 146: - if (location.parent && location.parent.kind === 145) { + case 147: + if (location.parent && location.parent.kind === 146) { location = location.parent; } if (location.parent && ts.isClassElement(location.parent)) { @@ -21486,7 +21504,7 @@ var ts; } if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; - if (decls && decls.length === 1 && decls[0].kind === 235) { + if (decls && decls.length === 1 && decls[0].kind === 236) { error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name); } } @@ -21496,14 +21514,14 @@ var ts; function isTypeParameterSymbolDeclaredInContainer(symbol, container) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - if (decl.kind === 144 && decl.parent === container) { + if (decl.kind === 145 && decl.parent === container) { return true; } } return false; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 71 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, true); @@ -21541,10 +21559,10 @@ var ts; } function getEntityNameForExtendingInterface(node) { switch (node.kind) { - case 70: - case 178: + case 71: + case 179: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; - case 200: + case 201: ts.Debug.assert(ts.isEntityNameExpression(node.expression)); return node.expression; default: @@ -21590,7 +21608,7 @@ var ts; } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384)); - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; }); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 232) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined"); if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { if (result.flags & 2) { @@ -21609,17 +21627,17 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } - return ts.findAncestor(node, function (n) { return n.kind === 237; }); + return ts.findAncestor(node, function (n) { return n.kind === 238; }); } } function getDeclarationOfAliasSymbol(symbol) { return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - if (node.moduleReference.kind === 247) { + if (node.moduleReference.kind === 248) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); @@ -21725,19 +21743,19 @@ var ts; } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) { switch (node.kind) { - case 236: + case 237: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 238: - return getTargetOfImportClause(node, dontRecursivelyResolve); case 239: + return getTargetOfImportClause(node, dontRecursivelyResolve); + case 240: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 241: + case 242: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 245: + case 246: return getTargetOfExportSpecifier(node, dontRecursivelyResolve); - case 242: + case 243: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 235: + case 236: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); } } @@ -21782,10 +21800,10 @@ var ts; links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); ts.Debug.assert(!!node); - if (node.kind === 242) { + if (node.kind === 243) { checkExpressionCached(node.expression); } - else if (node.kind === 245) { + else if (node.kind === 246) { checkExpressionCached(node.propertyName || node.name); } else if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -21794,14 +21812,14 @@ var ts; } } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { - if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { + if (entityName.kind === 71 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 70 || entityName.parent.kind === 142) { + if (entityName.kind === 71 || entityName.parent.kind === 143) { return resolveEntityName(entityName, 1920, false, dontResolveAlias); } else { - ts.Debug.assert(entityName.parent.kind === 236); + ts.Debug.assert(entityName.parent.kind === 237); return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias); } } @@ -21813,26 +21831,26 @@ var ts; return undefined; } var symbol; - if (name.kind === 70) { + if (name.kind === 71) { var message = meaning === 1920 ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(location || name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 142 || name.kind === 178) { + else if (name.kind === 143 || name.kind === 179) { var left = void 0; - if (name.kind === 142) { + if (name.kind === 143) { left = name.left; } - else if (name.kind === 178 && - (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) { + else if (name.kind === 179 && + (name.expression.kind === 185 || ts.isEntityNameExpression(name.expression))) { left = name.expression; } else { return undefined; } - var right = name.kind === 142 ? name.right : name.name; + var right = name.kind === 143 ? name.right : name.name; var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location); if (!namespace || ts.nodeIsMissing(right)) { return undefined; @@ -21848,7 +21866,7 @@ var ts; return undefined; } } - else if (name.kind === 184) { + else if (name.kind === 185) { return ts.isEntityNameExpression(name.expression) ? resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) : undefined; @@ -21864,7 +21882,7 @@ var ts; } function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) { if (isForAugmentation === void 0) { isForAugmentation = false; } - if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) { + if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 13) { return; } var moduleReferenceLiteral = moduleReferenceExpression; @@ -22045,7 +22063,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 151 && ts.nodeIsPresent(member.body)) { + if (member.kind === 152 && ts.nodeIsPresent(member.body)) { return member; } } @@ -22118,11 +22136,11 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: if (result = callback(getSymbolOfNode(location).exports)) { return result; } @@ -22166,7 +22184,7 @@ var ts; return ts.forEachEntry(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); @@ -22198,7 +22216,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -22212,10 +22230,10 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; switch (declaration.kind) { - case 148: - case 150: - case 152: + case 149: + case 151: case 153: + case 154: continue; default: return false; @@ -22268,7 +22286,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 265 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; @@ -22302,11 +22320,11 @@ var ts; } function isEntityNameVisible(entityName, enclosingDeclaration) { var meaning; - if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { + if (entityName.parent.kind === 162 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning = 107455 | 1048576; } - else if (entityName.kind === 142 || entityName.kind === 178 || - entityName.parent.kind === 236) { + else if (entityName.kind === 143 || entityName.kind === 179 || + entityName.parent.kind === 237) { meaning = 1920; } else { @@ -22392,16 +22410,16 @@ var ts; return undefined; } if (type.flags & 1) { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } if (type.flags & 2) { - return ts.createKeywordTypeNode(135); + return ts.createKeywordTypeNode(136); } if (type.flags & 4) { - return ts.createKeywordTypeNode(132); + return ts.createKeywordTypeNode(133); } if (type.flags & 8) { - return ts.createKeywordTypeNode(121); + return ts.createKeywordTypeNode(122); } if (type.flags & 16) { var name = symbolToName(type.symbol, false); @@ -22421,22 +22439,22 @@ var ts; return ts.createTypeReferenceNode(name, undefined); } if (type.flags & 1024) { - return ts.createKeywordTypeNode(104); + return ts.createKeywordTypeNode(105); } if (type.flags & 2048) { - return ts.createKeywordTypeNode(138); + return ts.createKeywordTypeNode(139); } if (type.flags & 4096) { - return ts.createKeywordTypeNode(94); + return ts.createKeywordTypeNode(95); } if (type.flags & 8192) { - return ts.createKeywordTypeNode(129); + return ts.createKeywordTypeNode(130); } if (type.flags & 512) { - return ts.createKeywordTypeNode(136); + return ts.createKeywordTypeNode(137); } if (type.flags & 16777216) { - return ts.createKeywordTypeNode(133); + return ts.createKeywordTypeNode(134); } if (type.flags & 16384 && type.isThisType) { if (context.inObjectTypeLiteral) { @@ -22470,7 +22488,7 @@ var ts; var formattedUnionTypes = formatUnionTypes(type.types); var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes); if (unionTypeNodes && unionTypeNodes.length > 0) { - return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes); + return ts.createUnionOrIntersectionTypeNode(166, unionTypeNodes); } else { if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) { @@ -22480,7 +22498,7 @@ var ts; } } if (type.flags & 131072) { - return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types)); + return ts.createUnionOrIntersectionTypeNode(167, mapToTypeNodeArray(type.types)); } if (objectFlags & (16 | 32)) { ts.Debug.assert(!!(type.flags & 32768)); @@ -22514,8 +22532,8 @@ var ts; var typeParameterNode = typeParameterToDeclaration(typeParameter); var templateType = getTemplateTypeFromMappedType(type); var templateTypeNode = typeToTypeNodeHelper(templateType); - var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined; - var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined; + var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(131) : undefined; + var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined; return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); } function createAnonymousTypeNode(type) { @@ -22533,7 +22551,7 @@ var ts; return ts.createTypeReferenceNode(entityName, undefined); } else { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } } else { @@ -22555,7 +22573,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return ts.contains(context.symbolStack, symbol); @@ -22575,11 +22593,11 @@ var ts; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var signature = resolved.callSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 159); + return signatureToSignatureDeclarationHelper(signature, 160); } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { var signature = resolved.constructSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 160); + return signatureToSignatureDeclarationHelper(signature, 161); } } var saveInObjectTypeLiteral = context.inObjectTypeLiteral; @@ -22654,11 +22672,11 @@ var ts; var typeElements = []; for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 154)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); } for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 156)); } if (resolvedType.stringIndexInfo) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0)); @@ -22678,19 +22696,19 @@ var ts; return; } var propertyName = oldDeclaration.name; - var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined; + var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : undefined; if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) { var signatures = getSignaturesOfType(propertyType, 0); for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) { var signature = signatures_1[_e]; - var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149); + var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150); methodDeclaration.name = propertyName; methodDeclaration.questionToken = optionalToken; typeElements.push(methodDeclaration); } } else { - var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118); + var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119); typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined)); } } @@ -22698,11 +22716,11 @@ var ts; } } function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) { - var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132); + var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133); var name = ts.getNameFromIndexInfo(indexInfo); var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined); var typeNode = typeToTypeNodeHelper(indexInfo.type); - return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode); + return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : undefined, [indexingParameter], typeNode); } function signatureToSignatureDeclarationHelper(signature, kind) { var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); }); @@ -22718,7 +22736,7 @@ var ts; var returnType = getReturnTypeOfSignature(signature); returnTypeNode = returnType && typeToTypeNodeHelper(returnType); } - var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined; + var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined; return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny); } function typeParameterToDeclaration(type) { @@ -22730,10 +22748,10 @@ var ts; return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode); } function symbolToParameterDeclaration(parameterSymbol) { - var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145); + var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146); var parameterType = getTypeOfSymbol(parameterSymbol); var parameterTypeNode = typeToTypeNodeHelper(parameterType); - var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer); + var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer); return parameterNode; } function symbolToName(symbol, expectsIdentifier) { @@ -22813,17 +22831,17 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) { context.encounteredError = true; } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -22874,8 +22892,8 @@ var ts; } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048) { - var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; }); - if (node.kind === 230) { + var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 168; }); + if (node.kind === 231) { return getSymbolOfNode(node); } } @@ -22883,7 +22901,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 233 && + node.parent.kind === 234 && ts.isExternalModuleAugmentation(node.parent.parent); } function literalTypeToString(type) { @@ -22895,14 +22913,14 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -22917,17 +22935,17 @@ var ts; var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { - writePunctuation(writer, 20); + writePunctuation(writer, 21); if (ts.isSingleOrDoubleQuote(firstChar)) { writer.writeStringLiteral(symbolName); } else { writer.writeSymbol(symbolName, symbol); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 22); + writePunctuation(writer, 23); writer.writeSymbol(symbolName, symbol); } } @@ -23003,7 +23021,7 @@ var ts; } else if (type.flags & 256) { buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); appendSymbolNameOnly(type.symbol, writer); } else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) { @@ -23030,28 +23048,28 @@ var ts; } else if (type.flags & 524288) { writeType(type.objectType, 64); - writePunctuation(writer, 20); - writeType(type.indexType, 0); writePunctuation(writer, 21); + writeType(type.indexType, 0); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writeSpace(writer); - writePunctuation(writer, 23); + writePunctuation(writer, 24); writeSpace(writer); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function writeTypeList(types, delimiter) { for (var i = 0; i < types.length; i++) { if (i > 0) { - if (delimiter !== 25) { + if (delimiter !== 26) { writeSpace(writer); } writePunctuation(writer, delimiter); writeSpace(writer); } - writeType(types[i], delimiter === 25 ? 0 : 64); + writeType(types[i], delimiter === 26 ? 0 : 64); } } function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { @@ -23059,29 +23077,29 @@ var ts; buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064, 0, flags); } if (pos < end) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); writeType(typeArguments[pos], 256); pos++; while (pos < end) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); writeType(typeArguments[pos], 0); pos++; } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function writeTypeReference(type, flags) { var typeArguments = type.typeArguments || emptyArray; if (type.target === globalArrayType && !(flags & 1)) { writeType(typeArguments[0], 64); - writePunctuation(writer, 20); writePunctuation(writer, 21); + writePunctuation(writer, 22); } else if (type.target.objectFlags & 8) { - writePunctuation(writer, 20); - writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 25); writePunctuation(writer, 21); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26); + writePunctuation(writer, 22); } else { var outerTypeParameters = type.target.outerTypeParameters; @@ -23096,7 +23114,7 @@ var ts; } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent); if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { writeSymbolTypeReference(parent, typeArguments, start, i, flags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); } } } @@ -23106,16 +23124,16 @@ var ts; } function writeUnionOrIntersectionType(type, flags) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } if (type.flags & 65536) { - writeTypeList(formatUnionTypes(type.types), 48); + writeTypeList(formatUnionTypes(type.types), 49); } else { - writeTypeList(type.types, 47); + writeTypeList(type.types, 48); } if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } } function writeAnonymousType(type, flags) { @@ -23134,7 +23152,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793064, 0, flags); } else { - writeKeyword(writer, 118); + writeKeyword(writer, 119); } } else { @@ -23155,7 +23173,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -23164,18 +23182,18 @@ var ts; } } function writeTypeOfSymbol(type, typeFormatFlags) { - writeKeyword(writer, 102); + writeKeyword(writer, 103); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags); } function writePropertyWithModifiers(prop) { if (isReadonlySymbol(prop)) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } buildSymbolDisplay(prop, writer); if (prop.flags & 67108864) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } } function shouldAddParenthesisAroundFunctionType(callSignature, flags) { @@ -23199,55 +23217,55 @@ var ts; var resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 16); writePunctuation(writer, 17); + writePunctuation(writer, 18); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); if (parenthesizeSignature) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (parenthesizeSignature) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } } var saveInObjectTypeLiteral = inObjectTypeLiteral; inObjectTypeLiteral = true; - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); writeObjectLiteralType(resolved); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); inObjectTypeLiteral = saveInObjectTypeLiteral; } function writeObjectLiteralType(resolved) { for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, 1, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack); @@ -23261,45 +23279,45 @@ var ts; var signature = signatures_2[_f]; writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } else { writePropertyWithModifiers(p); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(t, 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } } function writeMappedType(type) { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); if (type.declaration.readonlyToken) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); appendSymbolNameOnly(getTypeParameterFromMappedType(type).symbol, writer); writeSpace(writer); - writeKeyword(writer, 91); + writeKeyword(writer, 92); writeSpace(writer); writeType(getConstraintTypeFromMappedType(type), 0); - writePunctuation(writer, 21); + writePunctuation(writer, 22); if (type.declaration.questionToken) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(getTemplateTypeFromMappedType(type), 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration, flags) { @@ -23313,14 +23331,14 @@ var ts; var constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); - writeKeyword(writer, 84); + writeKeyword(writer, 85); writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } var defaultType = getDefaultFromTypeParameter(tp); if (defaultType) { writeSpace(writer); - writePunctuation(writer, 57); + writePunctuation(writer, 58); writeSpace(writer); buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); } @@ -23328,7 +23346,7 @@ var ts; function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { var parameterNode = p.valueDeclaration; if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } if (parameterNode && ts.isBindingPattern(parameterNode.name)) { buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); @@ -23337,9 +23355,9 @@ var ts; appendSymbolNameOnly(p, writer); } if (parameterNode && isOptionalParameter(parameterNode)) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); var type = getTypeOfSymbol(p); if (parameterNode && isRequiredInitializedParameter(parameterNode)) { @@ -23348,29 +23366,29 @@ var ts; buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack); } function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { - if (bindingPattern.kind === 173) { - writePunctuation(writer, 16); - buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + if (bindingPattern.kind === 174) { writePunctuation(writer, 17); + buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + writePunctuation(writer, 18); } - else if (bindingPattern.kind === 174) { - writePunctuation(writer, 20); + else if (bindingPattern.kind === 175) { + writePunctuation(writer, 21); var elements = bindingPattern.elements; buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); if (elements && elements.hasTrailingComma) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } } function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isOmittedExpression(bindingElement)) { return; } - ts.Debug.assert(bindingElement.kind === 175); + ts.Debug.assert(bindingElement.kind === 176); if (bindingElement.propertyName) { writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName)); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); } if (ts.isBindingPattern(bindingElement.name)) { @@ -23378,22 +23396,22 @@ var ts; } else { if (bindingElement.dotDotDotToken) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } appendSymbolNameOnly(bindingElement.symbol, writer); } } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForCommaSeparatedList(list, writer, action) { for (var i = 0; i < list.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } action(list[i]); @@ -23401,42 +23419,42 @@ var ts; } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); var flags = 256; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); flags = 0; } buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags); } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); if (thisParameter) { buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); } for (var i = 0; i < parameters.length; i++) { if (i > 0 || thisParameter) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); } - writePunctuation(writer, 19); + writePunctuation(writer, 20); } function buildTypePredicateDisplay(predicate, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isIdentifierTypePredicate(predicate)) { writer.writeParameter(predicate.parameterName); } else { - writeKeyword(writer, 98); + writeKeyword(writer, 99); } writeSpace(writer); - writeKeyword(writer, 125); + writeKeyword(writer, 126); writeSpace(writer); buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack); } @@ -23447,10 +23465,10 @@ var ts; } if (flags & 8) { writeSpace(writer); - writePunctuation(writer, 35); + writePunctuation(writer, 36); } else { - writePunctuation(writer, 55); + writePunctuation(writer, 56); } writeSpace(writer); if (signature.typePredicate) { @@ -23462,7 +23480,7 @@ var ts; } function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, kind, symbolStack) { if (kind === 1) { - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); } if (signature.target && (flags & 32)) { @@ -23477,26 +23495,26 @@ var ts; function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) { if (info) { if (info.isReadonly) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); switch (kind) { case 1: - writeKeyword(writer, 132); + writeKeyword(writer, 133); break; case 0: - writeKeyword(writer, 135); + writeKeyword(writer, 136); break; } - writePunctuation(writer, 21); - writePunctuation(writer, 55); + writePunctuation(writer, 22); + writePunctuation(writer, 56); writeSpace(writer); buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } @@ -23525,63 +23543,63 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 175: + case 176: return isDeclarationVisible(node.parent.parent); - case 225: + case 226: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 232: - case 228: + case 233: case 229: case 230: - case 227: case 231: - case 236: + case 228: + case 232: + case 237: if (ts.isExternalModuleAugmentation(node)) { return true; } var parent = getDeclarationContainer(node); if (!(ts.getCombinedModifierFlags(node) & 1) && - !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) { + !(node.kind !== 237 && parent.kind !== 265 && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); + case 149: case 148: - case 147: - case 152: case 153: + case 154: + case 151: case 150: - case 149: if (ts.getModifierFlags(node) & (8 | 16)) { return false; } - case 151: - case 155: - case 154: + case 152: case 156: - case 145: - case 233: - case 159: + case 155: + case 157: + case 146: + case 234: case 160: - case 162: - case 158: + case 161: case 163: + case 159: case 164: case 165: case 166: case 167: + case 168: return isDeclarationVisible(node.parent); - case 238: case 239: - case 241: + case 240: + case 242: return false; - case 144: - case 264: - case 235: + case 145: + case 265: + case 236: return true; - case 242: + case 243: return false; default: return false; @@ -23590,10 +23608,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 242) { + if (node.parent && node.parent.kind === 243) { exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 245) { + else if (node.parent.kind === 246) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -23670,12 +23688,12 @@ var ts; function getDeclarationContainer(node) { node = ts.findAncestor(ts.getRootDeclaration(node), function (node) { switch (node.kind) { - case 225: case 226: + case 227: + case 242: case 241: case 240: case 239: - case 238: return false; default: return true; @@ -23699,7 +23717,7 @@ var ts; return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false); } function isComputedNonLiteralName(name) { - return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression); + return name.kind === 144 && !ts.isStringOrNumericLiteral(name.expression); } function getRestType(source, properties, symbol) { source = filterType(source, function (t) { return !(t.flags & 6144); }); @@ -23741,7 +23759,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 173) { + if (pattern.kind === 174) { if (declaration.dotDotDotToken) { if (!isValidSpreadType(parentType)) { error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types); @@ -23811,11 +23829,11 @@ var ts; } function isNullOrUndefined(node) { var expr = ts.skipParentheses(node); - return expr.kind === 94 || expr.kind === 70 && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 95 || expr.kind === 71 && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral(node) { var expr = ts.skipParentheses(node); - return expr.kind === 176 && expr.elements.length === 0; + return expr.kind === 177 && expr.elements.length === 0; } function addOptionality(type, optional) { return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type; @@ -23827,11 +23845,11 @@ var ts; return type; } } - if (declaration.parent.parent.kind === 214) { + if (declaration.parent.parent.kind === 215) { var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression)); return indexType.flags & (16384 | 262144) ? indexType : stringType; } - if (declaration.parent.parent.kind === 215) { + if (declaration.parent.parent.kind === 216) { var forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType; } @@ -23843,7 +23861,7 @@ var ts; return addOptionality(declaredType, declaration.questionToken && includeOptionality); } if ((noImplicitAny || declaration.flags & 65536) && - declaration.kind === 225 && !ts.isBindingPattern(declaration.name) && + declaration.kind === 226 && !ts.isBindingPattern(declaration.name) && !(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) { if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) { return autoType; @@ -23852,10 +23870,10 @@ var ts; return autoArrayType; } } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var func = declaration.parent; - if (func.kind === 153 && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152); + if (func.kind === 154 && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 153); if (getter) { var getterSignature = getSignatureFromDeclaration(getter); var thisParameter = getAccessorThisParameter(func); @@ -23884,7 +23902,7 @@ var ts; if (ts.isJsxAttribute(declaration)) { return trueType; } - if (declaration.kind === 261) { + if (declaration.kind === 262) { return checkIdentifier(declaration.name); } if (ts.isBindingPattern(declaration.name)) { @@ -23898,14 +23916,14 @@ var ts; var definedInMethod = false; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - var expression = declaration.kind === 193 ? declaration : - declaration.kind === 178 ? ts.getAncestor(declaration, 193) : + var expression = declaration.kind === 194 ? declaration : + declaration.kind === 179 ? ts.getAncestor(declaration, 194) : undefined; if (!expression) { return unknownType; } - if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) { - if (ts.getThisContainer(expression, false).kind === 151) { + if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 99) { + if (ts.getThisContainer(expression, false).kind === 152) { definedInConstructor = true; } else { @@ -23980,7 +23998,7 @@ var ts; return result; } function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { - return pattern.kind === 173 + return pattern.kind === 174 ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } @@ -23990,7 +24008,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - if (declaration.kind === 260) { + if (declaration.kind === 261) { return type; } return getWidenedType(type); @@ -24005,7 +24023,7 @@ var ts; } function declarationBelongsToPrivateAmbientMember(declaration) { var root = ts.getRootDeclaration(declaration); - var memberDeclaration = root.kind === 145 ? root.parent : root; + var memberDeclaration = root.kind === 146 ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -24018,18 +24036,18 @@ var ts; if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) { return links.type = anyType; } - if (declaration.kind === 242) { + if (declaration.kind === 243) { return links.type = checkExpression(declaration.expression); } - if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) { + if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) { return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } if (!pushTypeResolution(symbol, 0)) { return unknownType; } var type = void 0; - if (declaration.kind === 193 || - declaration.kind === 178 && declaration.parent.kind === 193) { + if (declaration.kind === 194 || + declaration.kind === 179 && declaration.parent.kind === 194) { type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol); } else { @@ -24044,7 +24062,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 152) { + if (accessor.kind === 153) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -24064,8 +24082,8 @@ var ts; function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - var getter = ts.getDeclarationOfKind(symbol, 152); - var setter = ts.getDeclarationOfKind(symbol, 153); + var getter = ts.getDeclarationOfKind(symbol, 153); + var setter = ts.getDeclarationOfKind(symbol, 154); if (getter && getter.flags & 65536) { var jsDocType = getTypeForDeclarationFromJSDocComment(getter); if (jsDocType) { @@ -24106,7 +24124,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 152); + var getter_1 = ts.getDeclarationOfKind(symbol, 153); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -24247,9 +24265,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 228 || node.kind === 198 || - node.kind === 227 || node.kind === 185 || - node.kind === 150 || node.kind === 186) { + if (node.kind === 229 || node.kind === 199 || + node.kind === 228 || node.kind === 186 || + node.kind === 151 || node.kind === 187) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -24258,15 +24276,15 @@ var ts; } } function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229); + var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 230); return appendOuterTypeParameters(undefined, declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 229 || node.kind === 228 || - node.kind === 198 || node.kind === 230) { + if (node.kind === 230 || node.kind === 229 || + node.kind === 199 || node.kind === 231) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -24422,7 +24440,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 230 && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -24451,7 +24469,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229) { + if (declaration.kind === 230) { if (declaration.flags & 64) { return false; } @@ -24501,7 +24519,7 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 289); + var declaration = ts.getDeclarationOfKind(symbol, 290); var type = void 0; if (declaration) { if (declaration.jsDocTypeLiteral) { @@ -24512,7 +24530,7 @@ var ts; } } else { - declaration = ts.getDeclarationOfKind(symbol, 230); + declaration = ts.getDeclarationOfKind(symbol, 231); type = getTypeFromTypeNode(declaration.type); } if (popTypeResolution()) { @@ -24537,14 +24555,14 @@ var ts; return !ts.isInAmbientContext(member); } return expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8 || - expr.kind === 70 && !!symbol.exports.get(expr.text); + expr.kind === 71 && !!symbol.exports.get(expr.text); } function enumHasLiteralMembers(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; if (!isLiteralEnumMember(symbol, member)) { @@ -24572,7 +24590,7 @@ var ts; var memberTypes = []; for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { computeEnumMemberValues(declaration); for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; @@ -24655,21 +24673,21 @@ var ts; } function isIndependentType(node) { switch (node.kind) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: case 133: - case 104: - case 138: - case 94: - case 129: - case 172: + case 122: + case 137: + case 134: + case 105: + case 139: + case 95: + case 130: + case 173: return true; - case 163: + case 164: return isIndependentType(node.elementType); - case 158: + case 159: return isIndependentTypeReference(node); } return false; @@ -24678,7 +24696,7 @@ var ts; return node.type && isIndependentType(node.type) || !node.type && !node.initializer; } function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -24694,12 +24712,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { + case 149: case 148: - case 147: return isIndependentVariableLikeDeclaration(declaration); - case 150: - case 149: case 151: + case 150: + case 152: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -25035,7 +25053,7 @@ var ts; var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); var templateReadonly = !!type.declaration.readonlyToken; var templateOptional = !!type.declaration.questionToken; - if (type.declaration.typeParameter.constraint.kind === 169) { + if (type.declaration.typeParameter.constraint.kind === 170) { for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) { var propertySymbol = _a[_i]; addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol); @@ -25088,7 +25106,7 @@ var ts; function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { var constraintDeclaration = type.declaration.typeParameter.constraint; - if (constraintDeclaration.kind === 169) { + if (constraintDeclaration.kind === 170) { type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper); } else { @@ -25453,7 +25471,7 @@ var ts; } function isJSDocOptionalParameter(node) { if (node.flags & 65536) { - if (node.type && node.type.kind === 277) { + if (node.type && node.type.kind === 278) { return true; } var paramTags = ts.getJSDocParameterTags(node); @@ -25464,7 +25482,7 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 277; + return paramTag.typeExpression.type.kind === 278; } } } @@ -25497,7 +25515,7 @@ var ts; return false; } function createTypePredicateFromTypePredicateNode(node) { - if (node.parameterName.kind === 70) { + if (node.parameterName.kind === 71) { var parameterName = node.parameterName; return { kind: 1, @@ -25570,7 +25588,7 @@ var ts; else { parameters.push(paramSymbol); } - if (param.type && param.type.kind === 172) { + if (param.type && param.type.kind === 173) { hasLiteralTypes = true; } var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken || @@ -25581,23 +25599,23 @@ var ts; minArgumentCount = parameters.length; } } - if ((declaration.kind === 152 || declaration.kind === 153) && + if ((declaration.kind === 153 || declaration.kind === 154) && !ts.hasDynamicName(declaration) && (!hasThisParameter || !thisParameter)) { - var otherKind = declaration.kind === 152 ? 153 : 152; + var otherKind = declaration.kind === 153 ? 154 : 153; var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - var classType = declaration.kind === 151 ? + var classType = declaration.kind === 152 ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : getTypeParametersFromJSDocTemplate(declaration); var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType); - var typePredicate = declaration.type && declaration.type.kind === 157 ? + var typePredicate = declaration.type && declaration.type.kind === 158 ? createTypePredicateFromTypePredicateNode(declaration.type) : undefined; links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); @@ -25620,8 +25638,8 @@ var ts; return type; } } - if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 153); + if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 154); return getAnnotatedAccessorType(setter); } if (ts.nodeIsMissing(declaration.body)) { @@ -25643,13 +25661,13 @@ var ts; if (!node) return false; switch (node.kind) { - case 70: + case 71: return node.text === "arguments" && ts.isPartOfExpression(node); - case 148: - case 150: - case 152: + case 149: + case 151: case 153: - return node.name.kind === 143 + case 154: + return node.name.kind === 144 && traverse(node.name); default: return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse); @@ -25663,20 +25681,20 @@ var ts; for (var i = 0; i < symbol.declarations.length; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 278: + case 187: + case 279: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -25766,7 +25784,7 @@ var ts; } function getOrCreateTypeFromSignature(signature) { if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155; + var isConstructor = signature.declaration.kind === 152 || signature.declaration.kind === 156; var type = createObjectType(16); type.members = emptySymbols; type.properties = emptyArray; @@ -25780,7 +25798,7 @@ var ts; return symbol.members.get("__index"); } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 132 : 135; + var syntaxKind = kind === 1 ? 133 : 136; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -25807,7 +25825,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 144).constraint; + return ts.getDeclarationOfKind(type.symbol, 145).constraint; } function getConstraintFromTypeParameter(typeParameter) { if (!typeParameter.constraint) { @@ -25823,7 +25841,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 145).parent); } function getTypeListId(types) { var result = ""; @@ -25943,11 +25961,11 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 158: + case 159: return node.typeName; - case 276: + case 277: return node.name; - case 200: + case 201: var expr = node.expression; if (ts.isEntityNameExpression(expr)) { return expr; @@ -25971,7 +25989,7 @@ var ts; if (symbol.flags & 524288) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 && node.kind === 276) { + if (symbol.flags & 107455 && node.kind === 277) { return getTypeOfSymbol(symbol); } return getTypeFromNonGenericTypeReference(node, symbol); @@ -26013,7 +26031,7 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 276) { + if (node.kind === 277) { type = getPrimitiveTypeFromJSDocTypeReference(node); if (!type) { var typeReferenceName = getTypeReferenceName(node); @@ -26022,7 +26040,7 @@ var ts; } } else { - var typeNameOrExpression = node.kind === 158 + var typeNameOrExpression = node.kind === 159 ? node.typeName : ts.isEntityNameExpression(node.expression) ? node.expression @@ -26051,9 +26069,9 @@ var ts; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var declaration = declarations_4[_i]; switch (declaration.kind) { - case 228: case 229: - case 231: + case 230: + case 232: return declaration; } } @@ -26479,7 +26497,7 @@ var ts; return type; } function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; var propName = indexType.flags & (32 | 64 | 256) ? indexType.text : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ? @@ -26527,7 +26545,7 @@ var ts; } } if (accessNode) { - var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType; + var indexNode = accessNode.kind === 180 ? accessNode.argumentExpression : accessNode.indexType; if (indexType.flags & (32 | 64)) { error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType)); } @@ -26542,7 +26560,7 @@ var ts; return anyType; } function getIndexedAccessForMappedType(type, indexType, accessNode) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) { error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type)); return unknownType; @@ -26553,7 +26571,7 @@ var ts; } function getIndexedAccessType(objectType, indexType, accessNode) { if (maybeTypeOfKind(indexType, 540672 | 262144) || - maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) || + maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 180) || isGenericMappedType(objectType)) { if (objectType.flags & 1) { return objectType; @@ -26619,7 +26637,7 @@ var ts; return links.resolvedType; } function getAliasSymbolForTypeNode(node) { - return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined; + return node.parent.kind === 231 ? getSymbolOfNode(node.parent) : undefined; } function getAliasTypeArgumentsForTypeNode(node) { var symbol = getAliasSymbolForTypeNode(node); @@ -26762,9 +26780,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 229)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 230)) { if (!(ts.getModifierFlags(container) & 32) && - (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) { + (container.kind !== 152 || ts.isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -26780,83 +26798,83 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 118: - case 267: + case 119: case 268: + case 269: return anyType; - case 135: + case 136: return stringType; - case 132: + case 133: return numberType; - case 121: + case 122: return booleanType; - case 136: + case 137: return esSymbolType; - case 104: + case 105: return voidType; - case 138: + case 139: return undefinedType; - case 94: + case 95: return nullType; - case 129: + case 130: return neverType; - case 133: + case 134: return nonPrimitiveType; - case 168: - case 98: + case 169: + case 99: return getTypeFromThisTypeNode(node); - case 172: + case 173: return getTypeFromLiteralTypeNode(node); - case 292: + case 293: return getTypeFromLiteralTypeNode(node.literal); - case 158: - case 276: + case 159: + case 277: return getTypeFromTypeReference(node); - case 157: + case 158: return booleanType; - case 200: + case 201: return getTypeFromTypeReference(node); - case 161: + case 162: return getTypeFromTypeQueryNode(node); - case 163: - case 269: - return getTypeFromArrayTypeNode(node); case 164: - return getTypeFromTupleTypeNode(node); - case 165: case 270: - return getTypeFromUnionTypeNode(node); + return getTypeFromArrayTypeNode(node); + case 165: + return getTypeFromTupleTypeNode(node); case 166: - return getTypeFromIntersectionTypeNode(node); - case 272: - return getTypeFromJSDocNullableTypeNode(node); + case 271: + return getTypeFromUnionTypeNode(node); case 167: + return getTypeFromIntersectionTypeNode(node); case 273: - case 280: + return getTypeFromJSDocNullableTypeNode(node); + case 168: + case 274: case 281: - case 277: + case 282: + case 278: return getTypeFromTypeNode(node.type); - case 274: + case 275: return getTypeFromTypeNode(node.literal); - case 159: case 160: - case 162: - case 291: - case 278: + case 161: + case 163: + case 292: + case 279: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 169: - return getTypeFromTypeOperatorNode(node); case 170: - return getTypeFromIndexedAccessTypeNode(node); + return getTypeFromTypeOperatorNode(node); case 171: + return getTypeFromIndexedAccessTypeNode(node); + case 172: return getTypeFromMappedTypeNode(node); - case 70: - case 142: + case 71: + case 143: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 271: + case 272: return getTypeFromJSDocTupleType(node); - case 279: + case 280: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -27046,27 +27064,27 @@ var ts; } var mappedTypes = mapper.mappedTypes; return !!ts.findAncestor(symbol.declarations[0], function (node) { - if (node.kind === 232 || node.kind === 264) { + if (node.kind === 233 || node.kind === 265) { return "quit"; } switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 228: - case 198: + case 187: case 229: + case 199: case 230: + case 231: var declaration = node; if (declaration.typeParameters) { for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { @@ -27076,19 +27094,19 @@ var ts; } } } - if (ts.isClassLike(node) || node.kind === 229) { + if (ts.isClassLike(node) || node.kind === 230) { var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; if (thisType && ts.contains(mappedTypes, thisType)) { return true; } } break; - case 171: + case 172: if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) { return true; } break; - case 278: + case 279: var func = node; for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) { var p = _c[_b]; @@ -27103,7 +27121,7 @@ var ts; function isTopLevelTypeAlias(symbol) { if (symbol.declarations && symbol.declarations.length) { var parentKind = symbol.declarations[0].parent.kind; - return parentKind === 264 || parentKind === 233; + return parentKind === 265 || parentKind === 234; } return false; } @@ -27155,33 +27173,33 @@ var ts; return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 185: case 186: + case 187: return isContextSensitiveFunctionLikeDeclaration(node); - case 177: + case 178: return ts.forEach(node.properties, isContextSensitive); - case 176: + case 177: return ts.forEach(node.elements, isContextSensitive); - case 194: + case 195: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 193: - return node.operatorToken.kind === 53 && + case 194: + return node.operatorToken.kind === 54 && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 260: + case 261: return isContextSensitive(node.initializer); + case 151: case 150: - case 149: return isContextSensitiveFunctionLikeDeclaration(node); - case 184: + case 185: return isContextSensitive(node.expression); - case 253: + case 254: return ts.forEach(node.properties, isContextSensitive); - case 252: + case 253: return node.initializer && isContextSensitive(node.initializer); - case 255: + case 256: return node.expression && isContextSensitive(node.expression); } return false; @@ -27193,7 +27211,7 @@ var ts; if (ts.forEach(node.parameters, function (p) { return !p.type; })) { return true; } - if (node.kind === 186) { + if (node.kind === 187) { return false; } var parameter = ts.firstOrUndefined(node.parameters); @@ -27680,7 +27698,7 @@ var ts; if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) { if (reportErrors) { ts.Debug.assert(!!errorNode); - if (ts.isJsxAttributes(errorNode)) { + if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode)) { reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); } else { @@ -28642,25 +28660,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { + case 149: case 148: - case 147: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 145: + case 146: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 175: + case 176: diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; break; - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: - case 185: + case 154: case 186: + case 187: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -29077,17 +29095,17 @@ var ts; return links.resolvedSymbol; } function isInTypeQuery(node) { - return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; }); + return !!ts.findAncestor(node, function (n) { return n.kind === 162 ? true : n.kind === 71 || n.kind === 143 ? false : "quit"; }); } function getFlowCacheKey(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; } - if (node.kind === 98) { + if (node.kind === 99) { return "0"; } - if (node.kind === 178) { + if (node.kind === 179) { var key = getFlowCacheKey(node.expression); return key && key + "." + node.name.text; } @@ -29095,33 +29113,33 @@ var ts; } function getLeftmostIdentifierOrThis(node) { switch (node.kind) { - case 70: - case 98: + case 71: + case 99: return node; - case 178: + case 179: return getLeftmostIdentifierOrThis(node.expression); } return undefined; } function isMatchingReference(source, target) { switch (source.kind) { - case 70: - return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) || - (target.kind === 225 || target.kind === 175) && + case 71: + return target.kind === 71 && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 226 || target.kind === 176) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); - case 98: - return target.kind === 98; - case 96: - return target.kind === 96; - case 178: - return target.kind === 178 && + case 99: + return target.kind === 99; + case 97: + return target.kind === 97; + case 179: + return target.kind === 179 && source.name.text === target.name.text && isMatchingReference(source.expression, target.expression); } return false; } function containsMatchingReference(source, target) { - while (source.kind === 178) { + while (source.kind === 179) { source = source.expression; if (isMatchingReference(source, target)) { return true; @@ -29130,15 +29148,15 @@ var ts; return false; } function containsMatchingReferenceDiscriminant(source, target) { - return target.kind === 178 && + return target.kind === 179 && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); } function getDeclaredTypeOfReference(expr) { - if (expr.kind === 70) { + if (expr.kind === 71) { return getTypeOfSymbol(getResolvedSymbol(expr)); } - if (expr.kind === 178) { + if (expr.kind === 179) { var type = getDeclaredTypeOfReference(expr.expression); return type && getTypeOfPropertyOfType(type, expr.name.text); } @@ -29168,7 +29186,7 @@ var ts; } } } - if (callExpression.expression.kind === 178 && + if (callExpression.expression.kind === 179 && isOrContainsMatchingReference(reference, callExpression.expression.expression)) { return true; } @@ -29296,15 +29314,15 @@ var ts; return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType); } function getAssignedTypeOfBinaryExpression(node) { - var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) || - node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent); + var isDestructuringDefaultAssignment = node.parent.kind === 177 && isDestructuringAssignmentTarget(node.parent) || + node.parent.kind === 261 && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 193 && parent.parent.left === parent || - parent.parent.kind === 215 && parent.parent.initializer === parent; + return parent.parent.kind === 194 && parent.parent.left === parent || + parent.parent.kind === 216 && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); @@ -29321,21 +29339,21 @@ var ts; function getAssignedType(node) { var parent = node.parent; switch (parent.kind) { - case 214: - return stringType; case 215: + return stringType; + case 216: return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType; - case 193: + case 194: return getAssignedTypeOfBinaryExpression(parent); - case 187: + case 188: return undefinedType; - case 176: + case 177: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 197: + case 198: return getAssignedTypeOfSpreadExpression(parent); - case 260: - return getAssignedTypeOfPropertyAssignment(parent); case 261: + return getAssignedTypeOfPropertyAssignment(parent); + case 262: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return unknownType; @@ -29343,7 +29361,7 @@ var ts; function getInitialTypeOfBindingElement(node) { var pattern = node.parent; var parentType = getInitialType(pattern.parent); - var type = pattern.kind === 173 ? + var type = pattern.kind === 174 ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : @@ -29358,39 +29376,39 @@ var ts; if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 214) { + if (node.parent.parent.kind === 215) { return stringType; } - if (node.parent.parent.kind === 215) { + if (node.parent.parent.kind === 216) { return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType; } return unknownType; } function getInitialType(node) { - return node.kind === 225 ? + return node.kind === 226 ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function getInitialOrAssignedType(node) { - return node.kind === 225 || node.kind === 175 ? + return node.kind === 226 || node.kind === 176 ? getInitialType(node) : getAssignedType(node); } function isEmptyArrayAssignment(node) { - return node.kind === 225 && node.initializer && + return node.kind === 226 && node.initializer && isEmptyArrayLiteral(node.initializer) || - node.kind !== 175 && node.parent.kind === 193 && + node.kind !== 176 && node.parent.kind === 194 && isEmptyArrayLiteral(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 184: + case 185: return getReferenceCandidate(node.expression); - case 193: + case 194: switch (node.operatorToken.kind) { - case 57: + case 58: return getReferenceCandidate(node.left); - case 25: + case 26: return getReferenceCandidate(node.right); } } @@ -29398,13 +29416,13 @@ var ts; } function getReferenceRoot(node) { var parent = node.parent; - return parent.kind === 184 || - parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node || - parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ? + return parent.kind === 185 || + parent.kind === 194 && parent.operatorToken.kind === 58 && parent.left === node || + parent.kind === 194 && parent.operatorToken.kind === 26 && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 256) { + if (clause.kind === 257) { var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); return isUnitType(caseType) ? caseType : undefined; } @@ -29546,12 +29564,12 @@ var ts; function isEvolvingArrayOperationTarget(node) { var root = getReferenceRoot(node); var parent = root.parent; - var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" || - parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name)); - var isElementAssignment = parent.kind === 179 && + var isLengthPushOrUnshift = parent.kind === 179 && (parent.name.text === "length" || + parent.parent.kind === 181 && ts.isPushOrUnshiftIdentifier(parent.name)); + var isElementAssignment = parent.kind === 180 && parent.expression === root && - parent.parent.kind === 193 && - parent.parent.operatorToken.kind === 57 && + parent.parent.kind === 194 && + parent.parent.operatorToken.kind === 58 && parent.parent.left === parent && !ts.isAssignmentTarget(parent.parent) && isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048); @@ -29565,7 +29583,7 @@ var ts; return links.maybeTypePredicate; } function getMaybeTypePredicate(node) { - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { var funcType = checkNonNullExpression(node.expression); if (funcType !== silentNeverType) { var apparentType = getApparentType(funcType); @@ -29587,7 +29605,7 @@ var ts; var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode)); visitedFlowCount = visitedFlowStart; var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType); - if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) { + if (reference.parent.kind === 203 && getTypeWithFacts(resultType, 524288).flags & 8192) { return declaredType; } return resultType; @@ -29641,7 +29659,7 @@ var ts; } else if (flow.flags & 2) { var container = flow.container; - if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) { + if (container && container !== flowContainer && reference.kind !== 179 && reference.kind !== 99) { flow = container.flowNode; continue; } @@ -29684,7 +29702,7 @@ var ts; } function getTypeAtFlowArrayMutation(flow) { var node = flow.node; - var expr = node.kind === 180 ? + var expr = node.kind === 181 ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { @@ -29692,7 +29710,7 @@ var ts; var type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256) { var evolvedType_1 = type; - if (node.kind === 180) { + if (node.kind === 181) { for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) { var arg = _a[_i]; evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg); @@ -29816,7 +29834,7 @@ var ts; return result; } function isMatchingReferenceDiscriminant(expr) { - return expr.kind === 178 && + return expr.kind === 179 && declaredType.flags & 65536 && isMatchingReference(reference, expr.expression) && isDiscriminantProperty(declaredType, expr.name.text); @@ -29841,19 +29859,19 @@ var ts; } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { - case 57: + case 58: return narrowTypeByTruthiness(type, expr.left, assumeTrue); - case 31: case 32: case 33: case 34: + case 35: var operator_1 = expr.operatorToken.kind; var left_1 = getReferenceCandidate(expr.left); var right_1 = getReferenceCandidate(expr.right); - if (left_1.kind === 188 && right_1.kind === 9) { + if (left_1.kind === 189 && right_1.kind === 9) { return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); } - if (right_1.kind === 188 && left_1.kind === 9) { + if (right_1.kind === 189 && left_1.kind === 9) { return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); } if (isMatchingReference(reference, left_1)) { @@ -29872,9 +29890,9 @@ var ts; return declaredType; } break; - case 92: + case 93: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 25: + case 26: return narrowType(type, expr.right, assumeTrue); } return type; @@ -29883,7 +29901,7 @@ var ts; if (type.flags & 1) { return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } var valueType = getTypeOfExpression(value); @@ -29891,10 +29909,10 @@ var ts; if (!strictNullChecks) { return type; } - var doubleEquals = operator === 31 || operator === 32; + var doubleEquals = operator === 32 || operator === 33; var facts = doubleEquals ? assumeTrue ? 65536 : 524288 : - value.kind === 94 ? + value.kind === 95 ? assumeTrue ? 32768 : 262144 : assumeTrue ? 16384 : 131072; return getTypeWithFacts(type, facts); @@ -29920,7 +29938,7 @@ var ts; } return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } if (assumeTrue && !(type.flags & 65536)) { @@ -30026,7 +30044,7 @@ var ts; return type; } if (ts.isIdentifierTypePredicate(predicate)) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + var predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)]; if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); @@ -30038,7 +30056,7 @@ var ts; } else { var invokedExpression = ts.skipParentheses(callExpression.expression); - if (invokedExpression.kind === 179 || invokedExpression.kind === 178) { + if (invokedExpression.kind === 180 || invokedExpression.kind === 179) { var accessExpression = invokedExpression; var possibleReference = ts.skipParentheses(accessExpression.expression); if (isMatchingReference(reference, possibleReference)) { @@ -30053,19 +30071,19 @@ var ts; } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 70: - case 98: - case 96: - case 178: + case 71: + case 99: + case 97: + case 179: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 180: + case 181: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 184: + case 185: return narrowType(type, expr.expression, assumeTrue); - case 193: + case 194: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 191: - if (expr.operator === 50) { + case 192: + if (expr.operator === 51) { return narrowType(type, expr.operand, !assumeTrue); } break; @@ -30074,7 +30092,7 @@ var ts; } } function getTypeOfSymbolAtLocation(symbol, location) { - if (location.kind === 70) { + if (location.kind === 71) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { location = location.parent; } @@ -30090,9 +30108,9 @@ var ts; function getControlFlowContainer(node) { return ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || - node.kind === 233 || - node.kind === 264 || - node.kind === 148; + node.kind === 234 || + node.kind === 265 || + node.kind === 149; }); } function isParameterAssigned(symbol) { @@ -30110,10 +30128,10 @@ var ts; return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); }); } function markParameterAssignments(node) { - if (node.kind === 70) { + if (node.kind === 71) { if (ts.isAssignmentTarget(node)) { var symbol = getResolvedSymbol(node); - if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) { + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 146) { symbol.isAssigned = true; } } @@ -30127,7 +30145,7 @@ var ts; } function removeOptionalityFromDeclaredType(declaredType, declaration) { var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 145 && + declaration.kind === 146 && declaration.initializer && getFalsyFlags(declaredType) & 2048 && !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048); @@ -30141,7 +30159,7 @@ var ts; if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); if (languageVersion < 2) { - if (container.kind === 186) { + if (container.kind === 187) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (ts.hasModifier(container, 256)) { @@ -30157,7 +30175,7 @@ var ts; var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); if (localOrExportSymbol.flags & 32) { var declaration_1 = localOrExportSymbol.valueDeclaration; - if (declaration_1.kind === 228 + if (declaration_1.kind === 229 && ts.nodeIsDecorated(declaration_1)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -30169,11 +30187,11 @@ var ts; container = ts.getContainingClass(container); } } - else if (declaration_1.kind === 198) { + else if (declaration_1.kind === 199) { var container = ts.getThisContainer(node, false); while (container !== undefined) { if (container.parent === declaration_1) { - if (container.kind === 148 && ts.hasModifier(container, 32)) { + if (container.kind === 149 && ts.hasModifier(container, 32)) { getNodeLinks(declaration_1).flags |= 8388608; getNodeLinks(node).flags |= 16777216; } @@ -30203,17 +30221,17 @@ var ts; if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) { return type; } - var isParameter = ts.getRootDeclaration(declaration).kind === 145; + var isParameter = ts.getRootDeclaration(declaration).kind === 146; var declarationContainer = getControlFlowContainer(declaration); var flowContainer = getControlFlowContainer(node); var isOuterVariable = flowContainer !== declarationContainer; - while (flowContainer !== declarationContainer && (flowContainer.kind === 185 || - flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && + while (flowContainer !== declarationContainer && (flowContainer.kind === 186 || + flowContainer.kind === 187 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } var assumeInitialized = isParameter || isOuterVariable || - type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) || + type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) || ts.isInAmbientContext(declaration); var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) : type === autoType || type === autoArrayType ? undefinedType : @@ -30240,7 +30258,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 || (symbol.flags & (2 | 32)) === 0 || - symbol.valueDeclaration.parent.kind === 259) { + symbol.valueDeclaration.parent.kind === 260) { return; } var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -30258,8 +30276,8 @@ var ts; if (usedInFunction) { getNodeLinks(current).flags |= 65536; } - if (container.kind === 213 && - ts.getAncestor(symbol.valueDeclaration, 226).parent === container && + if (container.kind === 214 && + ts.getAncestor(symbol.valueDeclaration, 227).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152; } @@ -30271,16 +30289,16 @@ var ts; } function isAssignedInBodyOfForStatement(node, container) { var current = node; - while (current.parent.kind === 184) { + while (current.parent.kind === 185) { current = current.parent; } var isAssigned = false; if (ts.isAssignmentTarget(current)) { isAssigned = true; } - else if ((current.parent.kind === 191 || current.parent.kind === 192)) { + else if ((current.parent.kind === 192 || current.parent.kind === 193)) { var expr = current.parent; - isAssigned = expr.operator === 42 || expr.operator === 43; + isAssigned = expr.operator === 43 || expr.operator === 44; } if (!isAssigned) { return false; @@ -30289,7 +30307,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2; - if (container.kind === 148 || container.kind === 151) { + if (container.kind === 149 || container.kind === 152) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4; } @@ -30333,32 +30351,32 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 151) { + if (container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 186) { + if (container.kind === 187) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = (languageVersion < 2); } switch (container.kind) { - case 232: + case 233: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 231: + case 232: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 151: + case 152: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; + case 149: case 148: - case 147: if (ts.getModifierFlags(container) & 32) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 143: + case 144: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -30367,8 +30385,8 @@ var ts; } if (ts.isFunctionLike(container) && (!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) { - if (container.kind === 185 && - container.parent.kind === 193 && + if (container.kind === 186 && + container.parent.kind === 194 && ts.getSpecialPropertyAssignmentKind(container.parent) === 3) { var className = container.parent .left @@ -30402,22 +30420,22 @@ var ts; } function getTypeForThisExpressionFromJSDoc(node) { var jsdocType = ts.getJSDocType(node); - if (jsdocType && jsdocType.kind === 278) { + if (jsdocType && jsdocType.kind === 279) { var jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 282) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; }); + return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 146; }); } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 180 && node.parent.expression === node; + var isCallExpression = node.parent.kind === 181 && node.parent.expression === node; var container = ts.getSuperContainer(node, true); var needToCaptureLexicalThis = false; if (!isCallExpression) { - while (container && container.kind === 186) { + while (container && container.kind === 187) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = languageVersion < 2; } @@ -30425,14 +30443,14 @@ var ts; var canUseSuperExpression = isLegalUsageOfSuperExpression(container); var nodeCheckFlag = 0; if (!canUseSuperExpression) { - var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; }); - if (current && current.kind === 143) { + var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 144; }); + if (current && current.kind === 144) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 178)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -30440,7 +30458,7 @@ var ts; } return unknownType; } - if (!isCallExpression && container.kind === 151) { + if (!isCallExpression && container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if ((ts.getModifierFlags(container) & 32) || isCallExpression) { @@ -30450,7 +30468,7 @@ var ts; nodeCheckFlag = 256; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 150 && ts.getModifierFlags(container) & 256) { + if (container.kind === 151 && ts.getModifierFlags(container) & 256) { if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096; } @@ -30461,7 +30479,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 177) { + if (container.parent.kind === 178) { if (languageVersion < 2) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -30479,7 +30497,7 @@ var ts; } return unknownType; } - if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 152 && isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } @@ -30491,24 +30509,24 @@ var ts; return false; } if (isCallExpression) { - return container.kind === 151; + return container.kind === 152; } else { - if (ts.isClassLike(container.parent) || container.parent.kind === 177) { + if (ts.isClassLike(container.parent) || container.parent.kind === 178) { if (ts.getModifierFlags(container) & 32) { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || - container.kind === 153; + return container.kind === 151 || + container.kind === 150 || + container.kind === 153 || + container.kind === 154; } else { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || + return container.kind === 151 || + container.kind === 150 || container.kind === 153 || + container.kind === 154 || + container.kind === 149 || container.kind === 148 || - container.kind === 147 || - container.kind === 151; + container.kind === 152; } } } @@ -30516,10 +30534,10 @@ var ts; } } function getContainingObjectLiteral(func) { - return (func.kind === 150 || - func.kind === 152 || - func.kind === 153) && func.parent.kind === 177 ? func.parent : - func.kind === 185 && func.parent.kind === 260 ? func.parent.parent : + return (func.kind === 151 || + func.kind === 153 || + func.kind === 154) && func.parent.kind === 178 ? func.parent : + func.kind === 186 && func.parent.kind === 261 ? func.parent.parent : undefined; } function getThisTypeArgument(type) { @@ -30531,7 +30549,7 @@ var ts; }); } function getContextualThisParameterType(func) { - if (func.kind === 186) { + if (func.kind === 187) { return undefined; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -30554,7 +30572,7 @@ var ts; if (thisType) { return instantiateType(thisType, getContextualMapper(containingLiteral)); } - if (literal.parent.kind !== 260) { + if (literal.parent.kind !== 261) { break; } literal = literal.parent.parent; @@ -30562,9 +30580,9 @@ var ts; } return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral); } - if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) { + if (func.parent.kind === 194 && func.parent.operatorToken.kind === 58) { var target = func.parent.left; - if (target.kind === 178 || target.kind === 179) { + if (target.kind === 179 || target.kind === 180) { return checkExpressionCached(target.expression); } } @@ -30616,7 +30634,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -30628,7 +30646,7 @@ var ts; if (ts.isBindingPattern(declaration.parent)) { var parentDeclaration = declaration.parent.parent; var name = declaration.propertyName || declaration.name; - if (parentDeclaration.kind !== 175 && + if (parentDeclaration.kind !== 176 && parentDeclaration.type && !ts.isBindingPattern(name)) { var text = ts.getTextOfPropertyName(name); @@ -30669,7 +30687,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 145 && node.parent.initializer === node) { + if (node.parent.kind === 146 && node.parent.initializer === node) { return true; } node = node.parent; @@ -30678,8 +30696,8 @@ var ts; } function getContextualReturnType(functionDecl) { if (functionDecl.type || - functionDecl.kind === 151 || - functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) { + functionDecl.kind === 152 || + functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); @@ -30698,7 +30716,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 182) { + if (template.parent.kind === 183) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -30706,7 +30724,7 @@ var ts; function getContextualTypeForBinaryOperand(node) { var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; - if (operator >= 57 && operator <= 69) { + if (operator >= 58 && operator <= 70) { if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) { return undefined; } @@ -30714,14 +30732,14 @@ var ts; return getTypeOfExpression(binaryExpression.left); } } - else if (operator === 53) { + else if (operator === 54) { var type = getContextualType(binaryExpression); if (!type && node === binaryExpression.right) { type = getTypeOfExpression(binaryExpression.left); } return type; } - else if (operator === 52 || operator === 25) { + else if (operator === 53 || operator === 26) { if (node === binaryExpression.right) { return getContextualType(binaryExpression); } @@ -30778,6 +30796,25 @@ var ts; var conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } + function getContextualTypeForJsxExpression(node) { + var jsxAttributes = ts.isJsxAttributeLike(node.parent) ? + node.parent.parent : + node.parent.openingElement.attributes; + var attributesType = getContextualType(jsxAttributes); + if (!attributesType || isTypeAny(attributesType)) { + return undefined; + } + if (ts.isJsxAttribute(node.parent)) { + return getTypeOfPropertyOfType(attributesType, node.parent.name.text); + } + else if (node.parent.kind === 249) { + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + return jsxChildrenPropertyName && jsxChildrenPropertyName !== "" ? getTypeOfPropertyOfType(attributesType, jsxChildrenPropertyName) : anyType; + } + else { + return attributesType; + } + } function getContextualTypeForJsxAttribute(attribute) { var attributesType = getContextualType(attribute.parent); if (ts.isJsxAttribute(attribute)) { @@ -30803,44 +30840,44 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 175: + case 176: return getContextualTypeForInitializerExpression(node); - case 186: - case 218: + case 187: + case 219: return getContextualTypeForReturnExpression(node); - case 196: + case 197: return getContextualTypeForYieldOperand(parent); - case 180: case 181: + case 182: return getContextualTypeForArgument(parent, node); - case 183: - case 201: + case 184: + case 202: return getTypeFromTypeNode(parent.type); - case 193: + case 194: return getContextualTypeForBinaryOperand(node); - case 260: case 261: + case 262: return getContextualTypeForObjectLiteralElement(parent); - case 176: + case 177: return getContextualTypeForElementExpression(node); - case 194: + case 195: return getContextualTypeForConditionalOperand(node); - case 204: - ts.Debug.assert(parent.parent.kind === 195); + case 205: + ts.Debug.assert(parent.parent.kind === 196); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 184: + case 185: return getContextualType(parent); + case 256: + return getContextualTypeForJsxExpression(parent); + case 253: case 255: - return getContextualType(parent); - case 252: - case 254: return getContextualTypeForJsxAttribute(parent); + case 251: case 250: - case 249: return getAttributesTypeFromJsxOpeningLikeElement(parent); } return undefined; @@ -30873,7 +30910,7 @@ var ts; return sourceLength < targetParameterCount; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 185 || node.kind === 186; + return node.kind === 186 || node.kind === 187; } function getContextualSignatureForFunctionLikeDeclaration(node) { return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) @@ -30886,7 +30923,7 @@ var ts; getApparentTypeOfContextualType(node); } function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; @@ -30927,8 +30964,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false); } function hasDefaultValue(node) { - return (node.kind === 175 && !!node.initializer) || - (node.kind === 193 && node.operatorToken.kind === 57); + return (node.kind === 176 && !!node.initializer) || + (node.kind === 194 && node.operatorToken.kind === 58); } function checkArrayLiteral(node, checkMode) { var elements = node.elements; @@ -30937,7 +30974,7 @@ var ts; var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 197) { + if (inDestructuringPattern && e.kind === 198) { var restArrayType = checkExpression(e.expression, checkMode); var restElementType = getIndexTypeOfType(restArrayType, 1) || getIteratedTypeOrElementType(restArrayType, undefined, false, false, false); @@ -30949,7 +30986,7 @@ var ts; var type = checkExpressionForMutableLocation(e, checkMode); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 197; + hasSpreadElement = hasSpreadElement || e.kind === 198; } if (!hasSpreadElement) { if (inDestructuringPattern && elementTypes.length) { @@ -30960,7 +30997,7 @@ var ts; var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; - if (pattern && (pattern.kind === 174 || pattern.kind === 176)) { + if (pattern && (pattern.kind === 175 || pattern.kind === 177)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -30968,7 +31005,7 @@ var ts; elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 199) { + if (patternElement.kind !== 200) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -30985,7 +31022,7 @@ var ts; strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340); @@ -31031,7 +31068,7 @@ var ts; var propagatedFlags = 0; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177); + (contextualType.pattern.kind === 174 || contextualType.pattern.kind === 178); var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node); var typeFlags = 0; var patternWithComputedProperties = false; @@ -31041,25 +31078,25 @@ var ts; for (var i = 0; i < node.properties.length; i++) { var memberDecl = node.properties[i]; var member = memberDecl.symbol; - if (memberDecl.kind === 260 || - memberDecl.kind === 261 || + if (memberDecl.kind === 261 || + memberDecl.kind === 262 || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 260) { + if (memberDecl.kind === 261) { type = checkPropertyAssignment(memberDecl, checkMode); } - else if (memberDecl.kind === 150) { + else if (memberDecl.kind === 151) { type = checkObjectLiteralMethod(memberDecl, checkMode); } else { - ts.Debug.assert(memberDecl.kind === 261); + ts.Debug.assert(memberDecl.kind === 262); type = checkExpressionForMutableLocation(memberDecl.name, checkMode); } typeFlags |= type.flags; var prop = createSymbol(4 | member.flags, member.name); if (inDestructuringPattern) { - var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 261 && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 262 && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 67108864; } @@ -31085,7 +31122,7 @@ var ts; prop.target = member; member = prop; } - else if (memberDecl.kind === 262) { + else if (memberDecl.kind === 263) { if (languageVersion < 2) { checkExternalEmitHelpers(memberDecl, 2); } @@ -31107,7 +31144,7 @@ var ts; continue; } else { - ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153); + ts.Debug.assert(memberDecl.kind === 153 || memberDecl.kind === 154); checkNodeDeferred(memberDecl); } if (ts.hasDynamicName(memberDecl)) { @@ -31182,27 +31219,13 @@ var ts; else { checkExpression(node.closingElement.tagName); } - for (var _i = 0, _a = node.children; _i < _a.length; _i++) { - var child = _a[_i]; - switch (child.kind) { - case 255: - checkJsxExpression(child); - break; - case 248: - checkJsxElement(child); - break; - case 249: - checkJsxSelfClosingElement(child); - break; - } - } return getJsxGlobalElementType() || anyType; } function isUnhyphenatedJsxName(name) { return name.indexOf("-") < 0; } function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 178 || tagName.kind === 98) { + if (tagName.kind === 179 || tagName.kind === 99) { return false; } else { @@ -31233,7 +31256,7 @@ var ts; attributesArray.push(attributeSymbol); } else { - ts.Debug.assert(attributeDecl.kind === 254); + ts.Debug.assert(attributeDecl.kind === 255); if (attributesArray.length > 0) { spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); attributesArray = []; @@ -31266,6 +31289,32 @@ var ts; } }); } + var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined; + if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + var childrenTypes = []; + for (var _b = 0, _c = parent.children; _b < _c.length; _b++) { + var child = _c[_b]; + if (child.kind === 10) { + if (!child.containsOnlyWhiteSpaces) { + childrenTypes.push(stringType); + } + } + else { + childrenTypes.push(checkExpression(child, checkMode)); + } + } + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { + if (attributesTable.has(jsxChildrenPropertyName)) { + error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName); + } + var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName); + childrenPropSymbol.type = childrenTypes.length === 1 ? + childrenTypes[0] : + createArrayType(getUnionType(childrenTypes, false)); + attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol); + } + } return createJsxAttributesType(attributes.symbol, attributesTable); function createJsxAttributesType(symbol, attributesTable) { var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined); @@ -31327,26 +31376,37 @@ var ts; } return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true); } - function getJsxElementPropertiesName() { + function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) { var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined); - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064); - var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - var attribProperties = attribPropType && getPropertiesOfType(attribPropType); - if (attribProperties) { - if (attribProperties.length === 0) { + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 793064); + var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); + var propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); + if (propertiesOfJsxElementAttribPropInterface) { + if (propertiesOfJsxElementAttribPropInterface.length === 0) { return ""; } - else if (attribProperties.length === 1) { - return attribProperties[0].name; + else if (propertiesOfJsxElementAttribPropInterface.length === 1) { + return propertiesOfJsxElementAttribPropInterface[0].name; } - else { - error(attribsPropTypeSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, JsxNames.ElementAttributesPropertyNameContainer); - return undefined; + else if (propertiesOfJsxElementAttribPropInterface.length > 1) { + error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, nameOfAttribPropContainer); } } - else { - return undefined; + return undefined; + } + function getJsxElementPropertiesName() { + if (!_hasComputedJsxElementPropertiesName) { + _hasComputedJsxElementPropertiesName = true; + _jsxElementPropertiesName = getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer); + } + return _jsxElementPropertiesName; + } + function getJsxElementChildrenPropertyname() { + if (!_hasComputedJsxElementChildrenPropertyName) { + _hasComputedJsxElementChildrenPropertyName = true; + _jsxElementChildrenPropertyName = getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer); } + return _jsxElementChildrenPropertyName; } function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) { ts.Debug.assert(!(elementType.flags & 65536)); @@ -31612,7 +31672,7 @@ var ts; } } function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 148; + return s.valueDeclaration ? s.valueDeclaration.kind : 149; } function getDeclarationModifierFlagsFromSymbol(s) { if (s.valueDeclaration) { @@ -31640,18 +31700,18 @@ var ts; } function checkPropertyAccessibility(node, left, type, prop) { var flags = getDeclarationModifierFlagsFromSymbol(prop); - var errorNode = node.kind === 178 || node.kind === 225 ? + var errorNode = node.kind === 179 || node.kind === 226 ? node.name : node.right; if (getCheckFlags(prop) & 256) { error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type)); return false; } - if (left.kind === 96) { + if (left.kind === 97) { if (languageVersion < 2) { var hasNonMethodDeclaration = forEachProperty(prop, function (p) { var propKind = getDeclarationKindFromSymbol(p); - return propKind !== 150 && propKind !== 149; + return propKind !== 151 && propKind !== 150; }); if (hasNonMethodDeclaration) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -31674,7 +31734,7 @@ var ts; } return true; } - if (left.kind === 96) { + if (left.kind === 97) { return true; } var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) { @@ -31747,7 +31807,7 @@ var ts; } function isInPropertyInitializer(node) { while (node) { - if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) { + if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) { return true; } node = node.parent; @@ -31779,8 +31839,8 @@ var ts; !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text); } - if (prop.valueDeclaration.kind === 228 && - node.parent && node.parent.kind !== 158 && + if (prop.valueDeclaration.kind === 229 && + node.parent && node.parent.kind !== 159 && !ts.isInAmbientContext(prop.valueDeclaration) && !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text); @@ -31797,7 +31857,7 @@ var ts; return unknownType; } } - if (node.kind !== 178 || assignmentKind === 1 || + if (node.kind !== 179 || assignmentKind === 1 || !(prop.flags & (3 | 4 | 98304)) && !(prop.flags & 8192 && propType.flags & 65536)) { return propType; @@ -31806,7 +31866,7 @@ var ts; return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 178 + var left = node.kind === 179 ? node.expression : node.left; var type = checkExpression(left); @@ -31820,13 +31880,13 @@ var ts; } function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 226) { + if (initializer.kind === 227) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); } } - else if (initializer.kind === 70) { + else if (initializer.kind === 71) { return getResolvedSymbol(initializer); } return undefined; @@ -31836,13 +31896,13 @@ var ts; } function isForInVariableForNumericPropertyNames(expr) { var e = ts.skipParentheses(expr); - if (e.kind === 70) { + if (e.kind === 71) { var symbol = getResolvedSymbol(e); if (symbol.flags & 3) { var child = expr; var node = expr.parent; while (node) { - if (node.kind === 214 && + if (node.kind === 215 && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { @@ -31860,7 +31920,7 @@ var ts; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 181 && node.parent.expression === node) { + if (node.parent.kind === 182 && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -31913,10 +31973,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 182) { + if (node.kind === 183) { checkExpression(node.template); } - else if (node.kind !== 146) { + else if (node.kind !== 147) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -31967,7 +32027,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 197) { + if (arg && arg.kind === 198) { return i; } } @@ -31983,11 +32043,11 @@ var ts; if (ts.isJsxOpeningLikeElement(node)) { return true; } - if (node.kind === 182) { + if (node.kind === 183) { var tagExpression = node; argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 195) { + if (tagExpression.template.kind === 196) { var templateExpression = tagExpression.template; var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); ts.Debug.assert(lastSpan !== undefined); @@ -31995,11 +32055,11 @@ var ts; } else { var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 12); + ts.Debug.assert(templateLiteral.kind === 13); callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 146) { + else if (node.kind === 147) { isDecorator = true; typeArguments = undefined; argCount = getEffectiveArgumentCount(node, undefined, signature); @@ -32007,7 +32067,7 @@ var ts; else { var callExpression = node; if (!callExpression.arguments) { - ts.Debug.assert(callExpression.kind === 181); + ts.Debug.assert(callExpression.kind === 182); return signature.minArgumentCount === 0; } argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -32068,7 +32128,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -32135,7 +32195,7 @@ var ts; return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation); } var thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 181) { + if (thisType && thisType !== voidType && node.kind !== 182) { var thisArgumentNode = getThisArgumentOfCall(node); var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; @@ -32148,7 +32208,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -32163,28 +32223,28 @@ var ts; return true; } function getThisArgumentOfCall(node) { - if (node.kind === 180) { + if (node.kind === 181) { var callee = node.expression; - if (callee.kind === 178) { + if (callee.kind === 179) { return callee.expression; } - else if (callee.kind === 179) { + else if (callee.kind === 180) { return callee.expression; } } } function getEffectiveCallArguments(node) { var args; - if (node.kind === 182) { + if (node.kind === 183) { var template = node.template; args = [undefined]; - if (template.kind === 195) { + if (template.kind === 196) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 146) { + else if (node.kind === 147) { return undefined; } else if (ts.isJsxOpeningLikeElement(node)) { @@ -32196,21 +32256,21 @@ var ts; return args; } function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 146) { + if (node.kind === 147) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return 1; - case 148: + case 149: return 2; - case 150: - case 152: + case 151: case 153: + case 154: if (languageVersion === 0) { return 2; } return signature.parameters.length >= 3 ? 3 : 2; - case 145: + case 146: return 3; } } @@ -32219,48 +32279,48 @@ var ts; } } function getEffectiveDecoratorFirstArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { return getParentTypeOfClassElement(node); } ts.Debug.fail("Unsupported decorator target."); return unknownType; } function getEffectiveDecoratorSecondArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { return anyType; } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var element = node; switch (element.name.kind) { - case 70: + case 71: case 8: case 9: return getLiteralTypeForText(32, element.name.text); - case 143: + case 144: var nameType = checkComputedPropertyName(element.name); if (isTypeOfKind(nameType, 512)) { return nameType; @@ -32277,20 +32337,20 @@ var ts; return unknownType; } function getEffectiveDecoratorThirdArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { return numberType; } - if (node.kind === 148) { + if (node.kind === 149) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var propertyType = getTypeOfNode(node); return createTypedPropertyDescriptorType(propertyType); } @@ -32311,26 +32371,26 @@ var ts; return unknownType; } function getEffectiveArgumentType(node, argIndex) { - if (node.kind === 146) { + if (node.kind === 147) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return getGlobalTemplateStringsArrayType(); } return undefined; } function getEffectiveArgument(node, args, argIndex) { - if (node.kind === 146 || - (argIndex === 0 && node.kind === 182)) { + if (node.kind === 147 || + (argIndex === 0 && node.kind === 183)) { return undefined; } return args[argIndex]; } function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 146) { + if (node.kind === 147) { return node.expression; } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return node.template; } else { @@ -32338,13 +32398,13 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 182; - var isDecorator = node.kind === 146; + var isTaggedTemplate = node.kind === 183; + var isDecorator = node.kind === 147; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); var typeArguments; if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) { typeArguments = node.typeArguments; - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { ts.forEach(typeArguments, checkSourceElement); } } @@ -32384,7 +32444,7 @@ var ts; var candidateForTypeArgumentError; var resultOfFailedInference; var result; - var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma; + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma); } @@ -32502,7 +32562,7 @@ var ts; } } function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var superType = checkSuperExpression(node.expression); if (superType !== unknownType) { var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node)); @@ -32656,16 +32716,16 @@ var ts; } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 145: + case 146: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 148: + case 149: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 150: - case 152: + case 151: case 153: + case 154: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -32715,16 +32775,16 @@ var ts; } function resolveSignature(node, candidatesOutArray) { switch (node.kind) { - case 180: - return resolveCallExpression(node, candidatesOutArray); case 181: - return resolveNewExpression(node, candidatesOutArray); + return resolveCallExpression(node, candidatesOutArray); case 182: + return resolveNewExpression(node, candidatesOutArray); + case 183: return resolveTaggedTemplateExpression(node, candidatesOutArray); - case 146: + case 147: return resolveDecorator(node, candidatesOutArray); + case 251: case 250: - case 249: return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray); } ts.Debug.fail("Branch in 'resolveSignature' should be unreachable."); @@ -32753,17 +32813,17 @@ var ts; function checkCallExpression(node) { checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return voidType; } - if (node.kind === 181) { + if (node.kind === 182) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 151 && - declaration.kind !== 155 && - declaration.kind !== 160 && + declaration.kind !== 152 && + declaration.kind !== 156 && + declaration.kind !== 161 && !ts.isJSDocConstructSignature(declaration)) { - var funcSymbol = node.expression.kind === 70 ? + var funcSymbol = node.expression.kind === 71 ? getResolvedSymbol(node.expression) : checkExpression(node.expression).symbol; if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) { @@ -32795,9 +32855,9 @@ var ts; return false; } var targetDeclarationKind = resolvedRequire.flags & 16 - ? 227 + ? 228 : resolvedRequire.flags & 3 - ? 225 + ? 226 : 0; if (targetDeclarationKind !== 0) { var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind); @@ -32830,7 +32890,7 @@ var ts; error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return unknownType; } - else if (container.kind === 151) { + else if (container.kind === 152) { var symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } @@ -32896,7 +32956,7 @@ var ts; for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; if (!ts.isOmittedExpression(element)) { - if (element.name.kind === 70) { + if (element.name.kind === 71) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } assignBindingElementTypes(element); @@ -32909,8 +32969,8 @@ var ts; if (!links.type) { links.type = instantiateType(contextualType, mapper); if (links.type === emptyObjectType && - (parameter.valueDeclaration.name.kind === 173 || - parameter.valueDeclaration.name.kind === 174)) { + (parameter.valueDeclaration.name.kind === 174 || + parameter.valueDeclaration.name.kind === 175)) { links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); } assignBindingElementTypes(parameter.valueDeclaration); @@ -32952,7 +33012,7 @@ var ts; } var functionFlags = ts.getFunctionFlags(func); var type; - if (func.body.kind !== 206) { + if (func.body.kind !== 207) { type = checkExpressionCached(func.body, checkMode); if (functionFlags & 2) { type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -33046,7 +33106,7 @@ var ts; return false; } var lastStatement = ts.lastOrUndefined(func.body.statements); - if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) { + if (lastStatement && lastStatement.kind === 221 && isExhaustiveSwitchStatement(lastStatement)) { return false; } return true; @@ -33075,7 +33135,7 @@ var ts; } }); if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || - func.kind === 185 || func.kind === 186)) { + func.kind === 186 || func.kind === 187)) { return undefined; } if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { @@ -33092,7 +33152,7 @@ var ts; if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) { return; } - if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 207 || !functionHasImplicitReturn(func)) { return; } var hasExplicitReturn = func.flags & 256; @@ -33119,9 +33179,9 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 185) { + if (!hasGrammarError && node.kind === 186) { checkGrammarForGenerator(node); } if (checkMode === 1 && isContextSensitive(node)) { @@ -33155,7 +33215,7 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 150) { + if (produceDiagnostics && node.kind !== 151) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithCapturedNewTargetVariable(node, node.name); @@ -33163,7 +33223,7 @@ var ts; return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); var returnOrPromisedType = node.type && ((functionFlags & 3) === 2 ? @@ -33176,7 +33236,7 @@ var ts; if (!node.type) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 206) { + if (node.body.kind === 207) { checkSourceElement(node.body); } else { @@ -33211,10 +33271,10 @@ var ts; function isReferenceToReadonlyEntity(expr, symbol) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 && - (expr.kind === 178 || expr.kind === 179) && - expr.expression.kind === 98) { + (expr.kind === 179 || expr.kind === 180) && + expr.expression.kind === 99) { var func = ts.getContainingFunction(expr); - if (!(func && func.kind === 151)) + if (!(func && func.kind === 152)) return true; return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent); } @@ -33223,13 +33283,13 @@ var ts; return false; } function isReferenceThroughNamespaceImport(expr) { - if (expr.kind === 178 || expr.kind === 179) { + if (expr.kind === 179 || expr.kind === 180) { var node = ts.skipParentheses(expr.expression); - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol.flags & 8388608) { var declaration = getDeclarationOfAliasSymbol(symbol); - return declaration && declaration.kind === 239; + return declaration && declaration.kind === 240; } } } @@ -33237,7 +33297,7 @@ var ts; } function checkReferenceExpression(expr, invalidReferenceMessage) { var node = ts.skipParentheses(expr); - if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) { error(expr, invalidReferenceMessage); return false; } @@ -33246,7 +33306,7 @@ var ts; function checkDeleteExpression(node) { checkExpression(node.expression); var expr = ts.skipParentheses(node.expression); - if (expr.kind !== 178 && expr.kind !== 179) { + if (expr.kind !== 179 && expr.kind !== 180) { error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } @@ -33282,25 +33342,25 @@ var ts; if (operandType === silentNeverType) { return silentNeverType; } - if (node.operator === 37 && node.operand.kind === 8) { + if (node.operator === 38 && node.operand.kind === 8) { return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text)); } switch (node.operator) { - case 36: case 37: - case 51: + case 38: + case 52: checkNonNullType(operandType, node.operand); if (maybeTypeOfKind(operandType, 512)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; - case 50: + case 51: var facts = getTypeFacts(operandType) & (1048576 | 2097152); return facts === 1048576 ? falseType : facts === 2097152 ? trueType : booleanType; - case 42: case 43: + case 44: var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access); @@ -33404,9 +33464,9 @@ var ts; return sourceType; } function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) { - if (property.kind === 260 || property.kind === 261) { + if (property.kind === 261 || property.kind === 262) { var name = property.name; - if (name.kind === 143) { + if (name.kind === 144) { checkComputedPropertyName(name); } if (isComputedNonLiteralName(name)) { @@ -33419,7 +33479,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) || getIndexTypeOfType(objectLiteralType, 0); if (type) { - if (property.kind === 261) { + if (property.kind === 262) { return checkDestructuringAssignment(property, type); } else { @@ -33430,7 +33490,7 @@ var ts; error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name)); } } - else if (property.kind === 262) { + else if (property.kind === 263) { if (languageVersion < 5) { checkExternalEmitHelpers(property, 4); } @@ -33461,8 +33521,8 @@ var ts; function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { var elements = node.elements; var element = elements[elementIndex]; - if (element.kind !== 199) { - if (element.kind !== 197) { + if (element.kind !== 200) { + if (element.kind !== 198) { var propName = "" + elementIndex; var type = isTypeAny(sourceType) ? sourceType @@ -33488,7 +33548,7 @@ var ts; } else { var restExpression = element.expression; - if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) { + if (restExpression.kind === 194 && restExpression.operatorToken.kind === 58) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -33501,7 +33561,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) { var target; - if (exprOrAssignment.kind === 261) { + if (exprOrAssignment.kind === 262) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && @@ -33515,21 +33575,21 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 193 && target.operatorToken.kind === 57) { + if (target.kind === 194 && target.operatorToken.kind === 58) { checkBinaryExpression(target, checkMode); target = target.left; } - if (target.kind === 177) { + if (target.kind === 178) { return checkObjectLiteralAssignment(target, sourceType); } - if (target.kind === 176) { + if (target.kind === 177) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { var targetType = checkExpression(target, checkMode); - var error = target.parent.kind === 262 ? + var error = target.parent.kind === 263 ? ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; if (checkReferenceExpression(target, error)) { @@ -33540,49 +33600,49 @@ var ts; function isSideEffectFree(node) { node = ts.skipParentheses(node); switch (node.kind) { - case 70: + case 71: case 9: - case 11: - case 182: - case 195: case 12: + case 183: + case 196: + case 13: case 8: - case 100: - case 85: - case 94: - case 138: - case 185: - case 198: + case 101: + case 86: + case 95: + case 139: case 186: - case 176: + case 199: + case 187: case 177: - case 188: - case 202: + case 178: + case 189: + case 203: + case 250: case 249: - case 248: return true; - case 194: + case 195: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 193: + case 194: if (ts.isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 191: case 192: + case 193: switch (node.operator) { - case 50: - case 36: - case 37: case 51: + case 37: + case 38: + case 52: return true; } return false; - case 189: - case 183: - case 201: + case 190: + case 184: + case 202: default: return false; } @@ -33602,34 +33662,34 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; - if (operator === 57 && (left.kind === 177 || left.kind === 176)) { + if (operator === 58 && (left.kind === 178 || left.kind === 177)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode); } var leftType = checkExpression(left, checkMode); var rightType = checkExpression(right, checkMode); switch (operator) { - case 38: case 39: - case 60: - case 61: case 40: + case 61: case 62: case 41: case 63: - case 37: - case 59: - case 44: + case 42: case 64: + case 38: + case 60: case 45: case 65: case 46: case 66: - case 48: - case 68: - case 49: - case 69: case 47: case 67: + case 49: + case 69: + case 50: + case 70: + case 48: + case 68: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -33649,8 +33709,8 @@ var ts; } } return numberType; - case 36: - case 58: + case 37: + case 59: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -33677,14 +33737,14 @@ var ts; reportOperatorError(); return anyType; } - if (operator === 58) { + if (operator === 59) { checkAssignmentOperator(resultType); } return resultType; - case 26: - case 28: + case 27: case 29: case 30: + case 31: if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); @@ -33693,10 +33753,10 @@ var ts; } } return booleanType; - case 31: case 32: case 33: case 34: + case 35: var leftIsLiteral = isLiteralType(leftType); var rightIsLiteral = isLiteralType(rightType); if (!leftIsLiteral || !rightIsLiteral) { @@ -33707,29 +33767,29 @@ var ts; reportOperatorError(); } return booleanType; - case 92: + case 93: return checkInstanceOfExpression(left, right, leftType, rightType); - case 91: + case 92: return checkInExpression(left, right, leftType, rightType); - case 52: + case 53: return getTypeFacts(leftType) & 1048576 ? includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) : leftType; - case 53: + case 54: return getTypeFacts(leftType) & 2097152 ? getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : leftType; - case 57: + case 58: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); - case 25: + case 26: if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } function isEvalNode(node) { - return node.kind === 70 && node.text === "eval"; + return node.kind === 71 && node.text === "eval"; } function checkForDisallowedESSymbolOperand(operator) { var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left : @@ -33743,21 +33803,21 @@ var ts; } function getSuggestedBooleanOperator(operator) { switch (operator) { + case 49: + case 69: + return 54; + case 50: + case 70: + return 35; case 48: case 68: return 53; - case 49: - case 69: - return 34; - case 47: - case 67: - return 52; default: return undefined; } } function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 57 && operator <= 69) { + if (produceDiagnostics && operator >= 58 && operator <= 70) { if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) { checkTypeAssignableTo(valueType, leftType, left, undefined); } @@ -33843,9 +33903,9 @@ var ts; return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text)); case 8: return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text)); - case 100: + case 101: return trueType; - case 85: + case 86: return falseType; } } @@ -33879,7 +33939,7 @@ var ts; } function isTypeAssertion(node) { node = ts.skipParentheses(node); - return node.kind === 183 || node.kind === 201; + return node.kind === 184 || node.kind === 202; } function checkDeclarationInitializer(declaration) { var type = getTypeOfExpression(declaration.initializer, true); @@ -33905,14 +33965,14 @@ var ts; return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -33934,7 +33994,7 @@ var ts; return type; } function getTypeOfExpression(node, cache) { - if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) { + if (node.kind === 181 && node.expression.kind !== 97 && !ts.isRequireCall(node, true)) { var funcType = checkNonNullExpression(node.expression); var signature = getSingleCallSignature(funcType); if (signature && !signature.typeParameters) { @@ -33952,7 +34012,7 @@ var ts; } function checkExpression(node, checkMode) { var type; - if (node.kind === 142) { + if (node.kind === 143) { type = checkQualifiedName(node); } else { @@ -33960,9 +34020,9 @@ var ts; type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 178 && node.parent.expression === node) || - (node.parent.kind === 179 && node.parent.expression === node) || - ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 179 && node.parent.expression === node) || + (node.parent.kind === 180 && node.parent.expression === node) || + ((node.kind === 71 || node.kind === 143) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -33971,83 +34031,83 @@ var ts; } function checkExpressionWorker(node, checkMode) { switch (node.kind) { - case 70: + case 71: return checkIdentifier(node); - case 98: + case 99: return checkThisExpression(node); - case 96: + case 97: return checkSuperExpression(node); - case 94: + case 95: return nullWideningType; case 9: case 8: - case 100: - case 85: + case 101: + case 86: return checkLiteralExpression(node); - case 195: + case 196: return checkTemplateExpression(node); - case 12: + case 13: return stringType; - case 11: + case 12: return globalRegExpType; - case 176: - return checkArrayLiteral(node, checkMode); case 177: - return checkObjectLiteral(node, checkMode); + return checkArrayLiteral(node, checkMode); case 178: - return checkPropertyAccessExpression(node); + return checkObjectLiteral(node, checkMode); case 179: - return checkIndexedAccess(node); + return checkPropertyAccessExpression(node); case 180: + return checkIndexedAccess(node); case 181: - return checkCallExpression(node); case 182: + return checkCallExpression(node); + case 183: return checkTaggedTemplateExpression(node); - case 184: + case 185: return checkExpression(node.expression, checkMode); - case 198: + case 199: return checkClassExpression(node); - case 185: case 186: + case 187: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 188: + case 189: return checkTypeOfExpression(node); - case 183: - case 201: - return checkAssertion(node); + case 184: case 202: - return checkNonNullAssertion(node); + return checkAssertion(node); case 203: + return checkNonNullAssertion(node); + case 204: return checkMetaProperty(node); - case 187: + case 188: return checkDeleteExpression(node); - case 189: - return checkVoidExpression(node); case 190: - return checkAwaitExpression(node); + return checkVoidExpression(node); case 191: - return checkPrefixUnaryExpression(node); + return checkAwaitExpression(node); case 192: - return checkPostfixUnaryExpression(node); + return checkPrefixUnaryExpression(node); case 193: - return checkBinaryExpression(node, checkMode); + return checkPostfixUnaryExpression(node); case 194: + return checkBinaryExpression(node, checkMode); + case 195: return checkConditionalExpression(node, checkMode); - case 197: + case 198: return checkSpreadExpression(node, checkMode); - case 199: + case 200: return undefinedWideningType; - case 196: + case 197: return checkYieldExpression(node); - case 255: + case 256: return checkJsxExpression(node, checkMode); - case 248: - return checkJsxElement(node); case 249: + return checkJsxElement(node); + case 250: return checkJsxSelfClosingElement(node); - case 253: + case 254: return checkJsxAttributes(node, checkMode); - case 250: + case 251: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -34077,7 +34137,7 @@ var ts; var func = ts.getContainingFunction(node); if (ts.getModifierFlags(node) & 92) { func = ts.getContainingFunction(node); - if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 152 && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -34088,7 +34148,7 @@ var ts; if (ts.indexOf(func.parameters, node) !== 0) { error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); } - if (func.kind === 151 || func.kind === 155 || func.kind === 160) { + if (func.kind === 152 || func.kind === 156 || func.kind === 161) { error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); } } @@ -34100,7 +34160,7 @@ var ts; if (parameterList) { for (var i = 0; i < parameterList.length; i++) { var param = parameterList[i]; - if (param.name.kind === 70 && + if (param.name.kind === 71 && param.name.text === parameter.text) { return i; } @@ -34150,13 +34210,13 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { + case 187: + case 155: + case 228: case 186: - case 154: - case 227: - case 185: - case 159: + case 160: + case 151: case 150: - case 149: var parent = node.parent; if (node === parent.type) { return parent; @@ -34170,13 +34230,13 @@ var ts; continue; } var name = element.name; - if (name.kind === 70 && + if (name.kind === 71 && name.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name.kind === 174 || - name.kind === 173) { + else if (name.kind === 175 || + name.kind === 174) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) { return true; } @@ -34184,12 +34244,12 @@ var ts; } } function checkSignatureDeclaration(node) { - if (node.kind === 156) { + if (node.kind === 157) { checkGrammarIndexSignature(node); } - else if (node.kind === 159 || node.kind === 227 || node.kind === 160 || - node.kind === 154 || node.kind === 151 || - node.kind === 155) { + else if (node.kind === 160 || node.kind === 228 || node.kind === 161 || + node.kind === 155 || node.kind === 152 || + node.kind === 156) { checkGrammarFunctionLikeDeclaration(node); } var functionFlags = ts.getFunctionFlags(node); @@ -34216,10 +34276,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (noImplicitAny && !node.type) { switch (node.kind) { - case 155: + case 156: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 154: + case 155: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -34253,7 +34313,7 @@ var ts; var staticNames = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151) { + if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; if (ts.isParameterPropertyDeclaration(param)) { @@ -34267,16 +34327,16 @@ var ts; var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); if (memberName) { switch (member.kind) { - case 152: + case 153: addName(names, member.name, memberName, 1); break; - case 153: + case 154: addName(names, member.name, memberName, 2); break; - case 148: + case 149: addName(names, member.name, memberName, 3); break; - case 150: + case 151: addName(names, member.name, memberName, 4); break; } @@ -34328,12 +34388,12 @@ var ts; var names = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 147) { + if (member.kind === 148) { var memberName = void 0; switch (member.name.kind) { case 9: case 8: - case 70: + case 71: memberName = member.name.text; break; default: @@ -34350,7 +34410,7 @@ var ts; } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 229) { + if (node.kind === 230) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -34365,7 +34425,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 135: + case 136: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -34373,7 +34433,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 132: + case 133: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -34429,15 +34489,15 @@ var ts; return ts.forEachChild(n, containsSuperCall); } function markThisReferencesAsErrors(n) { - if (n.kind === 98) { + if (n.kind === 99) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 185 && n.kind !== 227) { + else if (n.kind !== 186 && n.kind !== 228) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 148 && + return n.kind === 149 && !(ts.getModifierFlags(n) & 32) && !!n.initializer; } @@ -34457,7 +34517,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) { var statement = statements_3[_i]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { superCallStatement = statement; break; } @@ -34480,18 +34540,18 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 152) { + if (node.kind === 153) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) { if (!(node.flags & 256)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { - var otherKind = node.kind === 152 ? 153 : 152; + var otherKind = node.kind === 153 ? 154 : 153; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) { @@ -34505,7 +34565,7 @@ var ts; } } var returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 152) { + if (node.kind === 153) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -34615,9 +34675,9 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); - if (n.parent.kind !== 229 && - n.parent.kind !== 228 && - n.parent.kind !== 198 && + if (n.parent.kind !== 230 && + n.parent.kind !== 229 && + n.parent.kind !== 199 && ts.isInAmbientContext(n)) { if (!(flags & 2)) { flags |= 1; @@ -34694,7 +34754,7 @@ var ts; if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 150 || node.kind === 149) && + var reportError = (node.kind === 151 || node.kind === 150) && (ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32); if (reportError) { var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; @@ -34727,11 +34787,11 @@ var ts; var current = declarations_5[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 230 || node.parent.kind === 163 || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) { + if (node.kind === 228 || node.kind === 151 || node.kind === 150 || node.kind === 152) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -34842,16 +34902,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 229: + case 230: return 2097152; - case 232: + case 233: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; - case 228: - case 231: + case 229: + case 232: return 2097152 | 1048576; - case 236: + case 237: var result_3 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); }); @@ -34973,7 +35033,7 @@ var ts; var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; if (promiseConstructorType === unknownType) { - if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { + if (promiseConstructorName.kind === 71 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { @@ -35008,22 +35068,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 228: + case 229: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 145: + case 146: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 148: + case 149: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 150: - case 152: + case 151: case 153: + case 154: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -35034,7 +35094,7 @@ var ts; function markTypeNodeAsReferenced(node) { var typeName = node && ts.getEntityNameFromTypeNode(node); var rootName = typeName && getFirstIdentifier(typeName); - var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 70 ? 793064 : 1920) | 8388608, undefined, undefined); + var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined); if (rootSymbol && rootSymbol.flags & 8388608 && symbolIsValue(rootSymbol) @@ -35057,13 +35117,13 @@ var ts; } var firstDecorator = node.decorators[0]; checkExternalEmitHelpers(firstDecorator, 8); - if (node.kind === 145) { + if (node.kind === 146) { checkExternalEmitHelpers(firstDecorator, 32); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16); switch (node.kind) { - case 228: + case 229: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) { @@ -35072,19 +35132,19 @@ var ts; } } break; - case 150: - case 152: + case 151: case 153: + case 154: for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markTypeNodeAsReferenced(node.type); break; - case 148: + case 149: markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); break; - case 145: + case 146: markTypeNodeAsReferenced(node.type); break; } @@ -35105,7 +35165,7 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var functionFlags = ts.getFunctionFlags(node); - if (node.name && node.name.kind === 143) { + if (node.name && node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -35149,43 +35209,43 @@ var ts; for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { var node = deferredUnusedIdentifierNodes_1[_i]; switch (node.kind) { - case 264: - case 232: + case 265: + case 233: checkUnusedModuleMembers(node); break; - case 228: - case 198: + case 229: + case 199: checkUnusedClassMembers(node); checkUnusedTypeParameters(node); break; - case 229: + case 230: checkUnusedTypeParameters(node); break; - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: checkUnusedLocalsAndParameters(node); break; - case 151: - case 185: - case 227: - case 186: - case 150: case 152: + case 186: + case 228: + case 187: + case 151: case 153: + case 154: if (node.body) { checkUnusedLocalsAndParameters(node); } checkUnusedTypeParameters(node); break; - case 149: - case 154: + case 150: case 155: case 156: - case 159: + case 157: case 160: + case 161: checkUnusedTypeParameters(node); break; } @@ -35193,10 +35253,10 @@ var ts; } } function checkUnusedLocalsAndParameters(node) { - if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + if (node.parent.kind !== 230 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { node.locals.forEach(function (local) { if (!local.isReferenced) { - if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) { + if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) { var parameter = ts.getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !ts.isParameterPropertyDeclaration(parameter) && @@ -35222,13 +35282,13 @@ var ts; function errorUnusedLocal(node, name) { if (isIdentifierThatStartsWithUnderScore(node)) { var declaration = ts.getRootDeclaration(node.parent); - if (declaration.kind === 225 && - (declaration.parent.parent.kind === 214 || - declaration.parent.parent.kind === 215)) { + if (declaration.kind === 226 && + (declaration.parent.parent.kind === 215 || + declaration.parent.parent.kind === 216)) { return; } } - if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) { + if (!isRemovedPropertyFromObjectSpread(node.kind === 71 ? node.parent : node)) { error(node, ts.Diagnostics._0_is_declared_but_never_used, name); } } @@ -35236,19 +35296,19 @@ var ts; return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node) { - return node.kind === 70 && node.text.charCodeAt(0) === 95; + return node.kind === 71 && node.text.charCodeAt(0) === 95; } function checkUnusedClassMembers(node) { if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { if (node.members) { for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 150 || member.kind === 148) { + if (member.kind === 151 || member.kind === 149) { if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) { error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); } } - else if (member.kind === 151) { + else if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) { @@ -35292,7 +35352,7 @@ var ts; } } function checkBlock(node) { - if (node.kind === 206) { + if (node.kind === 207) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -35314,19 +35374,19 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 148 || - node.kind === 147 || + if (node.kind === 149 || + node.kind === 148 || + node.kind === 151 || node.kind === 150 || - node.kind === 149 || - node.kind === 152 || - node.kind === 153) { + node.kind === 153 || + node.kind === 154) { return false; } if (ts.isInAmbientContext(node)) { return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 146 && ts.nodeIsMissing(root.parent.body)) { return false; } return true; @@ -35344,7 +35404,7 @@ var ts; function checkIfThisIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration_1 = node.kind !== 70; + var isDeclaration_1 = node.kind !== 71; if (isDeclaration_1) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -35358,7 +35418,7 @@ var ts; function checkIfNewTargetIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 8) { - var isDeclaration_2 = node.kind !== 70; + var isDeclaration_2 = node.kind !== 71; if (isDeclaration_2) { error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } @@ -35378,7 +35438,7 @@ var ts; return; } if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_3 = node.kind !== 70; + var isDeclaration_3 = node.kind !== 71; if (isDeclaration_3) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -35394,11 +35454,11 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -35406,11 +35466,11 @@ var ts; if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -35418,7 +35478,7 @@ var ts; if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) { return; } - if (node.kind === 225 && !node.initializer) { + if (node.kind === 226 && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -35428,15 +35488,15 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226); - var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 227); + var container = varDeclList.parent.kind === 208 && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; var namesShareScope = container && - (container.kind === 206 && ts.isFunctionLike(container.parent) || + (container.kind === 207 && ts.isFunctionLike(container.parent) || + container.kind === 234 || container.kind === 233 || - container.kind === 232 || - container.kind === 264); + container.kind === 265); if (!namesShareScope) { var name = symbolToString(localDeclarationSymbol); error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -35446,7 +35506,7 @@ var ts; } } function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 145) { + if (ts.getRootDeclaration(node).kind !== 146) { return; } var func = ts.getContainingFunction(node); @@ -35455,10 +35515,10 @@ var ts; if (ts.isTypeNode(n) || ts.isDeclarationName(n)) { return; } - if (n.kind === 178) { + if (n.kind === 179) { return visit(n.expression); } - else if (n.kind === 70) { + else if (n.kind === 71) { var symbol = resolveName(n, n.text, 107455 | 8388608, undefined, undefined); if (!symbol || symbol === unknownSymbol || !symbol.valueDeclaration) { return; @@ -35469,8 +35529,8 @@ var ts; } var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (enclosingContainer === func) { - if (symbol.valueDeclaration.kind === 145 || - symbol.valueDeclaration.kind === 175) { + if (symbol.valueDeclaration.kind === 146 || + symbol.valueDeclaration.kind === 176) { if (symbol.valueDeclaration.pos < node.pos) { return; } @@ -35479,7 +35539,7 @@ var ts; return "quit"; } return ts.isFunctionLike(current.parent) || - (current.parent.kind === 148 && + (current.parent.kind === 149 && !(ts.hasModifier(current.parent, 32)) && ts.isClassLike(current.parent.parent)); })) { @@ -35500,17 +35560,17 @@ var ts; function checkVariableLikeDeclaration(node) { checkDecorators(node); checkSourceElement(node.type); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 175) { - if (node.parent.kind === 173 && languageVersion < 5) { + if (node.kind === 176) { + if (node.parent.kind === 174 && languageVersion < 5) { checkExternalEmitHelpers(node, 4); } - if (node.propertyName && node.propertyName.kind === 143) { + if (node.propertyName && node.propertyName.kind === 144) { checkComputedPropertyName(node.propertyName); } var parent = node.parent.parent; @@ -35523,17 +35583,17 @@ var ts; } } if (ts.isBindingPattern(node.name)) { - if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) { + if (node.name.kind === 175 && languageVersion < 2 && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512); } ts.forEach(node.name.elements, checkSourceElement); } - if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 146 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (ts.isBindingPattern(node.name)) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); checkParameterInitializer(node); } @@ -35542,7 +35602,7 @@ var ts; var symbol = getSymbolOfNode(node); var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol)); if (node === symbol.valueDeclaration) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); checkParameterInitializer(node); } @@ -35560,9 +35620,9 @@ var ts; error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); } } - if (node.kind !== 148 && node.kind !== 147) { + if (node.kind !== 149 && node.kind !== 148) { checkExportsOnMergedDeclarations(node); - if (node.kind === 225 || node.kind === 175) { + if (node.kind === 226 || node.kind === 176) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -35573,8 +35633,8 @@ var ts; } } function areDeclarationFlagsIdentical(left, right) { - if ((left.kind === 145 && right.kind === 225) || - (left.kind === 225 && right.kind === 145)) { + if ((left.kind === 146 && right.kind === 226) || + (left.kind === 226 && right.kind === 146)) { return true; } if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) { @@ -35601,7 +35661,7 @@ var ts; ts.forEach(node.declarationList.declarations, checkSourceElement); } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { - if (node.modifiers && node.parent.kind === 177) { + if (node.modifiers && node.parent.kind === 178) { if (ts.getFunctionFlags(node) & 2) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -35620,7 +35680,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 208) { + if (node.thenStatement.kind === 209) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -35637,12 +35697,12 @@ var ts; } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 226) { + if (node.initializer && node.initializer.kind === 227) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -35660,7 +35720,7 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.kind === 215) { + if (node.kind === 216) { if (node.awaitModifier) { if (languageVersion < 4) { checkExternalEmitHelpers(node, 8192); @@ -35670,13 +35730,13 @@ var ts; checkExternalEmitHelpers(node, 256); } } - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { @@ -35695,7 +35755,7 @@ var ts; function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); var rightType = checkNonNullExpression(node.expression); - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -35705,7 +35765,7 @@ var ts; else { var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { @@ -35917,7 +35977,7 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } function isGetAccessorWithAnnotatedSetAccessor(node) { - return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153))); + return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154))); } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2 @@ -35942,12 +36002,12 @@ var ts; if (functionFlags & 1) { return; } - if (func.kind === 153) { + if (func.kind === 154) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } } - else if (func.kind === 151) { + else if (func.kind === 152) { if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) { error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -35965,7 +36025,7 @@ var ts; } } } - else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + else if (func.kind !== 152 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } } @@ -35991,7 +36051,7 @@ var ts; var expressionType = checkExpression(node.expression); var expressionIsLiteral = isLiteralType(expressionType); ts.forEach(node.caseBlock.clauses, function (clause) { - if (clause.kind === 257 && !hasDuplicateDefaultClause) { + if (clause.kind === 258 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -36003,7 +36063,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 256) { + if (produceDiagnostics && clause.kind === 257) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); var caseIsLiteral = isLiteralType(caseType); @@ -36028,7 +36088,7 @@ var ts; if (ts.isFunctionLike(current)) { return "quit"; } - if (current.kind === 221 && current.label.text === node.label.text) { + if (current.kind === 222 && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); return true; @@ -36120,7 +36180,7 @@ var ts; return; } var errorNode; - if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) { + if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) { errorNode = propDeclaration; } else if (indexDeclaration) { @@ -36342,7 +36402,7 @@ var ts; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { return ts.filter(symbol.declarations, function (d) { - return d.kind === 228 || d.kind === 229; + return d.kind === 229 || d.kind === 230; }); } function checkKindsOfPropertyMemberOverrides(type, baseType) { @@ -36360,7 +36420,7 @@ var ts; if (derived === base) { var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) { - if (derivedClassDecl.kind === 198) { + if (derivedClassDecl.kind === 199) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -36400,7 +36460,7 @@ var ts; } } function isAccessor(kind) { - return kind === 152 || kind === 153; + return kind === 153 || kind === 154; } function checkInheritedPropertiesAreIdentical(type, typeNode) { var baseTypes = getBaseTypes(type); @@ -36442,7 +36502,7 @@ var ts; checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 230); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -36538,18 +36598,18 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 191: + case 192: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; } switch (e.operator) { - case 36: return value_1; - case 37: return -value_1; - case 51: return ~value_1; + case 37: return value_1; + case 38: return -value_1; + case 52: return ~value_1; } return undefined; - case 193: + case 194: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -36559,38 +36619,38 @@ var ts; return undefined; } switch (e.operatorToken.kind) { - case 48: return left | right; - case 47: return left & right; - case 45: return left >> right; - case 46: return left >>> right; - case 44: return left << right; - case 49: return left ^ right; - case 38: return left * right; - case 40: return left / right; - case 36: return left + right; - case 37: return left - right; - case 41: return left % right; + case 49: return left | right; + case 48: return left & right; + case 46: return left >> right; + case 47: return left >>> right; + case 45: return left << right; + case 50: return left ^ right; + case 39: return left * right; + case 41: return left / right; + case 37: return left + right; + case 38: return left - right; + case 42: return left % right; } return undefined; case 8: checkGrammarNumericLiteral(e); return +e.text; - case 184: + case 185: return evalConstant(e.expression); - case 70: + case 71: + case 180: case 179: - case 178: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; var propertyName = void 0; - if (e.kind === 70) { + if (e.kind === 71) { enumType_1 = currentType; propertyName = e.text; } else { var expression = void 0; - if (e.kind === 179) { + if (e.kind === 180) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9) { return undefined; @@ -36604,10 +36664,10 @@ var ts; } var current = expression; while (current) { - if (current.kind === 70) { + if (current.kind === 71) { break; } - else if (current.kind === 178) { + else if (current.kind === 179) { current = current.expression; } else { @@ -36668,7 +36728,7 @@ var ts; } var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 231) { + if (declaration.kind !== 232) { return false; } var enumDeclaration = declaration; @@ -36691,8 +36751,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { var declaration = declarations_8[_i]; - if ((declaration.kind === 228 || - (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 229 || + (declaration.kind === 228 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -36751,7 +36811,7 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - var mergedClass = ts.getDeclarationOfKind(symbol, 228); + var mergedClass = ts.getDeclarationOfKind(symbol, 229); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768; @@ -36794,22 +36854,22 @@ var ts; } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 207: + case 208: for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 242: case 243: + case 244: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 236: case 237: + case 238: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 175: - case 225: + case 176: + case 226: var name = node.name; if (ts.isBindingPattern(name)) { for (var _b = 0, _c = name.elements; _b < _c.length; _b++) { @@ -36818,12 +36878,12 @@ var ts; } break; } - case 228: - case 231: - case 227: case 229: case 232: + case 228: case 230: + case 233: + case 231: if (isGlobalAugmentation) { return; } @@ -36839,17 +36899,17 @@ var ts; } function getFirstIdentifier(node) { switch (node.kind) { - case 70: + case 71: return node; - case 142: + case 143: do { node = node.left; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; - case 178: + case 179: do { node = node.expression; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; } } @@ -36859,9 +36919,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 264 && !inAmbientExternalModule) { - error(moduleName, node.kind === 243 ? + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 265 && !inAmbientExternalModule) { + error(moduleName, node.kind === 244 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -36882,7 +36942,7 @@ var ts; (symbol.flags & 793064 ? 793064 : 0) | (symbol.flags & 1920 ? 1920 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 245 ? + var message = node.kind === 246 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -36909,7 +36969,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239) { + if (importClause.namedBindings.kind === 240) { checkImportBinding(importClause.namedBindings); } else { @@ -36960,10 +37020,10 @@ var ts; if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 && + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 234 && !node.moduleSpecifier && ts.isInAmbientContext(node); - if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + if (node.parent.kind !== 265 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -36976,7 +37036,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232; + var isInAppropriateContext = node.parent.kind === 265 || node.parent.kind === 234 || node.parent.kind === 233; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -36999,8 +37059,8 @@ var ts; if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { return; } - var container = node.parent.kind === 264 ? node.parent : node.parent.parent; - if (container.kind === 232 && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 265 ? node.parent : node.parent.parent; + if (container.kind === 233 && !ts.isAmbientModule(container)) { if (node.isExportEquals) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } @@ -37012,7 +37072,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { markExportAsReferenced(node); } else { @@ -37067,7 +37127,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return (declaration.kind !== 227 && declaration.kind !== 150) || + return (declaration.kind !== 228 && declaration.kind !== 151) || !!declaration.body; } } @@ -37078,123 +37138,123 @@ var ts; var kind = node.kind; if (cancellationToken) { switch (kind) { - case 232: - case 228: + case 233: case 229: - case 227: + case 230: + case 228: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 144: - return checkTypeParameter(node); case 145: + return checkTypeParameter(node); + case 146: return checkParameter(node); + case 149: case 148: - case 147: return checkPropertyDeclaration(node); - case 159: case 160: - case 154: + case 161: case 155: - return checkSignatureDeclaration(node); case 156: return checkSignatureDeclaration(node); + case 157: + return checkSignatureDeclaration(node); + case 151: case 150: - case 149: return checkMethodDeclaration(node); - case 151: - return checkConstructorDeclaration(node); case 152: + return checkConstructorDeclaration(node); case 153: + case 154: return checkAccessorDeclaration(node); - case 158: + case 159: return checkTypeReferenceNode(node); - case 157: + case 158: return checkTypePredicate(node); - case 161: - return checkTypeQuery(node); case 162: - return checkTypeLiteral(node); + return checkTypeQuery(node); case 163: - return checkArrayType(node); + return checkTypeLiteral(node); case 164: - return checkTupleType(node); + return checkArrayType(node); case 165: + return checkTupleType(node); case 166: - return checkUnionOrIntersectionType(node); case 167: - case 169: - return checkSourceElement(node.type); + return checkUnionOrIntersectionType(node); + case 168: case 170: - return checkIndexedAccessType(node); + return checkSourceElement(node.type); case 171: + return checkIndexedAccessType(node); + case 172: return checkMappedType(node); - case 227: + case 228: return checkFunctionDeclaration(node); - case 206: - case 233: - return checkBlock(node); case 207: + case 234: + return checkBlock(node); + case 208: return checkVariableStatement(node); - case 209: - return checkExpressionStatement(node); case 210: - return checkIfStatement(node); + return checkExpressionStatement(node); case 211: - return checkDoStatement(node); + return checkIfStatement(node); case 212: - return checkWhileStatement(node); + return checkDoStatement(node); case 213: - return checkForStatement(node); + return checkWhileStatement(node); case 214: - return checkForInStatement(node); + return checkForStatement(node); case 215: - return checkForOfStatement(node); + return checkForInStatement(node); case 216: + return checkForOfStatement(node); case 217: - return checkBreakOrContinueStatement(node); case 218: - return checkReturnStatement(node); + return checkBreakOrContinueStatement(node); case 219: - return checkWithStatement(node); + return checkReturnStatement(node); case 220: - return checkSwitchStatement(node); + return checkWithStatement(node); case 221: - return checkLabeledStatement(node); + return checkSwitchStatement(node); case 222: - return checkThrowStatement(node); + return checkLabeledStatement(node); case 223: + return checkThrowStatement(node); + case 224: return checkTryStatement(node); - case 225: + case 226: return checkVariableDeclaration(node); - case 175: + case 176: return checkBindingElement(node); - case 228: - return checkClassDeclaration(node); case 229: - return checkInterfaceDeclaration(node); + return checkClassDeclaration(node); case 230: - return checkTypeAliasDeclaration(node); + return checkInterfaceDeclaration(node); case 231: - return checkEnumDeclaration(node); + return checkTypeAliasDeclaration(node); case 232: + return checkEnumDeclaration(node); + case 233: return checkModuleDeclaration(node); - case 237: + case 238: return checkImportDeclaration(node); - case 236: + case 237: return checkImportEqualsDeclaration(node); - case 243: + case 244: return checkExportDeclaration(node); - case 242: + case 243: return checkExportAssignment(node); - case 208: + case 209: checkGrammarStatementInAmbientContext(node); return; - case 224: + case 225: checkGrammarStatementInAmbientContext(node); return; - case 246: + case 247: return checkMissingDeclaration(node); } } @@ -37207,17 +37267,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 185: case 186: + case 187: + case 151: case 150: - case 149: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 152: case 153: + case 154: checkAccessorDeclaration(node); break; - case 198: + case 199: checkClassExpressionDeferred(node); break; } @@ -37305,7 +37365,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 219 && node.parent.statement === node) { + if (node.parent.kind === 220 && node.parent.statement === node) { return true; } node = node.parent; @@ -37327,28 +37387,28 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931); break; - case 231: + case 232: copySymbols(getSymbolOfNode(location).exports, meaning & 8); break; - case 198: + case 199: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 228: case 229: + case 230: if (!(memberFlags & 32)) { copySymbols(getSymbolOfNode(location).members, meaning & 793064); } break; - case 185: + case 186: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -37380,33 +37440,33 @@ var ts; } } function isTypeDeclarationName(name) { - return name.kind === 70 && + return name.kind === 71 && isTypeDeclaration(name.parent) && name.parent.name === name; } function isTypeDeclaration(node) { switch (node.kind) { - case 144: - case 228: + case 145: case 229: case 230: case 231: + case 232: return true; } } function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 142) { + while (node.parent && node.parent.kind === 143) { node = node.parent; } - return node.parent && (node.parent.kind === 158 || node.parent.kind === 276); + return node.parent && (node.parent.kind === 159 || node.parent.kind === 277); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 178) { + while (node.parent && node.parent.kind === 179) { node = node.parent; } - return node.parent && node.parent.kind === 200; + return node.parent && node.parent.kind === 201; } function forEachEnclosingClass(node, callback) { var result; @@ -37423,13 +37483,13 @@ var ts; return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 142) { + while (nodeOnRightSide.parent.kind === 143) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 236) { + if (nodeOnRightSide.parent.kind === 237) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 242) { + if (nodeOnRightSide.parent.kind === 243) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -37454,18 +37514,18 @@ var ts; return getSymbolOfNode(entityName.parent); } if (ts.isInJavaScriptFile(entityName) && - entityName.parent.kind === 178 && + entityName.parent.kind === 179 && entityName.parent === entityName.parent.parent.left) { var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); if (specialPropertyAssignmentSymbol) { return specialPropertyAssignmentSymbol; } } - if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) { + if (entityName.parent.kind === 243 && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608); } - if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) { - var importEqualsDeclaration = ts.getAncestor(entityName, 236); + if (entityName.kind !== 179 && isInRightSideOfImportOrExportAssignment(entityName)) { + var importEqualsDeclaration = ts.getAncestor(entityName, 237); ts.Debug.assert(importEqualsDeclaration !== undefined); return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true); } @@ -37474,7 +37534,7 @@ var ts; } if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0; - if (entityName.parent.kind === 200) { + if (entityName.parent.kind === 201) { meaning = 793064; if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455; @@ -37493,20 +37553,20 @@ var ts; if (ts.nodeIsMissing(entityName)) { return undefined; } - if (entityName.kind === 70) { + if (entityName.kind === 71) { if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { return getIntrinsicTagSymbol(entityName.parent); } return resolveEntityName(entityName, 107455, false, true); } - else if (entityName.kind === 178) { + else if (entityName.kind === 179) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 142) { + else if (entityName.kind === 143) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -37515,19 +37575,19 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920; + var meaning = (entityName.parent.kind === 159 || entityName.parent.kind === 277) ? 793064 : 1920; return resolveEntityName(entityName, meaning, false, true); } - else if (entityName.parent.kind === 252) { + else if (entityName.parent.kind === 253) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 157) { + if (entityName.parent.kind === 158) { return resolveEntityName(entityName, 1); } return undefined; } function getSymbolAtLocation(node) { - if (node.kind === 264) { + if (node.kind === 265) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } if (isInsideWithStatementBody(node)) { @@ -37539,12 +37599,12 @@ var ts; else if (ts.isLiteralComputedPropertyDeclarationName(node)) { return getSymbolOfNode(node.parent.parent); } - if (node.kind === 70) { + if (node.kind === 71) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 175 && - node.parent.parent.kind === 173 && + else if (node.parent.kind === 176 && + node.parent.parent.kind === 174 && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -37554,11 +37614,11 @@ var ts; } } switch (node.kind) { - case 70: - case 178: - case 142: + case 71: + case 179: + case 143: return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 98: + case 99: var container = ts.getThisContainer(node, false); if (ts.isFunctionLike(container)) { var sig = getSignatureFromDeclaration(container); @@ -37566,21 +37626,21 @@ var ts; return sig.thisParameter; } } - case 96: + case 97: var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 168: + case 169: return getTypeFromTypeNode(node).symbol; - case 122: + case 123: var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 151) { + if (constructorDeclaration && constructorDeclaration.kind === 152) { return constructorDeclaration.parent.symbol; } return undefined; case 9: if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 237 || node.parent.kind === 243) && + ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } @@ -37588,7 +37648,7 @@ var ts; return resolveExternalModuleName(node, node); } case 8: - if (node.parent.kind === 179 && node.parent.argumentExpression === node) { + if (node.parent.kind === 180 && node.parent.argumentExpression === node) { var objectType = getTypeOfExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -37602,7 +37662,7 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 261) { + if (location && location.kind === 262) { return resolveEntityName(location.name, 107455 | 8388608); } return undefined; @@ -37661,20 +37721,20 @@ var ts; return unknownType; } function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { - ts.Debug.assert(expr.kind === 177 || expr.kind === 176); - if (expr.parent.kind === 215) { + ts.Debug.assert(expr.kind === 178 || expr.kind === 177); + if (expr.parent.kind === 216) { var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 193) { + if (expr.parent.kind === 194) { var iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 260) { + if (expr.parent.kind === 261) { var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); } - ts.Debug.assert(expr.parent.kind === 176); + ts.Debug.assert(expr.parent.kind === 177); var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType; return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType); @@ -37742,7 +37802,7 @@ var ts; if (!ts.isGeneratedIdentifier(node)) { node = ts.getParseTreeNode(node, ts.isIdentifier); if (node) { - var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node; + var isPropertyName_1 = node.parent.kind === 179 && node.parent.name === node; return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol; } } @@ -37785,7 +37845,7 @@ var ts; } var parentSymbol_1 = getParentOfSymbol(symbol); if (parentSymbol_1) { - if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) { + if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 265) { var symbolFile = parentSymbol_1.valueDeclaration; var referenceFile = ts.getSourceFileOfNode(node); var symbolIsUmdExport = symbolFile !== referenceFile; @@ -37819,7 +37879,7 @@ var ts; else if (nodeLinks_1.flags & 131072) { var isDeclaredInLoop = nodeLinks_1.flags & 262144; var inLoopInitializer = ts.isIterationStatement(container, false); - var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false); + var inLoopBodyBlock = container.kind === 207 && ts.isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { @@ -37855,18 +37915,18 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 236: - case 238: + case 237: case 239: - case 241: - case 245: + case 240: + case 242: + case 246: return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); - case 243: + case 244: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 242: + case 243: return node.expression - && node.expression.kind === 70 + && node.expression.kind === 71 ? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) : true; } @@ -37874,7 +37934,7 @@ var ts; } function isTopLevelValueImportEqualsWithEntityName(node) { node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration); - if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node === undefined || node.parent.kind !== 265 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -37927,15 +37987,15 @@ var ts; } function canHaveConstantValue(node) { switch (node.kind) { - case 263: - case 178: + case 264: case 179: + case 180: return true; } return false; } function getConstantValue(node) { - if (node.kind === 263) { + if (node.kind === 264) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -38129,7 +38189,7 @@ var ts; if (!fileToDirective) { return undefined; } - var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node)) + var meaning = (node.kind === 179) || (node.kind === 71 && isInTypeQuery(node)) ? 107455 | 1048576 : 793064 | 1920; var symbol = resolveEntityName(node, meaning, true); @@ -38172,7 +38232,7 @@ var ts; break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) { + if (current.valueDeclaration && current.valueDeclaration.kind === 265 && current.flags & 512) { return false; } for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { @@ -38191,7 +38251,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 264); + return ts.getDeclarationOfKind(moduleSymbol, 265); } function initializeTypeChecker() { for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) { @@ -38296,14 +38356,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 150 && !ts.nodeIsPresent(node.body)) { + if (node.kind === 151 && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 152 || node.kind === 153) { + else if (node.kind === 153 || node.kind === 154) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -38320,28 +38380,28 @@ var ts; var flags = 0; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 130) { - if (node.kind === 147 || node.kind === 149) { + if (modifier.kind !== 131) { + if (node.kind === 148 || node.kind === 150) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); } - if (node.kind === 156) { + if (node.kind === 157) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 75: - if (node.kind !== 231 && node.parent.kind === 228) { - return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75)); + case 76: + if (node.kind !== 232 && node.parent.kind === 229) { + return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(76)); } break; + case 114: case 113: case 112: - case 111: var text = visibilityToString(ts.modifierToFlag(modifier.kind)); - if (modifier.kind === 112) { + if (modifier.kind === 113) { lastProtected = modifier; } - else if (modifier.kind === 111) { + else if (modifier.kind === 112) { lastPrivate = modifier; } if (flags & 28) { @@ -38356,11 +38416,11 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128) { - if (modifier.kind === 111) { + if (modifier.kind === 112) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -38369,7 +38429,7 @@ var ts; } flags |= ts.modifierToFlag(modifier.kind); break; - case 114: + case 115: if (flags & 32) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } @@ -38379,10 +38439,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128) { @@ -38391,17 +38451,17 @@ var ts; flags |= 32; lastStatic = modifier; break; - case 130: + case 131: if (flags & 64) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); } - else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) { + else if (node.kind !== 149 && node.kind !== 148 && node.kind !== 157 && node.kind !== 146) { return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64; lastReadonly = modifier; break; - case 83: + case 84: if (flags & 1) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } @@ -38414,45 +38474,45 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1; break; - case 123: + case 124: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 234) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 2; lastDeclare = modifier; break; - case 116: + case 117: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 228) { - if (node.kind !== 150 && - node.kind !== 148 && - node.kind !== 152 && - node.kind !== 153) { + if (node.kind !== 229) { + if (node.kind !== 151 && + node.kind !== 149 && + node.kind !== 153 && + node.kind !== 154) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) { + if (!(node.parent.kind === 229 && ts.getModifierFlags(node.parent) & 128)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32) { @@ -38464,14 +38524,14 @@ var ts; } flags |= 128; break; - case 119: + case 120: if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256; @@ -38479,7 +38539,7 @@ var ts; break; } } - if (node.kind === 151) { + if (node.kind === 152) { if (flags & 32) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -38494,13 +38554,13 @@ var ts; } return; } - else if ((node.kind === 237 || node.kind === 236) && flags & 2) { + else if ((node.kind === 238 || node.kind === 237) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) { + else if (node.kind === 146 && (flags & 92) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); } - else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) { + else if (node.kind === 146 && (flags & 92) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256) { @@ -38516,38 +38576,38 @@ var ts; } function shouldReportBadModifier(node) { switch (node.kind) { - case 152: case 153: - case 151: + case 154: + case 152: + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 156: - case 232: + case 157: + case 233: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 185: case 186: - case 145: + case 187: + case 146: return false; default: - if (node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 234 || node.parent.kind === 265) { return false; } switch (node.kind) { - case 227: - return nodeHasAnyModifiersExcept(node, 119); case 228: - return nodeHasAnyModifiersExcept(node, 116); + return nodeHasAnyModifiersExcept(node, 120); case 229: - case 207: + return nodeHasAnyModifiersExcept(node, 117); case 230: - return true; + case 208: case 231: - return nodeHasAnyModifiersExcept(node, 75); + return true; + case 232: + return nodeHasAnyModifiersExcept(node, 76); default: ts.Debug.fail(); return false; @@ -38559,10 +38619,10 @@ var ts; } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 150: - case 227: - case 185: + case 151: + case 228: case 186: + case 187: return false; } return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -38625,7 +38685,7 @@ var ts; return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 186) { + if (node.kind === 187) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -38660,7 +38720,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 135 && parameter.type.kind !== 132) { + if (parameter.type.kind !== 136 && parameter.type.kind !== 133) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -38687,7 +38747,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_4 = args; _i < args_4.length; _i++) { var arg = args_4[_i]; - if (arg.kind === 199) { + if (arg.kind === 200) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -38713,7 +38773,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } @@ -38726,7 +38786,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -38741,14 +38801,14 @@ var ts; if (node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -38757,19 +38817,19 @@ var ts; return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 143) { + if (node.kind !== 144) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) { + if (computedPropertyName.expression.kind === 194 && computedPropertyName.expression.operatorToken.kind === 26) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 227 || - node.kind === 185 || - node.kind === 150); + ts.Debug.assert(node.kind === 228 || + node.kind === 186 || + node.kind === 151); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -38791,39 +38851,39 @@ var ts; var GetOrSetAccessor = GetAccessor | SetAccessor; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262) { + if (prop.kind === 263) { continue; } var name = prop.name; - if (name.kind === 143) { + if (name.kind === 144) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 262 && !inDestructuring && prop.objectAssignmentInitializer) { return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); } if (prop.modifiers) { for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { var mod = _c[_b]; - if (mod.kind !== 119 || prop.kind !== 150) { + if (mod.kind !== 120 || prop.kind !== 151) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } } } var currentKind = void 0; - if (prop.kind === 260 || prop.kind === 261) { + if (prop.kind === 261 || prop.kind === 262) { checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8) { checkGrammarNumericLiteral(name); } currentKind = Property; } - else if (prop.kind === 150) { + else if (prop.kind === 151) { currentKind = Property; } - else if (prop.kind === 152) { + else if (prop.kind === 153) { currentKind = GetAccessor; } - else if (prop.kind === 153) { + else if (prop.kind === 154) { currentKind = SetAccessor; } else { @@ -38859,7 +38919,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 254) { + if (attr.kind === 255) { continue; } var jsxAttr = attr; @@ -38871,7 +38931,7 @@ var ts; return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 255 && !initializer.expression) { + if (initializer && initializer.kind === 256 && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -38880,12 +38940,12 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 216 && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & 16384) === 0) { return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); } } - if (forInOrOfStatement.initializer.kind === 226) { + if (forInOrOfStatement.initializer.kind === 227) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -38893,20 +38953,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -38933,11 +38993,11 @@ var ts; return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 152 ? + return grammarErrorOnNode(accessor.name, kind === 153 ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 153) { + else if (kind === 154) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -38956,10 +39016,10 @@ var ts; } } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 153 ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 153 ? 1 : 2)) { return ts.getThisParameter(accessor); } } @@ -38974,7 +39034,7 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 177) { + if (node.parent.kind === 178) { if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } @@ -38990,10 +39050,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -39004,9 +39064,9 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 221: + case 222: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 216 + var isMisplacedContinueLabel = node.kind === 217 && !ts.isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -39014,8 +39074,8 @@ var ts; return false; } break; - case 220: - if (node.kind === 217 && !node.label) { + case 221: + if (node.kind === 218 && !node.label) { return false; } break; @@ -39028,13 +39088,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -39046,7 +39106,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } - if (node.name.kind === 174 || node.name.kind === 173) { + if (node.name.kind === 175 || node.name.kind === 174) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -39056,11 +39116,11 @@ var ts; } function isStringOrNumberLiteralExpression(expr) { return expr.kind === 9 || expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8; } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) { + if (node.parent.parent.kind !== 215 && node.parent.parent.kind !== 216) { if (ts.isInAmbientContext(node)) { if (node.initializer) { if (ts.isConst(node) && !node.type) { @@ -39095,7 +39155,7 @@ var ts; return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { - if (name.kind === 70) { + if (name.kind === 71) { if (ts.unescapeIdentifier(name.text) === "__esModule") { return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); } @@ -39111,8 +39171,8 @@ var ts; } } function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 70) { - if (name.originalKeywordKind === 109) { + if (name.kind === 71) { + if (name.originalKeywordKind === 110) { return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); } } @@ -39137,15 +39197,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 210: case 211: case 212: - case 219: case 213: + case 220: case 214: case 215: + case 216: return false; - case 221: + case 222: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -39161,7 +39221,7 @@ var ts; } } function checkGrammarMetaProperty(node) { - if (node.keywordToken === 93) { + if (node.keywordToken === 94) { if (node.name.text !== "target") { return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target"); } @@ -39207,7 +39267,7 @@ var ts; return true; } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -39215,7 +39275,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -39228,13 +39288,13 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 229 || - node.kind === 230 || + if (node.kind === 230 || + node.kind === 231 || + node.kind === 238 || node.kind === 237 || - node.kind === 236 || + node.kind === 244 || node.kind === 243 || - node.kind === 242 || - node.kind === 235 || + node.kind === 236 || ts.getModifierFlags(node) & (2 | 1 | 512)) { return false; } @@ -39243,7 +39303,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 207) { + if (ts.isDeclaration(decl) || decl.kind === 208) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -39262,7 +39322,7 @@ var ts; if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 207 || node.parent.kind === 234 || node.parent.kind === 265) { var links_1 = getNodeLinks(node.parent); if (!links_1.hasReportedStatementInAmbientContext) { return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -39278,14 +39338,14 @@ var ts; if (languageVersion >= 1) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 172)) { + else if (ts.isChildOfNodeWithKind(node, 173)) { diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 263)) { + else if (ts.isChildOfNodeWithKind(node, 264)) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { - var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37; + var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 38; var literal = (withMinus ? "-" : "") + "0o" + node.text; return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal); } @@ -39417,243 +39477,243 @@ var ts; return undefined; } var kind = node.kind; - if ((kind > 0 && kind <= 141) || kind === 168) { + if ((kind > 0 && kind <= 142) || kind === 169) { return node; } switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 297: - case 246: + case 206: + case 209: + case 200: + case 225: + case 298: + case 247: return node; - case 142: - return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); case 143: + return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); + case 144: return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression)); - case 159: - return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 160: + return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 161: return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 154: - return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 155: + return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 156: return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 149: + case 150: return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken)); - case 156: + case 157: return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 145: - return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 146: + return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 147: return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression)); - case 158: + case 159: return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode)); - case 157: + case 158: return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 161: - return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 162: - return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); + return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 163: - return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); + return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); case 164: - return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); + return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); case 165: + return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); case 166: - return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); case 167: + return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); + case 168: throw ts.Debug.fail("not implemented."); - case 169: - return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 170: - return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); + return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 171: - return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); case 172: + return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + case 173: return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression)); - case 144: + case 145: return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode)); - case 147: - return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 148: + return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 149: return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 150: - return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 151: - return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); + return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 152: - return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); case 153: + return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 154: return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); - case 173: - return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 174: - return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); + return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 175: - return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); case 176: - return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); + return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); case 177: - return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); + return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); case 178: - return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); case 179: - return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); + return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); case 180: - return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); case 181: - return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 182: - return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); + return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 183: - return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); case 184: - return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 185: - return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); case 186: - return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 187: - return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 188: - return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); case 189: - return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); case 190: + return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + case 191: return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression)); - case 193: + case 194: return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression)); - case 191: - return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); case 192: + return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); + case 193: return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 194: - return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 195: - return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); + return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 196: - return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); case 197: - return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); case 198: + return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + case 199: return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 200: - return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 201: - return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 202: + return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + case 203: return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 204: + case 205: return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail)); - case 206: - return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 207: + return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 208: return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList)); - case 209: - return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 210: - return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 211: - return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); case 212: - return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); case 213: - return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 214: - return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 215: - return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 216: - return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 217: - return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); case 218: - return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); case 219: - return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); case 220: - return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); + return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 221: - return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); case 222: - return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 223: + return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + case 224: return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock)); - case 225: - return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 226: - return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); + return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 227: - return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); case 228: + return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 229: return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 231: - return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 232: - return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); + return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 233: - return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); case 234: + return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 235: return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause)); - case 236: - return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 237: - return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 238: - return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); + return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 239: - return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); case 240: - return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); + return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); case 241: - return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); case 242: - return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); case 243: - return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); case 244: - return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 245: + return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + case 246: return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); - case 247: - return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); case 248: + return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); + case 249: return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement)); - case 253: + case 254: return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike)); - case 249: - return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 250: - return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); + return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 251: - return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 252: + return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + case 253: return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression)); - case 254: - return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 255: - return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 256: - return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); case 257: - return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); case 258: - return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); + return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 259: - return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); + return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); case 260: - return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); case 261: - return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); + return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); case 262: - return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); case 263: - return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); case 264: + return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + case 265: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); - case 295: + case 296: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); default: return node; @@ -39679,45 +39739,45 @@ var ts; var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft; var cbNodes = cbNodeArray || cbNode; var kind = node.kind; - if ((kind > 0 && kind <= 141)) { + if ((kind > 0 && kind <= 142)) { return initial; } - if ((kind >= 157 && kind <= 172)) { + if ((kind >= 158 && kind <= 173)) { return initial; } var result = initial; switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 294: + case 206: + case 209: + case 200: + case 225: + case 295: break; - case 142: + case 143: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 143: + case 144: result = reduceNode(node.expression, cbNode, result); break; - case 145: + case 146: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 146: + case 147: result = reduceNode(node.expression, cbNode, result); break; - case 148: + case 149: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 150: + case 151: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -39726,12 +39786,12 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 151: + case 152: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 152: + case 153: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -39739,55 +39799,55 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 153: + case 154: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 173: case 174: + case 175: result = reduceNodes(node.elements, cbNodes, result); break; - case 175: + case 176: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 176: + case 177: result = reduceNodes(node.elements, cbNodes, result); break; - case 177: + case 178: result = reduceNodes(node.properties, cbNodes, result); break; - case 178: + case 179: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 179: + case 180: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.argumentExpression, cbNode, result); break; - case 180: + case 181: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 181: + case 182: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 182: + case 183: result = reduceNode(node.tag, cbNode, result); result = reduceNode(node.template, cbNode, result); break; - case 183: + case 184: result = reduceNode(node.type, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 185: + case 186: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); @@ -39795,124 +39855,124 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 186: + case 187: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 184: - case 187: + case 185: case 188: case 189: case 190: - case 196: + case 191: case 197: - case 202: + case 198: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 191: case 192: + case 193: result = reduceNode(node.operand, cbNode, result); break; - case 193: + case 194: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 194: + case 195: result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.whenTrue, cbNode, result); result = reduceNode(node.whenFalse, cbNode, result); break; - case 195: + case 196: result = reduceNode(node.head, cbNode, result); result = reduceNodes(node.templateSpans, cbNodes, result); break; - case 198: + case 199: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 200: + case 201: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); break; - case 201: + case 202: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.type, cbNode, result); break; - case 202: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 204: + case 205: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.literal, cbNode, result); break; - case 206: + case 207: result = reduceNodes(node.statements, cbNodes, result); break; - case 207: + case 208: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.declarationList, cbNode, result); break; - case 209: + case 210: result = reduceNode(node.expression, cbNode, result); break; - case 210: + case 211: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.thenStatement, cbNode, result); result = reduceNode(node.elseStatement, cbNode, result); break; - case 211: + case 212: result = reduceNode(node.statement, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 212: - case 219: + case 213: + case 220: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 213: + case 214: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.incrementor, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 214: case 215: + case 216: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 218: - case 222: + case 219: + case 223: result = reduceNode(node.expression, cbNode, result); break; - case 220: + case 221: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.caseBlock, cbNode, result); break; - case 221: + case 222: result = reduceNode(node.label, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 223: + case 224: result = reduceNode(node.tryBlock, cbNode, result); result = reduceNode(node.catchClause, cbNode, result); result = reduceNode(node.finallyBlock, cbNode, result); break; - case 225: + case 226: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 226: + case 227: result = reduceNodes(node.declarations, cbNodes, result); break; - case 227: + case 228: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -39921,7 +39981,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 228: + case 229: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -39929,123 +39989,123 @@ var ts; result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 231: + case 232: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.members, cbNodes, result); break; - case 232: + case 233: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 233: + case 234: result = reduceNodes(node.statements, cbNodes, result); break; - case 234: + case 235: result = reduceNodes(node.clauses, cbNodes, result); break; - case 236: + case 237: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.moduleReference, cbNode, result); break; - case 237: + case 238: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.importClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 238: - result = reduceNode(node.name, cbNode, result); - result = reduceNode(node.namedBindings, cbNode, result); - break; case 239: result = reduceNode(node.name, cbNode, result); + result = reduceNode(node.namedBindings, cbNode, result); break; case 240: - case 244: - result = reduceNodes(node.elements, cbNodes, result); + result = reduceNode(node.name, cbNode, result); break; case 241: case 245: + result = reduceNodes(node.elements, cbNodes, result); + break; + case 242: + case 246: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 242: + case 243: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 243: + case 244: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.exportClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 247: + case 248: result = reduceNode(node.expression, cbNode, result); break; - case 248: + case 249: result = reduceNode(node.openingElement, cbNode, result); result = ts.reduceLeft(node.children, cbNode, result); result = reduceNode(node.closingElement, cbNode, result); break; - case 249: case 250: + case 251: result = reduceNode(node.tagName, cbNode, result); result = reduceNode(node.attributes, cbNode, result); break; - case 253: + case 254: result = reduceNodes(node.properties, cbNodes, result); break; - case 251: + case 252: result = reduceNode(node.tagName, cbNode, result); break; - case 252: + case 253: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 254: - result = reduceNode(node.expression, cbNode, result); - break; case 255: result = reduceNode(node.expression, cbNode, result); break; case 256: result = reduceNode(node.expression, cbNode, result); + break; case 257: + result = reduceNode(node.expression, cbNode, result); + case 258: result = reduceNodes(node.statements, cbNodes, result); break; - case 258: + case 259: result = reduceNodes(node.types, cbNodes, result); break; - case 259: + case 260: result = reduceNode(node.variableDeclaration, cbNode, result); result = reduceNode(node.block, cbNode, result); break; - case 260: + case 261: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 261: + case 262: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.objectAssignmentInitializer, cbNode, result); break; - case 262: + case 263: result = reduceNode(node.expression, cbNode, result); break; - case 263: + case 264: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 264: + case 265: result = reduceNodes(node.statements, cbNodes, result); break; - case 295: + case 296: result = reduceNode(node.expression, cbNode, result); break; default: @@ -40098,7 +40158,7 @@ var ts; return subtreeFlags; } function aggregateTransformFlagsForSubtree(node) { - if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) { + if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 201)) { return 0; } return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes); @@ -40475,8 +40535,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); context.enableSubstitution(179); + context.enableSubstitution(180); var currentSourceFile; var currentNamespace; var currentNamespaceContainerName; @@ -40509,15 +40569,15 @@ var ts; } function onBeforeVisitNode(node) { switch (node.kind) { - case 264: + case 265: + case 235: case 234: - case 233: - case 206: + case 207: currentScope = node; currentScopeFirstDeclarationsOfName = undefined; break; + case 229: case 228: - case 227: if (ts.hasModifier(node, 2)) { break; } @@ -40542,13 +40602,13 @@ var ts; } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 242: - return visitExportAssignment(node); case 243: + return visitExportAssignment(node); + case 244: return visitExportDeclaration(node); default: return visitorWorker(node); @@ -40558,11 +40618,11 @@ var ts; return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 243 || - node.kind === 237 || + if (node.kind === 244 || node.kind === 238 || - (node.kind === 236 && - node.moduleReference.kind === 247)) { + node.kind === 239 || + (node.kind === 237 && + node.moduleReference.kind === 248)) { return undefined; } else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) { @@ -40578,15 +40638,15 @@ var ts; } function classElementVisitorWorker(node) { switch (node.kind) { - case 151: - return undefined; - case 148: - case 156: case 152: + return undefined; + case 149: + case 157: case 153: - case 150: + case 154: + case 151: return visitorWorker(node); - case 205: + case 206: return node; default: ts.Debug.failBadSyntaxKind(node); @@ -40597,7 +40657,7 @@ var ts; if (ts.modifierToFlag(node.kind) & 2270) { return undefined; } - else if (currentNamespace && node.kind === 83) { + else if (currentNamespace && node.kind === 84) { return undefined; } return node; @@ -40607,33 +40667,32 @@ var ts; return ts.createNotEmittedStatement(node); } switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return currentNamespace ? undefined : node; - case 113: - case 111: + case 114: case 112: - case 116: - case 75: - case 123: - case 130: - case 163: + case 113: + case 117: + case 76: + case 124: + case 131: case 164: - case 162: - case 157: - case 144: - case 118: - case 121: - case 135: - case 132: - case 129: - case 104: + case 165: + case 163: + case 158: + case 145: + case 119: + case 122: case 136: + case 133: + case 130: + case 105: + case 137: + case 161: case 160: + case 162: case 159: - case 161: - case 158: - case 165: case 166: case 167: case 168: @@ -40641,57 +40700,58 @@ var ts; case 170: case 171: case 172: - case 156: - case 146: - case 230: - case 148: + case 173: + case 157: + case 147: + case 231: + case 149: return undefined; - case 151: + case 152: return visitConstructor(node); - case 229: + case 230: return ts.createNotEmittedStatement(node); - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 258: + case 259: return visitHeritageClause(node); - case 200: + case 201: return visitExpressionWithTypeArguments(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessor(node); case 153: + return visitGetAccessor(node); + case 154: return visitSetAccessor(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 184: + case 185: return visitParenthesizedExpression(node); - case 183: - case 201: + case 184: + case 202: return visitAssertionExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 202: + case 203: return visitNonNullExpression(node); - case 231: + case 232: return visitEnumDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 232: + case 233: return visitModuleDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); default: ts.Debug.failBadSyntaxKind(node); @@ -40782,7 +40842,7 @@ var ts; function visitClassExpression(node) { var staticProperties = getInitializedProperties(node, true); var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; })); + var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 85; })); var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members); ts.setOriginalNode(classExpression, node); ts.setTextRange(classExpression, node); @@ -40853,7 +40913,7 @@ var ts; return index; } var statement = statements[index]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { result.push(ts.visitNode(statement, visitor, ts.isStatement)); return index + 1; } @@ -40887,7 +40947,7 @@ var ts; return isInitializedProperty(member, false); } function isInitializedProperty(member, isStatic) { - return member.kind === 148 + return member.kind === 149 && isStatic === ts.hasModifier(member, 32) && member.initializer !== undefined; } @@ -40960,12 +41020,12 @@ var ts; } function getAllDecoratorsOfClassElement(node, member) { switch (member.kind) { - case 152: case 153: + case 154: return getAllDecoratorsOfAccessors(node, member); - case 150: + case 151: return getAllDecoratorsOfMethod(member); - case 148: + case 149: return getAllDecoratorsOfProperty(member); default: return undefined; @@ -41044,7 +41104,7 @@ var ts; var prefix = getClassMemberPrefix(node, member); var memberName = getExpressionForPropertyName(member, true); var descriptor = languageVersion > 0 - ? member.kind === 148 + ? member.kind === 149 ? ts.createVoidZero() : ts.createNull() : undefined; @@ -41113,13 +41173,13 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { var properties = void 0; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeParameterTypesOfNode(node, container)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeReturnTypeOfNode(node)))); } if (properties) { decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true))); @@ -41128,37 +41188,37 @@ var ts; } function shouldAddTypeMetadata(node) { var kind = node.kind; - return kind === 150 - || kind === 152 + return kind === 151 || kind === 153 - || kind === 148; + || kind === 154 + || kind === 149; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 150; + return node.kind === 151; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 228: - case 198: + case 229: + case 199: return ts.getFirstConstructorWithBody(node) !== undefined; - case 150: - case 152: + case 151: case 153: + case 154: return true; } return false; } function serializeTypeOfNode(node) { switch (node.kind) { - case 148: - case 145: - case 152: - return serializeTypeNode(node.type); + case 149: + case 146: case 153: + return serializeTypeNode(node.type); + case 154: return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); - case 228: - case 198: - case 150: + case 229: + case 199: + case 151: return ts.createIdentifier("Function"); default: return ts.createVoidZero(); @@ -41190,7 +41250,7 @@ var ts; return ts.createArrayLiteral(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 152) { + if (container && node.kind === 153) { var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor; if (setAccessor) { return setAccessor.parameters; @@ -41212,58 +41272,58 @@ var ts; return ts.createIdentifier("Object"); } switch (node.kind) { - case 104: - case 138: - case 94: - case 129: + case 105: + case 139: + case 95: + case 130: return ts.createVoidZero(); - case 167: + case 168: return serializeTypeNode(node.type); - case 159: case 160: + case 161: return ts.createIdentifier("Function"); - case 163: case 164: + case 165: return ts.createIdentifier("Array"); - case 157: - case 121: + case 158: + case 122: return ts.createIdentifier("Boolean"); - case 135: + case 136: return ts.createIdentifier("String"); - case 133: + case 134: return ts.createIdentifier("Object"); - case 172: + case 173: switch (node.literal.kind) { case 9: return ts.createIdentifier("String"); case 8: return ts.createIdentifier("Number"); - case 100: - case 85: + case 101: + case 86: return ts.createIdentifier("Boolean"); default: ts.Debug.failBadSyntaxKind(node.literal); break; } break; - case 132: + case 133: return ts.createIdentifier("Number"); - case 136: + case 137: return languageVersion < 2 ? getGlobalSymbolNameWithFallback() : ts.createIdentifier("Symbol"); - case 158: + case 159: return serializeTypeReferenceNode(node); + case 167: case 166: - case 165: return serializeUnionOrIntersectionType(node); - case 161: - case 169: + case 162: case 170: case 171: - case 162: - case 118: - case 168: + case 172: + case 163: + case 119: + case 169: break; default: ts.Debug.failBadSyntaxKind(node); @@ -41330,7 +41390,7 @@ var ts; } function serializeEntityNameAsExpression(node, useFallback) { switch (node.kind) { - case 70: + case 71: var name = ts.getMutableClone(node); name.flags &= ~8; name.original = undefined; @@ -41339,13 +41399,13 @@ var ts; return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name); } return name; - case 142: + case 143: return serializeQualifiedNameAsExpression(node, useFallback); } } function serializeQualifiedNameAsExpression(node, useFallback) { var left; - if (node.left.kind === 70) { + if (node.left.kind === 71) { left = serializeEntityNameAsExpression(node.left, useFallback); } else if (useFallback) { @@ -41390,9 +41450,9 @@ var ts; } } function visitHeritageClause(node) { - if (node.token === 84) { + if (node.token === 85) { var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1); - return ts.setTextRange(ts.createHeritageClause(84, types), node); + return ts.setTextRange(ts.createHeritageClause(85, types), node); } return undefined; } @@ -41624,7 +41684,7 @@ var ts; ts.setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 231) { + if (node.kind === 232) { ts.setSourceMapRange(statement.declarationList, node); } else { @@ -41685,7 +41745,7 @@ var ts; var statementsLocation; var blockLocation; var body = node.body; - if (body.kind === 233) { + if (body.kind === 234) { saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); }); statementsLocation = body.statements; blockLocation = body; @@ -41709,13 +41769,13 @@ var ts; currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true); ts.setTextRange(block, blockLocation); - if (body.kind !== 233) { + if (body.kind !== 234) { ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 232) { + if (moduleDeclaration.body.kind === 233) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -41735,7 +41795,7 @@ var ts; return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined; } function visitNamedImportBindings(node) { - if (node.kind === 239) { + if (node.kind === 240) { return resolver.isReferencedAliasDeclaration(node) ? node : undefined; } else { @@ -41856,29 +41916,29 @@ var ts; function enableSubstitutionForNonQualifiedEnumMembers() { if ((enabledSubstitutions & 8) === 0) { enabledSubstitutions |= 8; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionForClassAliases() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(70); + context.enableSubstitution(71); classAliases = []; } } function enableSubstitutionForNamespaceExports() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); - context.enableSubstitution(261); - context.enableEmitNotification(232); + context.enableSubstitution(71); + context.enableSubstitution(262); + context.enableEmitNotification(233); } } function isTransformedModuleDeclaration(node) { - return ts.getOriginalNode(node).kind === 232; + return ts.getOriginalNode(node).kind === 233; } function isTransformedEnumDeclaration(node) { - return ts.getOriginalNode(node).kind === 231; + return ts.getOriginalNode(node).kind === 232; } function onEmitNode(hint, node, emitCallback) { var savedApplicableSubstitutions = applicableSubstitutions; @@ -41922,11 +41982,11 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 178: - return substitutePropertyAccessExpression(node); case 179: + return substitutePropertyAccessExpression(node); + case 180: return substituteElementAccessExpression(node); } return node; @@ -41956,9 +42016,9 @@ var ts; function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 264) { - var substitute = (applicableSubstitutions & 2 && container.kind === 232) || - (applicableSubstitutions & 8 && container.kind === 231); + if (container && container.kind !== 265) { + var substitute = (applicableSubstitutions & 2 && container.kind === 233) || + (applicableSubstitutions & 8 && container.kind === 232); if (substitute) { return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node); } @@ -42073,17 +42133,17 @@ var ts; return node; } switch (node.kind) { - case 119: + case 120: return undefined; - case 190: + case 191: return visitAwaitExpression(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); default: return ts.visitEachChild(node, visitor, context); @@ -42117,7 +42177,7 @@ var ts; var original = ts.getOriginalNode(node, ts.isFunctionLike); var nodeType = original.type; var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined; - var isArrowFunction = node.kind === 186; + var isArrowFunction = node.kind === 187; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0; if (!isArrowFunction) { var statements = []; @@ -42173,14 +42233,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -42205,23 +42265,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -42240,11 +42300,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -42264,7 +42324,7 @@ var ts; }; function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(awaiterHelper); - var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body); + var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body); (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072; return ts.createCall(ts.getHelperName("__awaiter"), undefined, [ ts.createThis(), @@ -42314,7 +42374,7 @@ var ts; return visitorWorker(node, true); } function visitorNoAsyncModifier(node) { - if (node.kind === 119) { + if (node.kind === 120) { return undefined; } return node; @@ -42324,43 +42384,43 @@ var ts; return node; } switch (node.kind) { - case 190: + case 191: return visitAwaitExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 221: + case 222: return visitLabeledStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 193: + case 194: return visitBinaryExpression(node, noDestructuringValue); - case 225: + case 226: return visitVariableDeclaration(node); - case 215: + case 216: return visitForOfStatement(node, undefined); - case 213: + case 214: return visitForStatement(node); - case 189: + case 190: return visitVoidExpression(node); - case 151: + case 152: return visitConstructorDeclaration(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessorDeclaration(node); case 153: + return visitGetAccessorDeclaration(node); + case 154: return visitSetAccessorDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 209: + case 210: return visitExpressionStatement(node); - case 184: + case 185: return visitParenthesizedExpression(node, noDestructuringValue); default: return ts.visitEachChild(node, visitor, context); @@ -42387,7 +42447,7 @@ var ts; function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) { var statement = ts.unwrapInnermostStatementOfLabel(node); - if (statement.kind === 215 && statement.awaitModifier) { + if (statement.kind === 216 && statement.awaitModifier) { return visitForOfStatement(statement, node); } return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node); @@ -42399,7 +42459,7 @@ var ts; var objects = []; for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) { var e = elements_4[_i]; - if (e.kind === 262) { + if (e.kind === 263) { if (chunkObject) { objects.push(ts.createObjectLiteral(chunkObject)); chunkObject = undefined; @@ -42411,7 +42471,7 @@ var ts; if (!chunkObject) { chunkObject = []; } - if (e.kind === 260) { + if (e.kind === 261) { var p = e; chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression))); } @@ -42428,7 +42488,7 @@ var ts; function visitObjectLiteralExpression(node) { if (node.transformFlags & 1048576) { var objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 177) { + if (objects.length && objects[0].kind !== 178) { objects.unshift(ts.createObjectLiteral()); } return createAssignHelper(context, objects); @@ -42445,7 +42505,7 @@ var ts; if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 1048576) { return ts.flattenDestructuringAssignment(node, visitor, context, 1, !noDestructuringValue); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return ts.updateBinary(node, ts.visitNode(node.left, visitorNoDestructuringValue, ts.isExpression), ts.visitNode(node.right, noDestructuringValue ? visitorNoDestructuringValue : visitor, ts.isExpression)); } return ts.visitEachChild(node, visitor, context); @@ -42624,7 +42684,7 @@ var ts; var statements = []; var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor); appendObjectRestAssignmentsIfNeeded(statements, node); - statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); + statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(39), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); ts.addRange(statements, endLexicalEnvironment()); var block = ts.updateBlock(node.body, statements); if (languageVersion >= 2) { @@ -42675,14 +42735,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -42707,23 +42767,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -42742,11 +42802,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -42829,11 +42889,11 @@ var ts; } function visitorWorker(node) { switch (node.kind) { - case 248: - return visitJsxElement(node, false); case 249: + return visitJsxElement(node, false); + case 250: return visitJsxSelfClosingElement(node, false); - case 255: + case 256: return visitJsxExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -42843,11 +42903,11 @@ var ts; switch (node.kind) { case 10: return visitJsxText(node); - case 255: + case 256: return visitJsxExpression(node); - case 248: - return visitJsxElement(node, true); case 249: + return visitJsxElement(node, true); + case 250: return visitJsxSelfClosingElement(node, true); default: ts.Debug.failBadSyntaxKind(node); @@ -42901,7 +42961,7 @@ var ts; var decoded = tryDecodeEntities(node.text); return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node; } - else if (node.kind === 255) { + else if (node.kind === 256) { if (node.expression === undefined) { return ts.createTrue(); } @@ -42961,7 +43021,7 @@ var ts; return decoded === text ? undefined : decoded; } function getTagName(node) { - if (node.kind === 248) { + if (node.kind === 249) { return getTagName(node.openingElement); } else { @@ -43260,7 +43320,7 @@ var ts; return node; } switch (node.kind) { - case 193: + case 194: return visitBinaryExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -43268,9 +43328,9 @@ var ts; } function visitBinaryExpression(node) { switch (node.operatorToken.kind) { - case 61: + case 62: return visitExponentiationAssignmentExpression(node); - case 39: + case 40: return visitExponentiationExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -43345,7 +43405,7 @@ var ts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { return hierarchyFacts & 4096 - && node.kind === 218 + && node.kind === 219 && !node.expression; } function shouldVisitNode(node) { @@ -43369,104 +43429,104 @@ var ts; return node; } function callExpressionVisitor(node) { - if (node.kind === 96) { + if (node.kind === 97) { return visitSuperKeyword(true); } return visitor(node); } function visitJavaScript(node) { switch (node.kind) { - case 114: + case 115: return undefined; - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 145: + case 146: return visitParameter(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 186: + case 187: return visitArrowFunction(node); - case 185: + case 186: return visitFunctionExpression(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 70: + case 71: return visitIdentifier(node); - case 226: + case 227: return visitVariableDeclarationList(node); - case 220: + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 206: + case 207: return visitBlock(node, false); + case 218: case 217: - case 216: return visitBreakOrContinueStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 211: case 212: - return visitDoOrWhileStatement(node, undefined); case 213: - return visitForStatement(node, undefined); + return visitDoOrWhileStatement(node, undefined); case 214: - return visitForInStatement(node, undefined); + return visitForStatement(node, undefined); case 215: + return visitForInStatement(node, undefined); + case 216: return visitForOfStatement(node, undefined); - case 209: + case 210: return visitExpressionStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 259: + case 260: return visitCatchClause(node); - case 261: + case 262: return visitShorthandPropertyAssignment(node); - case 143: + case 144: return visitComputedPropertyName(node); - case 176: + case 177: return visitArrayLiteralExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 184: + case 185: return visitParenthesizedExpression(node, true); - case 193: + case 194: return visitBinaryExpression(node, true); - case 12: case 13: case 14: case 15: + case 16: return visitTemplateLiteral(node); case 9: return visitStringLiteral(node); case 8: return visitNumericLiteral(node); - case 182: + case 183: return visitTaggedTemplateExpression(node); - case 195: - return visitTemplateExpression(node); case 196: - return visitYieldExpression(node); + return visitTemplateExpression(node); case 197: + return visitYieldExpression(node); + case 198: return visitSpreadElement(node); - case 96: + case 97: return visitSuperKeyword(false); - case 98: + case 99: return visitThisKeyword(node); - case 203: + case 204: return visitMetaProperty(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: return ts.visitEachChild(node, visitor, context); @@ -43544,13 +43604,13 @@ var ts; } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - var jump = node.kind === 217 ? 2 : 4; + var jump = node.kind === 218 ? 2 : 4; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { var labelMarker = void 0; if (!node.label) { - if (node.kind === 217) { + if (node.kind === 218) { convertedLoopState.nonLocalJumps |= 2; labelMarker = "break"; } @@ -43560,7 +43620,7 @@ var ts; } } else { - if (node.kind === 217) { + if (node.kind === 218) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, true, node.label.text, labelMarker); } @@ -43579,10 +43639,10 @@ var ts; expr = copyExpr; } else { - expr = ts.createBinary(expr, 25, copyExpr); + expr = ts.createBinary(expr, 26, copyExpr); } } - returnExpression = ts.createBinary(expr, 25, returnExpression); + returnExpression = ts.createBinary(expr, 26, returnExpression); } return ts.createReturn(returnExpression); } @@ -43640,7 +43700,7 @@ var ts; addExtendsHelperIfNeeded(statements, node, extendsClauseElement); addConstructor(statements, node, extendsClauseElement); addClassMembers(statements, node); - var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 17); + var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18); var localName = ts.getLocalName(node); var outer = ts.createPartiallyEmittedExpression(localName); outer.end = closingBraceLocation.end; @@ -43696,7 +43756,7 @@ var ts; } ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); } - var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94; + var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 95; var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); if (superCaptureStatus === 1 || superCaptureStatus === 2) { statementOffset++; @@ -43724,17 +43784,17 @@ var ts; return block; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 218) { + if (statement.kind === 219) { return true; } - else if (statement.kind === 210) { + else if (statement.kind === 211) { var ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } } - else if (statement.kind === 206) { + else if (statement.kind === 207) { var lastStatement = ts.lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -43763,7 +43823,7 @@ var ts; var ctorStatements = ctor.body.statements; if (statementOffset < ctorStatements.length) { firstStatement = ctorStatements[statementOffset]; - if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) { + if (firstStatement.kind === 210 && ts.isSuperCall(firstStatement.expression)) { superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -43771,8 +43831,8 @@ var ts; && statementOffset === ctorStatements.length - 1 && !(ctor.transformFlags & (16384 | 32768))) { var returnStatement = ts.createReturn(superCallExpression); - if (superCallExpression.kind !== 193 - || superCallExpression.left.kind !== 180) { + if (superCallExpression.kind !== 194 + || superCallExpression.left.kind !== 181) { ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'."); } ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536))); @@ -43846,7 +43906,7 @@ var ts; statements.push(statement); } function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return node && node.dotDotDotToken && node.name.kind === 70 && !inConstructorWithSynthesizedSuper; + return node && node.dotDotDotToken && node.name.kind === 71 && !inConstructorWithSynthesizedSuper; } function addRestParameterIfNeeded(statements, node, inConstructorWithSynthesizedSuper) { var parameter = ts.lastOrUndefined(node.parameters); @@ -43873,7 +43933,7 @@ var ts; statements.push(forStatement); } function addCaptureThisForNodeIfNeeded(statements, node) { - if (node.transformFlags & 32768 && node.kind !== 186) { + if (node.transformFlags & 32768 && node.kind !== 187) { captureThisForNode(statements, node, ts.createThis()); } } @@ -43891,19 +43951,19 @@ var ts; if (hierarchyFacts & 16384) { var newTarget = void 0; switch (node.kind) { - case 186: + case 187: return statements; - case 150: - case 152: + case 151: case 153: + case 154: newTarget = ts.createVoidZero(); break; - case 151: + case 152: newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"); break; - case 227: - case 185: - newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); + case 228: + case 186: + newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 93, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); break; default: ts.Debug.failBadSyntaxKind(node); @@ -43923,20 +43983,20 @@ var ts; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; switch (member.kind) { - case 205: + case 206: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 150: + case 151: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 151: + case 152: break; default: ts.Debug.failBadSyntaxKind(node); @@ -44061,7 +44121,7 @@ var ts; : enterSubtree(16286, 65); var parameters = ts.visitParameterList(node.parameters, visitor, context); var body = transformFunctionBody(node); - if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) { + if (hierarchyFacts & 16384 && !name && (node.kind === 228 || node.kind === 186)) { name = ts.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 49152, 0); @@ -44095,7 +44155,7 @@ var ts; } } else { - ts.Debug.assert(node.kind === 186); + ts.Debug.assert(node.kind === 187); statementsLocation = ts.moveRangeEnd(body, -1); var equalsGreaterThanToken = node.equalsGreaterThanToken; if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) { @@ -44125,7 +44185,7 @@ var ts; ts.setEmitFlags(block, 1); } if (closeBraceLocation) { - ts.setTokenSourceMapRange(block, 17, closeBraceLocation); + ts.setTokenSourceMapRange(block, 18, closeBraceLocation); } ts.setOriginalNode(block, node.body); return block; @@ -44147,9 +44207,9 @@ var ts; } function visitExpressionStatement(node) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateStatement(node, visitBinaryExpression(node.expression, false)); } return ts.visitEachChild(node, visitor, context); @@ -44157,9 +44217,9 @@ var ts; function visitParenthesizedExpression(node, needsDestructuringValue) { if (!needsDestructuringValue) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateParen(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateParen(node, visitBinaryExpression(node.expression, false)); } } @@ -44185,13 +44245,13 @@ var ts; assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0); } else { - assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression)); + assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression)); } assignments = ts.append(assignments, assignment); } } if (assignments) { - updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node); + updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node); } else { updated = undefined; @@ -44283,14 +44343,14 @@ var ts; } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 211: case 212: - return visitDoOrWhileStatement(node, outermostLabeledStatement); case 213: - return visitForStatement(node, outermostLabeledStatement); + return visitDoOrWhileStatement(node, outermostLabeledStatement); case 214: - return visitForInStatement(node, outermostLabeledStatement); + return visitForStatement(node, outermostLabeledStatement); case 215: + return visitForInStatement(node, outermostLabeledStatement); + case 216: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -44416,7 +44476,7 @@ var ts; && i < numInitialPropertiesWithoutYield) { numInitialPropertiesWithoutYield = i; } - if (property.name.kind === 143) { + if (property.name.kind === 144) { numInitialProperties = i; break; } @@ -44447,7 +44507,7 @@ var ts; } visit(node.name); function visit(node) { - if (node.kind === 70) { + if (node.kind === 71) { state.hoistedLocalVariables.push(node); } else { @@ -44478,11 +44538,11 @@ var ts; var functionName = ts.createUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 213: case 214: case 215: + case 216: var initializer = node.initializer; - if (initializer && initializer.kind === 226) { + if (initializer && initializer.kind === 227) { loopInitializer = initializer; } break; @@ -44537,7 +44597,7 @@ var ts; loopBodyFlags |= 131072; } var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([ - ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(38) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) + ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) ]), 1048576)); var statements = [convertedLoopVariable]; var extraVariableDeclarations; @@ -44603,7 +44663,7 @@ var ts; function copyOutParameter(outParam, copyDirection) { var source = copyDirection === 0 ? outParam.outParamName : outParam.originalName; var target = copyDirection === 0 ? outParam.originalName : outParam.outParamName; - return ts.createBinary(target, 57, source); + return ts.createBinary(target, 58, source); } function copyOutParameters(outParams, copyDirection, statements) { for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) { @@ -44619,7 +44679,7 @@ var ts; !state.labeledNonLocalContinues; var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; })); var callResult = isAsyncBlockContainingAwait - ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304)) + ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304)) : call; if (isSimpleLoop) { statements.push(ts.createStatement(callResult)); @@ -44639,10 +44699,10 @@ var ts; else { returnStatement = ts.createReturn(ts.createPropertyAccess(loopResultName, "value")); } - statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 33, ts.createLiteral("object")), returnStatement)); + statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 34, ts.createLiteral("object")), returnStatement)); } if (state.nonLocalJumps & 2) { - statements.push(ts.createIf(ts.createBinary(loopResultName, 33, ts.createLiteral("break")), ts.createBreak())); + statements.push(ts.createIf(ts.createBinary(loopResultName, 34, ts.createLiteral("break")), ts.createBreak())); } if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { var caseClauses = []; @@ -44708,20 +44768,20 @@ var ts; for (var i = start; i < numProperties; i++) { var property = properties[i]; switch (property.kind) { - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine)); } break; - case 150: + case 151: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 260: + case 261: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 261: + case 262: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -44824,7 +44884,7 @@ var ts; } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { var _a = ts.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { ts.setEmitFlags(thisArg, 4); } var resultingCall; @@ -44834,7 +44894,7 @@ var ts; else { resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node); } - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var actualThis = ts.createThis(); ts.setEmitFlags(actualThis, 4); var initializer = ts.createLogicalOr(resultingCall, actualThis); @@ -44871,7 +44931,7 @@ var ts; else { if (segments.length === 1) { var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 + return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 ? ts.createArraySlice(segments[0]) : segments[0]; } @@ -44939,7 +44999,7 @@ var ts; } function getRawLiteral(node) { var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - var isLast = node.kind === 12 || node.kind === 15; + var isLast = node.kind === 13 || node.kind === 16; text = text.substring(1, text.length - (isLast ? 1 : 2)); text = text.replace(/\r\n?/g, "\n"); return ts.setTextRange(ts.createLiteral(text), node); @@ -44981,7 +45041,7 @@ var ts; : ts.createIdentifier("_super"); } function visitMetaProperty(node) { - if (node.keywordToken === 93 && node.name.text === "target") { + if (node.keywordToken === 94 && node.name.text === "target") { if (hierarchyFacts & 8192) { hierarchyFacts |= 32768; } @@ -45006,20 +45066,20 @@ var ts; function enableSubstitutionsForBlockScopedBindings() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(98); - context.enableEmitNotification(151); - context.enableEmitNotification(150); + context.enableSubstitution(99); context.enableEmitNotification(152); + context.enableEmitNotification(151); context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(187); context.enableEmitNotification(186); - context.enableEmitNotification(185); - context.enableEmitNotification(227); + context.enableEmitNotification(228); } } function onSubstituteNode(hint, node) { @@ -45044,10 +45104,10 @@ var ts; function isNameOfDeclarationWithCollidingName(node) { var parent = node.parent; switch (parent.kind) { - case 175: - case 228: - case 231: - case 225: + case 176: + case 229: + case 232: + case 226: return parent.name === node && resolver.isDeclarationWithCollidingName(parent); } @@ -45055,9 +45115,9 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 98: + case 99: return substituteThisKeyword(node); } return node; @@ -45090,19 +45150,19 @@ var ts; return false; } var statement = ts.firstOrUndefined(constructor.body.statements); - if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) { + if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 210) { return false; } var statementExpression = statement.expression; - if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) { + if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 181) { return false; } var callTarget = statementExpression.expression; - if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 96) { + if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 97) { return false; } var callArgument = ts.singleOrUndefined(statementExpression.arguments); - if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) { + if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 198) { return false; } var expression = callArgument.expression; @@ -45133,24 +45193,24 @@ var ts; if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(250); context.enableEmitNotification(251); - context.enableEmitNotification(249); + context.enableEmitNotification(252); + context.enableEmitNotification(250); noSubstitution = []; } var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); - context.enableSubstitution(260); + context.enableSubstitution(179); + context.enableSubstitution(261); return transformSourceFile; function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 250: case 251: - case 249: + case 252: + case 250: var tagName = node.tagName; noSubstitution[ts.getOriginalNodeId(tagName)] = true; break; @@ -45186,7 +45246,7 @@ var ts; } function trySubstituteReservedName(name) { var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined); - if (token >= 71 && token <= 106) { + if (token >= 72 && token <= 107) { return ts.setTextRange(ts.createLiteral(name), name); } return undefined; @@ -45270,13 +45330,13 @@ var ts; } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 220: - return visitSwitchStatement(node); case 221: + return visitSwitchStatement(node); + case 222: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -45284,24 +45344,24 @@ var ts; } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 213: - return visitForStatement(node); case 214: + return visitForStatement(node); + case 215: return visitForInStatement(node); - case 217: + case 218: return visitBreakStatement(node); - case 216: + case 217: return visitContinueStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: if (node.transformFlags & 16777216) { @@ -45317,21 +45377,21 @@ var ts; } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 193: - return visitBinaryExpression(node); case 194: + return visitBinaryExpression(node); + case 195: return visitConditionalExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 176: - return visitArrayLiteralExpression(node); case 177: + return visitArrayLiteralExpression(node); + case 178: return visitObjectLiteralExpression(node); - case 179: - return visitElementAccessExpression(node); case 180: - return visitCallExpression(node); + return visitElementAccessExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -45339,9 +45399,9 @@ var ts; } function visitGenerator(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); default: ts.Debug.failBadSyntaxKind(node); @@ -45474,23 +45534,23 @@ var ts; } } function isCompoundAssignment(kind) { - return kind >= 58 - && kind <= 69; + return kind >= 59 + && kind <= 70; } function getOperatorForCompoundAssignment(kind) { switch (kind) { - case 58: return 36; case 59: return 37; case 60: return 38; case 61: return 39; case 62: return 40; case 63: return 41; - case 64: return 44; + case 64: return 42; case 65: return 45; case 66: return 46; case 67: return 47; case 68: return 48; case 69: return 49; + case 70: return 50; } } function visitRightAssociativeBinaryExpression(node) { @@ -45498,10 +45558,10 @@ var ts; if (containsYield(right)) { var target = void 0; switch (left.kind) { - case 178: + case 179: target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name); break; - case 179: + case 180: target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression))); break; default: @@ -45523,7 +45583,7 @@ var ts; if (ts.isLogicalOperator(node.operatorToken.kind)) { return visitLogicalBinaryExpression(node); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return visitCommaExpression(node); } var clone_5 = ts.getMutableClone(node); @@ -45537,7 +45597,7 @@ var ts; var resultLabel = defineLabel(); var resultLocal = declareLocal(); emitAssignment(resultLocal, ts.visitNode(node.left, visitor, ts.isExpression), node.left); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { emitBreakWhenFalse(resultLabel, resultLocal, node.left); } else { @@ -45553,7 +45613,7 @@ var ts; visit(node.right); return ts.inlineExpressions(pendingExpressions); function visit(node) { - if (ts.isBinaryExpression(node) && node.operatorToken.kind === 25) { + if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) { visit(node.left); visit(node.right); } @@ -45702,35 +45762,35 @@ var ts; } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 206: + case 207: return transformAndEmitBlock(node); - case 209: - return transformAndEmitExpressionStatement(node); case 210: - return transformAndEmitIfStatement(node); + return transformAndEmitExpressionStatement(node); case 211: - return transformAndEmitDoStatement(node); + return transformAndEmitIfStatement(node); case 212: - return transformAndEmitWhileStatement(node); + return transformAndEmitDoStatement(node); case 213: - return transformAndEmitForStatement(node); + return transformAndEmitWhileStatement(node); case 214: + return transformAndEmitForStatement(node); + case 215: return transformAndEmitForInStatement(node); - case 216: - return transformAndEmitContinueStatement(node); case 217: - return transformAndEmitBreakStatement(node); + return transformAndEmitContinueStatement(node); case 218: - return transformAndEmitReturnStatement(node); + return transformAndEmitBreakStatement(node); case 219: - return transformAndEmitWithStatement(node); + return transformAndEmitReturnStatement(node); case 220: - return transformAndEmitSwitchStatement(node); + return transformAndEmitWithStatement(node); case 221: - return transformAndEmitLabeledStatement(node); + return transformAndEmitSwitchStatement(node); case 222: - return transformAndEmitThrowStatement(node); + return transformAndEmitLabeledStatement(node); case 223: + return transformAndEmitThrowStatement(node); + case 224: return transformAndEmitTryStatement(node); default: return emitStatement(ts.visitNode(node, visitor, ts.isStatement)); @@ -46016,7 +46076,7 @@ var ts; for (var i = 0; i < numClauses; i++) { var clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 257 && defaultClauseIndex === -1) { + if (clause.kind === 258 && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -46026,7 +46086,7 @@ var ts; var defaultClausesSkipped = 0; for (var i = clausesWritten; i < numClauses; i++) { var clause = caseBlock.clauses[i]; - if (clause.kind === 256) { + if (clause.kind === 257) { var caseClause = clause; if (containsYield(caseClause.expression) && pendingClauses.length > 0) { break; @@ -46264,7 +46324,7 @@ var ts; if (!renamedCatchVariables) { renamedCatchVariables = ts.createMap(); renamedCatchVariableDeclarations = []; - context.enableSubstitution(70); + context.enableSubstitution(71); } renamedCatchVariables.set(text, true); renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name; @@ -46844,12 +46904,12 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableSubstitution(261); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableSubstitution(262); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var currentSourceFile; @@ -47006,23 +47066,23 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return visitExportDeclaration(node); - case 242: + case 243: return visitExportAssignment(node); - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return node; @@ -47220,7 +47280,7 @@ var ts; } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -47252,10 +47312,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -47356,14 +47416,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)]; noSubstitution = []; @@ -47403,12 +47463,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); + case 193: case 192: - case 191: return substituteUnaryExpression(node); } return node; @@ -47423,7 +47483,7 @@ var ts; } if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node)); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node); } var importDeclaration = resolver.getReferencedImportDeclaration(node); @@ -47459,15 +47519,15 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 - ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node) + var expression = node.kind === 193 + ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 43 ? 59 : 60), ts.createLiteral(1)), node) : node; for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) { var exportName = exportedNames_2[_i]; @@ -47508,11 +47568,11 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var exportFunctionsMap = []; @@ -47618,7 +47678,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) { var externalImport = _a[_i]; - if (externalImport.kind === 243 && externalImport.exportClause) { + if (externalImport.kind === 244 && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -47641,7 +47701,7 @@ var ts; } for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) { var externalImport = _e[_d]; - if (externalImport.kind !== 243) { + if (externalImport.kind !== 244) { continue; } var exportDecl = externalImport; @@ -47693,15 +47753,15 @@ var ts; var entry = _b[_a]; var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile); switch (entry.kind) { - case 237: + case 238: if (!entry.importClause) { break; } - case 236: + case 237: ts.Debug.assert(importVariableName !== undefined); statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName))); break; - case 243: + case 244: ts.Debug.assert(importVariableName !== undefined); if (entry.exportClause) { var properties = []; @@ -47723,13 +47783,13 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return undefined; - case 242: + case 243: return visitExportAssignment(node); default: return nestedElementVisitor(node); @@ -47850,7 +47910,7 @@ var ts; } function shouldHoistVariableDeclarationList(node) { return (ts.getEmitFlags(node) & 1048576) === 0 - && (enclosingBlockScopedContainer.kind === 264 + && (enclosingBlockScopedContainer.kind === 265 || (ts.getOriginalNode(node).flags & 3) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { @@ -47872,7 +47932,7 @@ var ts; : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); var isExportedDeclaration = ts.hasModifier(node.original, 1); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -47905,10 +47965,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -48007,43 +48067,43 @@ var ts; } function nestedElementVisitor(node) { switch (node.kind) { - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 213: - return visitForStatement(node); case 214: - return visitForInStatement(node); + return visitForStatement(node); case 215: + return visitForInStatement(node); + case 216: return visitForOfStatement(node); - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 219: - return visitWithStatement(node); case 220: + return visitWithStatement(node); + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 256: - return visitCaseClause(node); case 257: + return visitCaseClause(node); + case 258: return visitDefaultClause(node); - case 223: + case 224: return visitTryStatement(node); - case 259: + case 260: return visitCatchClause(node); - case 206: + case 207: return visitBlock(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return destructuringVisitor(node); @@ -48137,7 +48197,7 @@ var ts; } function destructuringVisitor(node) { if (node.transformFlags & 1024 - && node.kind === 193) { + && node.kind === 194) { return visitDestructuringAssignment(node); } else if (node.transformFlags & 2048) { @@ -48174,7 +48234,7 @@ var ts; } else if (ts.isIdentifier(node)) { var container = resolver.getReferencedExportContainer(node); - return container !== undefined && container.kind === 264; + return container !== undefined && container.kind === 265; } else { return false; @@ -48182,14 +48242,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { var id = ts.getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -48220,12 +48280,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); - case 191: case 192: + case 193: return substituteUnaryExpression(node); } return node; @@ -48270,22 +48330,22 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 + var expression = node.kind === 193 ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node) : node; for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) { var exportName = exportedNames_4[_i]; expression = createExportExpression(exportName, preventSubstitution(expression)); } - if (node.kind === 192) { - expression = node.operator === 42 + if (node.kind === 193) { + expression = node.operator === 43 ? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1)) : ts.createAdd(preventSubstitution(expression), ts.createLiteral(1)); } @@ -48301,7 +48361,7 @@ var ts; || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { var exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration)); } exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]); @@ -48329,8 +48389,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(264); - context.enableSubstitution(70); + context.enableEmitNotification(265); + context.enableSubstitution(71); var currentSourceFile; return transformSourceFile; function transformSourceFile(node) { @@ -48354,9 +48414,9 @@ var ts; } function visitor(node) { switch (node.kind) { - case 236: + case 237: return undefined; - case 242: + case 243: return visitExportAssignment(node); } return node; @@ -48437,7 +48497,7 @@ var ts; } ts.getTransformers = getTransformers; function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(298); + var enabledSyntaxKindFeatures = new Array(299); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -48694,7 +48754,7 @@ var ts; } if (compilerOptions.mapRoot) { sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (sourceFileOrBundle.kind === 264) { + if (sourceFileOrBundle.kind === 265) { sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir)); } if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { @@ -48794,7 +48854,7 @@ var ts; var emitNode = node.emitNode; var emitFlags = emitNode && emitNode.flags; var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end; - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 16) === 0 && pos >= 0) { emitPos(ts.skipTrivia(currentSourceText, pos)); @@ -48807,7 +48867,7 @@ var ts; else { emitCallback(hint, node); } - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 32) === 0 && end >= 0) { emitPos(end); @@ -48947,7 +49007,7 @@ var ts; if (extendedDiagnostics) { ts.performance.mark("preEmitNodeWithComment"); } - var isEmittedNode = node.kind !== 294; + var isEmittedNode = node.kind !== 295; var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0; var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0; if (!skipLeadingComments) { @@ -48961,7 +49021,7 @@ var ts; } if (!skipTrailingComments) { containerEnd = end; - if (node.kind === 226) { + if (node.kind === 227) { declarationListContainerEnd = end; } } @@ -49249,8 +49309,8 @@ var ts; } ts.getDeclarationDiagnostics = getDeclarationDiagnostics; function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; - var isBundledEmit = sourceFileOrBundle.kind === 265; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var isBundledEmit = sourceFileOrBundle.kind === 266; var newLine = host.getNewLine(); var compilerOptions = host.getCompilerOptions(); var write; @@ -49312,7 +49372,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 237); + ts.Debug.assert(aliasEmitInfo.node.kind === 238); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -49385,10 +49445,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 225) { + if (declaration.kind === 226) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) { + else if (declaration.kind === 241 || declaration.kind === 242 || declaration.kind === 239) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -49399,7 +49459,7 @@ var ts; moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); } if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 237) { + if (moduleElementEmitInfo.node.kind === 238) { moduleElementEmitInfo.isVisible = true; } else { @@ -49407,12 +49467,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -49474,7 +49534,7 @@ var ts; function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) { writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; write(": "); - var shouldUseResolverType = declaration.kind === 145 && + var shouldUseResolverType = declaration.kind === 146 && resolver.isRequiredInitializedParameter(declaration); if (type && !shouldUseResolverType) { emitType(type); @@ -49534,74 +49594,74 @@ var ts; } function emitType(type) { switch (type.kind) { - case 118: - case 135: - case 132: - case 121: - case 133: + case 119: case 136: - case 104: - case 138: - case 94: - case 129: - case 168: - case 172: + case 133: + case 122: + case 134: + case 137: + case 105: + case 139: + case 95: + case 130: + case 169: + case 173: return writeTextOfNode(currentText, type); - case 200: + case 201: return emitExpressionWithTypeArguments(type); - case 158: + case 159: return emitTypeReference(type); - case 161: + case 162: return emitTypeQuery(type); - case 163: - return emitArrayType(type); case 164: - return emitTupleType(type); + return emitArrayType(type); case 165: - return emitUnionType(type); + return emitTupleType(type); case 166: - return emitIntersectionType(type); + return emitUnionType(type); case 167: + return emitIntersectionType(type); + case 168: return emitParenType(type); - case 169: - return emitTypeOperator(type); case 170: - return emitIndexedAccessType(type); + return emitTypeOperator(type); case 171: + return emitIndexedAccessType(type); + case 172: return emitMappedType(type); - case 159: case 160: + case 161: return emitSignatureDeclarationWithJsDocComments(type); - case 162: + case 163: return emitTypeLiteral(type); - case 70: + case 71: return emitEntityName(type); - case 142: + case 143: return emitEntityName(type); - case 157: + case 158: return emitTypePredicate(type); } function writeEntityName(entityName) { - if (entityName.kind === 70) { + if (entityName.kind === 71) { writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 142 ? entityName.left : entityName.expression; - var right = entityName.kind === 142 ? entityName.right : entityName.name; + var left = entityName.kind === 143 ? entityName.left : entityName.expression; + var right = entityName.kind === 143 ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 237 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isEntityNameExpression(node.expression)) { - ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178); + ts.Debug.assert(node.expression.kind === 71 || node.expression.kind === 179); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -49718,7 +49778,7 @@ var ts; } } function emitExportAssignment(node) { - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { write(node.isExportEquals ? "export = " : "export default "); writeTextOfNode(currentText, node.expression); } @@ -49739,7 +49799,7 @@ var ts; } write(";"); writeLine(); - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { var nodes = resolver.collectLinkedAliases(node.expression); writeAsynchronousModuleElements(nodes); } @@ -49757,10 +49817,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 236 || - (node.parent.kind === 264 && isCurrentFileExternalModule)) { + else if (node.kind === 237 || + (node.parent.kind === 265 && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 265) { asynchronousSubModuleDeclarationEmitInfo.push({ node: node, outputPos: writer.getTextPos(), @@ -49769,7 +49829,7 @@ var ts; }); } else { - if (node.kind === 237) { + if (node.kind === 238) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -49787,30 +49847,30 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 227: + case 228: return writeFunctionDeclaration(node); - case 207: + case 208: return writeVariableStatement(node); - case 229: + case 230: return writeInterfaceDeclaration(node); - case 228: + case 229: return writeClassDeclaration(node); - case 230: - return writeTypeAliasDeclaration(node); case 231: - return writeEnumDeclaration(node); + return writeTypeAliasDeclaration(node); case 232: + return writeEnumDeclaration(node); + case 233: return writeModuleDeclaration(node); - case 236: - return writeImportEqualsDeclaration(node); case 237: + return writeImportEqualsDeclaration(node); + case 238: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); } } function emitModuleElementDeclarationFlags(node) { - if (node.parent.kind === 264) { + if (node.parent.kind === 265) { var modifiers = ts.getModifierFlags(node); if (modifiers & 1) { write("export "); @@ -49818,7 +49878,7 @@ var ts; if (modifiers & 512) { write("default "); } - else if (node.kind !== 229 && !noDeclare) { + else if (node.kind !== 230 && !noDeclare) { write("declare "); } } @@ -49868,7 +49928,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 239) { + if (namedBindings.kind === 240) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -49891,7 +49951,7 @@ var ts; if (currentWriterPos !== writer.getTextPos()) { write(", "); } - if (node.importClause.namedBindings.kind === 239) { + if (node.importClause.namedBindings.kind === 240) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -49908,13 +49968,13 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 233; var moduleSpecifier; - if (parent.kind === 236) { + if (parent.kind === 237) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 232) { + else if (parent.kind === 233) { moduleSpecifier = parent.name; } else { @@ -49982,7 +50042,7 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body && node.body.kind !== 233) { + while (node.body && node.body.kind !== 234) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -50052,7 +50112,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 150 && ts.hasModifier(node.parent, 8); + return node.parent.kind === 151 && ts.hasModifier(node.parent, 8); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -50062,15 +50122,15 @@ var ts; writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.constraint); } else { @@ -50079,15 +50139,15 @@ var ts; } if (node.default && !isPrivateMethodTypeParameter(node)) { write(" = "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.default); } else { @@ -50097,34 +50157,34 @@ var ts; function getTypeParameterConstraintVisibilityError() { var diagnosticMessage; switch (node.parent.kind) { - case 228: + case 229: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 229: + case 230: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 155: + case 156: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 154: + case 155: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 227: + case 228: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 230: + case 231: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -50152,7 +50212,7 @@ var ts; if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } - else if (!isImplementsList && node.expression.kind === 94) { + else if (!isImplementsList && node.expression.kind === 95) { write("null"); } else { @@ -50163,7 +50223,7 @@ var ts; } function getHeritageClauseVisibilityError() { var diagnosticMessage; - if (node.parent.parent.kind === 228) { + if (node.parent.parent.kind === 229) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1; @@ -50247,17 +50307,17 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 225 || resolver.isDeclarationVisible(node)) { + if (node.kind !== 226 || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } else { writeTextOfNode(currentText, node.name); - if ((node.kind === 148 || node.kind === 147 || - (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { + if ((node.kind === 149 || node.kind === 148 || + (node.kind === 146 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) { + if ((node.kind === 149 || node.kind === 148) && node.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (resolver.isLiteralConstDeclaration(node)) { @@ -50270,14 +50330,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 225) { + if (node.kind === 226) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 148 || node.kind === 147) { + else if (node.kind === 149 || node.kind === 148) { if (ts.hasModifier(node, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -50285,7 +50345,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -50311,7 +50371,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 199) { + if (element.kind !== 200) { elements.push(element); } } @@ -50377,7 +50437,7 @@ var ts; accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { - var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 153 ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -50390,7 +50450,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 152 + return accessor.kind === 153 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type @@ -50399,7 +50459,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 153) { + if (accessorWithTypeAnnotation.kind === 154) { if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : @@ -50445,17 +50505,17 @@ var ts; } if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 227) { + if (node.kind === 228) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 150 || node.kind === 151) { + else if (node.kind === 151 || node.kind === 152) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); } - if (node.kind === 227) { + if (node.kind === 228) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 151) { + else if (node.kind === 152) { write("constructor"); } else { @@ -50475,15 +50535,15 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; var closeParenthesizedFunctionType = false; - if (node.kind === 156) { + if (node.kind === 157) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); write("["); } else { - if (node.kind === 155 || node.kind === 160) { + if (node.kind === 156 || node.kind === 161) { write("new "); } - else if (node.kind === 159) { + else if (node.kind === 160) { var currentOutput = writer.getText(); if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") { closeParenthesizedFunctionType = true; @@ -50494,20 +50554,20 @@ var ts; write("("); } emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 156) { + if (node.kind === 157) { write("]"); } else { write(")"); } - var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160; - if (isFunctionTypeOrConstructorType || node.parent.kind === 162) { + var isFunctionTypeOrConstructorType = node.kind === 160 || node.kind === 161; + if (isFunctionTypeOrConstructorType || node.parent.kind === 163) { if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 151 && !ts.hasModifier(node, 8)) { + else if (node.kind !== 152 && !ts.hasModifier(node, 8)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -50521,23 +50581,23 @@ var ts; function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 155: + case 156: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 154: + case 155: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 156: + case 157: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; + case 151: case 150: - case 149: if (ts.hasModifier(node, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -50545,7 +50605,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -50558,7 +50618,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 227: + case 228: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -50590,9 +50650,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - node.parent.parent.kind === 162) { + if (node.parent.kind === 160 || + node.parent.kind === 161 || + node.parent.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!ts.hasModifier(node.parent, 8)) { @@ -50608,26 +50668,26 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 151: + case 152: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 155: + case 156: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 154: + case 155: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 156: + case 157: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -50635,7 +50695,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -50647,7 +50707,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 227: + case 228: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -50658,12 +50718,12 @@ var ts; } } function emitBindingPattern(bindingPattern) { - if (bindingPattern.kind === 173) { + if (bindingPattern.kind === 174) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 174) { + else if (bindingPattern.kind === 175) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -50674,10 +50734,10 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 199) { + if (bindingElement.kind === 200) { write(" "); } - else if (bindingElement.kind === 175) { + else if (bindingElement.kind === 176) { if (bindingElement.propertyName) { writeTextOfNode(currentText, bindingElement.propertyName); write(": "); @@ -50687,7 +50747,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - ts.Debug.assert(bindingElement.name.kind === 70); + ts.Debug.assert(bindingElement.name.kind === 71); if (bindingElement.dotDotDotToken) { write("..."); } @@ -50699,39 +50759,39 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 227: - case 232: - case 236: - case 229: case 228: + case 233: + case 237: case 230: + case 229: case 231: + case 232: return emitModuleElement(node, isModuleElementVisible(node)); - case 207: + case 208: return emitModuleElement(node, isVariableStatementVisible(node)); - case 237: + case 238: return emitModuleElement(node, !node.importClause); - case 243: + case 244: return emitExportDeclaration(node); + case 152: case 151: case 150: - case 149: return writeFunctionDeclaration(node); - case 155: - case 154: case 156: + case 155: + case 157: return emitSignatureDeclarationWithJsDocComments(node); - case 152: case 153: + case 154: return emitAccessorDeclaration(node); + case 149: case 148: - case 147: return emitPropertyDeclaration(node); - case 263: + case 264: return emitEnumMemberDeclaration(node); - case 242: + case 243: return emitExportAssignment(node); - case 264: + case 265: return emitSourceFile(node); } } @@ -50750,7 +50810,7 @@ var ts; } return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFileOrBundle) { - var isBundledEmit = sourceFileOrBundle.kind === 265; + var isBundledEmit = sourceFileOrBundle.kind === 266; if (isBundledEmit && !addBundledFileReference) { return; } @@ -50764,7 +50824,7 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); @@ -50851,8 +50911,8 @@ var ts; } } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) { - var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; - var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined; + var bundle = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle : undefined; + var sourceFile = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle); if (bundle) { @@ -50888,7 +50948,7 @@ var ts; } function emitHelpers(node, writeLines) { var helpersEmitted = false; - var bundle = node.kind === 265 ? node : undefined; + var bundle = node.kind === 266 ? node : undefined; if (bundle && moduleKind === ts.ModuleKind.None) { return; } @@ -50961,8 +51021,8 @@ var ts; break; } switch (node.kind) { - case 264: return printFile(node); - case 265: return printBundle(node); + case 265: return printFile(node); + case 266: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); return endPrint(); @@ -51093,196 +51153,196 @@ var ts; return; } switch (kind) { - case 13: case 14: case 15: + case 16: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 142: - return emitQualifiedName(node); case 143: - return emitComputedPropertyName(node); + return emitQualifiedName(node); case 144: - return emitTypeParameter(node); + return emitComputedPropertyName(node); case 145: - return emitParameter(node); + return emitTypeParameter(node); case 146: - return emitDecorator(node); + return emitParameter(node); case 147: - return emitPropertySignature(node); + return emitDecorator(node); case 148: - return emitPropertyDeclaration(node); + return emitPropertySignature(node); case 149: - return emitMethodSignature(node); + return emitPropertyDeclaration(node); case 150: - return emitMethodDeclaration(node); + return emitMethodSignature(node); case 151: - return emitConstructor(node); + return emitMethodDeclaration(node); case 152: + return emitConstructor(node); case 153: - return emitAccessorDeclaration(node); case 154: - return emitCallSignature(node); + return emitAccessorDeclaration(node); case 155: - return emitConstructSignature(node); + return emitCallSignature(node); case 156: - return emitIndexSignature(node); + return emitConstructSignature(node); case 157: - return emitTypePredicate(node); + return emitIndexSignature(node); case 158: - return emitTypeReference(node); + return emitTypePredicate(node); case 159: - return emitFunctionType(node); + return emitTypeReference(node); case 160: - return emitConstructorType(node); + return emitFunctionType(node); case 161: - return emitTypeQuery(node); + return emitConstructorType(node); case 162: - return emitTypeLiteral(node); + return emitTypeQuery(node); case 163: - return emitArrayType(node); + return emitTypeLiteral(node); case 164: - return emitTupleType(node); + return emitArrayType(node); case 165: - return emitUnionType(node); + return emitTupleType(node); case 166: - return emitIntersectionType(node); + return emitUnionType(node); case 167: + return emitIntersectionType(node); + case 168: return emitParenthesizedType(node); - case 200: + case 201: return emitExpressionWithTypeArguments(node); - case 168: - return emitThisType(); case 169: - return emitTypeOperator(node); + return emitThisType(); case 170: - return emitIndexedAccessType(node); + return emitTypeOperator(node); case 171: - return emitMappedType(node); + return emitIndexedAccessType(node); case 172: - return emitLiteralType(node); + return emitMappedType(node); case 173: - return emitObjectBindingPattern(node); + return emitLiteralType(node); case 174: - return emitArrayBindingPattern(node); + return emitObjectBindingPattern(node); case 175: + return emitArrayBindingPattern(node); + case 176: return emitBindingElement(node); - case 204: - return emitTemplateSpan(node); case 205: - return emitSemicolonClassElement(); + return emitTemplateSpan(node); case 206: - return emitBlock(node); + return emitSemicolonClassElement(); case 207: - return emitVariableStatement(node); + return emitBlock(node); case 208: - return emitEmptyStatement(); + return emitVariableStatement(node); case 209: - return emitExpressionStatement(node); + return emitEmptyStatement(); case 210: - return emitIfStatement(node); + return emitExpressionStatement(node); case 211: - return emitDoStatement(node); + return emitIfStatement(node); case 212: - return emitWhileStatement(node); + return emitDoStatement(node); case 213: - return emitForStatement(node); + return emitWhileStatement(node); case 214: - return emitForInStatement(node); + return emitForStatement(node); case 215: - return emitForOfStatement(node); + return emitForInStatement(node); case 216: - return emitContinueStatement(node); + return emitForOfStatement(node); case 217: - return emitBreakStatement(node); + return emitContinueStatement(node); case 218: - return emitReturnStatement(node); + return emitBreakStatement(node); case 219: - return emitWithStatement(node); + return emitReturnStatement(node); case 220: - return emitSwitchStatement(node); + return emitWithStatement(node); case 221: - return emitLabeledStatement(node); + return emitSwitchStatement(node); case 222: - return emitThrowStatement(node); + return emitLabeledStatement(node); case 223: - return emitTryStatement(node); + return emitThrowStatement(node); case 224: - return emitDebuggerStatement(node); + return emitTryStatement(node); case 225: - return emitVariableDeclaration(node); + return emitDebuggerStatement(node); case 226: - return emitVariableDeclarationList(node); + return emitVariableDeclaration(node); case 227: - return emitFunctionDeclaration(node); + return emitVariableDeclarationList(node); case 228: - return emitClassDeclaration(node); + return emitFunctionDeclaration(node); case 229: - return emitInterfaceDeclaration(node); + return emitClassDeclaration(node); case 230: - return emitTypeAliasDeclaration(node); + return emitInterfaceDeclaration(node); case 231: - return emitEnumDeclaration(node); + return emitTypeAliasDeclaration(node); case 232: - return emitModuleDeclaration(node); + return emitEnumDeclaration(node); case 233: - return emitModuleBlock(node); + return emitModuleDeclaration(node); case 234: + return emitModuleBlock(node); + case 235: return emitCaseBlock(node); - case 236: - return emitImportEqualsDeclaration(node); case 237: - return emitImportDeclaration(node); + return emitImportEqualsDeclaration(node); case 238: - return emitImportClause(node); + return emitImportDeclaration(node); case 239: - return emitNamespaceImport(node); + return emitImportClause(node); case 240: - return emitNamedImports(node); + return emitNamespaceImport(node); case 241: - return emitImportSpecifier(node); + return emitNamedImports(node); case 242: - return emitExportAssignment(node); + return emitImportSpecifier(node); case 243: - return emitExportDeclaration(node); + return emitExportAssignment(node); case 244: - return emitNamedExports(node); + return emitExportDeclaration(node); case 245: - return emitExportSpecifier(node); + return emitNamedExports(node); case 246: - return; + return emitExportSpecifier(node); case 247: + return; + case 248: return emitExternalModuleReference(node); case 10: return emitJsxText(node); - case 250: - return emitJsxOpeningElement(node); case 251: - return emitJsxClosingElement(node); + return emitJsxOpeningElement(node); case 252: - return emitJsxAttribute(node); + return emitJsxClosingElement(node); case 253: - return emitJsxAttributes(node); + return emitJsxAttribute(node); case 254: - return emitJsxSpreadAttribute(node); + return emitJsxAttributes(node); case 255: - return emitJsxExpression(node); + return emitJsxSpreadAttribute(node); case 256: - return emitCaseClause(node); + return emitJsxExpression(node); case 257: - return emitDefaultClause(node); + return emitCaseClause(node); case 258: - return emitHeritageClause(node); + return emitDefaultClause(node); case 259: - return emitCatchClause(node); + return emitHeritageClause(node); case 260: - return emitPropertyAssignment(node); + return emitCatchClause(node); case 261: - return emitShorthandPropertyAssignment(node); + return emitPropertyAssignment(node); case 262: - return emitSpreadAssignment(node); + return emitShorthandPropertyAssignment(node); case 263: + return emitSpreadAssignment(node); + case 264: return emitEnumMember(node); } if (ts.isExpression(node)) { @@ -51299,77 +51359,77 @@ var ts; case 8: return emitNumericLiteral(node); case 9: - case 11: case 12: + case 13: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 85: - case 94: - case 96: - case 100: - case 98: + case 86: + case 95: + case 97: + case 101: + case 99: writeTokenText(kind); return; - case 176: - return emitArrayLiteralExpression(node); case 177: - return emitObjectLiteralExpression(node); + return emitArrayLiteralExpression(node); case 178: - return emitPropertyAccessExpression(node); + return emitObjectLiteralExpression(node); case 179: - return emitElementAccessExpression(node); + return emitPropertyAccessExpression(node); case 180: - return emitCallExpression(node); + return emitElementAccessExpression(node); case 181: - return emitNewExpression(node); + return emitCallExpression(node); case 182: - return emitTaggedTemplateExpression(node); + return emitNewExpression(node); case 183: - return emitTypeAssertionExpression(node); + return emitTaggedTemplateExpression(node); case 184: - return emitParenthesizedExpression(node); + return emitTypeAssertionExpression(node); case 185: - return emitFunctionExpression(node); + return emitParenthesizedExpression(node); case 186: - return emitArrowFunction(node); + return emitFunctionExpression(node); case 187: - return emitDeleteExpression(node); + return emitArrowFunction(node); case 188: - return emitTypeOfExpression(node); + return emitDeleteExpression(node); case 189: - return emitVoidExpression(node); + return emitTypeOfExpression(node); case 190: - return emitAwaitExpression(node); + return emitVoidExpression(node); case 191: - return emitPrefixUnaryExpression(node); + return emitAwaitExpression(node); case 192: - return emitPostfixUnaryExpression(node); + return emitPrefixUnaryExpression(node); case 193: - return emitBinaryExpression(node); + return emitPostfixUnaryExpression(node); case 194: - return emitConditionalExpression(node); + return emitBinaryExpression(node); case 195: - return emitTemplateExpression(node); + return emitConditionalExpression(node); case 196: - return emitYieldExpression(node); + return emitTemplateExpression(node); case 197: - return emitSpreadExpression(node); + return emitYieldExpression(node); case 198: - return emitClassExpression(node); + return emitSpreadExpression(node); case 199: + return emitClassExpression(node); + case 200: return; - case 201: - return emitAsExpression(node); case 202: - return emitNonNullExpression(node); + return emitAsExpression(node); case 203: + return emitNonNullExpression(node); + case 204: return emitMetaProperty(node); - case 248: - return emitJsxElement(node); case 249: + return emitJsxElement(node); + case 250: return emitJsxSelfClosingElement(node); - case 295: + case 296: return emitPartiallyEmittedExpression(node); } } @@ -51403,7 +51463,7 @@ var ts; emit(node.right); } function emitEntityName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -51473,7 +51533,7 @@ var ts; function emitAccessorDeclaration(node) { emitDecorators(node, node.decorators); emitModifiers(node, node.modifiers); - write(node.kind === 152 ? "get " : "set "); + write(node.kind === 153 ? "get " : "set "); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); } @@ -51652,7 +51712,7 @@ var ts; if (!(ts.getEmitFlags(node) & 65536)) { var dotRangeStart = node.expression.end; var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1; - var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd }; + var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd }; indentBeforeDot = needsIndentation(node, node.expression, dotToken); indentAfterDot = needsIndentation(node, dotToken, node.name); } @@ -51669,7 +51729,7 @@ var ts; if (ts.isNumericLiteral(expression)) { var text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(ts.tokenToString(22)) < 0; + && text.indexOf(ts.tokenToString(23)) < 0; } else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) { var constantValue = ts.getConstantValue(expression); @@ -51750,16 +51810,16 @@ var ts; } function shouldEmitWhitespaceBeforeOperand(node) { var operand = node.operand; - return operand.kind === 191 - && ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42)) - || (node.operator === 37 && (operand.operator === 37 || operand.operator === 43))); + return operand.kind === 192 + && ((node.operator === 37 && (operand.operator === 37 || operand.operator === 43)) + || (node.operator === 38 && (operand.operator === 38 || operand.operator === 44))); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand); writeTokenText(node.operator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 25; + var isCommaOperator = node.operatorToken.kind !== 26; var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); emitExpression(node.left); @@ -51827,17 +51887,17 @@ var ts; } function emitBlock(node) { if (isSingleLineEmptyBlock(node)) { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); write(" "); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } else { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); emitBlockStatements(node); increaseIndent(); emitLeadingCommentsOfPosition(node.statements.end); decreaseIndent(); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } } function emitBlockStatements(node) { @@ -51861,16 +51921,16 @@ var ts; write(";"); } function emitIfStatement(node) { - var openParenPos = writeToken(89, node.pos, node); + var openParenPos = writeToken(90, node.pos, node); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitExpression(node.expression); - writeToken(19, node.expression.end, node); + writeToken(20, node.expression.end, node); emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node); - writeToken(81, node.thenStatement.end, node); - if (node.elseStatement.kind === 210) { + writeToken(82, node.thenStatement.end, node); + if (node.elseStatement.kind === 211) { write(" "); emit(node.elseStatement); } @@ -51899,9 +51959,9 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitForBinding(node.initializer); write(";"); emitExpressionWithPrefix(" ", node.condition); @@ -51911,29 +51971,29 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" in "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); emitWithSuffix(node.awaitModifier, " "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" of "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForBinding(node) { if (node !== undefined) { - if (node.kind === 226) { + if (node.kind === 227) { emit(node); } else { @@ -51942,17 +52002,17 @@ var ts; } } function emitContinueStatement(node) { - writeToken(76, node.pos); + writeToken(77, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitBreakStatement(node) { - writeToken(71, node.pos); + writeToken(72, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitReturnStatement(node) { - writeToken(95, node.pos, node); + writeToken(96, node.pos, node); emitExpressionWithPrefix(" ", node.expression); write(";"); } @@ -51963,11 +52023,11 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - var openParenPos = writeToken(97, node.pos); + var openParenPos = writeToken(98, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); write(" "); emit(node.caseBlock); } @@ -51995,7 +52055,7 @@ var ts; } } function emitDebuggerStatement(node) { - writeToken(77, node.pos); + writeToken(78, node.pos); write(";"); } function emitVariableDeclaration(node) { @@ -52105,7 +52165,7 @@ var ts; emitBlockFunctionBody(body); } decreaseIndent(); - writeToken(17, body.statements.end, body); + writeToken(18, body.statements.end, body); } function emitBlockFunctionBodyOnSingleLine(body) { emitBlockFunctionBodyWorker(body, true); @@ -52182,7 +52242,7 @@ var ts; write(node.flags & 16 ? "namespace " : "module "); emit(node.name); var body = node.body; - while (body.kind === 232) { + while (body.kind === 233) { write("."); emit(body.name); body = body.body; @@ -52203,9 +52263,9 @@ var ts; } } function emitCaseBlock(node) { - writeToken(16, node.pos); + writeToken(17, node.pos); emitList(node, node.clauses, 65); - writeToken(17, node.clauses.end); + writeToken(18, node.clauses.end); } function emitImportEqualsDeclaration(node) { emitModifiers(node, node.modifiers); @@ -52216,7 +52276,7 @@ var ts; write(";"); } function emitModuleReference(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -52346,7 +52406,7 @@ var ts; } } function emitJsxTagName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -52383,11 +52443,11 @@ var ts; emitList(node, node.types, 272); } function emitCatchClause(node) { - var openParenPos = writeToken(73, node.pos); + var openParenPos = writeToken(74, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emit(node.variableDeclaration); - writeToken(19, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); + writeToken(20, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); write(" "); emit(node.block); } @@ -52721,7 +52781,7 @@ var ts; for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) { var line = lines_1[_a]; for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { - if (!ts.isWhiteSpace(line.charCodeAt(i))) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { if (indentation === undefined || i < indentation) { indentation = i; break; @@ -52844,7 +52904,7 @@ var ts; && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile); } function skipSynthesizedParentheses(node) { - while (node.kind === 184 && ts.nodeIsSynthesized(node)) { + while (node.kind === 185 && ts.nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -52972,23 +53032,23 @@ var ts; } function generateNameForNode(node) { switch (node.kind) { - case 70: + case 71: return makeUniqueName(getTextOfNode(node)); + case 233: case 232: - case 231: return generateNameForModuleOrEnum(node); - case 237: - case 243: + case 238: + case 244: return generateNameForImportOrExportDeclaration(node); - case 227: case 228: - case 242: + case 229: + case 243: return generateNameForExportDefault(); - case 198: + case 199: return generateNameForClassExpression(); - case 150: - case 152: + case 151: case 153: + case 154: return generateNameForMethodOrAccessor(node); default: return makeTempVariableName(0); @@ -53732,57 +53792,57 @@ var ts; return diagnostics; function walk(node) { switch (parent.kind) { - case 145: - case 148: + case 146: + case 149: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); return; } - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: - case 225: + case 228: + case 187: + case 228: + case 226: if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); return; } } switch (node.kind) { - case 236: + case 237: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return; - case 242: + case 243: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return; } break; - case 258: + case 259: var heritageClause = node; - if (heritageClause.token === 107) { + if (heritageClause.token === 108) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return; } break; - case 229: + case 230: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return; - case 232: + case 233: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return; - case 230: + case 231: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return; - case 231: + case 232: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return; - case 183: + case 184: var typeAssertionExpression = node; diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return; @@ -53797,45 +53857,45 @@ var ts; diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } switch (parent.kind) { - case 228: - case 150: - case 149: + case 229: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: + case 228: + case 187: + case 228: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return; } - case 207: + case 208: if (nodes === parent.modifiers) { - return checkModifiers(nodes, parent.kind === 207); + return checkModifiers(nodes, parent.kind === 208); } break; - case 148: + case 149: if (nodes === parent.modifiers) { for (var _i = 0, _a = nodes; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 114) { + if (modifier.kind !== 115) { diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); } } return; } break; - case 145: + case 146: if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return; } break; - case 180: case 181: - case 200: + case 182: + case 201: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); return; @@ -53851,21 +53911,21 @@ var ts; for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { var modifier = modifiers_1[_i]; switch (modifier.kind) { - case 75: + case 76: if (isConstValid) { continue; } - case 113: - case 111: + case 114: case 112: - case 130: - case 123: - case 116: + case 113: + case 131: + case 124: + case 117: diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); break; - case 114: - case 83: - case 78: + case 115: + case 84: + case 79: } } } @@ -53964,9 +54024,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { + case 238: case 237: - case 236: - case 243: + case 244: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9) { break; @@ -53978,7 +54038,7 @@ var ts; (imports || (imports = [])).push(moduleNameExpr); } break; - case 232: + case 233: if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) { var moduleName = node.name; if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { diff --git a/lib/tsserver.js b/lib/tsserver.js index 1b4b3546b6abe..54dcd8e51e581 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -46,323 +46,324 @@ var ts; SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral"; SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral"; - SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail"; - SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken"; - SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken"; - SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken"; - SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier"; - SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword"; - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword"; - SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword"; - SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword"; - SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword"; - SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword"; - SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword"; - SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword"; - SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword"; - SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword"; - SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword"; - SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName"; - SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator"; - SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature"; - SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType"; - SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator"; - SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType"; - SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType"; - SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType"; - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement"; - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement"; - SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression"; - SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression"; - SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty"; - SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement"; - SyntaxKind[SyntaxKind["Block"] = 206] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock"; - SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression"; - SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause"; - SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment"; - SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember"; - SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile"; - SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle"; - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression"; - SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType"; - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag"; - SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral"; - SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType"; - SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList"; - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["Count"] = 298] = "Count"; - SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment"; - SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 11] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 12] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 13] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 14] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 15] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 16] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 17] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 18] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 19] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 20] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 21] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 22] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 23] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 24] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 25] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 26] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 27] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 28] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 29] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 30] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 31] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 32] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 33] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 34] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 35] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 36] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 37] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 38] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 39] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 40] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 41] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 42] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 43] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 44] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 45] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 47] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 48] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 49] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 50] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 51] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 52] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 53] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 54] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 55] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 56] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 57] = "AtToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 58] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 59] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 60] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 61] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 62] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 63] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 64] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 65] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 67] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 68] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 69] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 70] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 71] = "Identifier"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 72] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 73] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 74] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 75] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 76] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 77] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 78] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 79] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 80] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 81] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 82] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 83] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 84] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 85] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 86] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 87] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 88] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 89] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 90] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 91] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 92] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 93] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 94] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 95] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 96] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 97] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 98] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 99] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 100] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 101] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 102] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 103] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 104] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 105] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 106] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 107] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 108] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 109] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 110] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 111] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 112] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 113] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 114] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 115] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 116] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 117] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 118] = "AsKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 119] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 120] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 121] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 122] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 123] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 124] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 125] = "GetKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 126] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 127] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 128] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 129] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 130] = "NeverKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 131] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 132] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 133] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 134] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 135] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 136] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 137] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 138] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 139] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 140] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 141] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 142] = "OfKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 143] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 144] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 145] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 146] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 147] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 148] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 149] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 150] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 151] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 152] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 153] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 154] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 155] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 156] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 157] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 158] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 159] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 160] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 161] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 162] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 163] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 164] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 165] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 166] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 167] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 168] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 169] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 170] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 171] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 172] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 173] = "LiteralType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 174] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 175] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 176] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 177] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 178] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 179] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 180] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 181] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 182] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 183] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 184] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 185] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 186] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 187] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 188] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 189] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 190] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 191] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 192] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 193] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 194] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 195] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 196] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 197] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 198] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 199] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 200] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 201] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 202] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 203] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 204] = "MetaProperty"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 205] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 206] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 207] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 208] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 209] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 210] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 211] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 212] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 213] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 214] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 215] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 216] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 217] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 218] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 219] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 220] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 221] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 222] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 223] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 224] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 225] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 226] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 227] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 228] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 229] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 230] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 231] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 232] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 233] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 234] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 235] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 236] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 237] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 238] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 239] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 240] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 241] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 242] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 243] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 244] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 245] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 246] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 247] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 248] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 249] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 250] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 251] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 252] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 253] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 254] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 255] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 256] = "JsxExpression"; + SyntaxKind[SyntaxKind["CaseClause"] = 257] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 258] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 259] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 260] = "CatchClause"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 261] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 262] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 263] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 264] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 265] = "SourceFile"; + SyntaxKind[SyntaxKind["Bundle"] = 266] = "Bundle"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 267] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 268] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 269] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 270] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 271] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 272] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 273] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 274] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 275] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 276] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 277] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 278] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 279] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 280] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 281] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 282] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType"; + SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["Count"] = 299] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 70] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 72] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 107] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 72] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 142] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 108] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 116] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 158] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 173] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 17] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 70] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 142] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode"; - SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode"; - SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 13] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 13] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 16] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 27] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); var NodeFlags; (function (NodeFlags) { @@ -3940,6 +3941,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -5192,7 +5194,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 264) { + while (node && node.kind !== 265) { node = node.parent; } return node; @@ -5200,11 +5202,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: return true; } return false; @@ -5260,7 +5262,7 @@ var ts; } ts.nodeIsPresent = nodeIsPresent; function isToken(n) { - return n.kind >= 0 && n.kind <= 141; + return n.kind >= 0 && n.kind <= 142; } ts.isToken = isToken; function getTokenPosOfNode(node, sourceFile, includeJsDoc) { @@ -5273,18 +5275,18 @@ var ts; if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) { return getTokenPosOfNode(node.jsDoc[0]); } - if (node.kind === 293 && node._children.length > 0) { + if (node.kind === 294 && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; function isJSDocNode(node) { - return node.kind >= 266 && node.kind <= 292; + return node.kind >= 267 && node.kind <= 293; } ts.isJSDocNode = isJSDocNode; function isJSDocTag(node) { - return node.kind >= 282 && node.kind <= 292; + return node.kind >= 283 && node.kind <= 293; } ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { @@ -5322,13 +5324,13 @@ var ts; switch (node.kind) { case 9: return getQuotedEscapedLiteralText('"', node.text, '"'); - case 12: - return getQuotedEscapedLiteralText("`", node.text, "`"); case 13: - return getQuotedEscapedLiteralText("`", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "`"); case 14: - return getQuotedEscapedLiteralText("}", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "${"); case 15: + return getQuotedEscapedLiteralText("}", node.text, "${"); + case 16: return getQuotedEscapedLiteralText("}", node.text, "`"); case 8: return node.text; @@ -5354,11 +5356,11 @@ var ts; ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isCatchClauseVariableDeclarationOrBindingElement(declaration) { var node = getRootDeclaration(declaration); - return node.kind === 225 && node.parent.kind === 259; + return node.kind === 226 && node.parent.kind === 260; } ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement; function isAmbientModule(node) { - return node && node.kind === 232 && + return node && node.kind === 233 && (node.name.kind === 9 || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; @@ -5367,11 +5369,11 @@ var ts; } ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; function isShorthandAmbientModule(node) { - return node && node.kind === 232 && (!node.body); + return node && node.kind === 233 && (!node.body); } function isBlockScopedContainerTopLevel(node) { - return node.kind === 264 || - node.kind === 232 || + return node.kind === 265 || + node.kind === 233 || isFunctionLike(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; @@ -5384,9 +5386,9 @@ var ts; return false; } switch (node.parent.kind) { - case 264: + case 265: return ts.isExternalModule(node.parent); - case 233: + case 234: return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; @@ -5398,22 +5400,22 @@ var ts; ts.isEffectiveExternalModule = isEffectiveExternalModule; function isBlockScope(node, parentNode) { switch (node.kind) { - case 264: - case 234: - case 259: - case 232: - case 213: + case 265: + case 235: + case 260: + case 233: case 214: case 215: - case 151: - case 150: + case 216: case 152: + case 151: case 153: - case 227: - case 185: + case 154: + case 228: case 186: + case 187: return true; - case 206: + case 207: return parentNode && !isFunctionLike(parentNode); } return false; @@ -5439,12 +5441,12 @@ var ts; ts.getNameFromIndexInfo = getNameFromIndexInfo; function getTextOfPropertyName(name) { switch (name.kind) { - case 70: + case 71: return name.text; case 9: case 8: return name.text; - case 143: + case 144: if (isStringOrNumericLiteral(name.expression)) { return name.expression.text; } @@ -5454,11 +5456,11 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { - case 70: + case 71: return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name); - case 142: + case 143: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 178: + case 179: return entityNameToString(name.expression) + "." + entityNameToString(name.name); } } @@ -5495,7 +5497,7 @@ var ts; ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; function getErrorSpanForArrowFunction(sourceFile, node) { var pos = ts.skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 206) { + if (node.body && node.body.kind === 207) { var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; if (startLine < endLine) { @@ -5507,29 +5509,29 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 264: + case 265: var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); if (pos_1 === sourceFile.text.length) { return ts.createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 225: - case 175: - case 228: - case 198: + case 226: + case 176: case 229: + case 199: + case 230: + case 233: case 232: - case 231: - case 263: - case 227: - case 185: - case 150: - case 152: + case 264: + case 228: + case 186: + case 151: case 153: - case 230: + case 154: + case 231: errorNode = node.name; break; - case 186: + case 187: return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { @@ -5550,7 +5552,7 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 231 && isConst(node); + return node.kind === 232 && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isConst(node) { @@ -5563,11 +5565,11 @@ var ts; } ts.isLet = isLet; function isSuperCall(n) { - return n.kind === 180 && n.expression.kind === 96; + return n.kind === 181 && n.expression.kind === 97; } ts.isSuperCall = isSuperCall; function isPrologueDirective(node) { - return node.kind === 209 + return node.kind === 210 && node.expression.kind === 9; } ts.isPrologueDirective = isPrologueDirective; @@ -5580,10 +5582,10 @@ var ts; } ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJSDocCommentRanges(node, text) { - var commentRanges = (node.kind === 145 || - node.kind === 144 || - node.kind === 185 || - node.kind === 186) ? + var commentRanges = (node.kind === 146 || + node.kind === 145 || + node.kind === 186 || + node.kind === 187) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, function (comment) { @@ -5597,69 +5599,69 @@ var ts; ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (157 <= node.kind && node.kind <= 172) { + if (158 <= node.kind && node.kind <= 173) { return true; } switch (node.kind) { - case 118: - case 132: - case 135: - case 121: + case 119: + case 133: case 136: - case 138: - case 129: + case 122: + case 137: + case 139: + case 130: return true; - case 104: - return node.parent.kind !== 189; - case 200: + case 105: + return node.parent.kind !== 190; + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 70: - if (node.parent.kind === 142 && node.parent.right === node) { + case 71: + if (node.parent.kind === 143 && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 178 && node.parent.name === node) { + else if (node.parent.kind === 179 && node.parent.name === node) { node = node.parent; } - ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - case 142: - case 178: - case 98: + ts.Debug.assert(node.kind === 71 || node.kind === 143 || node.kind === 179, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + case 143: + case 179: + case 99: var parent = node.parent; - if (parent.kind === 161) { + if (parent.kind === 162) { return false; } - if (157 <= parent.kind && parent.kind <= 172) { + if (158 <= parent.kind && parent.kind <= 173) { return true; } switch (parent.kind) { - case 200: + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 144: + case 145: return node === parent.constraint; + case 149: case 148: - case 147: - case 145: - case 225: + case 146: + case 226: return node === parent.type; - case 227: - case 185: + case 228: case 186: + case 187: + case 152: case 151: case 150: - case 149: - case 152: case 153: - return node === parent.type; case 154: + return node === parent.type; case 155: case 156: + case 157: return node === parent.type; - case 183: + case 184: return node === parent.type; - case 180: case 181: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 182: + return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + case 183: return false; } } @@ -5677,30 +5679,30 @@ var ts; } ts.isChildOfNodeWithKind = isChildOfNodeWithKind; function isPrefixUnaryExpression(node) { - return node.kind === 191; + return node.kind === 192; } ts.isPrefixUnaryExpression = isPrefixUnaryExpression; function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 218: + case 219: return visitor(node); - case 234: - case 206: - case 210: + case 235: + case 207: case 211: case 212: case 213: case 214: case 215: - case 219: + case 216: case 220: - case 256: - case 257: case 221: - case 223: - case 259: + case 257: + case 258: + case 222: + case 224: + case 260: return ts.forEachChild(node, traverse); } } @@ -5710,24 +5712,24 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 196: + case 197: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } return; - case 231: - case 229: case 232: case 230: - case 228: - case 198: + case 233: + case 231: + case 229: + case 199: return; default: if (isFunctionLike(node)) { var name = node.name; - if (name && name.kind === 143) { + if (name && name.kind === 144) { traverse(name.expression); return; } @@ -5740,10 +5742,10 @@ var ts; } ts.forEachYieldExpression = forEachYieldExpression; function getRestParameterElementType(node) { - if (node && node.kind === 163) { + if (node && node.kind === 164) { return node.elementType; } - else if (node && node.kind === 158) { + else if (node && node.kind === 159) { return ts.singleOrUndefined(node.typeArguments); } else { @@ -5754,14 +5756,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 175: - case 263: - case 145: - case 260: - case 148: - case 147: + case 176: + case 264: + case 146: case 261: - case 225: + case 149: + case 148: + case 262: + case 226: return true; } } @@ -5769,11 +5771,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 152 || node.kind === 153); + return node && (node.kind === 153 || node.kind === 154); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 228 || node.kind === 198); + return node && (node.kind === 229 || node.kind === 199); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -5782,19 +5784,19 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 151: - case 185: - case 227: + case 152: case 186: + case 228: + case 187: + case 151: case 150: - case 149: - case 152: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return true; } return false; @@ -5802,13 +5804,13 @@ var ts; ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: + case 186: return true; } return false; @@ -5816,13 +5818,13 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 213: case 214: case 215: - case 211: + case 216: case 212: + case 213: return true; - case 221: + case 222: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -5833,7 +5835,7 @@ var ts; if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 221) { + if (node.statement.kind !== 222) { return node.statement; } node = node.statement; @@ -5841,17 +5843,17 @@ var ts; } ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel; function isFunctionBlock(node) { - return node && node.kind === 206 && isFunctionLike(node.parent); + return node && node.kind === 207 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 150 && node.parent.kind === 177; + return node && node.kind === 151 && node.parent.kind === 178; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isObjectLiteralOrClassExpressionMethod(node) { - return node.kind === 150 && - (node.parent.kind === 177 || - node.parent.kind === 198); + return node.kind === 151 && + (node.parent.kind === 178 || + node.parent.kind === 199); } ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod; function isIdentifierTypePredicate(predicate) { @@ -5887,39 +5889,39 @@ var ts; return undefined; } switch (node.kind) { - case 143: + case 144: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 186: + case 187: if (!includeArrowFunctions) { continue; } - case 227: - case 185: - case 232: - case 148: - case 147: - case 150: + case 228: + case 186: + case 233: case 149: + case 148: case 151: + case 150: case 152: case 153: case 154: case 155: case 156: - case 231: - case 264: + case 157: + case 232: + case 265: return node; } } @@ -5929,9 +5931,9 @@ var ts; var container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 151: - case 227: - case 185: + case 152: + case 228: + case 186: return container; } } @@ -5945,25 +5947,25 @@ var ts; return node; } switch (node.kind) { - case 143: + case 144: node = node.parent; break; - case 227: - case 185: + case 228: case 186: + case 187: if (!stopOnFunctions) { continue; } - case 148: - case 147: - case 150: case 149: + case 148: case 151: + case 150: case 152: case 153: + case 154: return node; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { @@ -5975,14 +5977,14 @@ var ts; } ts.getSuperContainer = getSuperContainer; function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 185 || func.kind === 186) { + if (func.kind === 186 || func.kind === 187) { var prev = func; var parent = func.parent; - while (parent.kind === 184) { + while (parent.kind === 185) { prev = parent; parent = parent.parent; } - if (parent.kind === 180 && parent.expression === prev) { + if (parent.kind === 181 && parent.expression === prev) { return parent; } } @@ -5990,21 +5992,21 @@ var ts; ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression; function isSuperProperty(node) { var kind = node.kind; - return (kind === 178 || kind === 179) - && node.expression.kind === 96; + return (kind === 179 || kind === 180) + && node.expression.kind === 97; } ts.isSuperProperty = isSuperProperty; function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 158: - case 276: + case 159: + case 277: return node.typeName; - case 200: + case 201: return isEntityNameExpression(node.expression) ? node.expression : undefined; - case 70: - case 142: + case 71: + case 143: return node; } return undefined; @@ -6012,12 +6014,12 @@ var ts; ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function isCallLikeExpression(node) { switch (node.kind) { + case 251: case 250: - case 249: - case 180: case 181: case 182: - case 146: + case 183: + case 147: return true; default: return false; @@ -6025,7 +6027,7 @@ var ts; } ts.isCallLikeExpression = isCallLikeExpression; function getInvokedExpression(node) { - if (node.kind === 182) { + if (node.kind === 183) { return node.tag; } else if (isJsxOpeningLikeElement(node)) { @@ -6036,21 +6038,21 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 228: + case 229: return true; - case 148: - return node.parent.kind === 228; - case 152: + case 149: + return node.parent.kind === 229; case 153: - case 150: + case 154: + case 151: return node.body !== undefined - && node.parent.kind === 228; - case 145: + && node.parent.kind === 229; + case 146: return node.parent.body !== undefined - && (node.parent.kind === 151 - || node.parent.kind === 150 - || node.parent.kind === 153) - && node.parent.parent.kind === 228; + && (node.parent.kind === 152 + || node.parent.kind === 151 + || node.parent.kind === 154) + && node.parent.parent.kind === 229; } return false; } @@ -6066,19 +6068,19 @@ var ts; ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; function childIsDecorated(node) { switch (node.kind) { - case 228: + case 229: return ts.forEach(node.members, nodeOrChildIsDecorated); - case 150: - case 153: + case 151: + case 154: return ts.forEach(node.parameters, nodeIsDecorated); } } ts.childIsDecorated = childIsDecorated; function isJSXTagName(node) { var parent = node.parent; - if (parent.kind === 250 || - parent.kind === 249 || - parent.kind === 251) { + if (parent.kind === 251 || + parent.kind === 250 || + parent.kind === 252) { return parent.tagName === node; } return false; @@ -6086,99 +6088,99 @@ var ts; ts.isJSXTagName = isJSXTagName; function isPartOfExpression(node) { switch (node.kind) { - case 98: - case 96: - case 94: - case 100: - case 85: - case 11: - case 176: + case 99: + case 97: + case 95: + case 101: + case 86: + case 12: case 177: case 178: case 179: case 180: case 181: case 182: - case 201: case 183: case 202: case 184: + case 203: case 185: - case 198: case 186: - case 189: + case 199: case 187: + case 190: case 188: - case 191: + case 189: case 192: case 193: case 194: - case 197: case 195: - case 12: - case 199: - case 248: - case 249: + case 198: case 196: - case 190: - case 203: + case 13: + case 200: + case 249: + case 250: + case 197: + case 191: + case 204: return true; - case 142: - while (node.parent.kind === 142) { + case 143: + while (node.parent.kind === 143) { node = node.parent; } - return node.parent.kind === 161 || isJSXTagName(node); - case 70: - if (node.parent.kind === 161 || isJSXTagName(node)) { + return node.parent.kind === 162 || isJSXTagName(node); + case 71: + if (node.parent.kind === 162 || isJSXTagName(node)) { return true; } case 8: case 9: - case 98: + case 99: var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 263: - case 260: - case 175: + case 264: + case 261: + case 176: return parent.initializer === node; - case 209: case 210: case 211: case 212: - case 218: + case 213: case 219: case 220: - case 256: - case 222: - case 220: + case 221: + case 257: + case 223: + case 221: return parent.expression === node; - case 213: + case 214: var forStatement = parent; - return (forStatement.initializer === node && forStatement.initializer.kind !== 226) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 227) || forStatement.condition === node || forStatement.incrementor === node; - case 214: case 215: + case 216: var forInStatement = parent; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 227) || forInStatement.expression === node; - case 183: - case 201: + case 184: + case 202: return node === parent.expression; - case 204: + case 205: return node === parent.expression; - case 143: + case 144: return node === parent.expression; - case 146: + case 147: + case 256: case 255: - case 254: - case 262: + case 263: return true; - case 200: + case 201: return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent); default: if (isPartOfExpression(parent)) { @@ -6196,7 +6198,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind === 247; + return node.kind === 237 && node.moduleReference.kind === 248; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -6205,7 +6207,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind !== 247; + return node.kind === 237 && node.moduleReference.kind !== 248; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -6217,18 +6219,18 @@ var ts; } ts.isInJavaScriptFile = isInJavaScriptFile; function isRequireCall(callExpression, checkArgumentIsStringLiteral) { - if (callExpression.kind !== 180) { + if (callExpression.kind !== 181) { return false; } var _a = callExpression, expression = _a.expression, args = _a.arguments; - if (expression.kind !== 70 || expression.text !== "require") { + if (expression.kind !== 71 || expression.text !== "require") { return false; } if (args.length !== 1) { return false; } var arg = args[0]; - return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12; + return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 13; } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -6236,9 +6238,9 @@ var ts; } ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote; function isDeclarationOfFunctionOrClassExpression(s) { - if (s.valueDeclaration && s.valueDeclaration.kind === 225) { + if (s.valueDeclaration && s.valueDeclaration.kind === 226) { var declaration = s.valueDeclaration; - return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198); + return declaration.initializer && (declaration.initializer.kind === 186 || declaration.initializer.kind === 199); } return false; } @@ -6263,11 +6265,11 @@ var ts; return 0; } var expr = expression; - if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) { + if (expr.operatorToken.kind !== 58 || expr.left.kind !== 179) { return 0; } var lhs = expr.left; - if (lhs.expression.kind === 70) { + if (lhs.expression.kind === 71) { var lhsId = lhs.expression; if (lhsId.text === "exports") { return 1; @@ -6279,12 +6281,12 @@ var ts; return 5; } } - else if (lhs.expression.kind === 98) { + else if (lhs.expression.kind === 99) { return 4; } - else if (lhs.expression.kind === 178) { + else if (lhs.expression.kind === 179) { var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 70) { + if (innerPropertyAccess.expression.kind === 71) { var innerPropertyAccessIdentifier = innerPropertyAccess.expression; if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { return 1; @@ -6298,35 +6300,35 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 237) { + if (node.kind === 238) { return node.moduleSpecifier; } - if (node.kind === 236) { + if (node.kind === 237) { var reference = node.moduleReference; - if (reference.kind === 247) { + if (reference.kind === 248) { return reference.expression; } } - if (node.kind === 243) { + if (node.kind === 244) { return node.moduleSpecifier; } - if (node.kind === 232 && node.name.kind === 9) { + if (node.kind === 233 && node.name.kind === 9) { return node.name; } } ts.getExternalModuleName = getExternalModuleName; function getNamespaceDeclarationNode(node) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 240) { return importClause.namedBindings; } } ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode; function isDefaultImport(node) { - return node.kind === 237 + return node.kind === 238 && node.importClause && !!node.importClause.name; } @@ -6334,13 +6336,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 145: + case 146: + case 151: case 150: - case 149: + case 262: case 261: - case 260: + case 149: case 148: - case 147: return node.questionToken !== undefined; } } @@ -6348,9 +6350,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 278 && + return node.kind === 279 && node.parameters.length > 0 && - node.parameters[0].type.kind === 280; + node.parameters[0].type.kind === 281; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getCommentsFromJSDoc(node) { @@ -6358,7 +6360,7 @@ var ts; } ts.getCommentsFromJSDoc = getCommentsFromJSDoc; function hasJSDocParameterTags(node) { - var parameterTags = getJSDocTags(node, 285); + var parameterTags = getJSDocTags(node, 286); return parameterTags && parameterTags.length > 0; } ts.hasJSDocParameterTags = hasJSDocParameterTags; @@ -6368,7 +6370,7 @@ var ts; var result = []; for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) { var doc = docs_1[_i]; - if (doc.kind === 285) { + if (doc.kind === 286) { if (doc.kind === kind) { result.push(doc); } @@ -6397,9 +6399,9 @@ var ts; var parent = node.parent; var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) && parent.initializer === node && - parent.parent.parent.kind === 207; + parent.parent.parent.kind === 208; var isVariableOfVariableDeclarationStatement = isVariableLike(node) && - parent.parent.kind === 207; + parent.parent.kind === 208; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent : isVariableOfVariableDeclarationStatement ? parent.parent : undefined; @@ -6407,19 +6409,19 @@ var ts; getJSDocsWorker(variableStatementNode); } var isSourceOfAssignmentExpressionStatement = parent && parent.parent && - parent.kind === 193 && - parent.operatorToken.kind === 57 && - parent.parent.kind === 209; + parent.kind === 194 && + parent.operatorToken.kind === 58 && + parent.parent.kind === 210; if (isSourceOfAssignmentExpressionStatement) { getJSDocsWorker(parent.parent); } - var isModuleDeclaration = node.kind === 232 && - parent && parent.kind === 232; - var isPropertyAssignmentExpression = parent && parent.kind === 260; + var isModuleDeclaration = node.kind === 233 && + parent && parent.kind === 233; + var isPropertyAssignmentExpression = parent && parent.kind === 261; if (isModuleDeclaration || isPropertyAssignmentExpression) { getJSDocsWorker(parent); } - if (node.kind === 145) { + if (node.kind === 146) { cache = ts.concatenate(cache, getJSDocParameterTags(node)); } if (isVariableLike(node) && node.initializer) { @@ -6434,17 +6436,17 @@ var ts; return undefined; } var func = param.parent; - var tags = getJSDocTags(func, 285); + var tags = getJSDocTags(func, 286); if (!param.name) { var i = func.parameters.indexOf(param); - var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; }); + var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; }); if (paramTags && 0 <= i && i < paramTags.length) { return [paramTags[i]]; } } - else if (param.name.kind === 70) { + else if (param.name.kind === 71) { var name_1 = param.name.text; - return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; }); + return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; }); } else { return undefined; @@ -6452,8 +6454,8 @@ var ts; } ts.getJSDocParameterTags = getJSDocParameterTags; function getJSDocType(node) { - var tag = getFirstJSDocTag(node, 287); - if (!tag && node.kind === 145) { + var tag = getFirstJSDocTag(node, 288); + if (!tag && node.kind === 146) { var paramTags = getJSDocParameterTags(node); if (paramTags) { tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; }); @@ -6463,15 +6465,15 @@ var ts; } ts.getJSDocType = getJSDocType; function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, 284); + return getFirstJSDocTag(node, 285); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, 286); + return getFirstJSDocTag(node, 287); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, 288); + return getFirstJSDocTag(node, 289); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function hasRestParameter(s) { @@ -6484,8 +6486,8 @@ var ts; ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { if (node && (node.flags & 65536)) { - if (node.type && node.type.kind === 279 || - ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) { + if (node.type && node.type.kind === 280 || + ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 280; })) { return true; } } @@ -6506,30 +6508,30 @@ var ts; var parent = node.parent; while (true) { switch (parent.kind) { - case 193: + case 194: var binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? - binaryOperator === 57 ? 1 : 2 : + binaryOperator === 58 ? 1 : 2 : 0; - case 191: case 192: + case 193: var unaryOperator = parent.operator; - return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0; - case 214: + return unaryOperator === 43 || unaryOperator === 44 ? 2 : 0; case 215: + case 216: return parent.initializer === node ? 1 : 0; - case 184: - case 176: - case 197: + case 185: + case 177: + case 198: node = parent; break; - case 261: + case 262: if (parent.name !== node) { return 0; } node = parent.parent; break; - case 260: + case 261: if (parent.name === node) { return 0; } @@ -6547,14 +6549,14 @@ var ts; } ts.isAssignmentTarget = isAssignmentTarget; function isDeleteTarget(node) { - if (node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 179 && node.kind !== 180) { return false; } node = node.parent; - while (node && node.kind === 184) { + while (node && node.kind === 185) { node = node.parent; } - return node && node.kind === 187; + return node && node.kind === 188; } ts.isDeleteTarget = isDeleteTarget; function isNodeDescendantOf(node, ancestor) { @@ -6568,7 +6570,7 @@ var ts; ts.isNodeDescendantOf = isNodeDescendantOf; function isInAmbientContext(node) { while (node) { - if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) { + if (hasModifier(node, 2) || (node.kind === 265 && node.isDeclarationFile)) { return true; } node = node.parent; @@ -6577,11 +6579,11 @@ var ts; } ts.isInAmbientContext = isInAmbientContext; function isDeclarationName(name) { - if (name.kind !== 70 && name.kind !== 9 && name.kind !== 8) { + if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) { return false; } var parent = name.parent; - if (parent.kind === 241 || parent.kind === 245) { + if (parent.kind === 242 || parent.kind === 246) { if (parent.propertyName) { return true; } @@ -6594,48 +6596,48 @@ var ts; ts.isDeclarationName = isDeclarationName; function isLiteralComputedPropertyDeclarationName(node) { return (node.kind === 9 || node.kind === 8) && - node.parent.kind === 143 && + node.parent.kind === 144 && isDeclaration(node.parent.parent); } ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 152: case 153: - case 263: - case 260: - case 178: + case 154: + case 264: + case 261: + case 179: return parent.name === node; - case 142: + case 143: if (parent.right === node) { - while (parent.kind === 142) { + while (parent.kind === 143) { parent = parent.parent; } - return parent.kind === 161; + return parent.kind === 162; } return false; - case 175: - case 241: + case 176: + case 242: return parent.propertyName === node; - case 245: + case 246: return true; } return false; } ts.isIdentifierName = isIdentifierName; function isAliasSymbolDeclaration(node) { - return node.kind === 236 || - node.kind === 235 || - node.kind === 238 && !!node.name || - node.kind === 239 || - node.kind === 241 || - node.kind === 245 || - node.kind === 242 && exportAssignmentIsAlias(node); + return node.kind === 237 || + node.kind === 236 || + node.kind === 239 && !!node.name || + node.kind === 240 || + node.kind === 242 || + node.kind === 246 || + node.kind === 243 && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function exportAssignmentIsAlias(node) { @@ -6643,17 +6645,17 @@ var ts; } ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 107); + var heritageClause = getHeritageClause(node.heritageClauses, 108); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause ? heritageClause.types : undefined; } ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; @@ -6721,7 +6723,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 71 <= token && token <= 141; + return 72 <= token && token <= 142; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -6741,13 +6743,13 @@ var ts; function getFunctionFlags(node) { var flags = 0; switch (node.kind) { - case 227: - case 185: - case 150: + case 228: + case 186: + case 151: if (node.asteriskToken) { flags |= 1; } - case 186: + case 187: if (hasModifier(node, 256)) { flags |= 2; } @@ -6761,10 +6763,10 @@ var ts; ts.getFunctionFlags = getFunctionFlags; function isAsyncFunction(node) { switch (node.kind) { - case 227: - case 185: + case 228: case 186: - case 150: + case 187: + case 151: return node.body !== undefined && node.asteriskToken === undefined && hasModifier(node, 256); @@ -6787,7 +6789,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 143 && + return name.kind === 144 && !isStringOrNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } @@ -6797,10 +6799,10 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) { + if (name.kind === 71 || name.kind === 9 || name.kind === 8 || name.kind === 146) { return name.text; } - if (name.kind === 143) { + if (name.kind === 144) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -6818,7 +6820,7 @@ var ts; } ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; function isESSymbolIdentifier(node) { - return node.kind === 70 && node.text === "Symbol"; + return node.kind === 71 && node.text === "Symbol"; } ts.isESSymbolIdentifier = isESSymbolIdentifier; function isPushOrUnshiftIdentifier(node) { @@ -6827,17 +6829,17 @@ var ts; ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier; function isModifierKind(token) { switch (token) { - case 116: - case 119: - case 75: - case 123: - case 78: - case 83: - case 113: - case 111: - case 112: - case 130: + case 117: + case 120: + case 76: + case 124: + case 79: + case 84: case 114: + case 112: + case 113: + case 131: + case 115: return true; } return false; @@ -6845,11 +6847,11 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 145; + return root.kind === 146; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 175) { + while (node.kind === 176) { node = node.parent.parent; } return node; @@ -6857,15 +6859,15 @@ var ts; ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(node) { var kind = node.kind; - return kind === 151 - || kind === 185 - || kind === 227 + return kind === 152 || kind === 186 - || kind === 150 - || kind === 152 + || kind === 228 + || kind === 187 + || kind === 151 || kind === 153 - || kind === 232 - || kind === 264; + || kind === 154 + || kind === 233 + || kind === 265; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function nodeIsSynthesized(node) { @@ -6874,7 +6876,7 @@ var ts; } ts.nodeIsSynthesized = nodeIsSynthesized; function getOriginalSourceFileOrBundle(sourceFileOrBundle) { - if (sourceFileOrBundle.kind === 265) { + if (sourceFileOrBundle.kind === 266) { return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile)); } return getOriginalSourceFile(sourceFileOrBundle); @@ -6899,38 +6901,38 @@ var ts; })(Associativity = ts.Associativity || (ts.Associativity = {})); function getExpressionAssociativity(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorAssociativity(expression.kind, operator, hasArguments); } ts.getExpressionAssociativity = getExpressionAssociativity; function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 181: + case 182: return hasArguments ? 0 : 1; - case 191: - case 188: + case 192: case 189: - case 187: case 190: - case 194: - case 196: + case 188: + case 191: + case 195: + case 197: return 1; - case 193: + case 194: switch (operator) { - case 39: - case 57: + case 40: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 1; } } @@ -6939,15 +6941,15 @@ var ts; ts.getOperatorAssociativity = getOperatorAssociativity; function getExpressionPrecedence(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorPrecedence(expression.kind, operator, hasArguments); } ts.getExpressionPrecedence = getExpressionPrecedence; function getOperator(expression) { - if (expression.kind === 193) { + if (expression.kind === 194) { return expression.operatorToken.kind; } - else if (expression.kind === 191 || expression.kind === 192) { + else if (expression.kind === 192 || expression.kind === 193) { return expression.operator; } else { @@ -6957,106 +6959,106 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 98: - case 96: - case 70: - case 94: - case 100: - case 85: + case 99: + case 97: + case 71: + case 95: + case 101: + case 86: case 8: case 9: - case 176: case 177: - case 185: + case 178: case 186: - case 198: - case 248: + case 187: + case 199: case 249: - case 11: + case 250: case 12: - case 195: - case 184: - case 199: + case 13: + case 196: + case 185: + case 200: return 19; - case 182: - case 178: + case 183: case 179: + case 180: return 18; - case 181: + case 182: return hasArguments ? 18 : 17; - case 180: + case 181: return 17; - case 192: + case 193: return 16; - case 191: - case 188: + case 192: case 189: - case 187: case 190: + case 188: + case 191: return 15; - case 193: + case 194: switch (operatorKind) { - case 50: case 51: + case 52: return 15; - case 39: - case 38: case 40: + case 39: case 41: + case 42: return 14; - case 36: case 37: + case 38: return 13; - case 44: case 45: case 46: + case 47: return 12; - case 26: - case 29: - case 28: + case 27: case 30: - case 91: + case 29: + case 31: case 92: + case 93: return 11; - case 31: - case 33: case 32: case 34: + case 33: + case 35: return 10; - case 47: + case 48: return 9; - case 49: + case 50: return 8; - case 48: + case 49: return 7; - case 52: - return 6; case 53: + return 6; + case 54: return 5; - case 57: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 3; - case 25: + case 26: return 0; default: return -1; } - case 194: + case 195: return 4; - case 196: - return 2; case 197: + return 2; + case 198: return 1; default: return -1; @@ -7372,7 +7374,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 151 && nodeIsPresent(member.body)) { + if (member.kind === 152 && nodeIsPresent(member.body)) { return member; } }); @@ -7399,11 +7401,11 @@ var ts; } ts.parameterIsThisKeyword = parameterIsThisKeyword; function isThisIdentifier(node) { - return node && node.kind === 70 && identifierIsThisKeyword(node); + return node && node.kind === 71 && identifierIsThisKeyword(node); } ts.isThisIdentifier = isThisIdentifier; function identifierIsThisKeyword(id) { - return id.originalKeywordKind === 98; + return id.originalKeywordKind === 99; } ts.identifierIsThisKeyword = identifierIsThisKeyword; function getAllAccessorDeclarations(declarations, accessor) { @@ -7413,10 +7415,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 152) { + if (accessor.kind === 153) { getAccessor = accessor; } - else if (accessor.kind === 153) { + else if (accessor.kind === 154) { setAccessor = accessor; } else { @@ -7425,7 +7427,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 152 || member.kind === 153) + if ((member.kind === 153 || member.kind === 154) && hasModifier(member, 32) === hasModifier(accessor, 32)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -7436,10 +7438,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 152 && !getAccessor) { + if (member.kind === 153 && !getAccessor) { getAccessor = member; } - if (member.kind === 153 && !setAccessor) { + if (member.kind === 154 && !setAccessor) { setAccessor = member; } } @@ -7622,7 +7624,7 @@ var ts; flags |= modifierToFlag(modifier.kind); } } - if (node.flags & 4 || (node.kind === 70 && node.isInJSDocNamespace)) { + if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) { flags |= 1; } node.modifierFlagsCache = flags | 536870912; @@ -7631,34 +7633,34 @@ var ts; ts.getModifierFlags = getModifierFlags; function modifierToFlag(token) { switch (token) { - case 114: return 32; - case 113: return 4; - case 112: return 16; - case 111: return 8; - case 116: return 128; - case 83: return 1; - case 123: return 2; - case 75: return 2048; - case 78: return 512; - case 119: return 256; - case 130: return 64; + case 115: return 32; + case 114: return 4; + case 113: return 16; + case 112: return 8; + case 117: return 128; + case 84: return 1; + case 124: return 2; + case 76: return 2048; + case 79: return 512; + case 120: return 256; + case 131: return 64; } return 0; } ts.modifierToFlag = modifierToFlag; function isLogicalOperator(token) { - return token === 53 - || token === 52 - || token === 50; + return token === 54 + || token === 53 + || token === 51; } ts.isLogicalOperator = isLogicalOperator; function isAssignmentOperator(token) { - return token >= 57 && token <= 69; + return token >= 58 && token <= 70; } ts.isAssignmentOperator = isAssignmentOperator; function tryGetClassExtendingExpressionWithTypeArguments(node) { - if (node.kind === 200 && - node.parent.token === 84 && + if (node.kind === 201 && + node.parent.token === 85 && isClassLike(node.parent.parent)) { return node.parent.parent; } @@ -7667,7 +7669,7 @@ var ts; function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment - ? node.operatorToken.kind === 57 + ? node.operatorToken.kind === 58 : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } @@ -7675,8 +7677,8 @@ var ts; function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { var kind = node.left.kind; - return kind === 177 - || kind === 176; + return kind === 178 + || kind === 177; } return false; } @@ -7686,7 +7688,7 @@ var ts; } ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 70) { + if (node.kind === 71) { return true; } else if (isPropertyAccessExpression(node)) { @@ -7701,31 +7703,31 @@ var ts; } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; function isExpressionWithTypeArgumentsInClassImplementsClause(node) { - return node.kind === 200 + return node.kind === 201 && isEntityNameExpression(node.expression) && node.parent - && node.parent.token === 107 + && node.parent.token === 108 && node.parent.parent && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause; function isEntityNameExpression(node) { - return node.kind === 70 || - node.kind === 178 && isEntityNameExpression(node.expression); + return node.kind === 71 || + node.kind === 179 && isEntityNameExpression(node.expression); } ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 142 && node.parent.right === node) || - (node.parent.kind === 178 && node.parent.name === node); + return (node.parent.kind === 143 && node.parent.right === node) || + (node.parent.kind === 179 && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteral(expression) { - return expression.kind === 177 && + return expression.kind === 178 && expression.properties.length === 0; } ts.isEmptyObjectLiteral = isEmptyObjectLiteral; function isEmptyArrayLiteral(expression) { - return expression.kind === 176 && + return expression.kind === 177 && expression.elements.length === 0; } ts.isEmptyArrayLiteral = isEmptyArrayLiteral; @@ -7817,49 +7819,49 @@ var ts; var kind = node.kind; if (kind === 9 || kind === 8 - || kind === 11 || kind === 12 - || kind === 70 - || kind === 98 - || kind === 96 - || kind === 100 - || kind === 85 - || kind === 94) { + || kind === 13 + || kind === 71 + || kind === 99 + || kind === 97 + || kind === 101 + || kind === 86 + || kind === 95) { return true; } - else if (kind === 178) { + else if (kind === 179) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 179) { + else if (kind === 180) { return isSimpleExpressionWorker(node.expression, depth + 1) && isSimpleExpressionWorker(node.argumentExpression, depth + 1); } - else if (kind === 191 - || kind === 192) { + else if (kind === 192 + || kind === 193) { return isSimpleExpressionWorker(node.operand, depth + 1); } - else if (kind === 193) { - return node.operatorToken.kind !== 39 + else if (kind === 194) { + return node.operatorToken.kind !== 40 && isSimpleExpressionWorker(node.left, depth + 1) && isSimpleExpressionWorker(node.right, depth + 1); } - else if (kind === 194) { + else if (kind === 195) { return isSimpleExpressionWorker(node.condition, depth + 1) && isSimpleExpressionWorker(node.whenTrue, depth + 1) && isSimpleExpressionWorker(node.whenFalse, depth + 1); } - else if (kind === 189 - || kind === 188 - || kind === 187) { + else if (kind === 190 + || kind === 189 + || kind === 188) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 176) { + else if (kind === 177) { return node.elements.length === 0; } - else if (kind === 177) { + else if (kind === 178) { return node.properties.length === 0; } - else if (kind === 180) { + else if (kind === 181) { if (!isSimpleExpressionWorker(node.expression, depth + 1)) { return false; } @@ -7980,8 +7982,8 @@ var ts; var parseNode = ts.getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 231: case 232: + case 233: return parseNode === parseNode.parent.name; } } @@ -7999,7 +8001,7 @@ var ts; if (node.symbol) { for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 228 && declaration !== node) { + if (declaration.kind === 229 && declaration !== node) { return true; } } @@ -8017,15 +8019,15 @@ var ts; } ts.isNodeArray = isNodeArray; function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 12; + return node.kind === 13; } ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral; function isLiteralKind(kind) { - return 8 <= kind && kind <= 12; + return 8 <= kind && kind <= 13; } ts.isLiteralKind = isLiteralKind; function isTextualLiteralKind(kind) { - return kind === 9 || kind === 12; + return kind === 9 || kind === 13; } ts.isTextualLiteralKind = isTextualLiteralKind; function isLiteralExpression(node) { @@ -8033,25 +8035,25 @@ var ts; } ts.isLiteralExpression = isLiteralExpression; function isTemplateLiteralKind(kind) { - return 12 <= kind && kind <= 15; + return 13 <= kind && kind <= 16; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isTemplateHead(node) { - return node.kind === 13; + return node.kind === 14; } ts.isTemplateHead = isTemplateHead; function isTemplateMiddleOrTemplateTail(node) { var kind = node.kind; - return kind === 14 - || kind === 15; + return kind === 15 + || kind === 16; } ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail; function isIdentifier(node) { - return node.kind === 70; + return node.kind === 71; } ts.isIdentifier = isIdentifier; function isVoidExpression(node) { - return node.kind === 189; + return node.kind === 190; } ts.isVoidExpression = isVoidExpression; function isGeneratedIdentifier(node) { @@ -8063,135 +8065,135 @@ var ts; } ts.isModifier = isModifier; function isQualifiedName(node) { - return node.kind === 142; + return node.kind === 143; } ts.isQualifiedName = isQualifiedName; function isComputedPropertyName(node) { - return node.kind === 143; + return node.kind === 144; } ts.isComputedPropertyName = isComputedPropertyName; function isEntityName(node) { var kind = node.kind; - return kind === 142 - || kind === 70; + return kind === 143 + || kind === 71; } ts.isEntityName = isEntityName; function isPropertyName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9 || kind === 8 - || kind === 143; + || kind === 144; } ts.isPropertyName = isPropertyName; function isModuleName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9; } ts.isModuleName = isModuleName; function isBindingName(node) { var kind = node.kind; - return kind === 70 - || kind === 173 - || kind === 174; + return kind === 71 + || kind === 174 + || kind === 175; } ts.isBindingName = isBindingName; function isTypeParameter(node) { - return node.kind === 144; + return node.kind === 145; } ts.isTypeParameter = isTypeParameter; function isParameter(node) { - return node.kind === 145; + return node.kind === 146; } ts.isParameter = isParameter; function isDecorator(node) { - return node.kind === 146; + return node.kind === 147; } ts.isDecorator = isDecorator; function isMethodDeclaration(node) { - return node.kind === 150; + return node.kind === 151; } ts.isMethodDeclaration = isMethodDeclaration; function isClassElement(node) { var kind = node.kind; - return kind === 151 - || kind === 148 - || kind === 150 - || kind === 152 + return kind === 152 + || kind === 149 + || kind === 151 || kind === 153 - || kind === 156 - || kind === 205; + || kind === 154 + || kind === 157 + || kind === 206; } ts.isClassElement = isClassElement; function isObjectLiteralElementLike(node) { var kind = node.kind; - return kind === 260 - || kind === 261 + return kind === 261 || kind === 262 - || kind === 150 - || kind === 152 + || kind === 263 + || kind === 151 || kind === 153 - || kind === 246; + || kind === 154 + || kind === 247; } ts.isObjectLiteralElementLike = isObjectLiteralElementLike; function isTypeNodeKind(kind) { - return (kind >= 157 && kind <= 172) - || kind === 118 - || kind === 132 + return (kind >= 158 && kind <= 173) + || kind === 119 || kind === 133 - || kind === 121 - || kind === 135 + || kind === 134 + || kind === 122 || kind === 136 - || kind === 98 - || kind === 104 - || kind === 138 - || kind === 94 - || kind === 129 - || kind === 200; + || kind === 137 + || kind === 99 + || kind === 105 + || kind === 139 + || kind === 95 + || kind === 130 + || kind === 201; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } ts.isTypeNode = isTypeNode; function isArrayBindingPattern(node) { - return node.kind === 174; + return node.kind === 175; } ts.isArrayBindingPattern = isArrayBindingPattern; function isObjectBindingPattern(node) { - return node.kind === 173; + return node.kind === 174; } ts.isObjectBindingPattern = isObjectBindingPattern; function isBindingPattern(node) { if (node) { var kind = node.kind; - return kind === 174 - || kind === 173; + return kind === 175 + || kind === 174; } return false; } ts.isBindingPattern = isBindingPattern; function isAssignmentPattern(node) { var kind = node.kind; - return kind === 176 - || kind === 177; + return kind === 177 + || kind === 178; } ts.isAssignmentPattern = isAssignmentPattern; function isBindingElement(node) { - return node.kind === 175; + return node.kind === 176; } ts.isBindingElement = isBindingElement; function isArrayBindingElement(node) { var kind = node.kind; - return kind === 175 - || kind === 199; + return kind === 176 + || kind === 200; } ts.isArrayBindingElement = isArrayBindingElement; function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 225: - case 145: - case 175: + case 226: + case 146: + case 176: return true; } return false; @@ -8204,8 +8206,8 @@ var ts; ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern; function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 173: - case 177: + case 174: + case 178: return true; } return false; @@ -8213,100 +8215,100 @@ var ts; ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern; function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: + case 175: + case 177: return true; } return false; } ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern; function isArrayLiteralExpression(node) { - return node.kind === 176; + return node.kind === 177; } ts.isArrayLiteralExpression = isArrayLiteralExpression; function isObjectLiteralExpression(node) { - return node.kind === 177; + return node.kind === 178; } ts.isObjectLiteralExpression = isObjectLiteralExpression; function isPropertyAccessExpression(node) { - return node.kind === 178; + return node.kind === 179; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isPropertyAccessOrQualifiedName(node) { var kind = node.kind; - return kind === 178 - || kind === 142; + return kind === 179 + || kind === 143; } ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName; function isElementAccessExpression(node) { - return node.kind === 179; + return node.kind === 180; } ts.isElementAccessExpression = isElementAccessExpression; function isBinaryExpression(node) { - return node.kind === 193; + return node.kind === 194; } ts.isBinaryExpression = isBinaryExpression; function isConditionalExpression(node) { - return node.kind === 194; + return node.kind === 195; } ts.isConditionalExpression = isConditionalExpression; function isCallExpression(node) { - return node.kind === 180; + return node.kind === 181; } ts.isCallExpression = isCallExpression; function isTemplateLiteral(node) { var kind = node.kind; - return kind === 195 - || kind === 12; + return kind === 196 + || kind === 13; } ts.isTemplateLiteral = isTemplateLiteral; function isSpreadExpression(node) { - return node.kind === 197; + return node.kind === 198; } ts.isSpreadExpression = isSpreadExpression; function isExpressionWithTypeArguments(node) { - return node.kind === 200; + return node.kind === 201; } ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments; function isLeftHandSideExpressionKind(kind) { - return kind === 178 - || kind === 179 - || kind === 181 + return kind === 179 || kind === 180 - || kind === 248 - || kind === 249 || kind === 182 - || kind === 176 - || kind === 184 + || kind === 181 + || kind === 249 + || kind === 250 + || kind === 183 || kind === 177 - || kind === 198 || kind === 185 - || kind === 70 - || kind === 11 + || kind === 178 + || kind === 199 + || kind === 186 + || kind === 71 + || kind === 12 || kind === 8 || kind === 9 - || kind === 12 - || kind === 195 - || kind === 85 - || kind === 94 - || kind === 98 - || kind === 100 - || kind === 96 - || kind === 202 - || kind === 203; + || kind === 13 + || kind === 196 + || kind === 86 + || kind === 95 + || kind === 99 + || kind === 101 + || kind === 97 + || kind === 203 + || kind === 204; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind); } ts.isLeftHandSideExpression = isLeftHandSideExpression; function isUnaryExpressionKind(kind) { - return kind === 191 - || kind === 192 - || kind === 187 + return kind === 192 + || kind === 193 || kind === 188 || kind === 189 || kind === 190 - || kind === 183 + || kind === 191 + || kind === 184 || isLeftHandSideExpressionKind(kind); } function isUnaryExpression(node) { @@ -8314,13 +8316,13 @@ var ts; } ts.isUnaryExpression = isUnaryExpression; function isExpressionKind(kind) { - return kind === 194 - || kind === 196 - || kind === 186 - || kind === 193 + return kind === 195 || kind === 197 - || kind === 201 - || kind === 199 + || kind === 187 + || kind === 194 + || kind === 198 + || kind === 202 + || kind === 200 || isUnaryExpressionKind(kind); } function isExpression(node) { @@ -8329,16 +8331,16 @@ var ts; ts.isExpression = isExpression; function isAssertionExpression(node) { var kind = node.kind; - return kind === 183 - || kind === 201; + return kind === 184 + || kind === 202; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 295; + return node.kind === 296; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 294; + return node.kind === 295; } ts.isNotEmittedStatement = isNotEmittedStatement; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -8347,15 +8349,15 @@ var ts; } ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode; function isOmittedExpression(node) { - return node.kind === 199; + return node.kind === 200; } ts.isOmittedExpression = isOmittedExpression; function isTemplateSpan(node) { - return node.kind === 204; + return node.kind === 205; } ts.isTemplateSpan = isTemplateSpan; function isBlock(node) { - return node.kind === 206; + return node.kind === 207; } ts.isBlock = isBlock; function isConciseBody(node) { @@ -8373,135 +8375,135 @@ var ts; } ts.isForInitializer = isForInitializer; function isVariableDeclaration(node) { - return node.kind === 225; + return node.kind === 226; } ts.isVariableDeclaration = isVariableDeclaration; function isVariableDeclarationList(node) { - return node.kind === 226; + return node.kind === 227; } ts.isVariableDeclarationList = isVariableDeclarationList; function isCaseBlock(node) { - return node.kind === 234; + return node.kind === 235; } ts.isCaseBlock = isCaseBlock; function isModuleBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232 - || kind === 70; + return kind === 234 + || kind === 233 + || kind === 71; } ts.isModuleBody = isModuleBody; function isNamespaceBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232; + return kind === 234 + || kind === 233; } ts.isNamespaceBody = isNamespaceBody; function isJSDocNamespaceBody(node) { var kind = node.kind; - return kind === 70 - || kind === 232; + return kind === 71 + || kind === 233; } ts.isJSDocNamespaceBody = isJSDocNamespaceBody; function isImportEqualsDeclaration(node) { - return node.kind === 236; + return node.kind === 237; } ts.isImportEqualsDeclaration = isImportEqualsDeclaration; function isImportClause(node) { - return node.kind === 238; + return node.kind === 239; } ts.isImportClause = isImportClause; function isNamedImportBindings(node) { var kind = node.kind; - return kind === 240 - || kind === 239; + return kind === 241 + || kind === 240; } ts.isNamedImportBindings = isNamedImportBindings; function isImportSpecifier(node) { - return node.kind === 241; + return node.kind === 242; } ts.isImportSpecifier = isImportSpecifier; function isNamedExports(node) { - return node.kind === 244; + return node.kind === 245; } ts.isNamedExports = isNamedExports; function isExportSpecifier(node) { - return node.kind === 245; + return node.kind === 246; } ts.isExportSpecifier = isExportSpecifier; function isModuleOrEnumDeclaration(node) { - return node.kind === 232 || node.kind === 231; + return node.kind === 233 || node.kind === 232; } ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration; function isDeclarationKind(kind) { - return kind === 186 - || kind === 175 + return kind === 187 + || kind === 176 + || kind === 229 + || kind === 199 + || kind === 152 + || kind === 232 + || kind === 264 + || kind === 246 || kind === 228 - || kind === 198 + || kind === 186 + || kind === 153 + || kind === 239 + || kind === 237 + || kind === 242 + || kind === 230 + || kind === 253 || kind === 151 - || kind === 231 - || kind === 263 - || kind === 245 - || kind === 227 - || kind === 185 - || kind === 152 - || kind === 238 - || kind === 236 - || kind === 241 - || kind === 229 - || kind === 252 || kind === 150 + || kind === 233 + || kind === 236 + || kind === 240 + || kind === 146 + || kind === 261 || kind === 149 - || kind === 232 - || kind === 235 - || kind === 239 - || kind === 145 - || kind === 260 || kind === 148 - || kind === 147 - || kind === 153 - || kind === 261 - || kind === 230 - || kind === 144 - || kind === 225 - || kind === 289; + || kind === 154 + || kind === 262 + || kind === 231 + || kind === 145 + || kind === 226 + || kind === 290; } function isDeclarationStatementKind(kind) { - return kind === 227 - || kind === 246 - || kind === 228 + return kind === 228 + || kind === 247 || kind === 229 || kind === 230 || kind === 231 || kind === 232 + || kind === 233 + || kind === 238 || kind === 237 - || kind === 236 + || kind === 244 || kind === 243 - || kind === 242 - || kind === 235; + || kind === 236; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 217 + return kind === 218 + || kind === 217 + || kind === 225 + || kind === 212 + || kind === 210 + || kind === 209 + || kind === 215 || kind === 216 - || kind === 224 + || kind === 214 || kind === 211 - || kind === 209 + || kind === 222 + || kind === 219 + || kind === 221 + || kind === 223 + || kind === 224 || kind === 208 - || kind === 214 - || kind === 215 || kind === 213 - || kind === 210 - || kind === 221 - || kind === 218 || kind === 220 - || kind === 222 - || kind === 223 - || kind === 207 - || kind === 212 - || kind === 219 - || kind === 294 - || kind === 297 - || kind === 296; + || kind === 295 + || kind === 298 + || kind === 297; } function isDeclaration(node) { return isDeclarationKind(node.kind); @@ -8519,98 +8521,98 @@ var ts; var kind = node.kind; return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) - || kind === 206; + || kind === 207; } ts.isStatement = isStatement; function isModuleReference(node) { var kind = node.kind; - return kind === 247 - || kind === 142 - || kind === 70; + return kind === 248 + || kind === 143 + || kind === 71; } ts.isModuleReference = isModuleReference; function isJsxOpeningElement(node) { - return node.kind === 250; + return node.kind === 251; } ts.isJsxOpeningElement = isJsxOpeningElement; function isJsxClosingElement(node) { - return node.kind === 251; + return node.kind === 252; } ts.isJsxClosingElement = isJsxClosingElement; function isJsxTagNameExpression(node) { var kind = node.kind; - return kind === 98 - || kind === 70 - || kind === 178; + return kind === 99 + || kind === 71 + || kind === 179; } ts.isJsxTagNameExpression = isJsxTagNameExpression; function isJsxChild(node) { var kind = node.kind; - return kind === 248 - || kind === 255 - || kind === 249 + return kind === 249 + || kind === 256 + || kind === 250 || kind === 10; } ts.isJsxChild = isJsxChild; function isJsxAttributes(node) { var kind = node.kind; - return kind === 253; + return kind === 254; } ts.isJsxAttributes = isJsxAttributes; function isJsxAttributeLike(node) { var kind = node.kind; - return kind === 252 - || kind === 254; + return kind === 253 + || kind === 255; } ts.isJsxAttributeLike = isJsxAttributeLike; function isJsxSpreadAttribute(node) { - return node.kind === 254; + return node.kind === 255; } ts.isJsxSpreadAttribute = isJsxSpreadAttribute; function isJsxAttribute(node) { - return node.kind === 252; + return node.kind === 253; } ts.isJsxAttribute = isJsxAttribute; function isStringLiteralOrJsxExpression(node) { var kind = node.kind; return kind === 9 - || kind === 255; + || kind === 256; } ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression; function isJsxOpeningLikeElement(node) { var kind = node.kind; - return kind === 250 - || kind === 249; + return kind === 251 + || kind === 250; } ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement; function isCaseOrDefaultClause(node) { var kind = node.kind; - return kind === 256 - || kind === 257; + return kind === 257 + || kind === 258; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isHeritageClause(node) { - return node.kind === 258; + return node.kind === 259; } ts.isHeritageClause = isHeritageClause; function isCatchClause(node) { - return node.kind === 259; + return node.kind === 260; } ts.isCatchClause = isCatchClause; function isPropertyAssignment(node) { - return node.kind === 260; + return node.kind === 261; } ts.isPropertyAssignment = isPropertyAssignment; function isShorthandPropertyAssignment(node) { - return node.kind === 261; + return node.kind === 262; } ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment; function isEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } ts.isEnumMember = isEnumMember; function isSourceFile(node) { - return node.kind === 264; + return node.kind === 265; } ts.isSourceFile = isSourceFile; function isWatchSet(options) { @@ -8750,9 +8752,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 144) { + if (d && d.kind === 145) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) { return current; } } @@ -8760,11 +8762,11 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent); + return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 175 || ts.isBindingPattern(node))) { + while (node && (node.kind === 176 || ts.isBindingPattern(node))) { node = node.parent; } return node; @@ -8772,14 +8774,14 @@ var ts; function getCombinedModifierFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = ts.getModifierFlags(node); - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= ts.getModifierFlags(node); node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= ts.getModifierFlags(node); } return flags; @@ -8788,14 +8790,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= node.flags; } return flags; @@ -8880,135 +8882,135 @@ var ts; var ts; (function (ts) { function tokenIsIdentifierOrKeyword(token) { - return token >= 70; + return token >= 71; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116, - "any": 118, - "as": 117, - "boolean": 121, - "break": 71, - "case": 72, - "catch": 73, - "class": 74, - "continue": 76, - "const": 75, - "constructor": 122, - "debugger": 77, - "declare": 123, - "default": 78, - "delete": 79, - "do": 80, - "else": 81, - "enum": 82, - "export": 83, - "extends": 84, - "false": 85, - "finally": 86, - "for": 87, - "from": 139, - "function": 88, - "get": 124, - "if": 89, - "implements": 107, - "import": 90, - "in": 91, - "instanceof": 92, - "interface": 108, - "is": 125, - "keyof": 126, - "let": 109, - "module": 127, - "namespace": 128, - "never": 129, - "new": 93, - "null": 94, - "number": 132, - "object": 133, - "package": 110, - "private": 111, - "protected": 112, - "public": 113, - "readonly": 130, - "require": 131, - "global": 140, - "return": 95, - "set": 134, - "static": 114, - "string": 135, - "super": 96, - "switch": 97, - "symbol": 136, - "this": 98, - "throw": 99, - "true": 100, - "try": 101, - "type": 137, - "typeof": 102, - "undefined": 138, - "var": 103, - "void": 104, - "while": 105, - "with": 106, - "yield": 115, - "async": 119, - "await": 120, - "of": 141, - "{": 16, - "}": 17, - "(": 18, - ")": 19, - "[": 20, - "]": 21, - ".": 22, - "...": 23, - ";": 24, - ",": 25, - "<": 26, - ">": 28, - "<=": 29, - ">=": 30, - "==": 31, - "!=": 32, - "===": 33, - "!==": 34, - "=>": 35, - "+": 36, - "-": 37, - "**": 39, - "*": 38, - "/": 40, - "%": 41, - "++": 42, - "--": 43, - "<<": 44, - ">": 45, - ">>>": 46, - "&": 47, - "|": 48, - "^": 49, - "!": 50, - "~": 51, - "&&": 52, - "||": 53, - "?": 54, - ":": 55, - "=": 57, - "+=": 58, - "-=": 59, - "*=": 60, - "**=": 61, - "/=": 62, - "%=": 63, - "<<=": 64, - ">>=": 65, - ">>>=": 66, - "&=": 67, - "|=": 68, - "^=": 69, - "@": 56, + "abstract": 117, + "any": 119, + "as": 118, + "boolean": 122, + "break": 72, + "case": 73, + "catch": 74, + "class": 75, + "continue": 77, + "const": 76, + "constructor": 123, + "debugger": 78, + "declare": 124, + "default": 79, + "delete": 80, + "do": 81, + "else": 82, + "enum": 83, + "export": 84, + "extends": 85, + "false": 86, + "finally": 87, + "for": 88, + "from": 140, + "function": 89, + "get": 125, + "if": 90, + "implements": 108, + "import": 91, + "in": 92, + "instanceof": 93, + "interface": 109, + "is": 126, + "keyof": 127, + "let": 110, + "module": 128, + "namespace": 129, + "never": 130, + "new": 94, + "null": 95, + "number": 133, + "object": 134, + "package": 111, + "private": 112, + "protected": 113, + "public": 114, + "readonly": 131, + "require": 132, + "global": 141, + "return": 96, + "set": 135, + "static": 115, + "string": 136, + "super": 97, + "switch": 98, + "symbol": 137, + "this": 99, + "throw": 100, + "true": 101, + "try": 102, + "type": 138, + "typeof": 103, + "undefined": 139, + "var": 104, + "void": 105, + "while": 106, + "with": 107, + "yield": 116, + "async": 120, + "await": 121, + "of": 142, + "{": 17, + "}": 18, + "(": 19, + ")": 20, + "[": 21, + "]": 22, + ".": 23, + "...": 24, + ";": 25, + ",": 26, + "<": 27, + ">": 29, + "<=": 30, + ">=": 31, + "==": 32, + "!=": 33, + "===": 34, + "!==": 35, + "=>": 36, + "+": 37, + "-": 38, + "**": 40, + "*": 39, + "/": 41, + "%": 42, + "++": 43, + "--": 44, + "<<": 45, + ">": 46, + ">>>": 47, + "&": 48, + "|": 49, + "^": 50, + "!": 51, + "~": 52, + "&&": 53, + "||": 54, + "?": 55, + ":": 56, + "=": 58, + "+=": 59, + "-=": 60, + "*=": 61, + "**=": 62, + "/=": 63, + "%=": 64, + "<<=": 65, + ">>=": 66, + ">>>=": 67, + "&=": 68, + "|=": 69, + "^=": 70, + "@": 57, }); var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 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, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 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, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 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, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 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, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; @@ -9120,10 +9122,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; function isWhiteSpaceSingleLine(ch) { return ch === 32 || ch === 9 || @@ -9239,7 +9241,7 @@ var ts; } break; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -9373,7 +9375,7 @@ var ts; } break scan; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -9471,8 +9473,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 || token > 106; }, - isReservedWord: function () { return token >= 71 && token <= 106; }, + isIdentifier: function () { return token === 71 || token > 107; }, + isReservedWord: function () { return token >= 72 && token <= 107; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -9610,20 +9612,20 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } var currChar = text.charCodeAt(pos); if (currChar === 96) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 : 14; + resultingToken = startedWithBacktick ? 14 : 15; break; } if (currChar === 92) { @@ -9788,7 +9790,7 @@ var ts; } } } - return token = 70; + return token = 71; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -9864,12 +9866,12 @@ var ts; case 33: if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 34; + return pos += 3, token = 35; } - return pos += 2, token = 32; + return pos += 2, token = 33; } pos++; - return token = 50; + return token = 51; case 34: case 39: tokenValue = scanString(); @@ -9878,68 +9880,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 63; + return pos += 2, token = 64; } pos++; - return token = 41; + return token = 42; case 38: if (text.charCodeAt(pos + 1) === 38) { - return pos += 2, token = 52; + return pos += 2, token = 53; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 67; + return pos += 2, token = 68; } pos++; - return token = 47; + return token = 48; case 40: pos++; - return token = 18; + return token = 19; case 41: pos++; - return token = 19; + return token = 20; case 42: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 60; + return pos += 2, token = 61; } if (text.charCodeAt(pos + 1) === 42) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 61; + return pos += 3, token = 62; } - return pos += 2, token = 39; + return pos += 2, token = 40; } pos++; - return token = 38; + return token = 39; case 43: if (text.charCodeAt(pos + 1) === 43) { - return pos += 2, token = 42; + return pos += 2, token = 43; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 58; + return pos += 2, token = 59; } pos++; - return token = 36; + return token = 37; case 44: pos++; - return token = 25; + return token = 26; case 45: if (text.charCodeAt(pos + 1) === 45) { - return pos += 2, token = 43; + return pos += 2, token = 44; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 59; + return pos += 2, token = 60; } pos++; - return token = 37; + return token = 38; case 46: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { - return pos += 3, token = 23; + return pos += 3, token = 24; } pos++; - return token = 22; + return token = 23; case 47: if (text.charCodeAt(pos + 1) === 47) { pos += 2; @@ -9983,10 +9985,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 62; + return pos += 2, token = 63; } pos++; - return token = 40; + return token = 41; case 48: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; @@ -10039,10 +10041,10 @@ var ts; return token = 8; case 58: pos++; - return token = 55; + return token = 56; case 59: pos++; - return token = 24; + return token = 25; case 60: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -10055,20 +10057,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 64; + return pos += 3, token = 65; } - return pos += 2, token = 44; + return pos += 2, token = 45; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 29; + return pos += 2, token = 30; } if (languageVariant === 1 && text.charCodeAt(pos + 1) === 47 && text.charCodeAt(pos + 2) !== 42) { - return pos += 2, token = 27; + return pos += 2, token = 28; } pos++; - return token = 26; + return token = 27; case 61: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -10081,15 +10083,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 33; + return pos += 3, token = 34; } - return pos += 2, token = 31; + return pos += 2, token = 32; } if (text.charCodeAt(pos + 1) === 62) { - return pos += 2, token = 35; + return pos += 2, token = 36; } pos++; - return token = 57; + return token = 58; case 62: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -10101,43 +10103,43 @@ var ts; } } pos++; - return token = 28; + return token = 29; case 63: pos++; - return token = 54; + return token = 55; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 94: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 69; + return pos += 2, token = 70; } pos++; - return token = 49; + return token = 50; case 123: pos++; - return token = 16; + return token = 17; case 124: if (text.charCodeAt(pos + 1) === 124) { - return pos += 2, token = 53; + return pos += 2, token = 54; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 68; + return pos += 2, token = 69; } pos++; - return token = 48; + return token = 49; case 125: pos++; - return token = 17; + return token = 18; case 126: pos++; - return token = 51; + return token = 52; case 64: pos++; - return token = 56; + return token = 57; case 92: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -10175,29 +10177,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28) { + if (token === 29) { if (text.charCodeAt(pos) === 62) { if (text.charCodeAt(pos + 1) === 62) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 66; + return pos += 3, token = 67; } - return pos += 2, token = 46; + return pos += 2, token = 47; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 65; + return pos += 2, token = 66; } pos++; - return token = 45; + return token = 46; } if (text.charCodeAt(pos) === 61) { pos++; - return token = 30; + return token = 31; } } return token; } function reScanSlashToken() { - if (token === 40 || token === 62) { + if (token === 41 || token === 63) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -10236,12 +10238,12 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11; + token = 12; } return token; } function reScanTemplateToken() { - ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -10258,17 +10260,17 @@ var ts; if (char === 60) { if (text.charCodeAt(pos + 1) === 47) { pos += 2; - return token = 27; + return token = 28; } pos++; - return token = 26; + return token = 27; } if (char === 123) { pos++; - return token = 16; + return token = 17; } + var firstNonWhitespace = 0; while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123) { break; @@ -10280,8 +10282,15 @@ var ts; } break; } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10; + return firstNonWhitespace === -1 ? 11 : 10; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -10328,42 +10337,42 @@ var ts; return token = 5; case 64: pos++; - return token = 56; + return token = 57; case 10: case 13: pos++; return token = 4; case 42: pos++; - return token = 38; + return token = 39; case 123: pos++; - return token = 16; + return token = 17; case 125: pos++; - return token = 17; + return token = 18; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 61: pos++; - return token = 57; + return token = 58; case 44: pos++; - return token = 25; + return token = 26; case 46: pos++; - return token = 22; + return token = 23; } if (isIdentifierStart(ch, 5)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) { pos++; } - return token = 70; + return token = 71; } else { return pos += 1, token = 0; @@ -10526,7 +10535,7 @@ var ts; return node; } function createIdentifier(text) { - var node = createSynthesizedNode(70); + var node = createSynthesizedNode(71); node.text = ts.escapeIdentifier(text); node.originalKeywordKind = text ? ts.stringToToken(text) : 0; node.autoGenerateKind = 0; @@ -10576,27 +10585,27 @@ var ts; } ts.createToken = createToken; function createSuper() { - return createSynthesizedNode(96); + return createSynthesizedNode(97); } ts.createSuper = createSuper; function createThis() { - return createSynthesizedNode(98); + return createSynthesizedNode(99); } ts.createThis = createThis; function createNull() { - return createSynthesizedNode(94); + return createSynthesizedNode(95); } ts.createNull = createNull; function createTrue() { - return createSynthesizedNode(100); + return createSynthesizedNode(101); } ts.createTrue = createTrue; function createFalse() { - return createSynthesizedNode(85); + return createSynthesizedNode(86); } ts.createFalse = createFalse; function createQualifiedName(left, right) { - var node = createSynthesizedNode(142); + var node = createSynthesizedNode(143); node.left = left; node.right = asName(right); return node; @@ -10610,7 +10619,7 @@ var ts; } ts.updateQualifiedName = updateQualifiedName; function createComputedPropertyName(expression) { - var node = createSynthesizedNode(143); + var node = createSynthesizedNode(144); node.expression = expression; return node; } @@ -10637,7 +10646,7 @@ var ts; : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(159, typeParameters, parameters, type); + return createSignatureDeclaration(160, typeParameters, parameters, type); } ts.createFunctionTypeNode = createFunctionTypeNode; function updateFunctionTypeNode(node, typeParameters, parameters, type) { @@ -10645,7 +10654,7 @@ var ts; } ts.updateFunctionTypeNode = updateFunctionTypeNode; function createConstructorTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(160, typeParameters, parameters, type); + return createSignatureDeclaration(161, typeParameters, parameters, type); } ts.createConstructorTypeNode = createConstructorTypeNode; function updateConstructorTypeNode(node, typeParameters, parameters, type) { @@ -10653,7 +10662,7 @@ var ts; } ts.updateConstructorTypeNode = updateConstructorTypeNode; function createCallSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(154, typeParameters, parameters, type); + return createSignatureDeclaration(155, typeParameters, parameters, type); } ts.createCallSignatureDeclaration = createCallSignatureDeclaration; function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { @@ -10661,7 +10670,7 @@ var ts; } ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration; function createConstructSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(155, typeParameters, parameters, type); + return createSignatureDeclaration(156, typeParameters, parameters, type); } ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration; function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { @@ -10669,7 +10678,7 @@ var ts; } ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration; function createMethodSignature(typeParameters, parameters, type, name, questionToken) { - var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type); + var methodSignature = createSignatureDeclaration(150, typeParameters, parameters, type); methodSignature.name = asName(name); methodSignature.questionToken = questionToken; return methodSignature; @@ -10690,11 +10699,11 @@ var ts; } ts.createKeywordTypeNode = createKeywordTypeNode; function createThisTypeNode() { - return createSynthesizedNode(168); + return createSynthesizedNode(169); } ts.createThisTypeNode = createThisTypeNode; function createLiteralTypeNode(literal) { - var literalTypeNode = createSynthesizedNode(172); + var literalTypeNode = createSynthesizedNode(173); literalTypeNode.literal = literal; return literalTypeNode; } @@ -10706,7 +10715,7 @@ var ts; } ts.updateLiteralTypeNode = updateLiteralTypeNode; function createTypeReferenceNode(typeName, typeArguments) { - var typeReference = createSynthesizedNode(158); + var typeReference = createSynthesizedNode(159); typeReference.typeName = asName(typeName); typeReference.typeArguments = asNodeArray(typeArguments); return typeReference; @@ -10720,7 +10729,7 @@ var ts; } ts.updateTypeReferenceNode = updateTypeReferenceNode; function createTypePredicateNode(parameterName, type) { - var typePredicateNode = createSynthesizedNode(157); + var typePredicateNode = createSynthesizedNode(158); typePredicateNode.parameterName = asName(parameterName); typePredicateNode.type = type; return typePredicateNode; @@ -10734,7 +10743,7 @@ var ts; } ts.updateTypePredicateNode = updateTypePredicateNode; function createTypeQueryNode(exprName) { - var typeQueryNode = createSynthesizedNode(161); + var typeQueryNode = createSynthesizedNode(162); typeQueryNode.exprName = exprName; return typeQueryNode; } @@ -10744,7 +10753,7 @@ var ts; } ts.updateTypeQueryNode = updateTypeQueryNode; function createArrayTypeNode(elementType) { - var arrayTypeNode = createSynthesizedNode(163); + var arrayTypeNode = createSynthesizedNode(164); arrayTypeNode.elementType = elementType; return arrayTypeNode; } @@ -10768,7 +10777,7 @@ var ts; } ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode; function createTypeLiteralNode(members) { - var typeLiteralNode = createSynthesizedNode(162); + var typeLiteralNode = createSynthesizedNode(163); typeLiteralNode.members = createNodeArray(members); return typeLiteralNode; } @@ -10780,7 +10789,7 @@ var ts; } ts.updateTypeLiteralNode = updateTypeLiteralNode; function createTupleTypeNode(elementTypes) { - var tupleTypeNode = createSynthesizedNode(164); + var tupleTypeNode = createSynthesizedNode(165); tupleTypeNode.elementTypes = createNodeArray(elementTypes); return tupleTypeNode; } @@ -10792,7 +10801,7 @@ var ts; } ts.updateTypleTypeNode = updateTypleTypeNode; function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) { - var mappedTypeNode = createSynthesizedNode(171); + var mappedTypeNode = createSynthesizedNode(172); mappedTypeNode.readonlyToken = readonlyToken; mappedTypeNode.typeParameter = typeParameter; mappedTypeNode.questionToken = questionToken; @@ -10810,8 +10819,8 @@ var ts; } ts.updateMappedTypeNode = updateMappedTypeNode; function createTypeOperatorNode(type) { - var typeOperatorNode = createSynthesizedNode(169); - typeOperatorNode.operator = 126; + var typeOperatorNode = createSynthesizedNode(170); + typeOperatorNode.operator = 127; typeOperatorNode.type = type; return typeOperatorNode; } @@ -10821,7 +10830,7 @@ var ts; } ts.updateTypeOperatorNode = updateTypeOperatorNode; function createIndexedAccessTypeNode(objectType, indexType) { - var indexedAccessTypeNode = createSynthesizedNode(170); + var indexedAccessTypeNode = createSynthesizedNode(171); indexedAccessTypeNode.objectType = objectType; indexedAccessTypeNode.indexType = indexType; return indexedAccessTypeNode; @@ -10835,7 +10844,7 @@ var ts; } ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode; function createTypeParameterDeclaration(name, constraint, defaultType) { - var typeParameter = createSynthesizedNode(144); + var typeParameter = createSynthesizedNode(145); typeParameter.name = asName(name); typeParameter.constraint = constraint; typeParameter.default = defaultType; @@ -10851,7 +10860,7 @@ var ts; } ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration; function createPropertySignature(name, questionToken, type, initializer) { - var propertySignature = createSynthesizedNode(147); + var propertySignature = createSynthesizedNode(148); propertySignature.name = asName(name); propertySignature.questionToken = questionToken; propertySignature.type = type; @@ -10869,7 +10878,7 @@ var ts; } ts.updatePropertySignature = updatePropertySignature; function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) { - var indexSignature = createSynthesizedNode(156); + var indexSignature = createSynthesizedNode(157); indexSignature.decorators = asNodeArray(decorators); indexSignature.modifiers = asNodeArray(modifiers); indexSignature.parameters = createNodeArray(parameters); @@ -10887,7 +10896,7 @@ var ts; } ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration; function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - var node = createSynthesizedNode(145); + var node = createSynthesizedNode(146); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; @@ -10911,7 +10920,7 @@ var ts; } ts.updateParameter = updateParameter; function createDecorator(expression) { - var node = createSynthesizedNode(146); + var node = createSynthesizedNode(147); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -10923,7 +10932,7 @@ var ts; } ts.updateDecorator = updateDecorator; function createProperty(decorators, modifiers, name, questionToken, type, initializer) { - var node = createSynthesizedNode(148); + var node = createSynthesizedNode(149); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -10944,7 +10953,7 @@ var ts; } ts.updateProperty = updateProperty; function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(150); + var node = createSynthesizedNode(151); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -10971,7 +10980,7 @@ var ts; } ts.updateMethod = updateMethod; function createConstructor(decorators, modifiers, parameters, body) { - var node = createSynthesizedNode(151); + var node = createSynthesizedNode(152); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.typeParameters = undefined; @@ -10991,7 +11000,7 @@ var ts; } ts.updateConstructor = updateConstructor; function createGetAccessor(decorators, modifiers, name, parameters, type, body) { - var node = createSynthesizedNode(152); + var node = createSynthesizedNode(153); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11014,7 +11023,7 @@ var ts; } ts.updateGetAccessor = updateGetAccessor; function createSetAccessor(decorators, modifiers, name, parameters, body) { - var node = createSynthesizedNode(153); + var node = createSynthesizedNode(154); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11035,7 +11044,7 @@ var ts; } ts.updateSetAccessor = updateSetAccessor; function createObjectBindingPattern(elements) { - var node = createSynthesizedNode(173); + var node = createSynthesizedNode(174); node.elements = createNodeArray(elements); return node; } @@ -11047,7 +11056,7 @@ var ts; } ts.updateObjectBindingPattern = updateObjectBindingPattern; function createArrayBindingPattern(elements) { - var node = createSynthesizedNode(174); + var node = createSynthesizedNode(175); node.elements = createNodeArray(elements); return node; } @@ -11059,7 +11068,7 @@ var ts; } ts.updateArrayBindingPattern = updateArrayBindingPattern; function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - var node = createSynthesizedNode(175); + var node = createSynthesizedNode(176); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -11077,7 +11086,7 @@ var ts; } ts.updateBindingElement = updateBindingElement; function createArrayLiteral(elements, multiLine) { - var node = createSynthesizedNode(176); + var node = createSynthesizedNode(177); node.elements = ts.parenthesizeListElements(createNodeArray(elements)); if (multiLine) { node.multiLine = true; @@ -11092,7 +11101,7 @@ var ts; } ts.updateArrayLiteral = updateArrayLiteral; function createObjectLiteral(properties, multiLine) { - var node = createSynthesizedNode(177); + var node = createSynthesizedNode(178); node.properties = createNodeArray(properties); if (multiLine) { node.multiLine = true; @@ -11107,7 +11116,7 @@ var ts; } ts.updateObjectLiteral = updateObjectLiteral; function createPropertyAccess(expression, name) { - var node = createSynthesizedNode(178); + var node = createSynthesizedNode(179); node.expression = ts.parenthesizeForAccess(expression); node.name = asName(name); setEmitFlags(node, 65536); @@ -11122,7 +11131,7 @@ var ts; } ts.updatePropertyAccess = updatePropertyAccess; function createElementAccess(expression, index) { - var node = createSynthesizedNode(179); + var node = createSynthesizedNode(180); node.expression = ts.parenthesizeForAccess(expression); node.argumentExpression = asExpression(index); return node; @@ -11136,7 +11145,7 @@ var ts; } ts.updateElementAccess = updateElementAccess; function createCall(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(180); + var node = createSynthesizedNode(181); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray)); @@ -11152,7 +11161,7 @@ var ts; } ts.updateCall = updateCall; function createNew(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(181); + var node = createSynthesizedNode(182); node.expression = ts.parenthesizeForNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined; @@ -11168,7 +11177,7 @@ var ts; } ts.updateNew = updateNew; function createTaggedTemplate(tag, template) { - var node = createSynthesizedNode(182); + var node = createSynthesizedNode(183); node.tag = ts.parenthesizeForAccess(tag); node.template = template; return node; @@ -11182,7 +11191,7 @@ var ts; } ts.updateTaggedTemplate = updateTaggedTemplate; function createTypeAssertion(type, expression) { - var node = createSynthesizedNode(183); + var node = createSynthesizedNode(184); node.type = type; node.expression = ts.parenthesizePrefixOperand(expression); return node; @@ -11196,7 +11205,7 @@ var ts; } ts.updateTypeAssertion = updateTypeAssertion; function createParen(expression) { - var node = createSynthesizedNode(184); + var node = createSynthesizedNode(185); node.expression = expression; return node; } @@ -11208,7 +11217,7 @@ var ts; } ts.updateParen = updateParen; function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(185); + var node = createSynthesizedNode(186); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -11232,12 +11241,12 @@ var ts; } ts.updateFunctionExpression = updateFunctionExpression; function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - var node = createSynthesizedNode(186); + var node = createSynthesizedNode(187); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35); + node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(36); node.body = ts.parenthesizeConciseBody(body); return node; } @@ -11253,7 +11262,7 @@ var ts; } ts.updateArrowFunction = updateArrowFunction; function createDelete(expression) { - var node = createSynthesizedNode(187); + var node = createSynthesizedNode(188); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11265,7 +11274,7 @@ var ts; } ts.updateDelete = updateDelete; function createTypeOf(expression) { - var node = createSynthesizedNode(188); + var node = createSynthesizedNode(189); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11277,7 +11286,7 @@ var ts; } ts.updateTypeOf = updateTypeOf; function createVoid(expression) { - var node = createSynthesizedNode(189); + var node = createSynthesizedNode(190); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11289,7 +11298,7 @@ var ts; } ts.updateVoid = updateVoid; function createAwait(expression) { - var node = createSynthesizedNode(190); + var node = createSynthesizedNode(191); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11301,7 +11310,7 @@ var ts; } ts.updateAwait = updateAwait; function createPrefix(operator, operand) { - var node = createSynthesizedNode(191); + var node = createSynthesizedNode(192); node.operator = operator; node.operand = ts.parenthesizePrefixOperand(operand); return node; @@ -11314,7 +11323,7 @@ var ts; } ts.updatePrefix = updatePrefix; function createPostfix(operand, operator) { - var node = createSynthesizedNode(192); + var node = createSynthesizedNode(193); node.operand = ts.parenthesizePostfixOperand(operand); node.operator = operator; return node; @@ -11327,7 +11336,7 @@ var ts; } ts.updatePostfix = updatePostfix; function createBinary(left, operator, right) { - var node = createSynthesizedNode(193); + var node = createSynthesizedNode(194); var operatorToken = asToken(operator); var operatorKind = operatorToken.kind; node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined); @@ -11344,11 +11353,11 @@ var ts; } ts.updateBinary = updateBinary; function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) { - var node = createSynthesizedNode(194); + var node = createSynthesizedNode(195); node.condition = ts.parenthesizeForConditionalHead(condition); - node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54); + node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(55); node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue); - node.colonToken = whenFalse ? colonToken : createToken(55); + node.colonToken = whenFalse ? colonToken : createToken(56); node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse); return node; } @@ -11362,7 +11371,7 @@ var ts; } ts.updateConditional = updateConditional; function createTemplateExpression(head, templateSpans) { - var node = createSynthesizedNode(195); + var node = createSynthesizedNode(196); node.head = head; node.templateSpans = createNodeArray(templateSpans); return node; @@ -11376,9 +11385,9 @@ var ts; } ts.updateTemplateExpression = updateTemplateExpression; function createYield(asteriskTokenOrExpression, expression) { - var node = createSynthesizedNode(196); - node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined; - node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression; + var node = createSynthesizedNode(197); + node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 39 ? asteriskTokenOrExpression : undefined; + node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 39 ? asteriskTokenOrExpression : expression; return node; } ts.createYield = createYield; @@ -11390,7 +11399,7 @@ var ts; } ts.updateYield = updateYield; function createSpread(expression) { - var node = createSynthesizedNode(197); + var node = createSynthesizedNode(198); node.expression = ts.parenthesizeExpressionForList(expression); return node; } @@ -11402,7 +11411,7 @@ var ts; } ts.updateSpread = updateSpread; function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(198); + var node = createSynthesizedNode(199); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11423,11 +11432,11 @@ var ts; } ts.updateClassExpression = updateClassExpression; function createOmittedExpression() { - return createSynthesizedNode(199); + return createSynthesizedNode(200); } ts.createOmittedExpression = createOmittedExpression; function createExpressionWithTypeArguments(typeArguments, expression) { - var node = createSynthesizedNode(200); + var node = createSynthesizedNode(201); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); return node; @@ -11441,7 +11450,7 @@ var ts; } ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments; function createAsExpression(expression, type) { - var node = createSynthesizedNode(201); + var node = createSynthesizedNode(202); node.expression = expression; node.type = type; return node; @@ -11455,7 +11464,7 @@ var ts; } ts.updateAsExpression = updateAsExpression; function createNonNullExpression(expression) { - var node = createSynthesizedNode(202); + var node = createSynthesizedNode(203); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -11467,7 +11476,7 @@ var ts; } ts.updateNonNullExpression = updateNonNullExpression; function createTemplateSpan(expression, literal) { - var node = createSynthesizedNode(204); + var node = createSynthesizedNode(205); node.expression = expression; node.literal = literal; return node; @@ -11481,7 +11490,7 @@ var ts; } ts.updateTemplateSpan = updateTemplateSpan; function createBlock(statements, multiLine) { - var block = createSynthesizedNode(206); + var block = createSynthesizedNode(207); block.statements = createNodeArray(statements); if (multiLine) block.multiLine = multiLine; @@ -11495,7 +11504,7 @@ var ts; } ts.updateBlock = updateBlock; function createVariableStatement(modifiers, declarationList) { - var node = createSynthesizedNode(207); + var node = createSynthesizedNode(208); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; @@ -11510,7 +11519,7 @@ var ts; } ts.updateVariableStatement = updateVariableStatement; function createVariableDeclarationList(declarations, flags) { - var node = createSynthesizedNode(226); + var node = createSynthesizedNode(227); node.flags |= flags; node.declarations = createNodeArray(declarations); return node; @@ -11523,7 +11532,7 @@ var ts; } ts.updateVariableDeclarationList = updateVariableDeclarationList; function createVariableDeclaration(name, type, initializer) { - var node = createSynthesizedNode(225); + var node = createSynthesizedNode(226); node.name = asName(name); node.type = type; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -11539,11 +11548,11 @@ var ts; } ts.updateVariableDeclaration = updateVariableDeclaration; function createEmptyStatement() { - return createSynthesizedNode(208); + return createSynthesizedNode(209); } ts.createEmptyStatement = createEmptyStatement; function createStatement(expression) { - var node = createSynthesizedNode(209); + var node = createSynthesizedNode(210); node.expression = ts.parenthesizeExpressionForExpressionStatement(expression); return node; } @@ -11555,7 +11564,7 @@ var ts; } ts.updateStatement = updateStatement; function createIf(expression, thenStatement, elseStatement) { - var node = createSynthesizedNode(210); + var node = createSynthesizedNode(211); node.expression = expression; node.thenStatement = thenStatement; node.elseStatement = elseStatement; @@ -11571,7 +11580,7 @@ var ts; } ts.updateIf = updateIf; function createDo(statement, expression) { - var node = createSynthesizedNode(211); + var node = createSynthesizedNode(212); node.statement = statement; node.expression = expression; return node; @@ -11585,7 +11594,7 @@ var ts; } ts.updateDo = updateDo; function createWhile(expression, statement) { - var node = createSynthesizedNode(212); + var node = createSynthesizedNode(213); node.expression = expression; node.statement = statement; return node; @@ -11599,7 +11608,7 @@ var ts; } ts.updateWhile = updateWhile; function createFor(initializer, condition, incrementor, statement) { - var node = createSynthesizedNode(213); + var node = createSynthesizedNode(214); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -11617,7 +11626,7 @@ var ts; } ts.updateFor = updateFor; function createForIn(initializer, expression, statement) { - var node = createSynthesizedNode(214); + var node = createSynthesizedNode(215); node.initializer = initializer; node.expression = expression; node.statement = statement; @@ -11633,7 +11642,7 @@ var ts; } ts.updateForIn = updateForIn; function createForOf(awaitModifier, initializer, expression, statement) { - var node = createSynthesizedNode(215); + var node = createSynthesizedNode(216); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; @@ -11651,7 +11660,7 @@ var ts; } ts.updateForOf = updateForOf; function createContinue(label) { - var node = createSynthesizedNode(216); + var node = createSynthesizedNode(217); node.label = asName(label); return node; } @@ -11663,7 +11672,7 @@ var ts; } ts.updateContinue = updateContinue; function createBreak(label) { - var node = createSynthesizedNode(217); + var node = createSynthesizedNode(218); node.label = asName(label); return node; } @@ -11675,7 +11684,7 @@ var ts; } ts.updateBreak = updateBreak; function createReturn(expression) { - var node = createSynthesizedNode(218); + var node = createSynthesizedNode(219); node.expression = expression; return node; } @@ -11687,7 +11696,7 @@ var ts; } ts.updateReturn = updateReturn; function createWith(expression, statement) { - var node = createSynthesizedNode(219); + var node = createSynthesizedNode(220); node.expression = expression; node.statement = statement; return node; @@ -11701,7 +11710,7 @@ var ts; } ts.updateWith = updateWith; function createSwitch(expression, caseBlock) { - var node = createSynthesizedNode(220); + var node = createSynthesizedNode(221); node.expression = ts.parenthesizeExpressionForList(expression); node.caseBlock = caseBlock; return node; @@ -11715,7 +11724,7 @@ var ts; } ts.updateSwitch = updateSwitch; function createLabel(label, statement) { - var node = createSynthesizedNode(221); + var node = createSynthesizedNode(222); node.label = asName(label); node.statement = statement; return node; @@ -11729,7 +11738,7 @@ var ts; } ts.updateLabel = updateLabel; function createThrow(expression) { - var node = createSynthesizedNode(222); + var node = createSynthesizedNode(223); node.expression = expression; return node; } @@ -11741,7 +11750,7 @@ var ts; } ts.updateThrow = updateThrow; function createTry(tryBlock, catchClause, finallyBlock) { - var node = createSynthesizedNode(223); + var node = createSynthesizedNode(224); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -11757,7 +11766,7 @@ var ts; } ts.updateTry = updateTry; function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(227); + var node = createSynthesizedNode(228); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -11783,7 +11792,7 @@ var ts; } ts.updateFunctionDeclaration = updateFunctionDeclaration; function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(228); + var node = createSynthesizedNode(229); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11805,7 +11814,7 @@ var ts; } ts.updateClassDeclaration = updateClassDeclaration; function createEnumDeclaration(decorators, modifiers, name, members) { - var node = createSynthesizedNode(231); + var node = createSynthesizedNode(232); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11823,7 +11832,7 @@ var ts; } ts.updateEnumDeclaration = updateEnumDeclaration; function createModuleDeclaration(decorators, modifiers, name, body, flags) { - var node = createSynthesizedNode(232); + var node = createSynthesizedNode(233); node.flags |= flags; node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); @@ -11842,7 +11851,7 @@ var ts; } ts.updateModuleDeclaration = updateModuleDeclaration; function createModuleBlock(statements) { - var node = createSynthesizedNode(233); + var node = createSynthesizedNode(234); node.statements = createNodeArray(statements); return node; } @@ -11854,7 +11863,7 @@ var ts; } ts.updateModuleBlock = updateModuleBlock; function createCaseBlock(clauses) { - var node = createSynthesizedNode(234); + var node = createSynthesizedNode(235); node.clauses = createNodeArray(clauses); return node; } @@ -11866,7 +11875,7 @@ var ts; } ts.updateCaseBlock = updateCaseBlock; function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) { - var node = createSynthesizedNode(236); + var node = createSynthesizedNode(237); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11884,7 +11893,7 @@ var ts; } ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration; function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) { - var node = createSynthesizedNode(237); + var node = createSynthesizedNode(238); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; @@ -11901,7 +11910,7 @@ var ts; } ts.updateImportDeclaration = updateImportDeclaration; function createImportClause(name, namedBindings) { - var node = createSynthesizedNode(238); + var node = createSynthesizedNode(239); node.name = name; node.namedBindings = namedBindings; return node; @@ -11915,7 +11924,7 @@ var ts; } ts.updateImportClause = updateImportClause; function createNamespaceImport(name) { - var node = createSynthesizedNode(239); + var node = createSynthesizedNode(240); node.name = name; return node; } @@ -11927,7 +11936,7 @@ var ts; } ts.updateNamespaceImport = updateNamespaceImport; function createNamedImports(elements) { - var node = createSynthesizedNode(240); + var node = createSynthesizedNode(241); node.elements = createNodeArray(elements); return node; } @@ -11939,7 +11948,7 @@ var ts; } ts.updateNamedImports = updateNamedImports; function createImportSpecifier(propertyName, name) { - var node = createSynthesizedNode(241); + var node = createSynthesizedNode(242); node.propertyName = propertyName; node.name = name; return node; @@ -11953,7 +11962,7 @@ var ts; } ts.updateImportSpecifier = updateImportSpecifier; function createExportAssignment(decorators, modifiers, isExportEquals, expression) { - var node = createSynthesizedNode(242); + var node = createSynthesizedNode(243); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; @@ -11970,7 +11979,7 @@ var ts; } ts.updateExportAssignment = updateExportAssignment; function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) { - var node = createSynthesizedNode(243); + var node = createSynthesizedNode(244); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.exportClause = exportClause; @@ -11988,7 +11997,7 @@ var ts; } ts.updateExportDeclaration = updateExportDeclaration; function createNamedExports(elements) { - var node = createSynthesizedNode(244); + var node = createSynthesizedNode(245); node.elements = createNodeArray(elements); return node; } @@ -12000,7 +12009,7 @@ var ts; } ts.updateNamedExports = updateNamedExports; function createExportSpecifier(propertyName, name) { - var node = createSynthesizedNode(245); + var node = createSynthesizedNode(246); node.propertyName = asName(propertyName); node.name = asName(name); return node; @@ -12014,7 +12023,7 @@ var ts; } ts.updateExportSpecifier = updateExportSpecifier; function createExternalModuleReference(expression) { - var node = createSynthesizedNode(247); + var node = createSynthesizedNode(248); node.expression = expression; return node; } @@ -12026,7 +12035,7 @@ var ts; } ts.updateExternalModuleReference = updateExternalModuleReference; function createJsxElement(openingElement, children, closingElement) { - var node = createSynthesizedNode(248); + var node = createSynthesizedNode(249); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -12042,7 +12051,7 @@ var ts; } ts.updateJsxElement = updateJsxElement; function createJsxSelfClosingElement(tagName, attributes) { - var node = createSynthesizedNode(249); + var node = createSynthesizedNode(250); node.tagName = tagName; node.attributes = attributes; return node; @@ -12056,7 +12065,7 @@ var ts; } ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement; function createJsxOpeningElement(tagName, attributes) { - var node = createSynthesizedNode(250); + var node = createSynthesizedNode(251); node.tagName = tagName; node.attributes = attributes; return node; @@ -12070,7 +12079,7 @@ var ts; } ts.updateJsxOpeningElement = updateJsxOpeningElement; function createJsxClosingElement(tagName) { - var node = createSynthesizedNode(251); + var node = createSynthesizedNode(252); node.tagName = tagName; return node; } @@ -12082,7 +12091,7 @@ var ts; } ts.updateJsxClosingElement = updateJsxClosingElement; function createJsxAttributes(properties) { - var jsxAttributes = createSynthesizedNode(253); + var jsxAttributes = createSynthesizedNode(254); jsxAttributes.properties = createNodeArray(properties); return jsxAttributes; } @@ -12095,7 +12104,7 @@ var ts; } ts.updateJsxAttributes = updateJsxAttributes; function createJsxAttribute(name, initializer) { - var node = createSynthesizedNode(252); + var node = createSynthesizedNode(253); node.name = name; node.initializer = initializer; return node; @@ -12109,7 +12118,7 @@ var ts; } ts.updateJsxAttribute = updateJsxAttribute; function createJsxSpreadAttribute(expression) { - var node = createSynthesizedNode(254); + var node = createSynthesizedNode(255); node.expression = expression; return node; } @@ -12121,7 +12130,7 @@ var ts; } ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute; function createJsxExpression(dotDotDotToken, expression) { - var node = createSynthesizedNode(255); + var node = createSynthesizedNode(256); node.dotDotDotToken = dotDotDotToken; node.expression = expression; return node; @@ -12134,7 +12143,7 @@ var ts; } ts.updateJsxExpression = updateJsxExpression; function createHeritageClause(token, types) { - var node = createSynthesizedNode(258); + var node = createSynthesizedNode(259); node.token = token; node.types = createNodeArray(types); return node; @@ -12148,7 +12157,7 @@ var ts; } ts.updateHeritageClause = updateHeritageClause; function createCaseClause(expression, statements) { - var node = createSynthesizedNode(256); + var node = createSynthesizedNode(257); node.expression = ts.parenthesizeExpressionForList(expression); node.statements = createNodeArray(statements); return node; @@ -12162,7 +12171,7 @@ var ts; } ts.updateCaseClause = updateCaseClause; function createDefaultClause(statements) { - var node = createSynthesizedNode(257); + var node = createSynthesizedNode(258); node.statements = createNodeArray(statements); return node; } @@ -12175,7 +12184,7 @@ var ts; } ts.updateDefaultClause = updateDefaultClause; function createCatchClause(variableDeclaration, block) { - var node = createSynthesizedNode(259); + var node = createSynthesizedNode(260); node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration; node.block = block; return node; @@ -12189,7 +12198,7 @@ var ts; } ts.updateCatchClause = updateCatchClause; function createPropertyAssignment(name, initializer) { - var node = createSynthesizedNode(260); + var node = createSynthesizedNode(261); node.name = asName(name); node.questionToken = undefined; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -12204,7 +12213,7 @@ var ts; } ts.updatePropertyAssignment = updatePropertyAssignment; function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - var node = createSynthesizedNode(261); + var node = createSynthesizedNode(262); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined; return node; @@ -12218,7 +12227,7 @@ var ts; } ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment; function createSpreadAssignment(expression) { - var node = createSynthesizedNode(262); + var node = createSynthesizedNode(263); node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined; return node; } @@ -12231,7 +12240,7 @@ var ts; } ts.updateSpreadAssignment = updateSpreadAssignment; function createEnumMember(name, initializer) { - var node = createSynthesizedNode(263); + var node = createSynthesizedNode(264); node.name = asName(name); node.initializer = initializer && ts.parenthesizeExpressionForList(initializer); return node; @@ -12246,7 +12255,7 @@ var ts; ts.updateEnumMember = updateEnumMember; function updateSourceFileNode(node, statements) { if (node.statements !== statements) { - var updated = createSynthesizedNode(264); + var updated = createSynthesizedNode(265); updated.flags |= node.flags; updated.statements = createNodeArray(statements); updated.endOfFileToken = node.endOfFileToken; @@ -12315,28 +12324,28 @@ var ts; } ts.getMutableClone = getMutableClone; function createNotEmittedStatement(original) { - var node = createSynthesizedNode(294); + var node = createSynthesizedNode(295); node.original = original; setTextRange(node, original); return node; } ts.createNotEmittedStatement = createNotEmittedStatement; function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(297); + var node = createSynthesizedNode(298); node.emitNode = {}; node.original = original; return node; } ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker; function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(296); + var node = createSynthesizedNode(297); node.emitNode = {}; node.original = original; return node; } ts.createMergeDeclarationMarker = createMergeDeclarationMarker; function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(295); + var node = createSynthesizedNode(296); node.expression = expression; node.original = original; setTextRange(node, original); @@ -12351,7 +12360,7 @@ var ts; } ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function createBundle(sourceFiles) { - var node = ts.createNode(265); + var node = ts.createNode(266); node.sourceFiles = sourceFiles; return node; } @@ -12364,47 +12373,47 @@ var ts; } ts.updateBundle = updateBundle; function createComma(left, right) { - return createBinary(left, 25, right); + return createBinary(left, 26, right); } ts.createComma = createComma; function createLessThan(left, right) { - return createBinary(left, 26, right); + return createBinary(left, 27, right); } ts.createLessThan = createLessThan; function createAssignment(left, right) { - return createBinary(left, 57, right); + return createBinary(left, 58, right); } ts.createAssignment = createAssignment; function createStrictEquality(left, right) { - return createBinary(left, 33, right); + return createBinary(left, 34, right); } ts.createStrictEquality = createStrictEquality; function createStrictInequality(left, right) { - return createBinary(left, 34, right); + return createBinary(left, 35, right); } ts.createStrictInequality = createStrictInequality; function createAdd(left, right) { - return createBinary(left, 36, right); + return createBinary(left, 37, right); } ts.createAdd = createAdd; function createSubtract(left, right) { - return createBinary(left, 37, right); + return createBinary(left, 38, right); } ts.createSubtract = createSubtract; function createPostfixIncrement(operand) { - return createPostfix(operand, 42); + return createPostfix(operand, 43); } ts.createPostfixIncrement = createPostfixIncrement; function createLogicalAnd(left, right) { - return createBinary(left, 52, right); + return createBinary(left, 53, right); } ts.createLogicalAnd = createLogicalAnd; function createLogicalOr(left, right) { - return createBinary(left, 53, right); + return createBinary(left, 54, right); } ts.createLogicalOr = createLogicalOr; function createLogicalNot(operand) { - return createPrefix(50, operand); + return createPrefix(51, operand); } ts.createLogicalNot = createLogicalNot; function createVoidZero() { @@ -12446,7 +12455,7 @@ var ts; function getOrCreateEmitNode(node) { if (!node.emitNode) { if (ts.isParseTreeNode(node)) { - if (node.kind === 264) { + if (node.kind === 265) { return node.emitNode = { annotatedNodes: [node] }; } var sourceFile = ts.getSourceFileOfNode(node); @@ -12815,7 +12824,7 @@ var ts; if (!outermostLabeledStatement) { return node; } - var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 + var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 222 ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node); if (afterRestoreLabelCallback) { @@ -12827,19 +12836,19 @@ var ts; function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { var target = skipParentheses(node); switch (target.kind) { - case 70: + case 71: return cacheIdentifiers; - case 98: + case 99: case 8: case 9: return false; - case 176: + case 177: var elements = target.elements; if (elements.length === 0) { return false; } return true; - case 177: + case 178: return target.properties.length > 0; default: return true; @@ -12853,7 +12862,7 @@ var ts; thisArg = ts.createThis(); target = callee; } - else if (callee.kind === 96) { + else if (callee.kind === 97) { thisArg = ts.createThis(); target = languageVersion < 2 ? ts.setTextRange(ts.createIdentifier("_super"), callee) @@ -12865,7 +12874,7 @@ var ts; } else { switch (callee.kind) { - case 178: { + case 179: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name); @@ -12877,7 +12886,7 @@ var ts; } break; } - case 179: { + case 180: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression); @@ -12928,14 +12937,14 @@ var ts; ts.createExpressionForPropertyName = createExpressionForPropertyName; function createExpressionForObjectLiteralElementLike(node, property, receiver) { switch (property.kind) { - case 152: case 153: + case 154: return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine); - case 260: - return createExpressionForPropertyAssignment(property, receiver); case 261: + return createExpressionForPropertyAssignment(property, receiver); + case 262: return createExpressionForShorthandPropertyAssignment(property, receiver); - case 150: + case 151: return createExpressionForMethodDeclaration(property, receiver); } } @@ -13113,7 +13122,7 @@ var ts; } ts.ensureUseStrict = ensureUseStrict; function parenthesizeConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -13124,7 +13133,7 @@ var ts; ts.parenthesizeConditionalHead = parenthesizeConditionalHead; function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { var skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 184) { + if (skipped.kind === 185) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) @@ -13133,15 +13142,15 @@ var ts; } ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand; function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator); - var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator); + var binaryOperatorPrecedence = ts.getOperatorPrecedence(194, binaryOperator); + var binaryOperatorAssociativity = ts.getOperatorAssociativity(194, binaryOperator); var emittedOperand = skipPartiallyEmittedExpressions(operand); var operandPrecedence = ts.getExpressionPrecedence(emittedOperand); switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1: if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 - && operand.kind === 196) { + && operand.kind === 197) { return false; } return true; @@ -13157,7 +13166,7 @@ var ts; if (operatorHasAssociativeProperty(binaryOperator)) { return false; } - if (binaryOperator === 36) { + if (binaryOperator === 37) { var leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0; if (ts.isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { return false; @@ -13170,17 +13179,17 @@ var ts; } } function operatorHasAssociativeProperty(binaryOperator) { - return binaryOperator === 38 + return binaryOperator === 39 + || binaryOperator === 49 || binaryOperator === 48 - || binaryOperator === 47 - || binaryOperator === 49; + || binaryOperator === 50; } function getLiteralKindOfBinaryPlusOperand(node) { node = skipPartiallyEmittedExpressions(node); if (ts.isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 193 && node.operatorToken.kind === 36) { + if (node.kind === 194 && node.operatorToken.kind === 37) { if (node.cachedLiteralKind !== undefined) { return node.cachedLiteralKind; } @@ -13195,7 +13204,7 @@ var ts; return 0; } function parenthesizeForConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -13205,7 +13214,7 @@ var ts; } ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead; function parenthesizeSubexpressionOfConditionalExpression(e) { - return e.kind === 193 && e.operatorToken.kind === 25 + return e.kind === 194 && e.operatorToken.kind === 26 ? ts.createParen(e) : e; } @@ -13213,9 +13222,9 @@ var ts; function parenthesizeForNew(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); switch (emittedExpression.kind) { - case 180: - return ts.createParen(expression); case 181: + return ts.createParen(expression); + case 182: return emittedExpression.arguments ? expression : ts.createParen(expression); @@ -13226,7 +13235,7 @@ var ts; function parenthesizeForAccess(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); if (ts.isLeftHandSideExpression(emittedExpression) - && (emittedExpression.kind !== 181 || emittedExpression.arguments)) { + && (emittedExpression.kind !== 182 || emittedExpression.arguments)) { return expression; } return ts.setTextRange(ts.createParen(expression), expression); @@ -13264,7 +13273,7 @@ var ts; function parenthesizeExpressionForList(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression); - var commaPrecedence = ts.getOperatorPrecedence(193, 25); + var commaPrecedence = ts.getOperatorPrecedence(194, 26); return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(ts.createParen(expression), expression); @@ -13275,7 +13284,7 @@ var ts; if (ts.isCallExpression(emittedExpression)) { var callee = emittedExpression.expression; var kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 185 || kind === 186) { + if (kind === 186 || kind === 187) { var mutableCall = ts.getMutableClone(emittedExpression); mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee); return recreatePartiallyEmittedExpressions(expression, mutableCall); @@ -13283,7 +13292,7 @@ var ts; } else { var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind; - if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) { + if (leftmostExpressionKind === 178 || leftmostExpressionKind === 186) { return ts.setTextRange(ts.createParen(expression), expression); } } @@ -13301,21 +13310,21 @@ var ts; function getLeftmostExpression(node) { while (true) { switch (node.kind) { - case 192: + case 193: node = node.operand; continue; - case 193: + case 194: node = node.left; continue; - case 194: + case 195: node = node.condition; continue; + case 181: case 180: case 179: - case 178: node = node.expression; continue; - case 295: + case 296: node = node.expression; continue; } @@ -13323,7 +13332,7 @@ var ts; } } function parenthesizeConciseBody(body) { - if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) { + if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 178) { return ts.setTextRange(ts.createParen(body), body); } return body; @@ -13355,7 +13364,7 @@ var ts; } ts.skipOuterExpressions = skipOuterExpressions; function skipParentheses(node) { - while (node.kind === 184) { + while (node.kind === 185) { node = node.expression; } return node; @@ -13369,7 +13378,7 @@ var ts; } ts.skipAssertions = skipAssertions; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 295) { + while (node.kind === 296) { node = node.expression; } return node; @@ -13412,10 +13421,10 @@ var ts; var name = namespaceDeclaration.name; return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name)); } - if (node.kind === 237 && node.importClause) { + if (node.kind === 238 && node.importClause) { return ts.getGeneratedNameForNode(node); } - if (node.kind === 243 && node.moduleSpecifier) { + if (node.kind === 244 && node.moduleSpecifier) { return ts.getGeneratedNameForNode(node); } return undefined; @@ -13477,11 +13486,11 @@ var ts; } if (ts.isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 260: - return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 261: - return bindingElement.name; + return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 262: + return bindingElement.name; + case 263: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return undefined; @@ -13497,11 +13506,11 @@ var ts; ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement; function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 145: - case 175: + case 146: + case 176: return bindingElement.dotDotDotToken; - case 197: - case 262: + case 198: + case 263: return bindingElement; } return undefined; @@ -13509,7 +13518,7 @@ var ts; ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement; function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 175: + case 176: if (bindingElement.propertyName) { var propertyName = bindingElement.propertyName; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -13517,7 +13526,7 @@ var ts; : propertyName; } break; - case 260: + case 261: if (bindingElement.name) { var propertyName = bindingElement.name; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -13525,7 +13534,7 @@ var ts; : propertyName; } break; - case 262: + case 263: return bindingElement.name; } var target = getTargetOfBindingOrAssignmentElement(bindingElement); @@ -13539,11 +13548,11 @@ var ts; ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 173: case 174: - case 176: - return name.elements; + case 175: case 177: + return name.elements; + case 178: return name.properties; } } @@ -13582,11 +13591,11 @@ var ts; ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement; function convertToAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: - return convertToArrayAssignmentPattern(node); - case 173: + case 175: case 177: + return convertToArrayAssignmentPattern(node); + case 174: + case 178: return convertToObjectAssignmentPattern(node); } } @@ -13632,15 +13641,15 @@ var ts; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { - case 237: + case 238: externalImports.push(node); break; - case 236: - if (node.moduleReference.kind === 247) { + case 237: + if (node.moduleReference.kind === 248) { externalImports.push(node); } break; - case 243: + case 244: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -13667,12 +13676,12 @@ var ts; } } break; - case 242: + case 243: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 207: + case 208: if (ts.hasModifier(node, 1)) { for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) { var decl = _e[_d]; @@ -13680,7 +13689,7 @@ var ts; } } break; - case 227: + case 228: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -13698,7 +13707,7 @@ var ts; } } break; - case 228: + case 229: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -13756,13 +13765,13 @@ var ts; var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 264) { + if (kind === 265) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - else if (kind === 70) { + else if (kind === 71) { return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); } - else if (kind < 142) { + else if (kind < 143) { return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); } else { @@ -13798,29 +13807,29 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 142: + case 143: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 144: + case 145: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.default) || visitNode(cbNode, node.expression); - case 261: + case 262: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 262: + case 263: return visitNode(cbNode, node.expression); - case 145: + case 146: + case 149: case 148: - case 147: - case 260: - case 225: - case 175: + case 261: + case 226: + case 176: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -13829,24 +13838,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 159: case 160: - case 154: + case 161: case 155: case 156: + case 157: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: + case 228: + case 187: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -13857,326 +13866,326 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 158: + case 159: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 157: + case 158: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 161: - return visitNode(cbNode, node.exprName); case 162: - return visitNodes(cbNodes, node.members); + return visitNode(cbNode, node.exprName); case 163: - return visitNode(cbNode, node.elementType); + return visitNodes(cbNodes, node.members); case 164: - return visitNodes(cbNodes, node.elementTypes); + return visitNode(cbNode, node.elementType); case 165: + return visitNodes(cbNodes, node.elementTypes); case 166: - return visitNodes(cbNodes, node.types); case 167: - case 169: - return visitNode(cbNode, node.type); + return visitNodes(cbNodes, node.types); + case 168: case 170: + return visitNode(cbNode, node.type); + case 171: return visitNode(cbNode, node.objectType) || visitNode(cbNode, node.indexType); - case 171: + case 172: return visitNode(cbNode, node.readonlyToken) || visitNode(cbNode, node.typeParameter) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type); - case 172: - return visitNode(cbNode, node.literal); case 173: + return visitNode(cbNode, node.literal); case 174: - return visitNodes(cbNodes, node.elements); - case 176: + case 175: return visitNodes(cbNodes, node.elements); case 177: - return visitNodes(cbNodes, node.properties); + return visitNodes(cbNodes, node.elements); case 178: + return visitNodes(cbNodes, node.properties); + case 179: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.name); - case 179: + case 180: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 180: case 181: + case 182: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 182: + case 183: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 183: + case 184: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 184: - return visitNode(cbNode, node.expression); - case 187: + case 185: return visitNode(cbNode, node.expression); case 188: return visitNode(cbNode, node.expression); case 189: return visitNode(cbNode, node.expression); - case 191: - return visitNode(cbNode, node.operand); - case 196: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); case 190: return visitNode(cbNode, node.expression); case 192: return visitNode(cbNode, node.operand); + case 197: + return visitNode(cbNode, node.asteriskToken) || + visitNode(cbNode, node.expression); + case 191: + return visitNode(cbNode, node.expression); case 193: + return visitNode(cbNode, node.operand); + case 194: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 201: + case 202: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 202: - return visitNode(cbNode, node.expression); case 203: + return visitNode(cbNode, node.expression); + case 204: return visitNode(cbNode, node.name); - case 194: + case 195: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 197: + case 198: return visitNode(cbNode, node.expression); - case 206: - case 233: + case 207: + case 234: return visitNodes(cbNodes, node.statements); - case 264: + case 265: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 207: + case 208: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 226: + case 227: return visitNodes(cbNodes, node.declarations); - case 209: - return visitNode(cbNode, node.expression); case 210: + return visitNode(cbNode, node.expression); + case 211: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 211: + case 212: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 212: + case 213: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 213: + case 214: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 214: + case 215: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 215: + case 216: return visitNode(cbNode, node.awaitModifier) || visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 216: case 217: - return visitNode(cbNode, node.label); case 218: - return visitNode(cbNode, node.expression); + return visitNode(cbNode, node.label); case 219: + return visitNode(cbNode, node.expression); + case 220: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 220: + case 221: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 234: + case 235: return visitNodes(cbNodes, node.clauses); - case 256: + case 257: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 257: + case 258: return visitNodes(cbNodes, node.statements); - case 221: + case 222: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 222: - return visitNode(cbNode, node.expression); case 223: + return visitNode(cbNode, node.expression); + case 224: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 259: + case 260: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 146: + case 147: return visitNode(cbNode, node.expression); - case 228: - case 198: + case 229: + case 199: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 229: + case 230: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 230: + case 231: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 231: + case 232: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 263: + case 264: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 232: + case 233: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 236: + case 237: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 237: + case 238: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 238: + case 239: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 235: - return visitNode(cbNode, node.name); - case 239: + case 236: return visitNode(cbNode, node.name); case 240: - case 244: + return visitNode(cbNode, node.name); + case 241: + case 245: return visitNodes(cbNodes, node.elements); - case 243: + case 244: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 241: - case 245: + case 242: + case 246: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 242: + case 243: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 195: + case 196: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 204: + case 205: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 143: + case 144: return visitNode(cbNode, node.expression); - case 258: + case 259: return visitNodes(cbNodes, node.types); - case 200: + case 201: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 247: + case 248: return visitNode(cbNode, node.expression); - case 246: + case 247: return visitNodes(cbNodes, node.decorators); - case 248: + case 249: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 249: case 250: + case 251: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.attributes); - case 253: + case 254: return visitNodes(cbNodes, node.properties); - case 252: + case 253: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 254: - return visitNode(cbNode, node.expression); case 255: + return visitNode(cbNode, node.expression); + case 256: return visitNode(cbNode, node.dotDotDotToken) || visitNode(cbNode, node.expression); - case 251: + case 252: return visitNode(cbNode, node.tagName); - case 266: + case 267: return visitNode(cbNode, node.type); - case 270: - return visitNodes(cbNodes, node.types); case 271: return visitNodes(cbNodes, node.types); - case 269: + case 272: + return visitNodes(cbNodes, node.types); + case 270: return visitNode(cbNode, node.elementType); - case 273: + case 274: return visitNode(cbNode, node.type); - case 272: + case 273: return visitNode(cbNode, node.type); - case 274: + case 275: return visitNode(cbNode, node.literal); - case 276: + case 277: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 277: - return visitNode(cbNode, node.type); case 278: + return visitNode(cbNode, node.type); + case 279: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 279: - return visitNode(cbNode, node.type); case 280: return visitNode(cbNode, node.type); case 281: return visitNode(cbNode, node.type); - case 275: + case 282: + return visitNode(cbNode, node.type); + case 276: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 282: + case 283: return visitNodes(cbNodes, node.tags); - case 285: + case 286: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 286: - return visitNode(cbNode, node.typeExpression); case 287: return visitNode(cbNode, node.typeExpression); - case 284: - return visitNode(cbNode, node.typeExpression); case 288: - return visitNodes(cbNodes, node.typeParameters); + return visitNode(cbNode, node.typeExpression); + case 285: + return visitNode(cbNode, node.typeExpression); case 289: + return visitNodes(cbNodes, node.typeParameters); + case 290: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.name) || visitNode(cbNode, node.jsDocTypeLiteral); - case 291: + case 292: return visitNodes(cbNodes, node.jsDocPropertyTags); - case 290: + case 291: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name); - case 295: + case 296: return visitNode(cbNode, node.expression); - case 292: + case 293: return visitNode(cbNode, node.literal); } } @@ -14340,7 +14349,7 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion, scriptKind) { - var sourceFile = new SourceFileConstructor(264, 0, sourceText.length); + var sourceFile = new SourceFileConstructor(265, 0, sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -14496,16 +14505,16 @@ var ts; return speculationHelper(callback, false); } function isIdentifier() { - if (token() === 70) { + if (token() === 71) { return true; } - if (token() === 115 && inYieldContext()) { + if (token() === 116 && inYieldContext()) { return false; } - if (token() === 120 && inAwaitContext()) { + if (token() === 121 && inAwaitContext()) { return false; } - return token() > 106; + return token() > 107; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } @@ -14546,20 +14555,20 @@ var ts; return finishNode(node); } function canParseSemicolon() { - if (token() === 24) { + if (token() === 25) { return true; } - return token() === 17 || token() === 1 || scanner.hasPrecedingLineBreak(); + return token() === 18 || token() === 1 || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token() === 24) { + if (token() === 25) { nextToken(); } return true; } else { - return parseExpected(24); + return parseExpected(25); } } function createNode(kind, pos) { @@ -14567,8 +14576,8 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return kind >= 142 ? new NodeConstructor(kind, pos, pos) : - kind === 70 ? new IdentifierConstructor(kind, pos, pos) : + return kind >= 143 ? new NodeConstructor(kind, pos, pos) : + kind === 71 ? new IdentifierConstructor(kind, pos, pos) : new TokenConstructor(kind, pos, pos); } function createNodeArray(elements, pos) { @@ -14613,15 +14622,15 @@ var ts; function createIdentifier(isIdentifier, diagnosticMessage) { identifierCount++; if (isIdentifier) { - var node = createNode(70); - if (token() !== 70) { + var node = createNode(71); + if (token() !== 71) { node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } - return createMissingNode(70, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); + return createMissingNode(71, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); } function parseIdentifier(diagnosticMessage) { return createIdentifier(isIdentifier(), diagnosticMessage); @@ -14638,7 +14647,7 @@ var ts; if (token() === 9 || token() === 8) { return parseLiteralNode(true); } - if (allowComputedPropertyNames && token() === 20) { + if (allowComputedPropertyNames && token() === 21) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -14653,10 +14662,10 @@ var ts; return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token()); } function parseComputedPropertyName() { - var node = createNode(143); - parseExpected(20); - node.expression = allowInAnd(parseExpression); + var node = createNode(144); parseExpected(21); + node.expression = allowInAnd(parseExpression); + parseExpected(22); return finishNode(node); } function parseContextualModifier(t) { @@ -14670,20 +14679,20 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token() === 75) { - return nextToken() === 82; + if (token() === 76) { + return nextToken() === 83; } - if (token() === 83) { + if (token() === 84) { nextToken(); - if (token() === 78) { + if (token() === 79) { return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token() !== 38 && token() !== 117 && token() !== 16 && canFollowModifier(); + return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier(); } - if (token() === 78) { + if (token() === 79) { return nextTokenIsClassOrFunctionOrAsync(); } - if (token() === 114) { + if (token() === 115) { nextToken(); return canFollowModifier(); } @@ -14693,17 +14702,17 @@ var ts; return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 20 - || token() === 16 - || token() === 38 - || token() === 23 + return token() === 21 + || token() === 17 + || token() === 39 + || token() === 24 || isLiteralPropertyName(); } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token() === 74 || token() === 88 || - (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || - (token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); + return token() === 75 || token() === 89 || + (token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || + (token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -14714,23 +14723,23 @@ var ts; case 0: case 1: case 3: - return !(token() === 24 && inErrorRecovery) && isStartOfStatement(); + return !(token() === 25 && inErrorRecovery) && isStartOfStatement(); case 2: - return token() === 72 || token() === 78; + return token() === 73 || token() === 79; case 4: return lookAhead(isTypeMemberStart); case 5: - return lookAhead(isClassMemberStart) || (token() === 24 && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 25 && !inErrorRecovery); case 6: - return token() === 20 || isLiteralPropertyName(); + return token() === 21 || isLiteralPropertyName(); case 12: - return token() === 20 || token() === 38 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 39 || token() === 24 || isLiteralPropertyName(); case 17: return isLiteralPropertyName(); case 9: - return token() === 20 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 24 || isLiteralPropertyName(); case 7: - if (token() === 16) { + if (token() === 17) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -14742,23 +14751,23 @@ var ts; case 8: return isIdentifierOrPattern(); case 10: - return token() === 25 || token() === 23 || isIdentifierOrPattern(); + return token() === 26 || token() === 24 || isIdentifierOrPattern(); case 18: return isIdentifier(); case 11: case 15: - return token() === 25 || token() === 23 || isStartOfExpression(); + return token() === 26 || token() === 24 || isStartOfExpression(); case 16: return isStartOfParameter(); case 19: case 20: - return token() === 25 || isStartOfType(); + return token() === 26 || isStartOfType(); case 21: return isHeritageClause(); case 22: return ts.tokenIsIdentifierOrKeyword(token()); case 13: - return ts.tokenIsIdentifierOrKeyword(token()) || token() === 16; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 17; case 14: return true; case 23: @@ -14771,10 +14780,10 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token() === 16); - if (nextToken() === 17) { + ts.Debug.assert(token() === 17); + if (nextToken() === 18) { var next = nextToken(); - return next === 25 || next === 16 || next === 84 || next === 107; + return next === 26 || next === 17 || next === 85 || next === 108; } return true; } @@ -14787,8 +14796,8 @@ var ts; return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 107 || - token() === 84) { + if (token() === 108 || + token() === 85) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -14810,40 +14819,40 @@ var ts; case 12: case 9: case 22: - return token() === 17; + return token() === 18; case 3: - return token() === 17 || token() === 72 || token() === 78; + return token() === 18 || token() === 73 || token() === 79; case 7: - return token() === 16 || token() === 84 || token() === 107; + return token() === 17 || token() === 85 || token() === 108; case 8: return isVariableDeclaratorListTerminator(); case 18: - return token() === 28 || token() === 18 || token() === 16 || token() === 84 || token() === 107; + return token() === 29 || token() === 19 || token() === 17 || token() === 85 || token() === 108; case 11: - return token() === 19 || token() === 24; + return token() === 20 || token() === 25; case 15: case 20: case 10: - return token() === 21; + return token() === 22; case 16: case 17: - return token() === 19 || token() === 21; + return token() === 20 || token() === 22; case 19: - return token() !== 25; + return token() !== 26; case 21: - return token() === 16 || token() === 17; + return token() === 17 || token() === 18; case 13: - return token() === 28 || token() === 40; + return token() === 29 || token() === 41; case 14: - return token() === 26 && lookAhead(nextTokenIsSlash); + return token() === 27 && lookAhead(nextTokenIsSlash); case 23: - return token() === 19 || token() === 55 || token() === 17; + return token() === 20 || token() === 56 || token() === 18; case 24: - return token() === 28 || token() === 17; + return token() === 29 || token() === 18; case 26: - return token() === 21 || token() === 17; + return token() === 22 || token() === 18; case 25: - return token() === 17; + return token() === 18; } } function isVariableDeclaratorListTerminator() { @@ -14853,7 +14862,7 @@ var ts; if (isInOrOfKeyword(token())) { return true; } - if (token() === 35) { + if (token() === 36) { return true; } return false; @@ -14959,17 +14968,17 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 151: - case 156: case 152: + case 157: case 153: - case 148: - case 205: + case 154: + case 149: + case 206: return true; - case 150: + case 151: var methodDeclaration = node; - var nameIsConstructor = methodDeclaration.name.kind === 70 && - methodDeclaration.name.originalKeywordKind === 122; + var nameIsConstructor = methodDeclaration.name.kind === 71 && + methodDeclaration.name.originalKeywordKind === 123; return !nameIsConstructor; } } @@ -14978,8 +14987,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 256: case 257: + case 258: return true; } } @@ -14988,65 +14997,65 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 227: + case 228: + case 208: case 207: - case 206: + case 211: case 210: - case 209: - case 222: + case 223: + case 219: + case 221: case 218: - case 220: case 217: + case 215: case 216: case 214: - case 215: case 213: - case 212: - case 219: - case 208: - case 223: - case 221: - case 211: + case 220: + case 209: case 224: + case 222: + case 212: + case 225: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 232: - case 228: + case 233: case 229: - case 231: case 230: + case 232: + case 231: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 155: - case 149: case 156: - case 147: - case 154: + case 150: + case 157: + case 148: + case 155: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 225) { + if (node.kind !== 226) { return false; } var variableDeclarator = node; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 145) { + if (node.kind !== 146) { return false; } var parameter = node; @@ -15100,15 +15109,15 @@ var ts; if (isListElement(kind, false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); - if (parseOptional(25)) { + if (parseOptional(26)) { continue; } commaStart = -1; if (isListTerminator(kind)) { break; } - parseExpected(25); - if (considerSemicolonAsDelimiter && token() === 24 && !scanner.hasPrecedingLineBreak()) { + parseExpected(26); + if (considerSemicolonAsDelimiter && token() === 25 && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -15140,8 +15149,8 @@ var ts; } function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(22)) { - var node = createNode(142, entity.pos); + while (parseOptional(23)) { + var node = createNode(143, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -15152,33 +15161,33 @@ var ts; if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token())) { var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { - return createMissingNode(70, true, ts.Diagnostics.Identifier_expected); + return createMissingNode(71, true, ts.Diagnostics.Identifier_expected); } } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(195); + var template = createNode(196); template.head = parseTemplateHead(); - ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(template.head.kind === 14, "Template head has wrong token kind"); var templateSpans = createNodeArray(); do { templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 14); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 15); templateSpans.end = getNodeEnd(); template.templateSpans = templateSpans; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(204); + var span = createNode(205); span.expression = allowInAnd(parseExpression); var literal; - if (token() === 17) { + if (token() === 18) { reScanTemplateToken(); literal = parseTemplateMiddleOrTemplateTail(); } else { - literal = parseExpectedToken(15, false, ts.Diagnostics._0_expected, ts.tokenToString(17)); + literal = parseExpectedToken(16, false, ts.Diagnostics._0_expected, ts.tokenToString(18)); } span.literal = literal; return finishNode(span); @@ -15188,12 +15197,12 @@ var ts; } function parseTemplateHead() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(fragment.kind === 14, "Template head has wrong token kind"); return fragment; } function parseTemplateMiddleOrTemplateTail() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 14 || fragment.kind === 15, "Template fragment has wrong token kind"); + ts.Debug.assert(fragment.kind === 15 || fragment.kind === 16, "Template fragment has wrong token kind"); return fragment; } function parseLiteralLikeNode(kind, internName) { @@ -15214,35 +15223,35 @@ var ts; return node; } function parseTypeReference() { - var node = createNode(158); + var node = createNode(159); node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (!scanner.hasPrecedingLineBreak() && token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (!scanner.hasPrecedingLineBreak() && token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(157, lhs.pos); + var node = createNode(158, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(168); + var node = createNode(169); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(161); - parseExpected(102); + var node = createNode(162); + parseExpected(103); node.exprName = parseEntityName(true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - if (parseOptional(84)) { + if (parseOptional(85)) { if (isStartOfType() || !isStartOfExpression()) { node.constraint = parseType(); } @@ -15250,40 +15259,40 @@ var ts; node.expression = parseUnaryExpressionOrHigher(); } } - if (parseOptional(57)) { + if (parseOptional(58)) { node.default = parseType(); } return finishNode(node); } function parseTypeParameters() { - if (token() === 26) { - return parseBracketedList(18, parseTypeParameter, 26, 28); + if (token() === 27) { + return parseBracketedList(18, parseTypeParameter, 27, 29); } } function parseParameterType() { - if (parseOptional(55)) { + if (parseOptional(56)) { return parseType(); } return undefined; } function isStartOfParameter() { - return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98; + return token() === 24 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 57 || token() === 99; } function parseParameter() { - var node = createNode(145); - if (token() === 98) { + var node = createNode(146); + if (token() === 99) { node.name = createIdentifier(true); node.type = parseParameterType(); return finishNode(node); } node.decorators = parseDecorators(); node.modifiers = parseModifiers(); - node.dotDotDotToken = parseOptionalToken(23); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); if (ts.getFullWidth(node.name) === 0 && !ts.hasModifiers(node) && ts.isModifierKind(token())) { nextToken(); } - node.questionToken = parseOptionalToken(54); + node.questionToken = parseOptionalToken(55); node.type = parseParameterType(); node.initializer = parseBindingElementInitializer(true); return addJSDocComment(finishNode(node)); @@ -15295,7 +15304,7 @@ var ts; return parseInitializer(true); } function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 35; + var returnTokenRequired = returnToken === 36; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { @@ -15307,7 +15316,7 @@ var ts; } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { - if (parseExpected(18)) { + if (parseExpected(19)) { var savedYieldContext = inYieldContext(); var savedAwaitContext = inAwaitContext(); setYieldContext(yieldContext); @@ -15315,7 +15324,7 @@ var ts; var result = parseDelimitedList(16, parseParameter); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); - if (!parseExpected(19) && requireCompleteParameterList) { + if (!parseExpected(20) && requireCompleteParameterList) { return undefined; } return result; @@ -15323,29 +15332,29 @@ var ts; return requireCompleteParameterList ? undefined : createMissingList(); } function parseTypeMemberSemicolon() { - if (parseOptional(25)) { + if (parseOptional(26)) { return; } parseSemicolon(); } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 155) { - parseExpected(93); + if (kind === 156) { + parseExpected(94); } - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(node)); } function isIndexSignature() { - if (token() !== 20) { + if (token() !== 21) { return false; } return lookAhead(isUnambiguouslyIndexSignature); } function isUnambiguouslyIndexSignature() { nextToken(); - if (token() === 23 || token() === 21) { + if (token() === 24 || token() === 22) { return true; } if (ts.isModifierKind(token())) { @@ -15360,43 +15369,43 @@ var ts; else { nextToken(); } - if (token() === 55 || token() === 25) { + if (token() === 56 || token() === 26) { return true; } - if (token() !== 54) { + if (token() !== 55) { return false; } nextToken(); - return token() === 55 || token() === 25 || token() === 21; + return token() === 56 || token() === 26 || token() === 22; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(156, fullStart); + var node = createNode(157, fullStart); node.decorators = decorators; node.modifiers = modifiers; - node.parameters = parseBracketedList(16, parseParameter, 20, 21); + node.parameters = parseBracketedList(16, parseParameter, 21, 22); node.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); return finishNode(node); } function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (token() === 18 || token() === 26) { - var method = createNode(149, fullStart); + var questionToken = parseOptionalToken(55); + if (token() === 19 || token() === 27) { + var method = createNode(150, fullStart); method.modifiers = modifiers; method.name = name; method.questionToken = questionToken; - fillSignature(55, false, false, false, method); + fillSignature(56, false, false, false, method); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(method)); } else { - var property = createNode(147, fullStart); + var property = createNode(148, fullStart); property.modifiers = modifiers; property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token() === 57) { + if (token() === 58) { property.initializer = parseNonParameterInitializer(); } parseTypeMemberSemicolon(); @@ -15404,7 +15413,7 @@ var ts; } } function isTypeMemberStart() { - if (token() === 18 || token() === 26) { + if (token() === 19 || token() === 27) { return true; } var idToken; @@ -15412,7 +15421,7 @@ var ts; idToken = true; nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (isLiteralPropertyName()) { @@ -15420,22 +15429,22 @@ var ts; nextToken(); } if (idToken) { - return token() === 18 || - token() === 26 || - token() === 54 || + return token() === 19 || + token() === 27 || token() === 55 || - token() === 25 || + token() === 56 || + token() === 26 || canParseSemicolon(); } return false; } function parseTypeMember() { - if (token() === 18 || token() === 26) { - return parseSignatureMember(154); - } - if (token() === 93 && lookAhead(isStartOfConstructSignature)) { + if (token() === 19 || token() === 27) { return parseSignatureMember(155); } + if (token() === 94 && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(156); + } var fullStart = getNodePos(); var modifiers = parseModifiers(); if (isIndexSignature()) { @@ -15445,18 +15454,18 @@ var ts; } function isStartOfConstructSignature() { nextToken(); - return token() === 18 || token() === 26; + return token() === 19 || token() === 27; } function parseTypeLiteral() { - var node = createNode(162); + var node = createNode(163); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers() { var members; - if (parseExpected(16)) { + if (parseExpected(17)) { members = parseList(4, parseTypeMember); - parseExpected(17); + parseExpected(18); } else { members = createMissingList(); @@ -15465,57 +15474,57 @@ var ts; } function isStartOfMappedType() { nextToken(); - if (token() === 130) { + if (token() === 131) { nextToken(); } - return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91; + return token() === 21 && nextTokenIsIdentifier() && nextToken() === 92; } function parseMappedTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - parseExpected(91); + parseExpected(92); node.constraint = parseType(); return finishNode(node); } function parseMappedType() { - var node = createNode(171); - parseExpected(16); - node.readonlyToken = parseOptionalToken(130); - parseExpected(20); - node.typeParameter = parseMappedTypeParameter(); + var node = createNode(172); + parseExpected(17); + node.readonlyToken = parseOptionalToken(131); parseExpected(21); - node.questionToken = parseOptionalToken(54); + node.typeParameter = parseMappedTypeParameter(); + parseExpected(22); + node.questionToken = parseOptionalToken(55); node.type = parseTypeAnnotation(); parseSemicolon(); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseTupleType() { - var node = createNode(164); - node.elementTypes = parseBracketedList(20, parseType, 20, 21); + var node = createNode(165); + node.elementTypes = parseBracketedList(20, parseType, 21, 22); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(167); - parseExpected(18); - node.type = parseType(); + var node = createNode(168); parseExpected(19); + node.type = parseType(); + parseExpected(20); return finishNode(node); } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 160) { - parseExpected(93); + if (kind === 161) { + parseExpected(94); } - fillSignature(35, false, false, false, node); + fillSignature(36, false, false, false, node); return finishNode(node); } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token() === 22 ? undefined : node; + return token() === 23 ? undefined : node; } function parseLiteralTypeNode() { - var node = createNode(172); + var node = createNode(173); node.literal = parseSimpleUnaryExpression(); finishNode(node); return node; @@ -15525,42 +15534,42 @@ var ts; } function parseNonArrayType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 138: - case 129: case 133: + case 122: + case 137: + case 139: + case 130: + case 134: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseLiteralTypeNode(); - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); - case 104: - case 94: + case 105: + case 95: return parseTokenNode(); - case 98: { + case 99: { var thisKeyword = parseThisTypeNode(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 102: + case 103: return parseTypeQuery(); - case 16: + case 17: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 20: + case 21: return parseTupleType(); - case 18: + case 19: return parseParenthesizedType(); default: return parseTypeReference(); @@ -15568,32 +15577,32 @@ var ts; } function isStartOfType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 138: - case 94: - case 98: - case 102: - case 129: - case 16: - case 20: - case 26: + case 133: + case 122: + case 137: + case 105: + case 139: + case 95: + case 99: + case 103: + case 130: + case 17: + case 21: + case 27: + case 49: case 48: - case 47: - case 93: + case 94: case 9: case 8: - case 100: - case 85: - case 133: + case 101: + case 86: + case 134: return true; - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral); - case 18: + case 19: return lookAhead(isStartOfParenthesizedOrFunctionType); default: return isIdentifier(); @@ -15601,29 +15610,29 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token() === 19 || isStartOfParameter() || isStartOfType(); + return token() === 20 || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) { + while (!scanner.hasPrecedingLineBreak() && parseOptional(21)) { if (isStartOfType()) { - var node = createNode(170, type.pos); + var node = createNode(171, type.pos); node.objectType = type; node.indexType = parseType(); - parseExpected(21); + parseExpected(22); type = finishNode(node); } else { - var node = createNode(163, type.pos); + var node = createNode(164, type.pos); node.elementType = type; - parseExpected(21); + parseExpected(22); type = finishNode(node); } } return type; } function parseTypeOperator(operator) { - var node = createNode(169); + var node = createNode(170); parseExpected(operator); node.operator = operator; node.type = parseTypeOperatorOrHigher(); @@ -15631,8 +15640,8 @@ var ts; } function parseTypeOperatorOrHigher() { switch (token()) { - case 126: - return parseTypeOperator(126); + case 127: + return parseTypeOperator(127); } return parseArrayTypeOrHigher(); } @@ -15652,26 +15661,26 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47); + return parseUnionOrIntersectionType(167, parseTypeOperatorOrHigher, 48); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48); + return parseUnionOrIntersectionType(166, parseIntersectionTypeOrHigher, 49); } function isStartOfFunctionType() { - if (token() === 26) { + if (token() === 27) { return true; } - return token() === 18 && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 19 && lookAhead(isUnambiguouslyStartOfFunctionType); } function skipParameterStart() { if (ts.isModifierKind(token())) { parseModifiers(); } - if (isIdentifier() || token() === 98) { + if (isIdentifier() || token() === 99) { nextToken(); return true; } - if (token() === 20 || token() === 16) { + if (token() === 21 || token() === 17) { var previousErrorCount = parseDiagnostics.length; parseIdentifierOrPattern(); return previousErrorCount === parseDiagnostics.length; @@ -15680,17 +15689,17 @@ var ts; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token() === 19 || token() === 23) { + if (token() === 20 || token() === 24) { return true; } if (skipParameterStart()) { - if (token() === 55 || token() === 25 || - token() === 54 || token() === 57) { + if (token() === 56 || token() === 26 || + token() === 55 || token() === 58) { return true; } - if (token() === 19) { + if (token() === 20) { nextToken(); - if (token() === 35) { + if (token() === 36) { return true; } } @@ -15701,7 +15710,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(157, typePredicateVariable.pos); + var node = createNode(158, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -15712,7 +15721,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -15722,36 +15731,36 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(159); - } - if (token() === 93) { return parseFunctionOrConstructorType(160); } + if (token() === 94) { + return parseFunctionOrConstructorType(161); + } return parseUnionTypeOrHigher(); } function parseTypeAnnotation() { - return parseOptional(55) ? parseType() : undefined; + return parseOptional(56) ? parseType() : undefined; } function isStartOfLeftHandSideExpression() { switch (token()) { - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: case 8: case 9: - case 12: case 13: - case 18: - case 20: - case 16: - case 88: - case 74: - case 93: - case 40: - case 62: - case 70: + case 14: + case 19: + case 21: + case 17: + case 89: + case 75: + case 94: + case 41: + case 63: + case 71: return true; default: return isIdentifier(); @@ -15762,18 +15771,18 @@ var ts; return true; } switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 42: + case 80: + case 103: + case 105: case 43: - case 26: - case 120: - case 115: + case 44: + case 27: + case 121: + case 116: return true; default: if (isBinaryOperator()) { @@ -15783,10 +15792,10 @@ var ts; } } function isStartOfExpressionStatement() { - return token() !== 16 && - token() !== 88 && - token() !== 74 && - token() !== 56 && + return token() !== 17 && + token() !== 89 && + token() !== 75 && + token() !== 57 && isStartOfExpression(); } function parseExpression() { @@ -15796,7 +15805,7 @@ var ts; } var expr = parseAssignmentExpressionOrHigher(); var operatorToken; - while ((operatorToken = parseOptionalToken(25))) { + while ((operatorToken = parseOptionalToken(26))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } if (saveDecoratorContext) { @@ -15805,12 +15814,12 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token() !== 57) { - if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 16) || !isStartOfExpression()) { + if (token() !== 58) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 17) || !isStartOfExpression()) { return undefined; } } - parseExpected(57); + parseExpected(58); return parseAssignmentExpressionOrHigher(); } function parseAssignmentExpressionOrHigher() { @@ -15822,7 +15831,7 @@ var ts; return arrowExpression; } var expr = parseBinaryExpressionOrHigher(0); - if (expr.kind === 70 && token() === 35) { + if (expr.kind === 71 && token() === 36) { return parseSimpleArrowFunctionExpression(expr); } if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { @@ -15831,7 +15840,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token() === 115) { + if (token() === 116) { if (inYieldContext()) { return true; } @@ -15844,11 +15853,11 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(196); + var node = createNode(197); nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token() === 38 || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(38); + (token() === 39 || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(39); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -15857,21 +15866,21 @@ var ts; } } function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { - ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + ts.Debug.assert(token() === 36, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); var node; if (asyncModifier) { - node = createNode(186, asyncModifier.pos); + node = createNode(187, asyncModifier.pos); node.modifiers = asyncModifier; } else { - node = createNode(186, identifier.pos); + node = createNode(187, identifier.pos); } - var parameter = createNode(145, identifier.pos); + var parameter = createNode(146, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = createNodeArray([parameter], parameter.pos); node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(!!asyncModifier); return addJSDocComment(finishNode(node)); } @@ -15888,78 +15897,78 @@ var ts; } var isAsync = !!(ts.getModifierFlags(arrowFunction) & 256); var lastToken = token(); - arrowFunction.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 35 || lastToken === 16) + arrowFunction.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 36 || lastToken === 17) ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return addJSDocComment(finishNode(arrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 18 || token() === 26 || token() === 119) { + if (token() === 19 || token() === 27 || token() === 120) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token() === 35) { + if (token() === 36) { return 1; } return 0; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0; } - if (token() !== 18 && token() !== 26) { + if (token() !== 19 && token() !== 27) { return 0; } } var first = token(); var second = nextToken(); - if (first === 18) { - if (second === 19) { + if (first === 19) { + if (second === 20) { var third = nextToken(); switch (third) { - case 35: - case 55: - case 16: + case 36: + case 56: + case 17: return 1; default: return 0; } } - if (second === 20 || second === 16) { + if (second === 21 || second === 17) { return 2; } - if (second === 23) { + if (second === 24) { return 1; } if (!isIdentifier()) { return 0; } - if (nextToken() === 55) { + if (nextToken() === 56) { return 1; } return 2; } else { - ts.Debug.assert(first === 26); + ts.Debug.assert(first === 27); if (!isIdentifier()) { return 0; } if (sourceFile.languageVariant === 1) { var isArrowFunctionInJsx = lookAhead(function () { var third = nextToken(); - if (third === 84) { + if (third === 85) { var fourth = nextToken(); switch (fourth) { - case 57: - case 28: + case 58: + case 29: return false; default: return true; } } - else if (third === 25) { + else if (third === 26) { return true; } return false; @@ -15976,7 +15985,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(false); } function tryParseAsyncSimpleArrowFunctionExpression() { - if (token() === 119) { + if (token() === 120) { var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); if (isUnParenthesizedAsyncArrowFunction === 1) { var asyncModifier = parseModifiersForArrowFunction(); @@ -15987,38 +15996,38 @@ var ts; return undefined; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); - if (scanner.hasPrecedingLineBreak() || token() === 35) { + if (scanner.hasPrecedingLineBreak() || token() === 36) { return 0; } var expr = parseBinaryExpressionOrHigher(0); - if (!scanner.hasPrecedingLineBreak() && expr.kind === 70 && token() === 35) { + if (!scanner.hasPrecedingLineBreak() && expr.kind === 71 && token() === 36) { return 1; } } return 0; } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(186); + var node = createNode(187); node.modifiers = parseModifiersForArrowFunction(); var isAsync = !!(ts.getModifierFlags(node) & 256); - fillSignature(55, false, isAsync, !allowAmbiguity, node); + fillSignature(56, false, isAsync, !allowAmbiguity, node); if (!node.parameters) { return undefined; } - if (!allowAmbiguity && token() !== 35 && token() !== 16) { + if (!allowAmbiguity && token() !== 36 && token() !== 17) { return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token() === 16) { + if (token() === 17) { return parseFunctionBlock(false, isAsync, false); } - if (token() !== 24 && - token() !== 88 && - token() !== 74 && + if (token() !== 25 && + token() !== 89 && + token() !== 75 && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(false, isAsync, true); @@ -16028,15 +16037,15 @@ var ts; : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); } function parseConditionalExpressionRest(leftOperand) { - var questionToken = parseOptionalToken(54); + var questionToken = parseOptionalToken(55); if (!questionToken) { return leftOperand; } - var node = createNode(194, leftOperand.pos); + var node = createNode(195, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(55, false, ts.Diagnostics._0_expected, ts.tokenToString(55)); + node.colonToken = parseExpectedToken(56, false, ts.Diagnostics._0_expected, ts.tokenToString(56)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -16045,22 +16054,22 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 91 || t === 141; + return t === 92 || t === 142; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { reScanGreaterToken(); var newPrecedence = getBinaryOperatorPrecedence(); - var consumeCurrentOperator = token() === 39 ? + var consumeCurrentOperator = token() === 40 ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token() === 91 && inDisallowInContext()) { + if (token() === 92 && inDisallowInContext()) { break; } - if (token() === 117) { + if (token() === 118) { if (scanner.hasPrecedingLineBreak()) { break; } @@ -16076,92 +16085,92 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token() === 91) { + if (inDisallowInContext() && token() === 92) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { switch (token()) { - case 53: + case 54: return 1; - case 52: + case 53: return 2; - case 48: - return 3; case 49: + return 3; + case 50: return 4; - case 47: + case 48: return 5; - case 31: case 32: case 33: case 34: + case 35: return 6; - case 26: - case 28: + case 27: case 29: case 30: + case 31: + case 93: case 92: - case 91: - case 117: + case 118: return 7; - case 44: case 45: case 46: + case 47: return 8; - case 36: case 37: - return 9; case 38: - case 40: + return 9; + case 39: case 41: + case 42: return 10; - case 39: + case 40: return 11; } return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(193, left.pos); + var node = createNode(194, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(201, left.pos); + var node = createNode(202, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(191); + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(187); + var node = createNode(188); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(188); + var node = createNode(189); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(189); + var node = createNode(190); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token() === 120) { + if (token() === 121) { if (inAwaitContext()) { return true; } @@ -16170,7 +16179,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(190); + var node = createNode(191); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -16178,15 +16187,15 @@ var ts; function parseUnaryExpressionOrHigher() { if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token() === 39 ? + return token() === 40 ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 39) { + if (token() === 40) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 183) { + if (simpleUnaryExpression.kind === 184) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -16197,20 +16206,20 @@ var ts; } function parseSimpleUnaryExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: return parsePrefixUnaryExpression(); - case 79: + case 80: return parseDeleteExpression(); - case 102: + case 103: return parseTypeOfExpression(); - case 104: + case 105: return parseVoidExpression(); - case 26: + case 27: return parseTypeAssertion(); - case 120: + case 121: if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -16220,16 +16229,16 @@ var ts; } function isUpdateExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 120: + case 80: + case 103: + case 105: + case 121: return false; - case 26: + case 27: if (sourceFile.languageVariant !== 1) { return false; } @@ -16238,20 +16247,20 @@ var ts; } } function parseIncrementExpression() { - if (token() === 42 || token() === 43) { - var node = createNode(191); + if (token() === 43 || token() === 44) { + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 && token() === 26 && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 && token() === 27 && lookAhead(nextTokenIsIdentifierOrKeyword)) { return parseJsxElementOrSelfClosingElement(true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(192, expression.pos); + if ((token() === 43 || token() === 44) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(193, expression.pos); node.operand = expression; node.operator = token(); nextToken(); @@ -16260,7 +16269,7 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token() === 96 + var expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); @@ -16271,12 +16280,12 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token() === 18 || token() === 22 || token() === 20) { + if (token() === 19 || token() === 23 || token() === 21) { return expression; } - var node = createNode(178, expression.pos); + var node = createNode(179, expression.pos); node.expression = expression; - parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(23, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -16284,10 +16293,10 @@ var ts; if (lhs.kind !== rhs.kind) { return false; } - if (lhs.kind === 70) { + if (lhs.kind === 71) { return lhs.text === rhs.text; } - if (lhs.kind === 98) { + if (lhs.kind === 99) { return true; } return lhs.name.text === rhs.name.text && @@ -16296,8 +16305,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 250) { - var node = createNode(248, opening.pos); + if (opening.kind === 251) { + var node = createNode(249, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -16307,18 +16316,18 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 249); + ts.Debug.assert(opening.kind === 250); result = opening; } - if (inExpressionContext && token() === 26) { + if (inExpressionContext && token() === 27) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(193, result.pos); + var badNode = createNode(194, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(25, false, undefined); + badNode.operatorToken = createMissingNode(26, false, undefined); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } @@ -16327,16 +16336,18 @@ var ts; } function parseJsxText() { var node = createNode(10, scanner.getStartPos()); + node.containsOnlyWhiteSpaces = currentToken === 11; currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token()) { case 10: + case 11: return parseJsxText(); - case 16: + case 17: return parseJsxExpression(false); - case 26: + case 27: return parseJsxElementOrSelfClosingElement(false); } ts.Debug.fail("Unknown JSX child kind " + token()); @@ -16347,7 +16358,7 @@ var ts; parsingContext |= 1 << 14; while (true) { currentToken = scanner.reScanJsxToken(); - if (token() === 27) { + if (token() === 28) { break; } else if (token() === 1) { @@ -16357,37 +16368,40 @@ var ts; else if (token() === 7) { break; } - result.push(parseJsxChild()); + var child = parseJsxChild(); + if (child) { + result.push(child); + } } result.end = scanner.getTokenPos(); parsingContext = saveParsingContext; return result; } function parseJsxAttributes() { - var jsxAttributes = createNode(253); + var jsxAttributes = createNode(254); jsxAttributes.properties = parseList(13, parseJsxAttribute); return finishNode(jsxAttributes); } function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { var fullStart = scanner.getStartPos(); - parseExpected(26); + parseExpected(27); var tagName = parseJsxElementName(); var attributes = parseJsxAttributes(); var node; - if (token() === 28) { - node = createNode(250, fullStart); + if (token() === 29) { + node = createNode(251, fullStart); scanJsxText(); } else { - parseExpected(40); + parseExpected(41); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } - node = createNode(249, fullStart); + node = createNode(250, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -16395,10 +16409,10 @@ var ts; } function parseJsxElementName() { scanJsxIdentifier(); - var expression = token() === 98 ? + var expression = token() === 99 ? parseTokenNode() : parseIdentifierName(); - while (parseOptional(22)) { - var propertyAccess = createNode(178, expression.pos); + while (parseOptional(23)) { + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); @@ -16406,29 +16420,29 @@ var ts; return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(255); - parseExpected(16); - if (token() !== 17) { - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(256); + parseExpected(17); + if (token() !== 18) { + node.dotDotDotToken = parseOptionalToken(24); node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { - parseExpected(17); + parseExpected(18); } else { - parseExpected(17, undefined, false); + parseExpected(18, undefined, false); scanJsxText(); } return finishNode(node); } function parseJsxAttribute() { - if (token() === 16) { + if (token() === 17) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(252); + var node = createNode(253); node.name = parseIdentifierName(); - if (token() === 57) { + if (token() === 58) { switch (scanJsxAttributeValue()) { case 9: node.initializer = parseLiteralNode(); @@ -16441,69 +16455,69 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(254); - parseExpected(16); - parseExpected(23); - node.expression = parseExpression(); + var node = createNode(255); parseExpected(17); + parseExpected(24); + node.expression = parseExpression(); + parseExpected(18); return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(251); - parseExpected(27); + var node = createNode(252); + parseExpected(28); node.tagName = parseJsxElementName(); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } return finishNode(node); } function parseTypeAssertion() { - var node = createNode(183); - parseExpected(26); + var node = createNode(184); + parseExpected(27); node.type = parseType(); - parseExpected(28); + parseExpected(29); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseMemberExpressionRest(expression) { while (true) { - var dotToken = parseOptionalToken(22); + var dotToken = parseOptionalToken(23); if (dotToken) { - var propertyAccess = createNode(178, expression.pos); + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; } - if (token() === 50 && !scanner.hasPrecedingLineBreak()) { + if (token() === 51 && !scanner.hasPrecedingLineBreak()) { nextToken(); - var nonNullExpression = createNode(202, expression.pos); + var nonNullExpression = createNode(203, expression.pos); nonNullExpression.expression = expression; expression = finishNode(nonNullExpression); continue; } - if (!inDecoratorContext() && parseOptional(20)) { - var indexedAccess = createNode(179, expression.pos); + if (!inDecoratorContext() && parseOptional(21)) { + var indexedAccess = createNode(180, expression.pos); indexedAccess.expression = expression; - if (token() !== 21) { + if (token() !== 22) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 || indexedAccess.argumentExpression.kind === 8) { var literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } - parseExpected(21); + parseExpected(22); expression = finishNode(indexedAccess); continue; } - if (token() === 12 || token() === 13) { - var tagExpression = createNode(182, expression.pos); + if (token() === 13 || token() === 14) { + var tagExpression = createNode(183, expression.pos); tagExpression.tag = expression; - tagExpression.template = token() === 12 + tagExpression.template = token() === 13 ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -16515,20 +16529,20 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token() === 26) { + if (token() === 27) { var typeArguments = tryParse(parseTypeArgumentsInExpression); if (!typeArguments) { return expression; } - var callExpr = createNode(180, expression.pos); + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token() === 18) { - var callExpr = createNode(180, expression.pos); + else if (token() === 19) { + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -16538,17 +16552,17 @@ var ts; } } function parseArgumentList() { - parseExpected(18); - var result = parseDelimitedList(11, parseArgumentExpression); parseExpected(19); + var result = parseDelimitedList(11, parseArgumentExpression); + parseExpected(20); return result; } function parseTypeArgumentsInExpression() { - if (!parseOptional(26)) { + if (!parseOptional(27)) { return undefined; } var typeArguments = parseDelimitedList(19, parseType); - if (!parseExpected(28)) { + if (!parseExpected(29)) { return undefined; } return typeArguments && canFollowTypeArgumentsInExpression() @@ -16557,27 +16571,27 @@ var ts; } function canFollowTypeArgumentsInExpression() { switch (token()) { - case 18: - case 22: case 19: - case 21: + case 23: + case 20: + case 22: + case 56: + case 25: case 55: - case 24: - case 54: - case 31: - case 33: case 32: case 34: - case 52: + case 33: + case 35: case 53: - case 49: - case 47: + case 54: + case 50: case 48: - case 17: + case 49: + case 18: case 1: return true; - case 25: - case 16: + case 26: + case 17: default: return false; } @@ -16586,87 +16600,87 @@ var ts; switch (token()) { case 8: case 9: - case 12: + case 13: return parseLiteralNode(); - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: return parseTokenNode(); - case 18: + case 19: return parseParenthesizedExpression(); - case 20: + case 21: return parseArrayLiteralExpression(); - case 16: + case 17: return parseObjectLiteralExpression(); - case 119: + case 120: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); - case 74: + case 75: return parseClassExpression(); - case 88: + case 89: return parseFunctionExpression(); - case 93: + case 94: return parseNewExpression(); - case 40: - case 62: - if (reScanSlashToken() === 11) { + case 41: + case 63: + if (reScanSlashToken() === 12) { return parseLiteralNode(); } break; - case 13: + case 14: return parseTemplateExpression(); } return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(184); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(185); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); return finishNode(node); } function parseSpreadElement() { - var node = createNode(197); - parseExpected(23); + var node = createNode(198); + parseExpected(24); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token() === 23 ? parseSpreadElement() : - token() === 25 ? createNode(199) : + return token() === 24 ? parseSpreadElement() : + token() === 26 ? createNode(200) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(176); - parseExpected(20); + var node = createNode(177); + parseExpected(21); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.elements = parseDelimitedList(15, parseArgumentOrArrayLiteralElement); - parseExpected(21); + parseExpected(22); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(124)) { - return parseAccessorDeclaration(152, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(134)) { + if (parseContextualModifier(125)) { return parseAccessorDeclaration(153, fullStart, decorators, modifiers); } + else if (parseContextualModifier(135)) { + return parseAccessorDeclaration(154, fullStart, decorators, modifiers); + } return undefined; } function parseObjectLiteralElement() { var fullStart = scanner.getStartPos(); - var dotDotDotToken = parseOptionalToken(23); + var dotDotDotToken = parseOptionalToken(24); if (dotDotDotToken) { - var spreadElement = createNode(262, fullStart); + var spreadElement = createNode(263, fullStart); spreadElement.expression = parseAssignmentExpressionOrHigher(); return addJSDocComment(finishNode(spreadElement)); } @@ -16676,19 +16690,19 @@ var ts; if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 26 || token() === 18 || token() === 58); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(261, fullStart); + var shorthandDeclaration = createNode(262, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(57); + var equalsToken = parseOptionalToken(58); if (equalsToken) { shorthandDeclaration.equalsToken = equalsToken; shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); @@ -16696,23 +16710,23 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(260, fullStart); + var propertyAssignment = createNode(261, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; - parseExpected(55); + parseExpected(56); propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); return addJSDocComment(finishNode(propertyAssignment)); } } function parseObjectLiteralExpression() { - var node = createNode(177); - parseExpected(16); + var node = createNode(178); + parseExpected(17); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.properties = parseDelimitedList(12, parseObjectLiteralElement, true); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseFunctionExpression() { @@ -16720,10 +16734,10 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(false); } - var node = createNode(185); + var node = createNode(186); node.modifiers = parseModifiers(); - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); var isGenerator = !!node.asteriskToken; var isAsync = !!(ts.getModifierFlags(node) & 256); node.name = @@ -16731,7 +16745,7 @@ var ts; isGenerator ? doInYieldContext(parseOptionalIdentifier) : isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlock(isGenerator, isAsync, false); if (saveDecoratorContext) { setDecoratorContext(true); @@ -16743,29 +16757,29 @@ var ts; } function parseNewExpression() { var fullStart = scanner.getStartPos(); - parseExpected(93); - if (parseOptional(22)) { - var node_1 = createNode(203, fullStart); - node_1.keywordToken = 93; + parseExpected(94); + if (parseOptional(23)) { + var node_1 = createNode(204, fullStart); + node_1.keywordToken = 94; node_1.name = parseIdentifierName(); return finishNode(node_1); } - var node = createNode(181, fullStart); + var node = createNode(182, fullStart); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token() === 18) { + if (node.typeArguments || token() === 19) { node.arguments = parseArgumentList(); } return finishNode(node); } function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(206); - if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) { + var node = createNode(207); + if (parseExpected(17, diagnosticMessage) || ignoreMissingOpenBrace) { if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -16790,48 +16804,48 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(208); - parseExpected(24); + var node = createNode(209); + parseExpected(25); return finishNode(node); } function parseIfStatement() { - var node = createNode(210); - parseExpected(89); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(211); + parseExpected(90); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(81) ? parseStatement() : undefined; + node.elseStatement = parseOptional(82) ? parseStatement() : undefined; return finishNode(node); } function parseDoStatement() { - var node = createNode(211); - parseExpected(80); + var node = createNode(212); + parseExpected(81); node.statement = parseStatement(); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + parseExpected(106); parseExpected(19); - parseOptional(24); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + parseOptional(25); return finishNode(node); } function parseWhileStatement() { - var node = createNode(212); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(213); + parseExpected(106); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseForOrForInOrForOfStatement() { var pos = getNodePos(); - parseExpected(87); - var awaitToken = parseOptionalToken(120); - parseExpected(18); + parseExpected(88); + var awaitToken = parseOptionalToken(121); + parseExpected(19); var initializer = undefined; - if (token() !== 24) { - if (token() === 103 || token() === 109 || token() === 75) { + if (token() !== 25) { + if (token() === 104 || token() === 110 || token() === 76) { initializer = parseVariableDeclarationList(true); } else { @@ -16839,33 +16853,33 @@ var ts; } } var forOrForInOrForOfStatement; - if (awaitToken ? parseExpected(141) : parseOptional(141)) { - var forOfStatement = createNode(215, pos); + if (awaitToken ? parseExpected(142) : parseOptional(142)) { + var forOfStatement = createNode(216, pos); forOfStatement.awaitModifier = awaitToken; forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forOfStatement; } - else if (parseOptional(91)) { - var forInStatement = createNode(214, pos); + else if (parseOptional(92)) { + var forInStatement = createNode(215, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forInStatement; } else { - var forStatement = createNode(213, pos); + var forStatement = createNode(214, pos); forStatement.initializer = initializer; - parseExpected(24); - if (token() !== 24 && token() !== 19) { + parseExpected(25); + if (token() !== 25 && token() !== 20) { forStatement.condition = allowInAnd(parseExpression); } - parseExpected(24); - if (token() !== 19) { + parseExpected(25); + if (token() !== 20) { forStatement.incrementor = allowInAnd(parseExpression); } - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forStatement; } forOrForInOrForOfStatement.statement = parseStatement(); @@ -16873,7 +16887,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 217 ? 71 : 76); + parseExpected(kind === 218 ? 72 : 77); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -16881,8 +16895,8 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(218); - parseExpected(95); + var node = createNode(219); + parseExpected(96); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); } @@ -16890,90 +16904,90 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(219); - parseExpected(106); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(220); + parseExpected(107); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseCaseClause() { - var node = createNode(256); - parseExpected(72); + var node = createNode(257); + parseExpected(73); node.expression = allowInAnd(parseExpression); - parseExpected(55); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseDefaultClause() { - var node = createNode(257); - parseExpected(78); - parseExpected(55); + var node = createNode(258); + parseExpected(79); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token() === 72 ? parseCaseClause() : parseDefaultClause(); + return token() === 73 ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(220); - parseExpected(97); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(221); + parseExpected(98); parseExpected(19); - var caseBlock = createNode(234, scanner.getStartPos()); - parseExpected(16); - caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + var caseBlock = createNode(235, scanner.getStartPos()); parseExpected(17); + caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + parseExpected(18); node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { - var node = createNode(222); - parseExpected(99); + var node = createNode(223); + parseExpected(100); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } function parseTryStatement() { - var node = createNode(223); - parseExpected(101); + var node = createNode(224); + parseExpected(102); node.tryBlock = parseBlock(false); - node.catchClause = token() === 73 ? parseCatchClause() : undefined; - if (!node.catchClause || token() === 86) { - parseExpected(86); + node.catchClause = token() === 74 ? parseCatchClause() : undefined; + if (!node.catchClause || token() === 87) { + parseExpected(87); node.finallyBlock = parseBlock(false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(259); - parseExpected(73); - if (parseExpected(18)) { + var result = createNode(260); + parseExpected(74); + if (parseExpected(19)) { result.variableDeclaration = parseVariableDeclaration(); } - parseExpected(19); + parseExpected(20); result.block = parseBlock(false); return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(224); - parseExpected(77); + var node = createNode(225); + parseExpected(78); parseSemicolon(); return finishNode(node); } function parseExpressionOrLabeledStatement() { var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); - if (expression.kind === 70 && parseOptional(55)) { - var labeledStatement = createNode(221, fullStart); + if (expression.kind === 71 && parseOptional(56)) { + var labeledStatement = createNode(222, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(209, fullStart); + var expressionStatement = createNode(210, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -16985,11 +16999,11 @@ var ts; } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 74 && !scanner.hasPrecedingLineBreak(); + return token() === 75 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 88 && !scanner.hasPrecedingLineBreak(); + return token() === 89 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); @@ -16998,47 +17012,47 @@ var ts; function isDeclaration() { while (true) { switch (token()) { - case 103: - case 109: + case 104: + case 110: + case 76: + case 89: case 75: - case 88: - case 74: - case 82: + case 83: return true; - case 108: - case 137: + case 109: + case 138: return nextTokenIsIdentifierOnSameLine(); - case 127: case 128: + case 129: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 116: - case 119: - case 123: - case 111: + case 117: + case 120: + case 124: case 112: case 113: - case 130: + case 114: + case 131: nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 140: + case 141: nextToken(); - return token() === 16 || token() === 70 || token() === 83; - case 90: + return token() === 17 || token() === 71 || token() === 84; + case 91: nextToken(); - return token() === 9 || token() === 38 || - token() === 16 || ts.tokenIsIdentifierOrKeyword(token()); - case 83: + return token() === 9 || token() === 39 || + token() === 17 || ts.tokenIsIdentifierOrKeyword(token()); + case 84: nextToken(); - if (token() === 57 || token() === 38 || - token() === 16 || token() === 78 || - token() === 117) { + if (token() === 58 || token() === 39 || + token() === 17 || token() === 79 || + token() === 118) { return true; } continue; - case 114: + case 115: nextToken(); continue; default: @@ -17051,46 +17065,46 @@ var ts; } function isStartOfStatement() { switch (token()) { - case 56: - case 24: - case 16: - case 103: - case 109: - case 88: - case 74: - case 82: + case 57: + case 25: + case 17: + case 104: + case 110: case 89: - case 80: - case 105: - case 87: - case 76: - case 71: - case 95: - case 106: - case 97: - case 99: - case 101: - case 77: - case 73: - case 86: - return true; case 75: case 83: case 90: + case 81: + case 106: + case 88: + case 77: + case 72: + case 96: + case 107: + case 98: + case 100: + case 102: + case 78: + case 74: + case 87: + return true; + case 76: + case 84: + case 91: return isStartOfDeclaration(); - case 119: - case 123: - case 108: - case 127: + case 120: + case 124: + case 109: case 128: - case 137: - case 140: + case 129: + case 138: + case 141: return true; - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -17098,73 +17112,73 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token() === 16 || token() === 20; + return isIdentifier() || token() === 17 || token() === 21; } function isLetDeclaration() { return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); } function parseStatement() { switch (token()) { - case 24: + case 25: return parseEmptyStatement(); - case 16: + case 17: return parseBlock(false); - case 103: + case 104: return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 109: + case 110: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined, undefined); } break; - case 88: + case 89: return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 74: + case 75: return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 89: + case 90: return parseIfStatement(); - case 80: + case 81: return parseDoStatement(); - case 105: + case 106: return parseWhileStatement(); - case 87: + case 88: return parseForOrForInOrForOfStatement(); - case 76: - return parseBreakOrContinueStatement(216); - case 71: + case 77: return parseBreakOrContinueStatement(217); - case 95: + case 72: + return parseBreakOrContinueStatement(218); + case 96: return parseReturnStatement(); - case 106: + case 107: return parseWithStatement(); - case 97: + case 98: return parseSwitchStatement(); - case 99: + case 100: return parseThrowStatement(); - case 101: - case 73: - case 86: + case 102: + case 74: + case 87: return parseTryStatement(); - case 77: + case 78: return parseDebuggerStatement(); - case 56: + case 57: return parseDeclaration(); - case 119: - case 108: - case 137: - case 127: + case 120: + case 109: + case 138: case 128: - case 123: - case 75: - case 82: + case 129: + case 124: + case 76: case 83: - case 90: - case 111: + case 84: + case 91: case 112: case 113: - case 116: case 114: - case 130: - case 140: + case 117: + case 115: + case 131: + case 141: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -17177,40 +17191,40 @@ var ts; var decorators = parseDecorators(); var modifiers = parseModifiers(); switch (token()) { - case 103: - case 109: - case 75: + case 104: + case 110: + case 76: return parseVariableStatement(fullStart, decorators, modifiers); - case 88: + case 89: return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 74: + case 75: return parseClassDeclaration(fullStart, decorators, modifiers); - case 108: + case 109: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 137: + case 138: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 82: + case 83: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 140: - case 127: + case 141: case 128: + case 129: return parseModuleDeclaration(fullStart, decorators, modifiers); - case 90: + case 91: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 83: + case 84: nextToken(); switch (token()) { - case 78: - case 57: + case 79: + case 58: return parseExportAssignment(fullStart, decorators, modifiers); - case 117: + case 118: return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); default: return parseExportDeclaration(fullStart, decorators, modifiers); } default: if (decorators || modifiers) { - var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(247, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; node.modifiers = modifiers; @@ -17223,32 +17237,32 @@ var ts; return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token() !== 16 && canParseSemicolon()) { + if (token() !== 17 && canParseSemicolon()) { parseSemicolon(); return; } return parseFunctionBlock(isGenerator, isAsync, false, diagnosticMessage); } function parseArrayBindingElement() { - if (token() === 25) { - return createNode(199); + if (token() === 26) { + return createNode(200); } - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token() !== 55) { + if (tokenIsIdentifier && token() !== 56) { node.name = propertyName; } else { - parseExpected(55); + parseExpected(56); node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } @@ -17256,33 +17270,33 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(173); - parseExpected(16); - node.elements = parseDelimitedList(9, parseObjectBindingElement); + var node = createNode(174); parseExpected(17); + node.elements = parseDelimitedList(9, parseObjectBindingElement); + parseExpected(18); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(174); - parseExpected(20); - node.elements = parseDelimitedList(10, parseArrayBindingElement); + var node = createNode(175); parseExpected(21); + node.elements = parseDelimitedList(10, parseArrayBindingElement); + parseExpected(22); return finishNode(node); } function isIdentifierOrPattern() { - return token() === 16 || token() === 20 || isIdentifier(); + return token() === 17 || token() === 21 || isIdentifier(); } function parseIdentifierOrPattern() { - if (token() === 20) { + if (token() === 21) { return parseArrayBindingPattern(); } - if (token() === 16) { + if (token() === 17) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(225); + var node = createNode(226); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token())) { @@ -17291,21 +17305,21 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(226); + var node = createNode(227); switch (token()) { - case 103: + case 104: break; - case 109: + case 110: node.flags |= 1; break; - case 75: + case 76: node.flags |= 2; break; default: ts.Debug.fail(); } nextToken(); - if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 142 && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -17317,10 +17331,10 @@ var ts; return finishNode(node); } function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 19; + return nextTokenIsIdentifier() && nextToken() === 20; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(207, fullStart); + var node = createNode(208, fullStart); node.decorators = decorators; node.modifiers = modifiers; node.declarationList = parseVariableDeclarationList(false); @@ -17328,29 +17342,29 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(227, fullStart); + var node = createNode(228, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); node.name = ts.hasModifier(node, 512) ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = ts.hasModifier(node, 256); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(151, pos); + var node = createNode(152, pos); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(122); - fillSignature(55, false, false, false, node); + parseExpected(123); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(150, fullStart); + var method = createNode(151, fullStart); method.decorators = decorators; method.modifiers = modifiers; method.asteriskToken = asteriskToken; @@ -17358,12 +17372,12 @@ var ts; method.questionToken = questionToken; var isGenerator = !!asteriskToken; var isAsync = ts.hasModifier(method, 256); - fillSignature(55, isGenerator, isAsync, false, method); + fillSignature(56, isGenerator, isAsync, false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(148, fullStart); + var property = createNode(149, fullStart); property.decorators = decorators; property.modifiers = modifiers; property.name = name; @@ -17376,10 +17390,10 @@ var ts; return addJSDocComment(finishNode(property)); } function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -17394,17 +17408,17 @@ var ts; node.decorators = decorators; node.modifiers = modifiers; node.name = parsePropertyName(); - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false); return addJSDocComment(finishNode(node)); } function isClassMemberModifier(idToken) { switch (idToken) { - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return true; default: return false; @@ -17412,7 +17426,7 @@ var ts; } function isClassMemberStart() { var idToken; - if (token() === 56) { + if (token() === 57) { return true; } while (ts.isModifierKind(token())) { @@ -17422,26 +17436,26 @@ var ts; } nextToken(); } - if (token() === 38) { + if (token() === 39) { return true; } if (isLiteralPropertyName()) { idToken = token(); nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) { + if (!ts.isKeyword(idToken) || idToken === 135 || idToken === 125) { return true; } switch (token()) { - case 18: - case 26: + case 19: + case 27: + case 56: + case 58: case 55: - case 57: - case 54: return true; default: return canParseSemicolon(); @@ -17453,10 +17467,10 @@ var ts; var decorators; while (true) { var decoratorStart = getNodePos(); - if (!parseOptional(56)) { + if (!parseOptional(57)) { break; } - var decorator = createNode(146, decoratorStart); + var decorator = createNode(147, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); finishNode(decorator); if (!decorators) { @@ -17476,7 +17490,7 @@ var ts; while (true) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); - if (token() === 75 && permitInvalidConstAsModifier) { + if (token() === 76 && permitInvalidConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { break; } @@ -17501,7 +17515,7 @@ var ts; } function parseModifiersForArrowFunction() { var modifiers; - if (token() === 119) { + if (token() === 120) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); nextToken(); @@ -17512,8 +17526,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token() === 24) { - var result = createNode(205); + if (token() === 25) { + var result = createNode(206); nextToken(); return finishNode(result); } @@ -17524,7 +17538,7 @@ var ts; if (accessor) { return accessor; } - if (token() === 122) { + if (token() === 123) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -17533,33 +17547,33 @@ var ts; if (ts.tokenIsIdentifierOrKeyword(token()) || token() === 9 || token() === 8 || - token() === 38 || - token() === 20) { + token() === 39 || + token() === 21) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { - var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected); + var name = createMissingNode(71, true, ts.Diagnostics.Declaration_expected); return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined); } ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198); + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 199); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 229); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(74); + parseExpected(75); node.name = parseNameOfClassDeclarationOrExpression(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseClassMembers(); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -17572,7 +17586,7 @@ var ts; : undefined; } function isImplementsClause() { - return token() === 107 && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 108 && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause()) { @@ -17582,8 +17596,8 @@ var ts; } function parseHeritageClause() { var tok = token(); - if (tok === 84 || tok === 107) { - var node = createNode(258); + if (tok === 85 || tok === 108) { + var node = createNode(259); node.token = tok; nextToken(); node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); @@ -17592,24 +17606,24 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(200); + var node = createNode(201); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function isHeritageClause() { - return token() === 84 || token() === 107; + return token() === 85 || token() === 108; } function parseClassMembers() { return parseList(5, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(229, fullStart); + var node = createNode(230, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(108); + parseExpected(109); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); @@ -17617,32 +17631,32 @@ var ts; return addJSDocComment(finishNode(node)); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230, fullStart); + var node = createNode(231, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(137); + parseExpected(138); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); - parseExpected(57); + parseExpected(58); node.type = parseType(); parseSemicolon(); return addJSDocComment(finishNode(node)); } function parseEnumMember() { - var node = createNode(263, scanner.getStartPos()); + var node = createNode(264, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return addJSDocComment(finishNode(node)); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231, fullStart); + var node = createNode(232, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(82); + parseExpected(83); node.name = parseIdentifier(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseDelimitedList(6, parseEnumMember); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -17650,10 +17664,10 @@ var ts; return addJSDocComment(finishNode(node)); } function parseModuleBlock() { - var node = createNode(233, scanner.getStartPos()); - if (parseExpected(16)) { + var node = createNode(234, scanner.getStartPos()); + if (parseExpected(17)) { node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -17661,29 +17675,29 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); var namespaceFlag = flags & 16; node.decorators = decorators; node.modifiers = modifiers; node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(22) + node.body = parseOptional(23) ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 4 | namespaceFlag) : parseModuleBlock(); return addJSDocComment(finishNode(node)); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (token() === 140) { + if (token() === 141) { node.name = parseIdentifier(); node.flags |= 512; } else { node.name = parseLiteralNode(true); } - if (token() === 16) { + if (token() === 17) { node.body = parseModuleBlock(); } else { @@ -17693,14 +17707,14 @@ var ts; } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = 0; - if (token() === 140) { + if (token() === 141) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } - else if (parseOptional(128)) { + else if (parseOptional(129)) { flags |= 16; } else { - parseExpected(127); + parseExpected(128); if (token() === 9) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } @@ -17708,66 +17722,66 @@ var ts; return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token() === 131 && + return token() === 132 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { - return nextToken() === 18; + return nextToken() === 19; } function nextTokenIsSlash() { - return nextToken() === 40; + return nextToken() === 41; } function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { - var exportDeclaration = createNode(235, fullStart); + var exportDeclaration = createNode(236, fullStart); exportDeclaration.decorators = decorators; exportDeclaration.modifiers = modifiers; - parseExpected(117); - parseExpected(128); + parseExpected(118); + parseExpected(129); exportDeclaration.name = parseIdentifier(); parseSemicolon(); return finishNode(exportDeclaration); } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(90); + parseExpected(91); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token() !== 25 && token() !== 139) { + if (token() !== 26 && token() !== 140) { return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier); } } - var importDeclaration = createNode(237, fullStart); + var importDeclaration = createNode(238, fullStart); importDeclaration.decorators = decorators; importDeclaration.modifiers = modifiers; if (identifier || - token() === 38 || - token() === 16) { + token() === 39 || + token() === 17) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(139); + parseExpected(140); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) { - var importEqualsDeclaration = createNode(236, fullStart); + var importEqualsDeclaration = createNode(237, fullStart); importEqualsDeclaration.decorators = decorators; importEqualsDeclaration.modifiers = modifiers; importEqualsDeclaration.name = identifier; - parseExpected(57); + parseExpected(58); importEqualsDeclaration.moduleReference = parseModuleReference(); parseSemicolon(); return addJSDocComment(finishNode(importEqualsDeclaration)); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(238, fullStart); + var importClause = createNode(239, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || - parseOptional(25)) { - importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240); + parseOptional(26)) { + importClause.namedBindings = token() === 39 ? parseNamespaceImport() : parseNamedImportsOrExports(241); } return finishNode(importClause); } @@ -17777,11 +17791,11 @@ var ts; : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(247); - parseExpected(131); - parseExpected(18); - node.expression = parseModuleSpecifier(); + var node = createNode(248); + parseExpected(132); parseExpected(19); + node.expression = parseModuleSpecifier(); + parseExpected(20); return finishNode(node); } function parseModuleSpecifier() { @@ -17795,22 +17809,22 @@ var ts; } } function parseNamespaceImport() { - var namespaceImport = createNode(239); - parseExpected(38); - parseExpected(117); + var namespaceImport = createNode(240); + parseExpected(39); + parseExpected(118); namespaceImport.name = parseIdentifier(); return finishNode(namespaceImport); } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17); + node.elements = parseBracketedList(22, kind === 241 ? parseImportSpecifier : parseExportSpecifier, 17, 18); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(245); + return parseImportOrExportSpecifier(246); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(241); + return parseImportOrExportSpecifier(242); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -17818,9 +17832,9 @@ var ts; var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token() === 117) { + if (token() === 118) { node.propertyName = identifierName; - parseExpected(117); + parseExpected(118); checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); @@ -17829,23 +17843,23 @@ var ts; else { node.name = identifierName; } - if (kind === 241 && checkIdentifierIsKeyword) { + if (kind === 242 && checkIdentifierIsKeyword) { parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(243, fullStart); + var node = createNode(244, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(38)) { - parseExpected(139); + if (parseOptional(39)) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(244); - if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { - parseExpected(139); + node.exportClause = parseNamedImportsOrExports(245); + if (token() === 140 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -17853,14 +17867,14 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(242, fullStart); + var node = createNode(243, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(57)) { + if (parseOptional(58)) { node.isExportEquals = true; } else { - parseExpected(78); + parseExpected(79); } node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); @@ -17947,10 +17961,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return ts.hasModifier(node, 1) - || node.kind === 236 && node.moduleReference.kind === 247 - || node.kind === 237 - || node.kind === 242 + || node.kind === 237 && node.moduleReference.kind === 248 + || node.kind === 238 || node.kind === 243 + || node.kind === 244 ? node : undefined; }); @@ -17996,16 +18010,16 @@ var ts; (function (JSDocParser) { function isJSDocType() { switch (token()) { - case 38: - case 54: - case 18: - case 20: - case 50: - case 16: - case 88: - case 23: - case 93: - case 98: + case 39: + case 55: + case 19: + case 21: + case 51: + case 17: + case 89: + case 24: + case 94: + case 99: return true; } return ts.tokenIsIdentifierOrKeyword(token()); @@ -18023,23 +18037,23 @@ var ts; } JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; function parseJSDocTypeExpression() { - var result = createNode(266, scanner.getTokenPos()); - parseExpected(16); - result.type = parseJSDocTopLevelType(); + var result = createNode(267, scanner.getTokenPos()); parseExpected(17); + result.type = parseJSDocTopLevelType(); + parseExpected(18); fixupParentReferences(result); return finishNode(result); } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token() === 48) { - var unionType = createNode(270, type.pos); + if (token() === 49) { + var unionType = createNode(271, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token() === 57) { - var optionalType = createNode(277, type.pos); + if (token() === 58) { + var optionalType = createNode(278, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -18049,21 +18063,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token() === 20) { - var arrayType = createNode(269, type.pos); + if (token() === 21) { + var arrayType = createNode(270, type.pos); arrayType.elementType = type; nextToken(); - parseExpected(21); + parseExpected(22); type = finishNode(arrayType); } - else if (token() === 54) { - var nullableType = createNode(272, type.pos); + else if (token() === 55) { + var nullableType = createNode(273, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token() === 50) { - var nonNullableType = createNode(273, type.pos); + else if (token() === 51) { + var nonNullableType = createNode(274, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -18076,95 +18090,95 @@ var ts; } function parseBasicTypeExpression() { switch (token()) { - case 38: + case 39: return parseJSDocAllType(); - case 54: + case 55: return parseJSDocUnknownOrNullableType(); - case 18: + case 19: return parseJSDocUnionType(); - case 20: + case 21: return parseJSDocTupleType(); - case 50: + case 51: return parseJSDocNonNullableType(); - case 16: + case 17: return parseJSDocRecordType(); - case 88: + case 89: return parseJSDocFunctionType(); - case 23: + case 24: return parseJSDocVariadicType(); - case 93: + case 94: return parseJSDocConstructorType(); - case 98: + case 99: return parseJSDocThisType(); - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 94: - case 138: - case 129: case 133: + case 122: + case 137: + case 105: + case 95: + case 139: + case 130: + case 134: return parseTokenNode(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseJSDocLiteralType(); } return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(281); + var result = createNode(282); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(280); + var result = createNode(281); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(279); + var result = createNode(280); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(278); + var result = createNode(279); nextToken(); - parseExpected(18); + parseExpected(19); result.parameters = parseDelimitedList(23, parseJSDocParameter); checkForTrailingComma(result.parameters); - parseExpected(19); - if (token() === 55) { + parseExpected(20); + if (token() === 56) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(145); + var parameter = createNode(146); parameter.type = parseJSDocType(); - if (parseOptional(57)) { - parameter.questionToken = createNode(57); + if (parseOptional(58)) { + parameter.questionToken = createNode(58); } return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(276); + var result = createNode(277); result.name = parseSimplePropertyName(); - if (token() === 26) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); } else { - while (parseOptional(22)) { - if (token() === 26) { + while (parseOptional(23)) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); break; } @@ -18180,7 +18194,7 @@ var ts; var typeArguments = parseDelimitedList(24, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); - parseExpected(28); + parseExpected(29); return typeArguments; } function checkForEmptyTypeArgumentList(typeArguments) { @@ -18191,28 +18205,28 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(142, left.pos); + var result = createNode(143, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(274); + var result = createNode(275); result.literal = parseTypeLiteral(); return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(273); + var result = createNode(274); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(271); + var result = createNode(272); nextToken(); result.types = parseDelimitedList(26, parseJSDocType); checkForTrailingComma(result.types); - parseExpected(21); + parseExpected(22); return finishNode(result); } function checkForTrailingComma(list) { @@ -18222,45 +18236,45 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(270); + var result = createNode(271); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(19); + parseExpected(20); return finishNode(result); } function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = createNodeArray([firstType], firstType.pos); - while (parseOptional(48)) { + while (parseOptional(49)) { types.push(parseJSDocType()); } types.end = scanner.getStartPos(); return types; } function parseJSDocAllType() { - var result = createNode(267); + var result = createNode(268); nextToken(); return finishNode(result); } function parseJSDocLiteralType() { - var result = createNode(292); + var result = createNode(293); result.literal = parseLiteralTypeNode(); return finishNode(result); } function parseJSDocUnknownOrNullableType() { var pos = scanner.getStartPos(); nextToken(); - if (token() === 25 || - token() === 17 || - token() === 19 || - token() === 28 || - token() === 57 || - token() === 48) { - var result = createNode(268, pos); + if (token() === 26 || + token() === 18 || + token() === 20 || + token() === 29 || + token() === 58 || + token() === 49) { + var result = createNode(269, pos); return finishNode(result); } else { - var result = createNode(272, pos); + var result = createNode(273, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -18331,7 +18345,7 @@ var ts; } while (token() !== 1) { switch (token()) { - case 56: + case 57: if (state === 0 || state === 1) { removeTrailingNewlines(comments); parseTag(indent); @@ -18349,7 +18363,7 @@ var ts; state = 0; indent = 0; break; - case 38: + case 39: var asterisk = scanner.getTokenText(); if (state === 1 || state === 2) { state = 2; @@ -18360,7 +18374,7 @@ var ts; indent += asterisk.length; } break; - case 70: + case 71: pushComment(scanner.getTokenText()); state = 2; break; @@ -18410,7 +18424,7 @@ var ts; content.charCodeAt(start + 3) !== 42; } function createJSDocComment() { - var result = createNode(282, start); + var result = createNode(283, start); result.tags = tags; result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -18421,8 +18435,8 @@ var ts; } } function parseTag(indent) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getTokenPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -18476,7 +18490,7 @@ var ts; comments.push(text); indent += text.length; } - while (token() !== 56 && token() !== 1) { + while (token() !== 57 && token() !== 1) { switch (token()) { case 4: if (state >= 1) { @@ -18485,7 +18499,7 @@ var ts; } indent = 0; break; - case 56: + case 57: break; case 5: if (state === 2) { @@ -18499,7 +18513,7 @@ var ts; indent += whitespace.length; } break; - case 38: + case 39: if (state === 0) { state = 1; indent += scanner.getTokenText().length; @@ -18510,7 +18524,7 @@ var ts; pushComment(scanner.getTokenText()); break; } - if (token() === 56) { + if (token() === 57) { break; } nextJSDocToken(); @@ -18520,7 +18534,7 @@ var ts; return comments; } function parseUnknownTag(atToken, tagName) { - var result = createNode(283, atToken.pos); + var result = createNode(284, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -18538,7 +18552,7 @@ var ts; function tryParseTypeExpression() { return tryParse(function () { skipWhitespace(); - if (token() !== 16) { + if (token() !== 17) { return undefined; } return parseJSDocTypeExpression(); @@ -18549,14 +18563,14 @@ var ts; skipWhitespace(); var name; var isBracketed; - if (parseOptionalToken(20)) { + if (parseOptionalToken(21)) { name = parseJSDocIdentifierName(); skipWhitespace(); isBracketed = true; - if (parseOptionalToken(57)) { + if (parseOptionalToken(58)) { parseExpression(); } - parseExpected(21); + parseExpected(22); } else if (ts.tokenIsIdentifierOrKeyword(token())) { name = parseJSDocIdentifierName(); @@ -18575,7 +18589,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(285, atToken.pos); + var result = createNode(286, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -18586,20 +18600,20 @@ var ts; return finishNode(result); } function parseReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 286; })) { + if (ts.forEach(tags, function (t) { return t.kind === 287; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(286, atToken.pos); + var result = createNode(287, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function parseTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 287; })) { + if (ts.forEach(tags, function (t) { return t.kind === 288; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(287, atToken.pos); + var result = createNode(288, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); @@ -18614,7 +18628,7 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var result = createNode(290, atToken.pos); + var result = createNode(291, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.name = name; @@ -18623,7 +18637,7 @@ var ts; } function parseAugmentsTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); - var result = createNode(284, atToken.pos); + var result = createNode(285, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = typeExpression; @@ -18632,15 +18646,15 @@ var ts; function parseTypedefTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); - var typedefTag = createNode(289, atToken.pos); + var typedefTag = createNode(290, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(0); if (typedefTag.fullName) { var rightNode = typedefTag.fullName; while (true) { - if (rightNode.kind === 70 || !rightNode.body) { - typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name; + if (rightNode.kind === 71 || !rightNode.body) { + typedefTag.name = rightNode.kind === 71 ? rightNode : rightNode.name; break; } rightNode = rightNode.body; @@ -18649,9 +18663,9 @@ var ts; typedefTag.typeExpression = typeExpression; skipWhitespace(); if (typeExpression) { - if (typeExpression.type.kind === 276) { + if (typeExpression.type.kind === 277) { var jsDocTypeReference = typeExpression.type; - if (jsDocTypeReference.name.kind === 70) { + if (jsDocTypeReference.name.kind === 71) { var name = jsDocTypeReference.name; if (name.text === "Object") { typedefTag.jsDocTypeLiteral = scanChildTags(); @@ -18667,7 +18681,7 @@ var ts; } return finishNode(typedefTag); function scanChildTags() { - var jsDocTypeLiteral = createNode(291, scanner.getStartPos()); + var jsDocTypeLiteral = createNode(292, scanner.getStartPos()); var resumePos = scanner.getStartPos(); var canParseTag = true; var seenAsterisk = false; @@ -18675,7 +18689,7 @@ var ts; while (token() !== 1 && !parentTagTerminated) { nextJSDocToken(); switch (token()) { - case 56: + case 57: if (canParseTag) { parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); if (!parentTagTerminated) { @@ -18689,13 +18703,13 @@ var ts; canParseTag = true; seenAsterisk = false; break; - case 38: + case 39: if (seenAsterisk) { canParseTag = false; } seenAsterisk = true; break; - case 70: + case 71: canParseTag = false; break; case 1: @@ -18708,8 +18722,8 @@ var ts; function parseJSDocTypeNameWithNamespace(flags) { var pos = scanner.getTokenPos(); var typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (typeNameOrNamespaceName && parseOptional(22)) { - var jsDocNamespaceNode = createNode(232, pos); + if (typeNameOrNamespaceName && parseOptional(23)) { + var jsDocNamespaceNode = createNode(233, pos); jsDocNamespaceNode.flags |= flags; jsDocNamespaceNode.name = typeNameOrNamespaceName; jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4); @@ -18722,8 +18736,8 @@ var ts; } } function tryParseChildTag(parentTag) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getStartPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getStartPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -18753,7 +18767,7 @@ var ts; return false; } function parseTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 288; })) { + if (ts.forEach(tags, function (t) { return t.kind === 289; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } var typeParameters = createNodeArray(); @@ -18764,11 +18778,11 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(144, name.pos); + var typeParameter = createNode(145, name.pos); typeParameter.name = name; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token() === 25) { + if (token() === 26) { nextJSDocToken(); skipWhitespace(); } @@ -18776,7 +18790,7 @@ var ts; break; } } - var result = createNode(288, atToken.pos); + var result = createNode(289, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -18797,7 +18811,7 @@ var ts; } var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); - var result = createNode(70, pos); + var result = createNode(71, pos); result.text = content.substring(pos, end); finishNode(result, end); nextJSDocToken(); @@ -18878,7 +18892,7 @@ var ts; switch (node.kind) { case 9: case 8: - case 70: + case 71: return true; } return false; @@ -19105,16 +19119,16 @@ var ts; ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; })(ModuleInstanceState = ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); function getModuleInstanceState(node) { - if (node.kind === 229 || node.kind === 230) { + if (node.kind === 230 || node.kind === 231) { return 0; } else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) { + else if ((node.kind === 238 || node.kind === 237) && !(ts.hasModifier(node, 1))) { return 0; } - else if (node.kind === 233) { + else if (node.kind === 234) { var state_1 = 0; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -19130,11 +19144,11 @@ var ts; }); return state_1; } - else if (node.kind === 232) { + else if (node.kind === 233) { var body = node.body; return body ? getModuleInstanceState(body) : 1; } - else if (node.kind === 70 && node.isInJSDocNamespace) { + else if (node.kind === 71 && node.isInJSDocNamespace) { return 0; } else { @@ -19251,7 +19265,7 @@ var ts; if (symbolFlags & 107455) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 233)) { symbol.valueDeclaration = node; } } @@ -19261,7 +19275,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 143) { + if (node.name.kind === 144) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression)) { return nameExpression.text; @@ -19272,21 +19286,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 151: + case 152: return "__constructor"; - case 159: - case 154: - return "__call"; case 160: case 155: - return "__new"; + return "__call"; + case 161: case 156: + return "__new"; + case 157: return "__index"; - case 243: + case 244: return "__export"; - case 242: + case 243: return node.isExportEquals ? "export=" : "default"; - case 193: + case 194: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2: return "export="; @@ -19299,23 +19313,23 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 227: case 228: + case 229: return ts.hasModifier(node, 512) ? "default" : undefined; - case 278: + case 279: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 145: - ts.Debug.assert(node.parent.kind === 278); + case 146: + ts.Debug.assert(node.parent.kind === 279); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "arg" + index; - case 289: + case 290: var parentNode = node.parent && node.parent.parent; var nameFromParentNode = void 0; - if (parentNode && parentNode.kind === 207) { + if (parentNode && parentNode.kind === 208) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70) { + if (nameIdentifier.kind === 71) { nameFromParentNode = nameIdentifier.text; } } @@ -19359,7 +19373,7 @@ var ts; } else { if (symbol.declarations && symbol.declarations.length && - (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) { + (isDefaultExport || (node.kind === 243 && !node.isExportEquals))) { message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; } } @@ -19379,7 +19393,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedModifierFlags(node) & 1; if (symbolFlags & 8388608) { - if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) { + if (node.kind === 246 || (node.kind === 237 && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -19387,9 +19401,9 @@ var ts; } } else { - var isJSDocTypedefInJSDocNamespace = node.kind === 289 && + var isJSDocTypedefInJSDocNamespace = node.kind === 290 && node.name && - node.name.kind === 70 && + node.name.kind === 71 && node.name.isInJSDocNamespace; if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32)) || isJSDocTypedefInJSDocNamespace) { var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | @@ -19448,7 +19462,7 @@ var ts; if (hasExplicitReturn) node.flags |= 256; } - if (node.kind === 264) { + if (node.kind === 265) { node.flags |= emitFlags; } if (isIIFE) { @@ -19524,70 +19538,70 @@ var ts; return; } switch (node.kind) { - case 212: + case 213: bindWhileStatement(node); break; - case 211: + case 212: bindDoStatement(node); break; - case 213: + case 214: bindForStatement(node); break; - case 214: case 215: + case 216: bindForInOrForOfStatement(node); break; - case 210: + case 211: bindIfStatement(node); break; - case 218: - case 222: + case 219: + case 223: bindReturnOrThrow(node); break; + case 218: case 217: - case 216: bindBreakOrContinueStatement(node); break; - case 223: + case 224: bindTryStatement(node); break; - case 220: + case 221: bindSwitchStatement(node); break; - case 234: + case 235: bindCaseBlock(node); break; - case 256: + case 257: bindCaseClause(node); break; - case 221: + case 222: bindLabeledStatement(node); break; - case 191: + case 192: bindPrefixUnaryExpressionFlow(node); break; - case 192: + case 193: bindPostfixUnaryExpressionFlow(node); break; - case 193: + case 194: bindBinaryExpressionFlow(node); break; - case 187: + case 188: bindDeleteExpressionFlow(node); break; - case 194: + case 195: bindConditionalExpressionFlow(node); break; - case 225: + case 226: bindVariableDeclarationFlow(node); break; - case 180: + case 181: bindCallExpressionFlow(node); break; - case 282: + case 283: bindJSDocComment(node); break; - case 289: + case 290: bindJSDocTypedefTag(node); break; default: @@ -19597,26 +19611,26 @@ var ts; } function isNarrowingExpression(expr) { switch (expr.kind) { - case 70: - case 98: - case 178: + case 71: + case 99: + case 179: return isNarrowableReference(expr); - case 180: + case 181: return hasNarrowableArgument(expr); - case 184: + case 185: return isNarrowingExpression(expr.expression); - case 193: + case 194: return isNarrowingBinaryExpression(expr); - case 191: - return expr.operator === 50 && isNarrowingExpression(expr.operand); + case 192: + return expr.operator === 51 && isNarrowingExpression(expr.operand); } return false; } function isNarrowableReference(expr) { - return expr.kind === 70 || - expr.kind === 98 || - expr.kind === 96 || - expr.kind === 178 && isNarrowableReference(expr.expression); + return expr.kind === 71 || + expr.kind === 99 || + expr.kind === 97 || + expr.kind === 179 && isNarrowableReference(expr.expression); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -19627,41 +19641,41 @@ var ts; } } } - if (expr.expression.kind === 178 && + if (expr.expression.kind === 179 && isNarrowableReference(expr.expression.expression)) { return true; } return false; } function isNarrowingTypeofOperands(expr1, expr2) { - return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; + return expr1.kind === 189 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; } function isNarrowingBinaryExpression(expr) { switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableReference(expr.left); - case 31: case 32: case 33: case 34: + case 35: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 92: + case 93: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowingExpression(expr.right); } return false; } function isNarrowableOperand(expr) { switch (expr.kind) { - case 184: + case 185: return isNarrowableOperand(expr.expression); - case 193: + case 194: switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowableOperand(expr.right); } } @@ -19695,8 +19709,8 @@ var ts; if (!expression) { return flags & 32 ? antecedent : unreachableFlow; } - if (expression.kind === 100 && flags & 64 || - expression.kind === 85 && flags & 32) { + if (expression.kind === 101 && flags & 64 || + expression.kind === 86 && flags & 32) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -19751,34 +19765,34 @@ var ts; function isStatementCondition(node) { var parent = node.parent; switch (parent.kind) { - case 210: - case 212: case 211: - return parent.expression === node; case 213: - case 194: + case 212: + return parent.expression === node; + case 214: + case 195: return parent.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 184) { + if (node.kind === 185) { node = node.expression; } - else if (node.kind === 191 && node.operator === 50) { + else if (node.kind === 192 && node.operator === 51) { node = node.operand; } else { - return node.kind === 193 && (node.operatorToken.kind === 52 || - node.operatorToken.kind === 53); + return node.kind === 194 && (node.operatorToken.kind === 53 || + node.operatorToken.kind === 54); } } } function isTopLevelLogicalExpression(node) { - while (node.parent.kind === 184 || - node.parent.kind === 191 && - node.parent.operator === 50) { + while (node.parent.kind === 185 || + node.parent.kind === 192 && + node.parent.operator === 51) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent); @@ -19819,7 +19833,7 @@ var ts; } function bindDoStatement(node) { var preDoLabel = createLoopLabel(); - var enclosingLabeledStatement = node.parent.kind === 221 + var enclosingLabeledStatement = node.parent.kind === 222 ? ts.lastOrUndefined(activeLabels) : undefined; var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel(); @@ -19851,13 +19865,13 @@ var ts; var postLoopLabel = createBranchLabel(); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 215) { + if (node.kind === 216) { bind(node.awaitModifier); } bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 226) { + if (node.initializer.kind !== 227) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -19879,7 +19893,7 @@ var ts; } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 218) { + if (node.kind === 219) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -19899,7 +19913,7 @@ var ts; return undefined; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - var flowLabel = node.kind === 217 ? breakTarget : continueTarget; + var flowLabel = node.kind === 218 ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -19962,7 +19976,7 @@ var ts; preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; }); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 258; }); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -20027,13 +20041,13 @@ var ts; if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); } - if (!node.statement || node.statement.kind !== 211) { + if (!node.statement || node.statement.kind !== 212) { addAntecedent(postStatementLabel, currentFlow); currentFlow = finishFlowLabel(postStatementLabel); } } function bindDestructuringTargetFlow(node) { - if (node.kind === 193 && node.operatorToken.kind === 57) { + if (node.kind === 194 && node.operatorToken.kind === 58) { bindAssignmentTargetFlow(node.left); } else { @@ -20044,10 +20058,10 @@ var ts; if (isNarrowableReference(node)) { currentFlow = createFlowAssignment(currentFlow, node); } - else if (node.kind === 176) { + else if (node.kind === 177) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { var e = _a[_i]; - if (e.kind === 197) { + if (e.kind === 198) { bindAssignmentTargetFlow(e.expression); } else { @@ -20055,16 +20069,16 @@ var ts; } } } - else if (node.kind === 177) { + else if (node.kind === 178) { for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { var p = _c[_b]; - if (p.kind === 260) { + if (p.kind === 261) { bindDestructuringTargetFlow(p.initializer); } - else if (p.kind === 261) { + else if (p.kind === 262) { bindAssignmentTargetFlow(p.name); } - else if (p.kind === 262) { + else if (p.kind === 263) { bindAssignmentTargetFlow(p.expression); } } @@ -20072,7 +20086,7 @@ var ts; } function bindLogicalExpression(node, trueTarget, falseTarget) { var preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { bindCondition(node.left, preRightLabel, falseTarget); } else { @@ -20083,7 +20097,7 @@ var ts; bindCondition(node.right, trueTarget, falseTarget); } function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 50) { + if (node.operator === 51) { var saveTrueTarget = currentTrueTarget; currentTrueTarget = currentFalseTarget; currentFalseTarget = saveTrueTarget; @@ -20093,20 +20107,20 @@ var ts; } else { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } } function bindPostfixUnaryExpressionFlow(node) { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } function bindBinaryExpressionFlow(node) { var operator = node.operatorToken.kind; - if (operator === 52 || operator === 53) { + if (operator === 53 || operator === 54) { if (isTopLevelLogicalExpression(node)) { var postExpressionLabel = createBranchLabel(); bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); @@ -20120,7 +20134,7 @@ var ts; bindEachChild(node); if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 57 && node.left.kind === 179) { + if (operator === 58 && node.left.kind === 180) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -20131,7 +20145,7 @@ var ts; } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { bindAssignmentTargetFlow(node.expression); } } @@ -20164,20 +20178,20 @@ var ts; } function bindVariableDeclarationFlow(node) { bindEachChild(node); - if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) { + if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) { bindInitializedVariableFlow(node); } } function bindJSDocComment(node) { ts.forEachChild(node, function (n) { - if (n.kind !== 289) { + if (n.kind !== 290) { bind(n); } }); } function bindJSDocTypedefTag(node) { ts.forEachChild(node, function (n) { - if (node.fullName && n === node.name && node.fullName.kind !== 70) { + if (node.fullName && n === node.name && node.fullName.kind !== 71) { return; } bind(n); @@ -20185,10 +20199,10 @@ var ts; } function bindCallExpressionFlow(node) { var expr = node.expression; - while (expr.kind === 184) { + while (expr.kind === 185) { expr = expr.expression; } - if (expr.kind === 185 || expr.kind === 186) { + if (expr.kind === 186 || expr.kind === 187) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -20196,7 +20210,7 @@ var ts; else { bindEachChild(node); } - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -20205,53 +20219,53 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 198: - case 228: - case 231: - case 177: - case 162: - case 291: - case 274: - case 253: - return 1; + case 199: case 229: - return 1 | 64; - case 278: case 232: + case 178: + case 163: + case 292: + case 275: + case 254: + return 1; case 230: - case 171: + return 1 | 64; + case 279: + case 233: + case 231: + case 172: return 1 | 32; - case 264: + case 265: return 1 | 4 | 32; - case 150: + case 151: if (ts.isObjectLiteralOrClassExpressionMethod(node)) { return 1 | 4 | 32 | 8 | 128; } - case 151: - case 227: - case 149: case 152: + case 228: + case 150: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return 1 | 4 | 32 | 8; - case 185: case 186: + case 187: return 1 | 4 | 32 | 8 | 16; - case 233: + case 234: return 4; - case 148: + case 149: return node.initializer ? 4 : 0; - case 259: - case 213: + case 260: case 214: case 215: - case 234: + case 216: + case 235: return 2; - case 206: + case 207: return ts.isFunctionLike(node.parent) ? 0 : 2; } return 0; @@ -20267,38 +20281,38 @@ var ts; } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 232: + case 233: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 264: + case 265: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 198: - case 228: + case 199: + case 229: return declareClassMember(node, symbolFlags, symbolExcludes); - case 231: + case 232: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 162: - case 177: - case 229: - case 274: - case 291: - case 253: + case 163: + case 178: + case 230: + case 275: + case 292: + case 254: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 159: case 160: - case 154: + case 161: case 155: case 156: - case 150: - case 149: + case 157: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: case 186: - case 278: - case 230: - case 171: + case 187: + case 279: + case 231: + case 172: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } } @@ -20313,11 +20327,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 264 ? node : node.body; - if (body && (body.kind === 264 || body.kind === 233)) { + var body = node.kind === 265 ? node : node.body; + if (body && (body.kind === 265 || body.kind === 234)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 243 || stat.kind === 242) { + if (stat.kind === 244 || stat.kind === 243) { return true; } } @@ -20400,11 +20414,11 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 || prop.name.kind !== 70) { + if (prop.kind === 263 || prop.name.kind !== 71) { continue; } var identifier = prop.name; - var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150 + var currentKind = prop.kind === 261 || prop.kind === 262 || prop.kind === 151 ? 1 : 2; var existingKind = seen.get(identifier.text); @@ -20432,10 +20446,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 232: + case 233: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 264: + case 265: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -20453,8 +20467,8 @@ var ts; } function checkStrictModeIdentifier(node) { if (inStrictMode && - node.originalKeywordKind >= 107 && - node.originalKeywordKind <= 115 && + node.originalKeywordKind >= 108 && + node.originalKeywordKind <= 116 && !ts.isIdentifierName(node) && !ts.isInAmbientContext(node)) { if (!file.parseDiagnostics.length) { @@ -20482,17 +20496,17 @@ var ts; } } function checkStrictModeDeleteExpression(node) { - if (inStrictMode && node.expression.kind === 70) { + if (inStrictMode && node.expression.kind === 71) { var span_2 = ts.getErrorSpanForNode(file, node.expression); file.bindDiagnostics.push(ts.createFileDiagnostic(file, span_2.start, span_2.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); } } function isEvalOrArgumentsIdentifier(node) { - return node.kind === 70 && + return node.kind === 71 && (node.text === "eval" || node.text === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 70) { + if (name && name.kind === 71) { var identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { var span_3 = ts.getErrorSpanForNode(file, name); @@ -20525,8 +20539,8 @@ var ts; } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2) { - if (blockScopeContainer.kind !== 264 && - blockScopeContainer.kind !== 232 && + if (blockScopeContainer.kind !== 265 && + blockScopeContainer.kind !== 233 && !ts.isFunctionLike(blockScopeContainer)) { var errorSpan = ts.getErrorSpanForNode(file, node); file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); @@ -20545,7 +20559,7 @@ var ts; } function checkStrictModePrefixUnaryExpression(node) { if (inStrictMode) { - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { checkStrictModeEvalOrArguments(node, node.operand); } } @@ -20572,7 +20586,7 @@ var ts; bindJSDocTypedefTagIfAny(node); } bindWorker(node); - if (node.kind > 141) { + if (node.kind > 142) { var saveParent = parent; parent = node; var containerFlags = getContainerFlags(node); @@ -20600,7 +20614,7 @@ var ts; } for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) { var tag = _c[_b]; - if (tag.kind === 289) { + if (tag.kind === 290) { var savedParent = parent; parent = jsDoc; bind(tag); @@ -20629,26 +20643,26 @@ var ts; } function bindWorker(node) { switch (node.kind) { - case 70: + case 71: if (node.isInJSDocNamespace) { var parentNode = node.parent; - while (parentNode && parentNode.kind !== 289) { + while (parentNode && parentNode.kind !== 290) { parentNode = parentNode.parent; } bindBlockScopedDeclaration(parentNode, 524288, 793064); break; } - case 98: - if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) { + case 99: + if (currentFlow && (ts.isExpression(node) || parent.kind === 262)) { node.flowNode = currentFlow; } return checkStrictModeIdentifier(node); - case 178: + case 179: if (currentFlow && isNarrowableReference(node)) { node.flowNode = currentFlow; } break; - case 193: + case 194: var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { case 1: @@ -20672,49 +20686,49 @@ var ts; ts.Debug.fail("Unknown special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 259: + case 260: return checkStrictModeCatchClause(node); - case 187: + case 188: return checkStrictModeDeleteExpression(node); case 8: return checkStrictModeNumericLiteral(node); - case 192: + case 193: return checkStrictModePostfixUnaryExpression(node); - case 191: + case 192: return checkStrictModePrefixUnaryExpression(node); - case 219: + case 220: return checkStrictModeWithStatement(node); - case 168: + case 169: seenThisKeyword = true; return; - case 157: + case 158: return checkTypePredicate(node); - case 144: - return declareSymbolAndAddToSymbolTable(node, 262144, 530920); case 145: + return declareSymbolAndAddToSymbolTable(node, 262144, 530920); + case 146: return bindParameter(node); - case 225: - case 175: + case 226: + case 176: return bindVariableDeclarationOrBindingElement(node); + case 149: case 148: - case 147: - case 275: + case 276: return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0); - case 290: + case 291: return bindJSDocProperty(node); - case 260: case 261: + case 262: return bindPropertyOrMethodOrAccessor(node, 4, 0); - case 263: + case 264: return bindPropertyOrMethodOrAccessor(node, 8, 900095); - case 262: - case 254: + case 263: + case 255: var root = container; var hasRest = false; while (root.parent) { - if (root.kind === 177 && - root.parent.kind === 193 && - root.parent.operatorToken.kind === 57 && + if (root.kind === 178 && + root.parent.kind === 194 && + root.parent.operatorToken.kind === 58 && root.parent.left === root) { hasRest = true; break; @@ -20722,91 +20736,91 @@ var ts; root = root.parent; } return; - case 154: case 155: case 156: + case 157: return declareSymbolAndAddToSymbolTable(node, 131072, 0); + case 151: case 150: - case 149: return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263); - case 227: + case 228: return bindFunctionDeclaration(node); - case 151: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 152: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 153: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 154: return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 159: case 160: - case 278: + case 161: + case 279: return bindFunctionOrConstructorType(node); - case 162: - case 171: - case 291: - case 274: + case 163: + case 172: + case 292: + case 275: return bindAnonymousDeclaration(node, 2048, "__type"); - case 177: + case 178: return bindObjectLiteralExpression(node); - case 185: case 186: + case 187: return bindFunctionExpression(node); - case 180: + case 181: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; - case 198: - case 228: + case 199: + case 229: inStrictMode = true; return bindClassLikeDeclaration(node); - case 229: + case 230: return bindBlockScopedDeclaration(node, 64, 792968); - case 289: - if (!node.fullName || node.fullName.kind === 70) { + case 290: + if (!node.fullName || node.fullName.kind === 71) { return bindBlockScopedDeclaration(node, 524288, 793064); } break; - case 230: - return bindBlockScopedDeclaration(node, 524288, 793064); case 231: - return bindEnumDeclaration(node); + return bindBlockScopedDeclaration(node, 524288, 793064); case 232: + return bindEnumDeclaration(node); + case 233: return bindModuleDeclaration(node); - case 253: + case 254: return bindJsxAttributes(node); - case 252: + case 253: return bindJsxAttribute(node, 4, 0); - case 236: - case 239: - case 241: - case 245: + case 237: + case 240: + case 242: + case 246: return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 235: + case 236: return bindNamespaceExportDeclaration(node); - case 238: + case 239: return bindImportClause(node); - case 243: + case 244: return bindExportDeclaration(node); - case 242: + case 243: return bindExportAssignment(node); - case 264: + case 265: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 206: + case 207: if (!ts.isFunctionLike(node.parent)) { return; } - case 233: + case 234: return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { var parameterName = node.parameterName, type = node.type; - if (parameterName && parameterName.kind === 70) { + if (parameterName && parameterName.kind === 71) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 168) { + if (parameterName && parameterName.kind === 169) { seenThisKeyword = true; } bind(type); @@ -20825,7 +20839,7 @@ var ts; bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } else { - var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node) + var flags = node.kind === 243 && ts.exportAssignmentIsAlias(node) ? 8388608 : 4; declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16); @@ -20835,7 +20849,7 @@ var ts; if (node.modifiers && node.modifiers.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); } - if (node.parent.kind !== 264) { + if (node.parent.kind !== 265) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); return; } @@ -20884,9 +20898,9 @@ var ts; isNameOfExportsOrModuleExportsAliasDeclaration(node); } function isNameOfExportsOrModuleExportsAliasDeclaration(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = lookupSymbolForName(node.text); - if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) { + if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 226) { var declaration = symbol.valueDeclaration; if (declaration.initializer) { return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer); @@ -20912,16 +20926,16 @@ var ts; ts.Debug.assert(ts.isInJavaScriptFile(node)); var container = ts.getThisContainer(node, false); switch (container.kind) { - case 227: - case 185: + case 228: + case 186: container.symbol.members = container.symbol.members || ts.createMap(); declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4); break; - case 151: - case 148: - case 150: case 152: + case 149: + case 151: case 153: + case 154: var containingClass = container.parent; var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0); if (symbol) { @@ -20973,7 +20987,7 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 228) { + if (node.kind === 229) { bindBlockScopedDeclaration(node, 32, 899519); } else { @@ -21084,15 +21098,15 @@ var ts; return false; } if (currentFlow === unreachableFlow) { - var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) || - node.kind === 228 || - (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 209) || + node.kind === 229 || + (node.kind === 233 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 232 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentFlow = reportedUnreachableFlow; var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 207 || + (node.kind !== 208 || ts.getCombinedNodeFlags(node.declarationList) & 3 || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -21106,56 +21120,56 @@ var ts; function computeTransformFlagsForNode(node, subtreeFlags) { var kind = node.kind; switch (kind) { - case 180: - return computeCallExpression(node, subtreeFlags); case 181: + return computeCallExpression(node, subtreeFlags); + case 182: return computeNewExpression(node, subtreeFlags); - case 232: + case 233: return computeModuleDeclaration(node, subtreeFlags); - case 184: + case 185: return computeParenthesizedExpression(node, subtreeFlags); - case 193: + case 194: return computeBinaryExpression(node, subtreeFlags); - case 209: + case 210: return computeExpressionStatement(node, subtreeFlags); - case 145: + case 146: return computeParameter(node, subtreeFlags); - case 186: + case 187: return computeArrowFunction(node, subtreeFlags); - case 185: + case 186: return computeFunctionExpression(node, subtreeFlags); - case 227: + case 228: return computeFunctionDeclaration(node, subtreeFlags); - case 225: - return computeVariableDeclaration(node, subtreeFlags); case 226: + return computeVariableDeclaration(node, subtreeFlags); + case 227: return computeVariableDeclarationList(node, subtreeFlags); - case 207: + case 208: return computeVariableStatement(node, subtreeFlags); - case 221: + case 222: return computeLabeledStatement(node, subtreeFlags); - case 228: + case 229: return computeClassDeclaration(node, subtreeFlags); - case 198: + case 199: return computeClassExpression(node, subtreeFlags); - case 258: - return computeHeritageClause(node, subtreeFlags); case 259: + return computeHeritageClause(node, subtreeFlags); + case 260: return computeCatchClause(node, subtreeFlags); - case 200: + case 201: return computeExpressionWithTypeArguments(node, subtreeFlags); - case 151: + case 152: return computeConstructor(node, subtreeFlags); - case 148: + case 149: return computePropertyDeclaration(node, subtreeFlags); - case 150: + case 151: return computeMethod(node, subtreeFlags); - case 152: case 153: + case 154: return computeAccessor(node, subtreeFlags); - case 236: + case 237: return computeImportEquals(node, subtreeFlags); - case 178: + case 179: return computePropertyAccess(node, subtreeFlags); default: return computeOther(node, kind, subtreeFlags); @@ -21178,13 +21192,13 @@ var ts; } function isSuperOrSuperProperty(node, kind) { switch (kind) { - case 96: + case 97: return true; - case 178: case 179: + case 180: var expression = node.expression; var expressionKind = expression.kind; - return expressionKind === 96; + return expressionKind === 97; } return false; } @@ -21203,14 +21217,14 @@ var ts; var transformFlags = subtreeFlags; var operatorTokenKind = node.operatorToken.kind; var leftKind = node.left.kind; - if (operatorTokenKind === 57 && leftKind === 177) { + if (operatorTokenKind === 58 && leftKind === 178) { transformFlags |= 8 | 192 | 3072; } - else if (operatorTokenKind === 57 && leftKind === 176) { + else if (operatorTokenKind === 58 && leftKind === 177) { transformFlags |= 192 | 3072; } - else if (operatorTokenKind === 39 - || operatorTokenKind === 61) { + else if (operatorTokenKind === 40 + || operatorTokenKind === 62) { transformFlags |= 32; } node.transformFlags = transformFlags | 536870912; @@ -21245,8 +21259,8 @@ var ts; var expression = node.expression; var expressionKind = expression.kind; var expressionTransformFlags = expression.transformFlags; - if (expressionKind === 201 - || expressionKind === 183) { + if (expressionKind === 202 + || expressionKind === 184) { transformFlags |= 3; } if (expressionTransformFlags & 1024) { @@ -21289,10 +21303,10 @@ var ts; function computeHeritageClause(node, subtreeFlags) { var transformFlags = subtreeFlags; switch (node.token) { - case 84: + case 85: transformFlags |= 192; break; - case 107: + case 108: transformFlags |= 3; break; default: @@ -21448,7 +21462,7 @@ var ts; var transformFlags = subtreeFlags; var expression = node.expression; var expressionKind = expression.kind; - if (expressionKind === 96) { + if (expressionKind === 97) { transformFlags |= 16384; } node.transformFlags = transformFlags | 536870912; @@ -21531,44 +21545,44 @@ var ts; var transformFlags = subtreeFlags; var excludeFlags = 536872257; switch (kind) { - case 119: - case 190: + case 120: + case 191: transformFlags |= 8 | 16; break; - case 113: - case 111: + case 114: case 112: - case 116: - case 123: - case 75: - case 231: - case 263: - case 183: - case 201: + case 113: + case 117: + case 124: + case 76: + case 232: + case 264: + case 184: case 202: - case 130: + case 203: + case 131: transformFlags |= 3; break; - case 248: case 249: case 250: - case 10: case 251: + case 10: case 252: case 253: case 254: case 255: + case 256: transformFlags |= 4; break; - case 12: case 13: case 14: case 15: - case 195: - case 182: - case 261: - case 114: - case 203: + case 16: + case 196: + case 183: + case 262: + case 115: + case 204: transformFlags |= 192; break; case 9: @@ -21581,27 +21595,26 @@ var ts; transformFlags |= 192; } break; - case 215: + case 216: if (node.awaitModifier) { transformFlags |= 8; } transformFlags |= 192; break; - case 196: + case 197: transformFlags |= 8 | 192 | 16777216; break; - case 118: - case 132: - case 129: + case 119: case 133: - case 135: - case 121: + case 130: + case 134: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: case 157: @@ -21615,55 +21628,56 @@ var ts; case 165: case 166: case 167: - case 229: - case 230: case 168: + case 230: + case 231: case 169: case 170: case 171: case 172: + case 173: transformFlags = 3; excludeFlags = -3; break; - case 143: + case 144: transformFlags |= 2097152; if (subtreeFlags & 16384) { transformFlags |= 65536; } break; - case 197: + case 198: transformFlags |= 192 | 524288; break; - case 262: + case 263: transformFlags |= 8 | 1048576; break; - case 96: + case 97: transformFlags |= 192; break; - case 98: + case 99: transformFlags |= 16384; break; - case 173: + case 174: transformFlags |= 192 | 8388608; if (subtreeFlags & 524288) { transformFlags |= 8 | 1048576; } excludeFlags = 537396545; break; - case 174: + case 175: transformFlags |= 192 | 8388608; excludeFlags = 537396545; break; - case 175: + case 176: transformFlags |= 192; if (node.dotDotDotToken) { transformFlags |= 524288; } break; - case 146: + case 147: transformFlags |= 3 | 4096; break; - case 177: + case 178: excludeFlags = 540087617; if (subtreeFlags & 2097152) { transformFlags |= 192; @@ -21675,29 +21689,29 @@ var ts; transformFlags |= 8; } break; - case 176: - case 181: + case 177: + case 182: excludeFlags = 537396545; if (subtreeFlags & 524288) { transformFlags |= 192; } break; - case 211: case 212: case 213: case 214: + case 215: if (subtreeFlags & 4194304) { transformFlags |= 192; } break; - case 264: + case 265: if (subtreeFlags & 32768) { transformFlags |= 192; } break; - case 218: - case 216: + case 219: case 217: + case 218: transformFlags |= 33554432; break; } @@ -21705,57 +21719,57 @@ var ts; return transformFlags & ~excludeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 157 && kind <= 172) { + if (kind >= 158 && kind <= 173) { return -3; } switch (kind) { - case 180: case 181: - case 176: + case 182: + case 177: return 537396545; - case 232: + case 233: return 574674241; - case 145: + case 146: return 536872257; - case 186: + case 187: return 601249089; - case 185: - case 227: + case 186: + case 228: return 601281857; - case 226: + case 227: return 546309441; - case 228: - case 198: + case 229: + case 199: return 539358529; - case 151: - return 601015617; - case 150: case 152: + return 601015617; + case 151: case 153: + case 154: return 601015617; - case 118: - case 132: - case 129: - case 135: + case 119: case 133: - case 121: + case 130: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 134: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: - case 229: + case 157: case 230: + case 231: return -3; - case 177: + case 178: return 540087617; - case 259: + case 260: return 537920833; - case 173: case 174: + case 175: return 537396545; default: return 536872257; @@ -22124,12 +22138,17 @@ var ts; var typeofType = createTypeofType(); var _jsxNamespace; var _jsxFactoryEntity; + var _jsxElementPropertiesName; + var _hasComputedJsxElementPropertiesName = false; + var _jsxElementChildrenPropertyName; + var _hasComputedJsxElementChildrenPropertyName = false; var jsxTypes = ts.createMap(); var JsxNames = { JSX: "JSX", IntrinsicElements: "IntrinsicElements", ElementClass: "ElementClass", ElementAttributesPropertyNameContainer: "ElementAttributesProperty", + ElementChildrenAttributeNameContainer: "ElementChildrenAttribute", Element: "Element", IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" @@ -22158,7 +22177,7 @@ var ts; initializeTypeChecker(); return checker; function getJsxNamespace() { - if (_jsxNamespace === undefined) { + if (!_jsxNamespace) { _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); @@ -22257,7 +22276,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) { + (target.valueDeclaration.kind === 233 && source.valueDeclaration.kind !== 233))) { target.valueDeclaration = source.valueDeclaration; } ts.addRange(target.declarations, source.declarations); @@ -22360,7 +22379,7 @@ var ts; return symbol.flags & 134217728 ? symbol.checkFlags : 0; } function isGlobalSourceFile(node) { - return node.kind === 264 && !ts.isExternalOrCommonJsModule(node); + return node.kind === 265 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -22404,20 +22423,20 @@ var ts; return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile); } if (declaration.pos <= usage.pos) { - if (declaration.kind === 175) { - var errorBindingElement = ts.getAncestor(usage, 175); + if (declaration.kind === 176) { + var errorBindingElement = ts.getAncestor(usage, 176); if (errorBindingElement) { return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage); + return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 226), usage); } - else if (declaration.kind === 225) { + else if (declaration.kind === 226) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } return true; } - if (usage.parent.kind === 245) { + if (usage.parent.kind === 246) { return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); @@ -22425,17 +22444,17 @@ var ts; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { - case 207: - case 213: - case 215: + case 208: + case 214: + case 216: if (isSameScopeDescendentOf(usage, declaration, container)) { return true; } break; } switch (declaration.parent.parent.kind) { - case 214: case 215: + case 216: if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { return true; } @@ -22451,16 +22470,16 @@ var ts; return true; } var initializerOfProperty = current.parent && - current.parent.kind === 148 && + current.parent.kind === 149 && current.parent.initializer === current; if (initializerOfProperty) { if (ts.getModifierFlags(current.parent) & 32) { - if (declaration.kind === 150) { + if (declaration.kind === 151) { return true; } } else { - var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32); + var isDeclarationInstanceProperty = declaration.kind === 149 && !(ts.getModifierFlags(declaration) & 32); if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) { return true; } @@ -22481,18 +22500,18 @@ var ts; if (result = getSymbol(location.locals, name, meaning)) { var useResult = true; if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 793064 && lastLocation.kind !== 282) { + if (meaning & result.flags & 793064 && lastLocation.kind !== 283) { useResult = result.flags & 262144 ? lastLocation === location.type || - lastLocation.kind === 145 || - lastLocation.kind === 144 + lastLocation.kind === 146 || + lastLocation.kind === 145 : false; } if (meaning & 107455 && result.flags & 1) { useResult = - lastLocation.kind === 145 || + lastLocation.kind === 146 || (lastLocation === location.type && - result.valueDeclaration.kind === 145); + result.valueDeclaration.kind === 146); } } if (useResult) { @@ -22504,13 +22523,13 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 232: + case 233: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 264 || ts.isAmbientModule(location)) { + if (location.kind === 265 || ts.isAmbientModule(location)) { if (result = moduleExports.get("default")) { var localSymbol = ts.getLocalSymbolForExportDefault(result); if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { @@ -22521,7 +22540,7 @@ var ts; var moduleExport = moduleExports.get(name); if (moduleExport && moduleExport.flags === 8388608 && - ts.getDeclarationOfKind(moduleExport, 245)) { + ts.getDeclarationOfKind(moduleExport, 246)) { break; } } @@ -22529,13 +22548,13 @@ var ts; break loop; } break; - case 231: + case 232: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) { break loop; } break; + case 149: case 148: - case 147: if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -22545,9 +22564,9 @@ var ts; } } break; - case 228: - case 198: case 229: + case 199: + case 230: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = undefined; @@ -22559,7 +22578,7 @@ var ts; } break loop; } - if (location.kind === 198 && meaning & 32) { + if (location.kind === 199 && meaning & 32) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -22567,28 +22586,28 @@ var ts; } } break; - case 143: + case 144: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 229) { + if (ts.isClassLike(grandparent) || grandparent.kind === 230) { if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 186: + case 154: + case 228: + case 187: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 185: + case 186: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; @@ -22601,8 +22620,8 @@ var ts; } } break; - case 146: - if (location.parent && location.parent.kind === 145) { + case 147: + if (location.parent && location.parent.kind === 146) { location = location.parent; } if (location.parent && ts.isClassElement(location.parent)) { @@ -22647,7 +22666,7 @@ var ts; } if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; - if (decls && decls.length === 1 && decls[0].kind === 235) { + if (decls && decls.length === 1 && decls[0].kind === 236) { error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name); } } @@ -22657,14 +22676,14 @@ var ts; function isTypeParameterSymbolDeclaredInContainer(symbol, container) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - if (decl.kind === 144 && decl.parent === container) { + if (decl.kind === 145 && decl.parent === container) { return true; } } return false; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 71 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, true); @@ -22702,10 +22721,10 @@ var ts; } function getEntityNameForExtendingInterface(node) { switch (node.kind) { - case 70: - case 178: + case 71: + case 179: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; - case 200: + case 201: ts.Debug.assert(ts.isEntityNameExpression(node.expression)); return node.expression; default: @@ -22751,7 +22770,7 @@ var ts; } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384)); - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; }); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 232) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined"); if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { if (result.flags & 2) { @@ -22770,17 +22789,17 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } - return ts.findAncestor(node, function (n) { return n.kind === 237; }); + return ts.findAncestor(node, function (n) { return n.kind === 238; }); } } function getDeclarationOfAliasSymbol(symbol) { return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - if (node.moduleReference.kind === 247) { + if (node.moduleReference.kind === 248) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); @@ -22886,19 +22905,19 @@ var ts; } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) { switch (node.kind) { - case 236: + case 237: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 238: - return getTargetOfImportClause(node, dontRecursivelyResolve); case 239: + return getTargetOfImportClause(node, dontRecursivelyResolve); + case 240: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 241: + case 242: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 245: + case 246: return getTargetOfExportSpecifier(node, dontRecursivelyResolve); - case 242: + case 243: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 235: + case 236: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); } } @@ -22943,10 +22962,10 @@ var ts; links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); ts.Debug.assert(!!node); - if (node.kind === 242) { + if (node.kind === 243) { checkExpressionCached(node.expression); } - else if (node.kind === 245) { + else if (node.kind === 246) { checkExpressionCached(node.propertyName || node.name); } else if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -22955,14 +22974,14 @@ var ts; } } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { - if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { + if (entityName.kind === 71 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 70 || entityName.parent.kind === 142) { + if (entityName.kind === 71 || entityName.parent.kind === 143) { return resolveEntityName(entityName, 1920, false, dontResolveAlias); } else { - ts.Debug.assert(entityName.parent.kind === 236); + ts.Debug.assert(entityName.parent.kind === 237); return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias); } } @@ -22974,26 +22993,26 @@ var ts; return undefined; } var symbol; - if (name.kind === 70) { + if (name.kind === 71) { var message = meaning === 1920 ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(location || name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 142 || name.kind === 178) { + else if (name.kind === 143 || name.kind === 179) { var left = void 0; - if (name.kind === 142) { + if (name.kind === 143) { left = name.left; } - else if (name.kind === 178 && - (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) { + else if (name.kind === 179 && + (name.expression.kind === 185 || ts.isEntityNameExpression(name.expression))) { left = name.expression; } else { return undefined; } - var right = name.kind === 142 ? name.right : name.name; + var right = name.kind === 143 ? name.right : name.name; var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location); if (!namespace || ts.nodeIsMissing(right)) { return undefined; @@ -23009,7 +23028,7 @@ var ts; return undefined; } } - else if (name.kind === 184) { + else if (name.kind === 185) { return ts.isEntityNameExpression(name.expression) ? resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) : undefined; @@ -23025,7 +23044,7 @@ var ts; } function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) { if (isForAugmentation === void 0) { isForAugmentation = false; } - if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) { + if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 13) { return; } var moduleReferenceLiteral = moduleReferenceExpression; @@ -23206,7 +23225,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 151 && ts.nodeIsPresent(member.body)) { + if (member.kind === 152 && ts.nodeIsPresent(member.body)) { return member; } } @@ -23279,11 +23298,11 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: if (result = callback(getSymbolOfNode(location).exports)) { return result; } @@ -23327,7 +23346,7 @@ var ts; return ts.forEachEntry(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); @@ -23359,7 +23378,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -23373,10 +23392,10 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; switch (declaration.kind) { - case 148: - case 150: - case 152: + case 149: + case 151: case 153: + case 154: continue; default: return false; @@ -23429,7 +23448,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 265 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; @@ -23463,11 +23482,11 @@ var ts; } function isEntityNameVisible(entityName, enclosingDeclaration) { var meaning; - if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { + if (entityName.parent.kind === 162 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning = 107455 | 1048576; } - else if (entityName.kind === 142 || entityName.kind === 178 || - entityName.parent.kind === 236) { + else if (entityName.kind === 143 || entityName.kind === 179 || + entityName.parent.kind === 237) { meaning = 1920; } else { @@ -23553,16 +23572,16 @@ var ts; return undefined; } if (type.flags & 1) { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } if (type.flags & 2) { - return ts.createKeywordTypeNode(135); + return ts.createKeywordTypeNode(136); } if (type.flags & 4) { - return ts.createKeywordTypeNode(132); + return ts.createKeywordTypeNode(133); } if (type.flags & 8) { - return ts.createKeywordTypeNode(121); + return ts.createKeywordTypeNode(122); } if (type.flags & 16) { var name = symbolToName(type.symbol, false); @@ -23582,22 +23601,22 @@ var ts; return ts.createTypeReferenceNode(name, undefined); } if (type.flags & 1024) { - return ts.createKeywordTypeNode(104); + return ts.createKeywordTypeNode(105); } if (type.flags & 2048) { - return ts.createKeywordTypeNode(138); + return ts.createKeywordTypeNode(139); } if (type.flags & 4096) { - return ts.createKeywordTypeNode(94); + return ts.createKeywordTypeNode(95); } if (type.flags & 8192) { - return ts.createKeywordTypeNode(129); + return ts.createKeywordTypeNode(130); } if (type.flags & 512) { - return ts.createKeywordTypeNode(136); + return ts.createKeywordTypeNode(137); } if (type.flags & 16777216) { - return ts.createKeywordTypeNode(133); + return ts.createKeywordTypeNode(134); } if (type.flags & 16384 && type.isThisType) { if (context.inObjectTypeLiteral) { @@ -23631,7 +23650,7 @@ var ts; var formattedUnionTypes = formatUnionTypes(type.types); var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes); if (unionTypeNodes && unionTypeNodes.length > 0) { - return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes); + return ts.createUnionOrIntersectionTypeNode(166, unionTypeNodes); } else { if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) { @@ -23641,7 +23660,7 @@ var ts; } } if (type.flags & 131072) { - return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types)); + return ts.createUnionOrIntersectionTypeNode(167, mapToTypeNodeArray(type.types)); } if (objectFlags & (16 | 32)) { ts.Debug.assert(!!(type.flags & 32768)); @@ -23675,8 +23694,8 @@ var ts; var typeParameterNode = typeParameterToDeclaration(typeParameter); var templateType = getTemplateTypeFromMappedType(type); var templateTypeNode = typeToTypeNodeHelper(templateType); - var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined; - var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined; + var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(131) : undefined; + var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined; return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); } function createAnonymousTypeNode(type) { @@ -23694,7 +23713,7 @@ var ts; return ts.createTypeReferenceNode(entityName, undefined); } else { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } } else { @@ -23716,7 +23735,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return ts.contains(context.symbolStack, symbol); @@ -23736,11 +23755,11 @@ var ts; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var signature = resolved.callSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 159); + return signatureToSignatureDeclarationHelper(signature, 160); } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { var signature = resolved.constructSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 160); + return signatureToSignatureDeclarationHelper(signature, 161); } } var saveInObjectTypeLiteral = context.inObjectTypeLiteral; @@ -23815,11 +23834,11 @@ var ts; var typeElements = []; for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 154)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); } for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 156)); } if (resolvedType.stringIndexInfo) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0)); @@ -23839,19 +23858,19 @@ var ts; return; } var propertyName = oldDeclaration.name; - var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined; + var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : undefined; if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) { var signatures = getSignaturesOfType(propertyType, 0); for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) { var signature = signatures_1[_e]; - var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149); + var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150); methodDeclaration.name = propertyName; methodDeclaration.questionToken = optionalToken; typeElements.push(methodDeclaration); } } else { - var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118); + var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119); typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined)); } } @@ -23859,11 +23878,11 @@ var ts; } } function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) { - var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132); + var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133); var name = ts.getNameFromIndexInfo(indexInfo); var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined); var typeNode = typeToTypeNodeHelper(indexInfo.type); - return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode); + return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : undefined, [indexingParameter], typeNode); } function signatureToSignatureDeclarationHelper(signature, kind) { var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); }); @@ -23879,7 +23898,7 @@ var ts; var returnType = getReturnTypeOfSignature(signature); returnTypeNode = returnType && typeToTypeNodeHelper(returnType); } - var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined; + var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined; return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny); } function typeParameterToDeclaration(type) { @@ -23891,10 +23910,10 @@ var ts; return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode); } function symbolToParameterDeclaration(parameterSymbol) { - var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145); + var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146); var parameterType = getTypeOfSymbol(parameterSymbol); var parameterTypeNode = typeToTypeNodeHelper(parameterType); - var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer); + var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer); return parameterNode; } function symbolToName(symbol, expectsIdentifier) { @@ -23974,17 +23993,17 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) { context.encounteredError = true; } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -24035,8 +24054,8 @@ var ts; } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048) { - var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; }); - if (node.kind === 230) { + var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 168; }); + if (node.kind === 231) { return getSymbolOfNode(node); } } @@ -24044,7 +24063,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 233 && + node.parent.kind === 234 && ts.isExternalModuleAugmentation(node.parent.parent); } function literalTypeToString(type) { @@ -24056,14 +24075,14 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -24078,17 +24097,17 @@ var ts; var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { - writePunctuation(writer, 20); + writePunctuation(writer, 21); if (ts.isSingleOrDoubleQuote(firstChar)) { writer.writeStringLiteral(symbolName); } else { writer.writeSymbol(symbolName, symbol); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 22); + writePunctuation(writer, 23); writer.writeSymbol(symbolName, symbol); } } @@ -24164,7 +24183,7 @@ var ts; } else if (type.flags & 256) { buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); appendSymbolNameOnly(type.symbol, writer); } else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) { @@ -24191,28 +24210,28 @@ var ts; } else if (type.flags & 524288) { writeType(type.objectType, 64); - writePunctuation(writer, 20); - writeType(type.indexType, 0); writePunctuation(writer, 21); + writeType(type.indexType, 0); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writeSpace(writer); - writePunctuation(writer, 23); + writePunctuation(writer, 24); writeSpace(writer); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function writeTypeList(types, delimiter) { for (var i = 0; i < types.length; i++) { if (i > 0) { - if (delimiter !== 25) { + if (delimiter !== 26) { writeSpace(writer); } writePunctuation(writer, delimiter); writeSpace(writer); } - writeType(types[i], delimiter === 25 ? 0 : 64); + writeType(types[i], delimiter === 26 ? 0 : 64); } } function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { @@ -24220,29 +24239,29 @@ var ts; buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064, 0, flags); } if (pos < end) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); writeType(typeArguments[pos], 256); pos++; while (pos < end) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); writeType(typeArguments[pos], 0); pos++; } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function writeTypeReference(type, flags) { var typeArguments = type.typeArguments || emptyArray; if (type.target === globalArrayType && !(flags & 1)) { writeType(typeArguments[0], 64); - writePunctuation(writer, 20); writePunctuation(writer, 21); + writePunctuation(writer, 22); } else if (type.target.objectFlags & 8) { - writePunctuation(writer, 20); - writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 25); writePunctuation(writer, 21); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26); + writePunctuation(writer, 22); } else { var outerTypeParameters = type.target.outerTypeParameters; @@ -24257,7 +24276,7 @@ var ts; } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent); if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { writeSymbolTypeReference(parent, typeArguments, start, i, flags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); } } } @@ -24267,16 +24286,16 @@ var ts; } function writeUnionOrIntersectionType(type, flags) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } if (type.flags & 65536) { - writeTypeList(formatUnionTypes(type.types), 48); + writeTypeList(formatUnionTypes(type.types), 49); } else { - writeTypeList(type.types, 47); + writeTypeList(type.types, 48); } if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } } function writeAnonymousType(type, flags) { @@ -24295,7 +24314,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793064, 0, flags); } else { - writeKeyword(writer, 118); + writeKeyword(writer, 119); } } else { @@ -24316,7 +24335,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -24325,18 +24344,18 @@ var ts; } } function writeTypeOfSymbol(type, typeFormatFlags) { - writeKeyword(writer, 102); + writeKeyword(writer, 103); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags); } function writePropertyWithModifiers(prop) { if (isReadonlySymbol(prop)) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } buildSymbolDisplay(prop, writer); if (prop.flags & 67108864) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } } function shouldAddParenthesisAroundFunctionType(callSignature, flags) { @@ -24360,55 +24379,55 @@ var ts; var resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 16); writePunctuation(writer, 17); + writePunctuation(writer, 18); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); if (parenthesizeSignature) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (parenthesizeSignature) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } } var saveInObjectTypeLiteral = inObjectTypeLiteral; inObjectTypeLiteral = true; - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); writeObjectLiteralType(resolved); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); inObjectTypeLiteral = saveInObjectTypeLiteral; } function writeObjectLiteralType(resolved) { for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, 1, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack); @@ -24422,45 +24441,45 @@ var ts; var signature = signatures_2[_f]; writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } else { writePropertyWithModifiers(p); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(t, 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } } function writeMappedType(type) { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); if (type.declaration.readonlyToken) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); appendSymbolNameOnly(getTypeParameterFromMappedType(type).symbol, writer); writeSpace(writer); - writeKeyword(writer, 91); + writeKeyword(writer, 92); writeSpace(writer); writeType(getConstraintTypeFromMappedType(type), 0); - writePunctuation(writer, 21); + writePunctuation(writer, 22); if (type.declaration.questionToken) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(getTemplateTypeFromMappedType(type), 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration, flags) { @@ -24474,14 +24493,14 @@ var ts; var constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); - writeKeyword(writer, 84); + writeKeyword(writer, 85); writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } var defaultType = getDefaultFromTypeParameter(tp); if (defaultType) { writeSpace(writer); - writePunctuation(writer, 57); + writePunctuation(writer, 58); writeSpace(writer); buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); } @@ -24489,7 +24508,7 @@ var ts; function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { var parameterNode = p.valueDeclaration; if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } if (parameterNode && ts.isBindingPattern(parameterNode.name)) { buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); @@ -24498,9 +24517,9 @@ var ts; appendSymbolNameOnly(p, writer); } if (parameterNode && isOptionalParameter(parameterNode)) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); var type = getTypeOfSymbol(p); if (parameterNode && isRequiredInitializedParameter(parameterNode)) { @@ -24509,29 +24528,29 @@ var ts; buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack); } function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { - if (bindingPattern.kind === 173) { - writePunctuation(writer, 16); - buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + if (bindingPattern.kind === 174) { writePunctuation(writer, 17); + buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + writePunctuation(writer, 18); } - else if (bindingPattern.kind === 174) { - writePunctuation(writer, 20); + else if (bindingPattern.kind === 175) { + writePunctuation(writer, 21); var elements = bindingPattern.elements; buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); if (elements && elements.hasTrailingComma) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } } function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isOmittedExpression(bindingElement)) { return; } - ts.Debug.assert(bindingElement.kind === 175); + ts.Debug.assert(bindingElement.kind === 176); if (bindingElement.propertyName) { writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName)); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); } if (ts.isBindingPattern(bindingElement.name)) { @@ -24539,22 +24558,22 @@ var ts; } else { if (bindingElement.dotDotDotToken) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } appendSymbolNameOnly(bindingElement.symbol, writer); } } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForCommaSeparatedList(list, writer, action) { for (var i = 0; i < list.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } action(list[i]); @@ -24562,42 +24581,42 @@ var ts; } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); var flags = 256; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); flags = 0; } buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags); } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); if (thisParameter) { buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); } for (var i = 0; i < parameters.length; i++) { if (i > 0 || thisParameter) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); } - writePunctuation(writer, 19); + writePunctuation(writer, 20); } function buildTypePredicateDisplay(predicate, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isIdentifierTypePredicate(predicate)) { writer.writeParameter(predicate.parameterName); } else { - writeKeyword(writer, 98); + writeKeyword(writer, 99); } writeSpace(writer); - writeKeyword(writer, 125); + writeKeyword(writer, 126); writeSpace(writer); buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack); } @@ -24608,10 +24627,10 @@ var ts; } if (flags & 8) { writeSpace(writer); - writePunctuation(writer, 35); + writePunctuation(writer, 36); } else { - writePunctuation(writer, 55); + writePunctuation(writer, 56); } writeSpace(writer); if (signature.typePredicate) { @@ -24623,7 +24642,7 @@ var ts; } function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, kind, symbolStack) { if (kind === 1) { - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); } if (signature.target && (flags & 32)) { @@ -24638,26 +24657,26 @@ var ts; function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) { if (info) { if (info.isReadonly) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); switch (kind) { case 1: - writeKeyword(writer, 132); + writeKeyword(writer, 133); break; case 0: - writeKeyword(writer, 135); + writeKeyword(writer, 136); break; } - writePunctuation(writer, 21); - writePunctuation(writer, 55); + writePunctuation(writer, 22); + writePunctuation(writer, 56); writeSpace(writer); buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } @@ -24686,63 +24705,63 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 175: + case 176: return isDeclarationVisible(node.parent.parent); - case 225: + case 226: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 232: - case 228: + case 233: case 229: case 230: - case 227: case 231: - case 236: + case 228: + case 232: + case 237: if (ts.isExternalModuleAugmentation(node)) { return true; } var parent = getDeclarationContainer(node); if (!(ts.getCombinedModifierFlags(node) & 1) && - !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) { + !(node.kind !== 237 && parent.kind !== 265 && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); + case 149: case 148: - case 147: - case 152: case 153: + case 154: + case 151: case 150: - case 149: if (ts.getModifierFlags(node) & (8 | 16)) { return false; } - case 151: - case 155: - case 154: + case 152: case 156: - case 145: - case 233: - case 159: + case 155: + case 157: + case 146: + case 234: case 160: - case 162: - case 158: + case 161: case 163: + case 159: case 164: case 165: case 166: case 167: + case 168: return isDeclarationVisible(node.parent); - case 238: case 239: - case 241: + case 240: + case 242: return false; - case 144: - case 264: - case 235: + case 145: + case 265: + case 236: return true; - case 242: + case 243: return false; default: return false; @@ -24751,10 +24770,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 242) { + if (node.parent && node.parent.kind === 243) { exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 245) { + else if (node.parent.kind === 246) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -24831,12 +24850,12 @@ var ts; function getDeclarationContainer(node) { node = ts.findAncestor(ts.getRootDeclaration(node), function (node) { switch (node.kind) { - case 225: case 226: + case 227: + case 242: case 241: case 240: case 239: - case 238: return false; default: return true; @@ -24860,7 +24879,7 @@ var ts; return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false); } function isComputedNonLiteralName(name) { - return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression); + return name.kind === 144 && !ts.isStringOrNumericLiteral(name.expression); } function getRestType(source, properties, symbol) { source = filterType(source, function (t) { return !(t.flags & 6144); }); @@ -24902,7 +24921,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 173) { + if (pattern.kind === 174) { if (declaration.dotDotDotToken) { if (!isValidSpreadType(parentType)) { error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types); @@ -24972,11 +24991,11 @@ var ts; } function isNullOrUndefined(node) { var expr = ts.skipParentheses(node); - return expr.kind === 94 || expr.kind === 70 && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 95 || expr.kind === 71 && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral(node) { var expr = ts.skipParentheses(node); - return expr.kind === 176 && expr.elements.length === 0; + return expr.kind === 177 && expr.elements.length === 0; } function addOptionality(type, optional) { return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type; @@ -24988,11 +25007,11 @@ var ts; return type; } } - if (declaration.parent.parent.kind === 214) { + if (declaration.parent.parent.kind === 215) { var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression)); return indexType.flags & (16384 | 262144) ? indexType : stringType; } - if (declaration.parent.parent.kind === 215) { + if (declaration.parent.parent.kind === 216) { var forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType; } @@ -25004,7 +25023,7 @@ var ts; return addOptionality(declaredType, declaration.questionToken && includeOptionality); } if ((noImplicitAny || declaration.flags & 65536) && - declaration.kind === 225 && !ts.isBindingPattern(declaration.name) && + declaration.kind === 226 && !ts.isBindingPattern(declaration.name) && !(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) { if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) { return autoType; @@ -25013,10 +25032,10 @@ var ts; return autoArrayType; } } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var func = declaration.parent; - if (func.kind === 153 && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152); + if (func.kind === 154 && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 153); if (getter) { var getterSignature = getSignatureFromDeclaration(getter); var thisParameter = getAccessorThisParameter(func); @@ -25045,7 +25064,7 @@ var ts; if (ts.isJsxAttribute(declaration)) { return trueType; } - if (declaration.kind === 261) { + if (declaration.kind === 262) { return checkIdentifier(declaration.name); } if (ts.isBindingPattern(declaration.name)) { @@ -25059,14 +25078,14 @@ var ts; var definedInMethod = false; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - var expression = declaration.kind === 193 ? declaration : - declaration.kind === 178 ? ts.getAncestor(declaration, 193) : + var expression = declaration.kind === 194 ? declaration : + declaration.kind === 179 ? ts.getAncestor(declaration, 194) : undefined; if (!expression) { return unknownType; } - if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) { - if (ts.getThisContainer(expression, false).kind === 151) { + if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 99) { + if (ts.getThisContainer(expression, false).kind === 152) { definedInConstructor = true; } else { @@ -25141,7 +25160,7 @@ var ts; return result; } function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { - return pattern.kind === 173 + return pattern.kind === 174 ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } @@ -25151,7 +25170,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - if (declaration.kind === 260) { + if (declaration.kind === 261) { return type; } return getWidenedType(type); @@ -25166,7 +25185,7 @@ var ts; } function declarationBelongsToPrivateAmbientMember(declaration) { var root = ts.getRootDeclaration(declaration); - var memberDeclaration = root.kind === 145 ? root.parent : root; + var memberDeclaration = root.kind === 146 ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -25179,18 +25198,18 @@ var ts; if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) { return links.type = anyType; } - if (declaration.kind === 242) { + if (declaration.kind === 243) { return links.type = checkExpression(declaration.expression); } - if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) { + if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) { return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } if (!pushTypeResolution(symbol, 0)) { return unknownType; } var type = void 0; - if (declaration.kind === 193 || - declaration.kind === 178 && declaration.parent.kind === 193) { + if (declaration.kind === 194 || + declaration.kind === 179 && declaration.parent.kind === 194) { type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol); } else { @@ -25205,7 +25224,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 152) { + if (accessor.kind === 153) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -25225,8 +25244,8 @@ var ts; function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - var getter = ts.getDeclarationOfKind(symbol, 152); - var setter = ts.getDeclarationOfKind(symbol, 153); + var getter = ts.getDeclarationOfKind(symbol, 153); + var setter = ts.getDeclarationOfKind(symbol, 154); if (getter && getter.flags & 65536) { var jsDocType = getTypeForDeclarationFromJSDocComment(getter); if (jsDocType) { @@ -25267,7 +25286,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 152); + var getter_1 = ts.getDeclarationOfKind(symbol, 153); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -25408,9 +25427,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 228 || node.kind === 198 || - node.kind === 227 || node.kind === 185 || - node.kind === 150 || node.kind === 186) { + if (node.kind === 229 || node.kind === 199 || + node.kind === 228 || node.kind === 186 || + node.kind === 151 || node.kind === 187) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -25419,15 +25438,15 @@ var ts; } } function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229); + var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 230); return appendOuterTypeParameters(undefined, declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 229 || node.kind === 228 || - node.kind === 198 || node.kind === 230) { + if (node.kind === 230 || node.kind === 229 || + node.kind === 199 || node.kind === 231) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -25583,7 +25602,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 230 && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -25612,7 +25631,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229) { + if (declaration.kind === 230) { if (declaration.flags & 64) { return false; } @@ -25662,7 +25681,7 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 289); + var declaration = ts.getDeclarationOfKind(symbol, 290); var type = void 0; if (declaration) { if (declaration.jsDocTypeLiteral) { @@ -25673,7 +25692,7 @@ var ts; } } else { - declaration = ts.getDeclarationOfKind(symbol, 230); + declaration = ts.getDeclarationOfKind(symbol, 231); type = getTypeFromTypeNode(declaration.type); } if (popTypeResolution()) { @@ -25698,14 +25717,14 @@ var ts; return !ts.isInAmbientContext(member); } return expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8 || - expr.kind === 70 && !!symbol.exports.get(expr.text); + expr.kind === 71 && !!symbol.exports.get(expr.text); } function enumHasLiteralMembers(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; if (!isLiteralEnumMember(symbol, member)) { @@ -25733,7 +25752,7 @@ var ts; var memberTypes = []; for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { computeEnumMemberValues(declaration); for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; @@ -25816,21 +25835,21 @@ var ts; } function isIndependentType(node) { switch (node.kind) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: case 133: - case 104: - case 138: - case 94: - case 129: - case 172: + case 122: + case 137: + case 134: + case 105: + case 139: + case 95: + case 130: + case 173: return true; - case 163: + case 164: return isIndependentType(node.elementType); - case 158: + case 159: return isIndependentTypeReference(node); } return false; @@ -25839,7 +25858,7 @@ var ts; return node.type && isIndependentType(node.type) || !node.type && !node.initializer; } function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -25855,12 +25874,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { + case 149: case 148: - case 147: return isIndependentVariableLikeDeclaration(declaration); - case 150: - case 149: case 151: + case 150: + case 152: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -26196,7 +26215,7 @@ var ts; var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); var templateReadonly = !!type.declaration.readonlyToken; var templateOptional = !!type.declaration.questionToken; - if (type.declaration.typeParameter.constraint.kind === 169) { + if (type.declaration.typeParameter.constraint.kind === 170) { for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) { var propertySymbol = _a[_i]; addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol); @@ -26249,7 +26268,7 @@ var ts; function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { var constraintDeclaration = type.declaration.typeParameter.constraint; - if (constraintDeclaration.kind === 169) { + if (constraintDeclaration.kind === 170) { type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper); } else { @@ -26614,7 +26633,7 @@ var ts; } function isJSDocOptionalParameter(node) { if (node.flags & 65536) { - if (node.type && node.type.kind === 277) { + if (node.type && node.type.kind === 278) { return true; } var paramTags = ts.getJSDocParameterTags(node); @@ -26625,7 +26644,7 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 277; + return paramTag.typeExpression.type.kind === 278; } } } @@ -26658,7 +26677,7 @@ var ts; return false; } function createTypePredicateFromTypePredicateNode(node) { - if (node.parameterName.kind === 70) { + if (node.parameterName.kind === 71) { var parameterName = node.parameterName; return { kind: 1, @@ -26731,7 +26750,7 @@ var ts; else { parameters.push(paramSymbol); } - if (param.type && param.type.kind === 172) { + if (param.type && param.type.kind === 173) { hasLiteralTypes = true; } var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken || @@ -26742,23 +26761,23 @@ var ts; minArgumentCount = parameters.length; } } - if ((declaration.kind === 152 || declaration.kind === 153) && + if ((declaration.kind === 153 || declaration.kind === 154) && !ts.hasDynamicName(declaration) && (!hasThisParameter || !thisParameter)) { - var otherKind = declaration.kind === 152 ? 153 : 152; + var otherKind = declaration.kind === 153 ? 154 : 153; var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - var classType = declaration.kind === 151 ? + var classType = declaration.kind === 152 ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : getTypeParametersFromJSDocTemplate(declaration); var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType); - var typePredicate = declaration.type && declaration.type.kind === 157 ? + var typePredicate = declaration.type && declaration.type.kind === 158 ? createTypePredicateFromTypePredicateNode(declaration.type) : undefined; links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); @@ -26781,8 +26800,8 @@ var ts; return type; } } - if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 153); + if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 154); return getAnnotatedAccessorType(setter); } if (ts.nodeIsMissing(declaration.body)) { @@ -26804,13 +26823,13 @@ var ts; if (!node) return false; switch (node.kind) { - case 70: + case 71: return node.text === "arguments" && ts.isPartOfExpression(node); - case 148: - case 150: - case 152: + case 149: + case 151: case 153: - return node.name.kind === 143 + case 154: + return node.name.kind === 144 && traverse(node.name); default: return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse); @@ -26824,20 +26843,20 @@ var ts; for (var i = 0; i < symbol.declarations.length; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 278: + case 187: + case 279: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -26927,7 +26946,7 @@ var ts; } function getOrCreateTypeFromSignature(signature) { if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155; + var isConstructor = signature.declaration.kind === 152 || signature.declaration.kind === 156; var type = createObjectType(16); type.members = emptySymbols; type.properties = emptyArray; @@ -26941,7 +26960,7 @@ var ts; return symbol.members.get("__index"); } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 132 : 135; + var syntaxKind = kind === 1 ? 133 : 136; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -26968,7 +26987,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 144).constraint; + return ts.getDeclarationOfKind(type.symbol, 145).constraint; } function getConstraintFromTypeParameter(typeParameter) { if (!typeParameter.constraint) { @@ -26984,7 +27003,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 145).parent); } function getTypeListId(types) { var result = ""; @@ -27104,11 +27123,11 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 158: + case 159: return node.typeName; - case 276: + case 277: return node.name; - case 200: + case 201: var expr = node.expression; if (ts.isEntityNameExpression(expr)) { return expr; @@ -27132,7 +27151,7 @@ var ts; if (symbol.flags & 524288) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 && node.kind === 276) { + if (symbol.flags & 107455 && node.kind === 277) { return getTypeOfSymbol(symbol); } return getTypeFromNonGenericTypeReference(node, symbol); @@ -27174,7 +27193,7 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 276) { + if (node.kind === 277) { type = getPrimitiveTypeFromJSDocTypeReference(node); if (!type) { var typeReferenceName = getTypeReferenceName(node); @@ -27183,7 +27202,7 @@ var ts; } } else { - var typeNameOrExpression = node.kind === 158 + var typeNameOrExpression = node.kind === 159 ? node.typeName : ts.isEntityNameExpression(node.expression) ? node.expression @@ -27212,9 +27231,9 @@ var ts; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var declaration = declarations_4[_i]; switch (declaration.kind) { - case 228: case 229: - case 231: + case 230: + case 232: return declaration; } } @@ -27640,7 +27659,7 @@ var ts; return type; } function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; var propName = indexType.flags & (32 | 64 | 256) ? indexType.text : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ? @@ -27688,7 +27707,7 @@ var ts; } } if (accessNode) { - var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType; + var indexNode = accessNode.kind === 180 ? accessNode.argumentExpression : accessNode.indexType; if (indexType.flags & (32 | 64)) { error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType)); } @@ -27703,7 +27722,7 @@ var ts; return anyType; } function getIndexedAccessForMappedType(type, indexType, accessNode) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) { error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type)); return unknownType; @@ -27714,7 +27733,7 @@ var ts; } function getIndexedAccessType(objectType, indexType, accessNode) { if (maybeTypeOfKind(indexType, 540672 | 262144) || - maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) || + maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 180) || isGenericMappedType(objectType)) { if (objectType.flags & 1) { return objectType; @@ -27780,7 +27799,7 @@ var ts; return links.resolvedType; } function getAliasSymbolForTypeNode(node) { - return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined; + return node.parent.kind === 231 ? getSymbolOfNode(node.parent) : undefined; } function getAliasTypeArgumentsForTypeNode(node) { var symbol = getAliasSymbolForTypeNode(node); @@ -27923,9 +27942,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 229)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 230)) { if (!(ts.getModifierFlags(container) & 32) && - (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) { + (container.kind !== 152 || ts.isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -27941,83 +27960,83 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 118: - case 267: + case 119: case 268: + case 269: return anyType; - case 135: + case 136: return stringType; - case 132: + case 133: return numberType; - case 121: + case 122: return booleanType; - case 136: + case 137: return esSymbolType; - case 104: + case 105: return voidType; - case 138: + case 139: return undefinedType; - case 94: + case 95: return nullType; - case 129: + case 130: return neverType; - case 133: + case 134: return nonPrimitiveType; - case 168: - case 98: + case 169: + case 99: return getTypeFromThisTypeNode(node); - case 172: + case 173: return getTypeFromLiteralTypeNode(node); - case 292: + case 293: return getTypeFromLiteralTypeNode(node.literal); - case 158: - case 276: + case 159: + case 277: return getTypeFromTypeReference(node); - case 157: + case 158: return booleanType; - case 200: + case 201: return getTypeFromTypeReference(node); - case 161: + case 162: return getTypeFromTypeQueryNode(node); - case 163: - case 269: - return getTypeFromArrayTypeNode(node); case 164: - return getTypeFromTupleTypeNode(node); - case 165: case 270: - return getTypeFromUnionTypeNode(node); + return getTypeFromArrayTypeNode(node); + case 165: + return getTypeFromTupleTypeNode(node); case 166: - return getTypeFromIntersectionTypeNode(node); - case 272: - return getTypeFromJSDocNullableTypeNode(node); + case 271: + return getTypeFromUnionTypeNode(node); case 167: + return getTypeFromIntersectionTypeNode(node); case 273: - case 280: + return getTypeFromJSDocNullableTypeNode(node); + case 168: + case 274: case 281: - case 277: + case 282: + case 278: return getTypeFromTypeNode(node.type); - case 274: + case 275: return getTypeFromTypeNode(node.literal); - case 159: case 160: - case 162: - case 291: - case 278: + case 161: + case 163: + case 292: + case 279: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 169: - return getTypeFromTypeOperatorNode(node); case 170: - return getTypeFromIndexedAccessTypeNode(node); + return getTypeFromTypeOperatorNode(node); case 171: + return getTypeFromIndexedAccessTypeNode(node); + case 172: return getTypeFromMappedTypeNode(node); - case 70: - case 142: + case 71: + case 143: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 271: + case 272: return getTypeFromJSDocTupleType(node); - case 279: + case 280: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -28207,27 +28226,27 @@ var ts; } var mappedTypes = mapper.mappedTypes; return !!ts.findAncestor(symbol.declarations[0], function (node) { - if (node.kind === 232 || node.kind === 264) { + if (node.kind === 233 || node.kind === 265) { return "quit"; } switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 228: - case 198: + case 187: case 229: + case 199: case 230: + case 231: var declaration = node; if (declaration.typeParameters) { for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { @@ -28237,19 +28256,19 @@ var ts; } } } - if (ts.isClassLike(node) || node.kind === 229) { + if (ts.isClassLike(node) || node.kind === 230) { var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; if (thisType && ts.contains(mappedTypes, thisType)) { return true; } } break; - case 171: + case 172: if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) { return true; } break; - case 278: + case 279: var func = node; for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) { var p = _c[_b]; @@ -28264,7 +28283,7 @@ var ts; function isTopLevelTypeAlias(symbol) { if (symbol.declarations && symbol.declarations.length) { var parentKind = symbol.declarations[0].parent.kind; - return parentKind === 264 || parentKind === 233; + return parentKind === 265 || parentKind === 234; } return false; } @@ -28316,33 +28335,33 @@ var ts; return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 185: case 186: + case 187: return isContextSensitiveFunctionLikeDeclaration(node); - case 177: + case 178: return ts.forEach(node.properties, isContextSensitive); - case 176: + case 177: return ts.forEach(node.elements, isContextSensitive); - case 194: + case 195: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 193: - return node.operatorToken.kind === 53 && + case 194: + return node.operatorToken.kind === 54 && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 260: + case 261: return isContextSensitive(node.initializer); + case 151: case 150: - case 149: return isContextSensitiveFunctionLikeDeclaration(node); - case 184: + case 185: return isContextSensitive(node.expression); - case 253: + case 254: return ts.forEach(node.properties, isContextSensitive); - case 252: + case 253: return node.initializer && isContextSensitive(node.initializer); - case 255: + case 256: return node.expression && isContextSensitive(node.expression); } return false; @@ -28354,7 +28373,7 @@ var ts; if (ts.forEach(node.parameters, function (p) { return !p.type; })) { return true; } - if (node.kind === 186) { + if (node.kind === 187) { return false; } var parameter = ts.firstOrUndefined(node.parameters); @@ -28841,7 +28860,7 @@ var ts; if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) { if (reportErrors) { ts.Debug.assert(!!errorNode); - if (ts.isJsxAttributes(errorNode)) { + if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode)) { reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); } else { @@ -29803,25 +29822,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { + case 149: case 148: - case 147: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 145: + case 146: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 175: + case 176: diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; break; - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: - case 185: + case 154: case 186: + case 187: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -30238,17 +30257,17 @@ var ts; return links.resolvedSymbol; } function isInTypeQuery(node) { - return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; }); + return !!ts.findAncestor(node, function (n) { return n.kind === 162 ? true : n.kind === 71 || n.kind === 143 ? false : "quit"; }); } function getFlowCacheKey(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; } - if (node.kind === 98) { + if (node.kind === 99) { return "0"; } - if (node.kind === 178) { + if (node.kind === 179) { var key = getFlowCacheKey(node.expression); return key && key + "." + node.name.text; } @@ -30256,33 +30275,33 @@ var ts; } function getLeftmostIdentifierOrThis(node) { switch (node.kind) { - case 70: - case 98: + case 71: + case 99: return node; - case 178: + case 179: return getLeftmostIdentifierOrThis(node.expression); } return undefined; } function isMatchingReference(source, target) { switch (source.kind) { - case 70: - return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) || - (target.kind === 225 || target.kind === 175) && + case 71: + return target.kind === 71 && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 226 || target.kind === 176) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); - case 98: - return target.kind === 98; - case 96: - return target.kind === 96; - case 178: - return target.kind === 178 && + case 99: + return target.kind === 99; + case 97: + return target.kind === 97; + case 179: + return target.kind === 179 && source.name.text === target.name.text && isMatchingReference(source.expression, target.expression); } return false; } function containsMatchingReference(source, target) { - while (source.kind === 178) { + while (source.kind === 179) { source = source.expression; if (isMatchingReference(source, target)) { return true; @@ -30291,15 +30310,15 @@ var ts; return false; } function containsMatchingReferenceDiscriminant(source, target) { - return target.kind === 178 && + return target.kind === 179 && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); } function getDeclaredTypeOfReference(expr) { - if (expr.kind === 70) { + if (expr.kind === 71) { return getTypeOfSymbol(getResolvedSymbol(expr)); } - if (expr.kind === 178) { + if (expr.kind === 179) { var type = getDeclaredTypeOfReference(expr.expression); return type && getTypeOfPropertyOfType(type, expr.name.text); } @@ -30329,7 +30348,7 @@ var ts; } } } - if (callExpression.expression.kind === 178 && + if (callExpression.expression.kind === 179 && isOrContainsMatchingReference(reference, callExpression.expression.expression)) { return true; } @@ -30457,15 +30476,15 @@ var ts; return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType); } function getAssignedTypeOfBinaryExpression(node) { - var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) || - node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent); + var isDestructuringDefaultAssignment = node.parent.kind === 177 && isDestructuringAssignmentTarget(node.parent) || + node.parent.kind === 261 && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 193 && parent.parent.left === parent || - parent.parent.kind === 215 && parent.parent.initializer === parent; + return parent.parent.kind === 194 && parent.parent.left === parent || + parent.parent.kind === 216 && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); @@ -30482,21 +30501,21 @@ var ts; function getAssignedType(node) { var parent = node.parent; switch (parent.kind) { - case 214: - return stringType; case 215: + return stringType; + case 216: return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType; - case 193: + case 194: return getAssignedTypeOfBinaryExpression(parent); - case 187: + case 188: return undefinedType; - case 176: + case 177: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 197: + case 198: return getAssignedTypeOfSpreadExpression(parent); - case 260: - return getAssignedTypeOfPropertyAssignment(parent); case 261: + return getAssignedTypeOfPropertyAssignment(parent); + case 262: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return unknownType; @@ -30504,7 +30523,7 @@ var ts; function getInitialTypeOfBindingElement(node) { var pattern = node.parent; var parentType = getInitialType(pattern.parent); - var type = pattern.kind === 173 ? + var type = pattern.kind === 174 ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : @@ -30519,39 +30538,39 @@ var ts; if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 214) { + if (node.parent.parent.kind === 215) { return stringType; } - if (node.parent.parent.kind === 215) { + if (node.parent.parent.kind === 216) { return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType; } return unknownType; } function getInitialType(node) { - return node.kind === 225 ? + return node.kind === 226 ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function getInitialOrAssignedType(node) { - return node.kind === 225 || node.kind === 175 ? + return node.kind === 226 || node.kind === 176 ? getInitialType(node) : getAssignedType(node); } function isEmptyArrayAssignment(node) { - return node.kind === 225 && node.initializer && + return node.kind === 226 && node.initializer && isEmptyArrayLiteral(node.initializer) || - node.kind !== 175 && node.parent.kind === 193 && + node.kind !== 176 && node.parent.kind === 194 && isEmptyArrayLiteral(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 184: + case 185: return getReferenceCandidate(node.expression); - case 193: + case 194: switch (node.operatorToken.kind) { - case 57: + case 58: return getReferenceCandidate(node.left); - case 25: + case 26: return getReferenceCandidate(node.right); } } @@ -30559,13 +30578,13 @@ var ts; } function getReferenceRoot(node) { var parent = node.parent; - return parent.kind === 184 || - parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node || - parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ? + return parent.kind === 185 || + parent.kind === 194 && parent.operatorToken.kind === 58 && parent.left === node || + parent.kind === 194 && parent.operatorToken.kind === 26 && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 256) { + if (clause.kind === 257) { var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); return isUnitType(caseType) ? caseType : undefined; } @@ -30707,12 +30726,12 @@ var ts; function isEvolvingArrayOperationTarget(node) { var root = getReferenceRoot(node); var parent = root.parent; - var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" || - parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name)); - var isElementAssignment = parent.kind === 179 && + var isLengthPushOrUnshift = parent.kind === 179 && (parent.name.text === "length" || + parent.parent.kind === 181 && ts.isPushOrUnshiftIdentifier(parent.name)); + var isElementAssignment = parent.kind === 180 && parent.expression === root && - parent.parent.kind === 193 && - parent.parent.operatorToken.kind === 57 && + parent.parent.kind === 194 && + parent.parent.operatorToken.kind === 58 && parent.parent.left === parent && !ts.isAssignmentTarget(parent.parent) && isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048); @@ -30726,7 +30745,7 @@ var ts; return links.maybeTypePredicate; } function getMaybeTypePredicate(node) { - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { var funcType = checkNonNullExpression(node.expression); if (funcType !== silentNeverType) { var apparentType = getApparentType(funcType); @@ -30748,7 +30767,7 @@ var ts; var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode)); visitedFlowCount = visitedFlowStart; var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType); - if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) { + if (reference.parent.kind === 203 && getTypeWithFacts(resultType, 524288).flags & 8192) { return declaredType; } return resultType; @@ -30802,7 +30821,7 @@ var ts; } else if (flow.flags & 2) { var container = flow.container; - if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) { + if (container && container !== flowContainer && reference.kind !== 179 && reference.kind !== 99) { flow = container.flowNode; continue; } @@ -30845,7 +30864,7 @@ var ts; } function getTypeAtFlowArrayMutation(flow) { var node = flow.node; - var expr = node.kind === 180 ? + var expr = node.kind === 181 ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { @@ -30853,7 +30872,7 @@ var ts; var type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256) { var evolvedType_1 = type; - if (node.kind === 180) { + if (node.kind === 181) { for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) { var arg = _a[_i]; evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg); @@ -30977,7 +30996,7 @@ var ts; return result; } function isMatchingReferenceDiscriminant(expr) { - return expr.kind === 178 && + return expr.kind === 179 && declaredType.flags & 65536 && isMatchingReference(reference, expr.expression) && isDiscriminantProperty(declaredType, expr.name.text); @@ -31002,19 +31021,19 @@ var ts; } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { - case 57: + case 58: return narrowTypeByTruthiness(type, expr.left, assumeTrue); - case 31: case 32: case 33: case 34: + case 35: var operator_1 = expr.operatorToken.kind; var left_1 = getReferenceCandidate(expr.left); var right_1 = getReferenceCandidate(expr.right); - if (left_1.kind === 188 && right_1.kind === 9) { + if (left_1.kind === 189 && right_1.kind === 9) { return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); } - if (right_1.kind === 188 && left_1.kind === 9) { + if (right_1.kind === 189 && left_1.kind === 9) { return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); } if (isMatchingReference(reference, left_1)) { @@ -31033,9 +31052,9 @@ var ts; return declaredType; } break; - case 92: + case 93: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 25: + case 26: return narrowType(type, expr.right, assumeTrue); } return type; @@ -31044,7 +31063,7 @@ var ts; if (type.flags & 1) { return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } var valueType = getTypeOfExpression(value); @@ -31052,10 +31071,10 @@ var ts; if (!strictNullChecks) { return type; } - var doubleEquals = operator === 31 || operator === 32; + var doubleEquals = operator === 32 || operator === 33; var facts = doubleEquals ? assumeTrue ? 65536 : 524288 : - value.kind === 94 ? + value.kind === 95 ? assumeTrue ? 32768 : 262144 : assumeTrue ? 16384 : 131072; return getTypeWithFacts(type, facts); @@ -31081,7 +31100,7 @@ var ts; } return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } if (assumeTrue && !(type.flags & 65536)) { @@ -31187,7 +31206,7 @@ var ts; return type; } if (ts.isIdentifierTypePredicate(predicate)) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + var predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)]; if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); @@ -31199,7 +31218,7 @@ var ts; } else { var invokedExpression = ts.skipParentheses(callExpression.expression); - if (invokedExpression.kind === 179 || invokedExpression.kind === 178) { + if (invokedExpression.kind === 180 || invokedExpression.kind === 179) { var accessExpression = invokedExpression; var possibleReference = ts.skipParentheses(accessExpression.expression); if (isMatchingReference(reference, possibleReference)) { @@ -31214,19 +31233,19 @@ var ts; } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 70: - case 98: - case 96: - case 178: + case 71: + case 99: + case 97: + case 179: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 180: + case 181: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 184: + case 185: return narrowType(type, expr.expression, assumeTrue); - case 193: + case 194: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 191: - if (expr.operator === 50) { + case 192: + if (expr.operator === 51) { return narrowType(type, expr.operand, !assumeTrue); } break; @@ -31235,7 +31254,7 @@ var ts; } } function getTypeOfSymbolAtLocation(symbol, location) { - if (location.kind === 70) { + if (location.kind === 71) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { location = location.parent; } @@ -31251,9 +31270,9 @@ var ts; function getControlFlowContainer(node) { return ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || - node.kind === 233 || - node.kind === 264 || - node.kind === 148; + node.kind === 234 || + node.kind === 265 || + node.kind === 149; }); } function isParameterAssigned(symbol) { @@ -31271,10 +31290,10 @@ var ts; return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); }); } function markParameterAssignments(node) { - if (node.kind === 70) { + if (node.kind === 71) { if (ts.isAssignmentTarget(node)) { var symbol = getResolvedSymbol(node); - if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) { + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 146) { symbol.isAssigned = true; } } @@ -31288,7 +31307,7 @@ var ts; } function removeOptionalityFromDeclaredType(declaredType, declaration) { var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 145 && + declaration.kind === 146 && declaration.initializer && getFalsyFlags(declaredType) & 2048 && !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048); @@ -31302,7 +31321,7 @@ var ts; if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); if (languageVersion < 2) { - if (container.kind === 186) { + if (container.kind === 187) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (ts.hasModifier(container, 256)) { @@ -31318,7 +31337,7 @@ var ts; var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); if (localOrExportSymbol.flags & 32) { var declaration_1 = localOrExportSymbol.valueDeclaration; - if (declaration_1.kind === 228 + if (declaration_1.kind === 229 && ts.nodeIsDecorated(declaration_1)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -31330,11 +31349,11 @@ var ts; container = ts.getContainingClass(container); } } - else if (declaration_1.kind === 198) { + else if (declaration_1.kind === 199) { var container = ts.getThisContainer(node, false); while (container !== undefined) { if (container.parent === declaration_1) { - if (container.kind === 148 && ts.hasModifier(container, 32)) { + if (container.kind === 149 && ts.hasModifier(container, 32)) { getNodeLinks(declaration_1).flags |= 8388608; getNodeLinks(node).flags |= 16777216; } @@ -31364,17 +31383,17 @@ var ts; if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) { return type; } - var isParameter = ts.getRootDeclaration(declaration).kind === 145; + var isParameter = ts.getRootDeclaration(declaration).kind === 146; var declarationContainer = getControlFlowContainer(declaration); var flowContainer = getControlFlowContainer(node); var isOuterVariable = flowContainer !== declarationContainer; - while (flowContainer !== declarationContainer && (flowContainer.kind === 185 || - flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && + while (flowContainer !== declarationContainer && (flowContainer.kind === 186 || + flowContainer.kind === 187 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } var assumeInitialized = isParameter || isOuterVariable || - type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) || + type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) || ts.isInAmbientContext(declaration); var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) : type === autoType || type === autoArrayType ? undefinedType : @@ -31401,7 +31420,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 || (symbol.flags & (2 | 32)) === 0 || - symbol.valueDeclaration.parent.kind === 259) { + symbol.valueDeclaration.parent.kind === 260) { return; } var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -31419,8 +31438,8 @@ var ts; if (usedInFunction) { getNodeLinks(current).flags |= 65536; } - if (container.kind === 213 && - ts.getAncestor(symbol.valueDeclaration, 226).parent === container && + if (container.kind === 214 && + ts.getAncestor(symbol.valueDeclaration, 227).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152; } @@ -31432,16 +31451,16 @@ var ts; } function isAssignedInBodyOfForStatement(node, container) { var current = node; - while (current.parent.kind === 184) { + while (current.parent.kind === 185) { current = current.parent; } var isAssigned = false; if (ts.isAssignmentTarget(current)) { isAssigned = true; } - else if ((current.parent.kind === 191 || current.parent.kind === 192)) { + else if ((current.parent.kind === 192 || current.parent.kind === 193)) { var expr = current.parent; - isAssigned = expr.operator === 42 || expr.operator === 43; + isAssigned = expr.operator === 43 || expr.operator === 44; } if (!isAssigned) { return false; @@ -31450,7 +31469,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2; - if (container.kind === 148 || container.kind === 151) { + if (container.kind === 149 || container.kind === 152) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4; } @@ -31494,32 +31513,32 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 151) { + if (container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 186) { + if (container.kind === 187) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = (languageVersion < 2); } switch (container.kind) { - case 232: + case 233: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 231: + case 232: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 151: + case 152: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; + case 149: case 148: - case 147: if (ts.getModifierFlags(container) & 32) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 143: + case 144: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -31528,8 +31547,8 @@ var ts; } if (ts.isFunctionLike(container) && (!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) { - if (container.kind === 185 && - container.parent.kind === 193 && + if (container.kind === 186 && + container.parent.kind === 194 && ts.getSpecialPropertyAssignmentKind(container.parent) === 3) { var className = container.parent .left @@ -31563,22 +31582,22 @@ var ts; } function getTypeForThisExpressionFromJSDoc(node) { var jsdocType = ts.getJSDocType(node); - if (jsdocType && jsdocType.kind === 278) { + if (jsdocType && jsdocType.kind === 279) { var jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 282) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; }); + return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 146; }); } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 180 && node.parent.expression === node; + var isCallExpression = node.parent.kind === 181 && node.parent.expression === node; var container = ts.getSuperContainer(node, true); var needToCaptureLexicalThis = false; if (!isCallExpression) { - while (container && container.kind === 186) { + while (container && container.kind === 187) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = languageVersion < 2; } @@ -31586,14 +31605,14 @@ var ts; var canUseSuperExpression = isLegalUsageOfSuperExpression(container); var nodeCheckFlag = 0; if (!canUseSuperExpression) { - var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; }); - if (current && current.kind === 143) { + var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 144; }); + if (current && current.kind === 144) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 178)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -31601,7 +31620,7 @@ var ts; } return unknownType; } - if (!isCallExpression && container.kind === 151) { + if (!isCallExpression && container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if ((ts.getModifierFlags(container) & 32) || isCallExpression) { @@ -31611,7 +31630,7 @@ var ts; nodeCheckFlag = 256; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 150 && ts.getModifierFlags(container) & 256) { + if (container.kind === 151 && ts.getModifierFlags(container) & 256) { if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096; } @@ -31622,7 +31641,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 177) { + if (container.parent.kind === 178) { if (languageVersion < 2) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -31640,7 +31659,7 @@ var ts; } return unknownType; } - if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 152 && isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } @@ -31652,24 +31671,24 @@ var ts; return false; } if (isCallExpression) { - return container.kind === 151; + return container.kind === 152; } else { - if (ts.isClassLike(container.parent) || container.parent.kind === 177) { + if (ts.isClassLike(container.parent) || container.parent.kind === 178) { if (ts.getModifierFlags(container) & 32) { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || - container.kind === 153; + return container.kind === 151 || + container.kind === 150 || + container.kind === 153 || + container.kind === 154; } else { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || + return container.kind === 151 || + container.kind === 150 || container.kind === 153 || + container.kind === 154 || + container.kind === 149 || container.kind === 148 || - container.kind === 147 || - container.kind === 151; + container.kind === 152; } } } @@ -31677,10 +31696,10 @@ var ts; } } function getContainingObjectLiteral(func) { - return (func.kind === 150 || - func.kind === 152 || - func.kind === 153) && func.parent.kind === 177 ? func.parent : - func.kind === 185 && func.parent.kind === 260 ? func.parent.parent : + return (func.kind === 151 || + func.kind === 153 || + func.kind === 154) && func.parent.kind === 178 ? func.parent : + func.kind === 186 && func.parent.kind === 261 ? func.parent.parent : undefined; } function getThisTypeArgument(type) { @@ -31692,7 +31711,7 @@ var ts; }); } function getContextualThisParameterType(func) { - if (func.kind === 186) { + if (func.kind === 187) { return undefined; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -31715,7 +31734,7 @@ var ts; if (thisType) { return instantiateType(thisType, getContextualMapper(containingLiteral)); } - if (literal.parent.kind !== 260) { + if (literal.parent.kind !== 261) { break; } literal = literal.parent.parent; @@ -31723,9 +31742,9 @@ var ts; } return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral); } - if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) { + if (func.parent.kind === 194 && func.parent.operatorToken.kind === 58) { var target = func.parent.left; - if (target.kind === 178 || target.kind === 179) { + if (target.kind === 179 || target.kind === 180) { return checkExpressionCached(target.expression); } } @@ -31777,7 +31796,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -31789,7 +31808,7 @@ var ts; if (ts.isBindingPattern(declaration.parent)) { var parentDeclaration = declaration.parent.parent; var name = declaration.propertyName || declaration.name; - if (parentDeclaration.kind !== 175 && + if (parentDeclaration.kind !== 176 && parentDeclaration.type && !ts.isBindingPattern(name)) { var text = ts.getTextOfPropertyName(name); @@ -31830,7 +31849,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 145 && node.parent.initializer === node) { + if (node.parent.kind === 146 && node.parent.initializer === node) { return true; } node = node.parent; @@ -31839,8 +31858,8 @@ var ts; } function getContextualReturnType(functionDecl) { if (functionDecl.type || - functionDecl.kind === 151 || - functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) { + functionDecl.kind === 152 || + functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); @@ -31859,7 +31878,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 182) { + if (template.parent.kind === 183) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -31867,7 +31886,7 @@ var ts; function getContextualTypeForBinaryOperand(node) { var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; - if (operator >= 57 && operator <= 69) { + if (operator >= 58 && operator <= 70) { if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) { return undefined; } @@ -31875,14 +31894,14 @@ var ts; return getTypeOfExpression(binaryExpression.left); } } - else if (operator === 53) { + else if (operator === 54) { var type = getContextualType(binaryExpression); if (!type && node === binaryExpression.right) { type = getTypeOfExpression(binaryExpression.left); } return type; } - else if (operator === 52 || operator === 25) { + else if (operator === 53 || operator === 26) { if (node === binaryExpression.right) { return getContextualType(binaryExpression); } @@ -31939,6 +31958,25 @@ var ts; var conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } + function getContextualTypeForJsxExpression(node) { + var jsxAttributes = ts.isJsxAttributeLike(node.parent) ? + node.parent.parent : + node.parent.openingElement.attributes; + var attributesType = getContextualType(jsxAttributes); + if (!attributesType || isTypeAny(attributesType)) { + return undefined; + } + if (ts.isJsxAttribute(node.parent)) { + return getTypeOfPropertyOfType(attributesType, node.parent.name.text); + } + else if (node.parent.kind === 249) { + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + return jsxChildrenPropertyName && jsxChildrenPropertyName !== "" ? getTypeOfPropertyOfType(attributesType, jsxChildrenPropertyName) : anyType; + } + else { + return attributesType; + } + } function getContextualTypeForJsxAttribute(attribute) { var attributesType = getContextualType(attribute.parent); if (ts.isJsxAttribute(attribute)) { @@ -31964,44 +32002,44 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 175: + case 176: return getContextualTypeForInitializerExpression(node); - case 186: - case 218: + case 187: + case 219: return getContextualTypeForReturnExpression(node); - case 196: + case 197: return getContextualTypeForYieldOperand(parent); - case 180: case 181: + case 182: return getContextualTypeForArgument(parent, node); - case 183: - case 201: + case 184: + case 202: return getTypeFromTypeNode(parent.type); - case 193: + case 194: return getContextualTypeForBinaryOperand(node); - case 260: case 261: + case 262: return getContextualTypeForObjectLiteralElement(parent); - case 176: + case 177: return getContextualTypeForElementExpression(node); - case 194: + case 195: return getContextualTypeForConditionalOperand(node); - case 204: - ts.Debug.assert(parent.parent.kind === 195); + case 205: + ts.Debug.assert(parent.parent.kind === 196); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 184: + case 185: return getContextualType(parent); + case 256: + return getContextualTypeForJsxExpression(parent); + case 253: case 255: - return getContextualType(parent); - case 252: - case 254: return getContextualTypeForJsxAttribute(parent); + case 251: case 250: - case 249: return getAttributesTypeFromJsxOpeningLikeElement(parent); } return undefined; @@ -32034,7 +32072,7 @@ var ts; return sourceLength < targetParameterCount; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 185 || node.kind === 186; + return node.kind === 186 || node.kind === 187; } function getContextualSignatureForFunctionLikeDeclaration(node) { return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) @@ -32047,7 +32085,7 @@ var ts; getApparentTypeOfContextualType(node); } function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; @@ -32088,8 +32126,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false); } function hasDefaultValue(node) { - return (node.kind === 175 && !!node.initializer) || - (node.kind === 193 && node.operatorToken.kind === 57); + return (node.kind === 176 && !!node.initializer) || + (node.kind === 194 && node.operatorToken.kind === 58); } function checkArrayLiteral(node, checkMode) { var elements = node.elements; @@ -32098,7 +32136,7 @@ var ts; var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 197) { + if (inDestructuringPattern && e.kind === 198) { var restArrayType = checkExpression(e.expression, checkMode); var restElementType = getIndexTypeOfType(restArrayType, 1) || getIteratedTypeOrElementType(restArrayType, undefined, false, false, false); @@ -32110,7 +32148,7 @@ var ts; var type = checkExpressionForMutableLocation(e, checkMode); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 197; + hasSpreadElement = hasSpreadElement || e.kind === 198; } if (!hasSpreadElement) { if (inDestructuringPattern && elementTypes.length) { @@ -32121,7 +32159,7 @@ var ts; var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; - if (pattern && (pattern.kind === 174 || pattern.kind === 176)) { + if (pattern && (pattern.kind === 175 || pattern.kind === 177)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -32129,7 +32167,7 @@ var ts; elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 199) { + if (patternElement.kind !== 200) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -32146,7 +32184,7 @@ var ts; strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340); @@ -32192,7 +32230,7 @@ var ts; var propagatedFlags = 0; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177); + (contextualType.pattern.kind === 174 || contextualType.pattern.kind === 178); var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node); var typeFlags = 0; var patternWithComputedProperties = false; @@ -32202,25 +32240,25 @@ var ts; for (var i = 0; i < node.properties.length; i++) { var memberDecl = node.properties[i]; var member = memberDecl.symbol; - if (memberDecl.kind === 260 || - memberDecl.kind === 261 || + if (memberDecl.kind === 261 || + memberDecl.kind === 262 || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 260) { + if (memberDecl.kind === 261) { type = checkPropertyAssignment(memberDecl, checkMode); } - else if (memberDecl.kind === 150) { + else if (memberDecl.kind === 151) { type = checkObjectLiteralMethod(memberDecl, checkMode); } else { - ts.Debug.assert(memberDecl.kind === 261); + ts.Debug.assert(memberDecl.kind === 262); type = checkExpressionForMutableLocation(memberDecl.name, checkMode); } typeFlags |= type.flags; var prop = createSymbol(4 | member.flags, member.name); if (inDestructuringPattern) { - var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 261 && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 262 && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 67108864; } @@ -32246,7 +32284,7 @@ var ts; prop.target = member; member = prop; } - else if (memberDecl.kind === 262) { + else if (memberDecl.kind === 263) { if (languageVersion < 2) { checkExternalEmitHelpers(memberDecl, 2); } @@ -32268,7 +32306,7 @@ var ts; continue; } else { - ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153); + ts.Debug.assert(memberDecl.kind === 153 || memberDecl.kind === 154); checkNodeDeferred(memberDecl); } if (ts.hasDynamicName(memberDecl)) { @@ -32343,27 +32381,13 @@ var ts; else { checkExpression(node.closingElement.tagName); } - for (var _i = 0, _a = node.children; _i < _a.length; _i++) { - var child = _a[_i]; - switch (child.kind) { - case 255: - checkJsxExpression(child); - break; - case 248: - checkJsxElement(child); - break; - case 249: - checkJsxSelfClosingElement(child); - break; - } - } return getJsxGlobalElementType() || anyType; } function isUnhyphenatedJsxName(name) { return name.indexOf("-") < 0; } function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 178 || tagName.kind === 98) { + if (tagName.kind === 179 || tagName.kind === 99) { return false; } else { @@ -32394,7 +32418,7 @@ var ts; attributesArray.push(attributeSymbol); } else { - ts.Debug.assert(attributeDecl.kind === 254); + ts.Debug.assert(attributeDecl.kind === 255); if (attributesArray.length > 0) { spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); attributesArray = []; @@ -32427,6 +32451,32 @@ var ts; } }); } + var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined; + if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + var childrenTypes = []; + for (var _b = 0, _c = parent.children; _b < _c.length; _b++) { + var child = _c[_b]; + if (child.kind === 10) { + if (!child.containsOnlyWhiteSpaces) { + childrenTypes.push(stringType); + } + } + else { + childrenTypes.push(checkExpression(child, checkMode)); + } + } + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { + if (attributesTable.has(jsxChildrenPropertyName)) { + error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName); + } + var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName); + childrenPropSymbol.type = childrenTypes.length === 1 ? + childrenTypes[0] : + createArrayType(getUnionType(childrenTypes, false)); + attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol); + } + } return createJsxAttributesType(attributes.symbol, attributesTable); function createJsxAttributesType(symbol, attributesTable) { var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined); @@ -32488,26 +32538,37 @@ var ts; } return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true); } - function getJsxElementPropertiesName() { + function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) { var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined); - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064); - var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - var attribProperties = attribPropType && getPropertiesOfType(attribPropType); - if (attribProperties) { - if (attribProperties.length === 0) { + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 793064); + var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); + var propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); + if (propertiesOfJsxElementAttribPropInterface) { + if (propertiesOfJsxElementAttribPropInterface.length === 0) { return ""; } - else if (attribProperties.length === 1) { - return attribProperties[0].name; + else if (propertiesOfJsxElementAttribPropInterface.length === 1) { + return propertiesOfJsxElementAttribPropInterface[0].name; } - else { - error(attribsPropTypeSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, JsxNames.ElementAttributesPropertyNameContainer); - return undefined; + else if (propertiesOfJsxElementAttribPropInterface.length > 1) { + error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, nameOfAttribPropContainer); } } - else { - return undefined; + return undefined; + } + function getJsxElementPropertiesName() { + if (!_hasComputedJsxElementPropertiesName) { + _hasComputedJsxElementPropertiesName = true; + _jsxElementPropertiesName = getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer); + } + return _jsxElementPropertiesName; + } + function getJsxElementChildrenPropertyname() { + if (!_hasComputedJsxElementChildrenPropertyName) { + _hasComputedJsxElementChildrenPropertyName = true; + _jsxElementChildrenPropertyName = getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer); } + return _jsxElementChildrenPropertyName; } function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) { ts.Debug.assert(!(elementType.flags & 65536)); @@ -32773,7 +32834,7 @@ var ts; } } function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 148; + return s.valueDeclaration ? s.valueDeclaration.kind : 149; } function getDeclarationModifierFlagsFromSymbol(s) { if (s.valueDeclaration) { @@ -32801,18 +32862,18 @@ var ts; } function checkPropertyAccessibility(node, left, type, prop) { var flags = getDeclarationModifierFlagsFromSymbol(prop); - var errorNode = node.kind === 178 || node.kind === 225 ? + var errorNode = node.kind === 179 || node.kind === 226 ? node.name : node.right; if (getCheckFlags(prop) & 256) { error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type)); return false; } - if (left.kind === 96) { + if (left.kind === 97) { if (languageVersion < 2) { var hasNonMethodDeclaration = forEachProperty(prop, function (p) { var propKind = getDeclarationKindFromSymbol(p); - return propKind !== 150 && propKind !== 149; + return propKind !== 151 && propKind !== 150; }); if (hasNonMethodDeclaration) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -32835,7 +32896,7 @@ var ts; } return true; } - if (left.kind === 96) { + if (left.kind === 97) { return true; } var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) { @@ -32908,7 +32969,7 @@ var ts; } function isInPropertyInitializer(node) { while (node) { - if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) { + if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) { return true; } node = node.parent; @@ -32940,8 +33001,8 @@ var ts; !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text); } - if (prop.valueDeclaration.kind === 228 && - node.parent && node.parent.kind !== 158 && + if (prop.valueDeclaration.kind === 229 && + node.parent && node.parent.kind !== 159 && !ts.isInAmbientContext(prop.valueDeclaration) && !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text); @@ -32958,7 +33019,7 @@ var ts; return unknownType; } } - if (node.kind !== 178 || assignmentKind === 1 || + if (node.kind !== 179 || assignmentKind === 1 || !(prop.flags & (3 | 4 | 98304)) && !(prop.flags & 8192 && propType.flags & 65536)) { return propType; @@ -32967,7 +33028,7 @@ var ts; return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 178 + var left = node.kind === 179 ? node.expression : node.left; var type = checkExpression(left); @@ -32981,13 +33042,13 @@ var ts; } function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 226) { + if (initializer.kind === 227) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); } } - else if (initializer.kind === 70) { + else if (initializer.kind === 71) { return getResolvedSymbol(initializer); } return undefined; @@ -32997,13 +33058,13 @@ var ts; } function isForInVariableForNumericPropertyNames(expr) { var e = ts.skipParentheses(expr); - if (e.kind === 70) { + if (e.kind === 71) { var symbol = getResolvedSymbol(e); if (symbol.flags & 3) { var child = expr; var node = expr.parent; while (node) { - if (node.kind === 214 && + if (node.kind === 215 && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { @@ -33021,7 +33082,7 @@ var ts; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 181 && node.parent.expression === node) { + if (node.parent.kind === 182 && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -33074,10 +33135,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 182) { + if (node.kind === 183) { checkExpression(node.template); } - else if (node.kind !== 146) { + else if (node.kind !== 147) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -33128,7 +33189,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 197) { + if (arg && arg.kind === 198) { return i; } } @@ -33144,11 +33205,11 @@ var ts; if (ts.isJsxOpeningLikeElement(node)) { return true; } - if (node.kind === 182) { + if (node.kind === 183) { var tagExpression = node; argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 195) { + if (tagExpression.template.kind === 196) { var templateExpression = tagExpression.template; var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); ts.Debug.assert(lastSpan !== undefined); @@ -33156,11 +33217,11 @@ var ts; } else { var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 12); + ts.Debug.assert(templateLiteral.kind === 13); callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 146) { + else if (node.kind === 147) { isDecorator = true; typeArguments = undefined; argCount = getEffectiveArgumentCount(node, undefined, signature); @@ -33168,7 +33229,7 @@ var ts; else { var callExpression = node; if (!callExpression.arguments) { - ts.Debug.assert(callExpression.kind === 181); + ts.Debug.assert(callExpression.kind === 182); return signature.minArgumentCount === 0; } argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -33229,7 +33290,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -33296,7 +33357,7 @@ var ts; return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation); } var thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 181) { + if (thisType && thisType !== voidType && node.kind !== 182) { var thisArgumentNode = getThisArgumentOfCall(node); var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; @@ -33309,7 +33370,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -33324,28 +33385,28 @@ var ts; return true; } function getThisArgumentOfCall(node) { - if (node.kind === 180) { + if (node.kind === 181) { var callee = node.expression; - if (callee.kind === 178) { + if (callee.kind === 179) { return callee.expression; } - else if (callee.kind === 179) { + else if (callee.kind === 180) { return callee.expression; } } } function getEffectiveCallArguments(node) { var args; - if (node.kind === 182) { + if (node.kind === 183) { var template = node.template; args = [undefined]; - if (template.kind === 195) { + if (template.kind === 196) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 146) { + else if (node.kind === 147) { return undefined; } else if (ts.isJsxOpeningLikeElement(node)) { @@ -33357,21 +33418,21 @@ var ts; return args; } function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 146) { + if (node.kind === 147) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return 1; - case 148: + case 149: return 2; - case 150: - case 152: + case 151: case 153: + case 154: if (languageVersion === 0) { return 2; } return signature.parameters.length >= 3 ? 3 : 2; - case 145: + case 146: return 3; } } @@ -33380,48 +33441,48 @@ var ts; } } function getEffectiveDecoratorFirstArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { return getParentTypeOfClassElement(node); } ts.Debug.fail("Unsupported decorator target."); return unknownType; } function getEffectiveDecoratorSecondArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { return anyType; } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var element = node; switch (element.name.kind) { - case 70: + case 71: case 8: case 9: return getLiteralTypeForText(32, element.name.text); - case 143: + case 144: var nameType = checkComputedPropertyName(element.name); if (isTypeOfKind(nameType, 512)) { return nameType; @@ -33438,20 +33499,20 @@ var ts; return unknownType; } function getEffectiveDecoratorThirdArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { return numberType; } - if (node.kind === 148) { + if (node.kind === 149) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var propertyType = getTypeOfNode(node); return createTypedPropertyDescriptorType(propertyType); } @@ -33472,26 +33533,26 @@ var ts; return unknownType; } function getEffectiveArgumentType(node, argIndex) { - if (node.kind === 146) { + if (node.kind === 147) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return getGlobalTemplateStringsArrayType(); } return undefined; } function getEffectiveArgument(node, args, argIndex) { - if (node.kind === 146 || - (argIndex === 0 && node.kind === 182)) { + if (node.kind === 147 || + (argIndex === 0 && node.kind === 183)) { return undefined; } return args[argIndex]; } function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 146) { + if (node.kind === 147) { return node.expression; } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return node.template; } else { @@ -33499,13 +33560,13 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 182; - var isDecorator = node.kind === 146; + var isTaggedTemplate = node.kind === 183; + var isDecorator = node.kind === 147; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); var typeArguments; if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) { typeArguments = node.typeArguments; - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { ts.forEach(typeArguments, checkSourceElement); } } @@ -33545,7 +33606,7 @@ var ts; var candidateForTypeArgumentError; var resultOfFailedInference; var result; - var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma; + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma); } @@ -33663,7 +33724,7 @@ var ts; } } function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var superType = checkSuperExpression(node.expression); if (superType !== unknownType) { var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node)); @@ -33817,16 +33878,16 @@ var ts; } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 145: + case 146: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 148: + case 149: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 150: - case 152: + case 151: case 153: + case 154: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -33876,16 +33937,16 @@ var ts; } function resolveSignature(node, candidatesOutArray) { switch (node.kind) { - case 180: - return resolveCallExpression(node, candidatesOutArray); case 181: - return resolveNewExpression(node, candidatesOutArray); + return resolveCallExpression(node, candidatesOutArray); case 182: + return resolveNewExpression(node, candidatesOutArray); + case 183: return resolveTaggedTemplateExpression(node, candidatesOutArray); - case 146: + case 147: return resolveDecorator(node, candidatesOutArray); + case 251: case 250: - case 249: return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray); } ts.Debug.fail("Branch in 'resolveSignature' should be unreachable."); @@ -33914,17 +33975,17 @@ var ts; function checkCallExpression(node) { checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return voidType; } - if (node.kind === 181) { + if (node.kind === 182) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 151 && - declaration.kind !== 155 && - declaration.kind !== 160 && + declaration.kind !== 152 && + declaration.kind !== 156 && + declaration.kind !== 161 && !ts.isJSDocConstructSignature(declaration)) { - var funcSymbol = node.expression.kind === 70 ? + var funcSymbol = node.expression.kind === 71 ? getResolvedSymbol(node.expression) : checkExpression(node.expression).symbol; if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) { @@ -33956,9 +34017,9 @@ var ts; return false; } var targetDeclarationKind = resolvedRequire.flags & 16 - ? 227 + ? 228 : resolvedRequire.flags & 3 - ? 225 + ? 226 : 0; if (targetDeclarationKind !== 0) { var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind); @@ -33991,7 +34052,7 @@ var ts; error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return unknownType; } - else if (container.kind === 151) { + else if (container.kind === 152) { var symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } @@ -34057,7 +34118,7 @@ var ts; for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; if (!ts.isOmittedExpression(element)) { - if (element.name.kind === 70) { + if (element.name.kind === 71) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } assignBindingElementTypes(element); @@ -34070,8 +34131,8 @@ var ts; if (!links.type) { links.type = instantiateType(contextualType, mapper); if (links.type === emptyObjectType && - (parameter.valueDeclaration.name.kind === 173 || - parameter.valueDeclaration.name.kind === 174)) { + (parameter.valueDeclaration.name.kind === 174 || + parameter.valueDeclaration.name.kind === 175)) { links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); } assignBindingElementTypes(parameter.valueDeclaration); @@ -34113,7 +34174,7 @@ var ts; } var functionFlags = ts.getFunctionFlags(func); var type; - if (func.body.kind !== 206) { + if (func.body.kind !== 207) { type = checkExpressionCached(func.body, checkMode); if (functionFlags & 2) { type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -34207,7 +34268,7 @@ var ts; return false; } var lastStatement = ts.lastOrUndefined(func.body.statements); - if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) { + if (lastStatement && lastStatement.kind === 221 && isExhaustiveSwitchStatement(lastStatement)) { return false; } return true; @@ -34236,7 +34297,7 @@ var ts; } }); if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || - func.kind === 185 || func.kind === 186)) { + func.kind === 186 || func.kind === 187)) { return undefined; } if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { @@ -34253,7 +34314,7 @@ var ts; if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) { return; } - if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 207 || !functionHasImplicitReturn(func)) { return; } var hasExplicitReturn = func.flags & 256; @@ -34280,9 +34341,9 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 185) { + if (!hasGrammarError && node.kind === 186) { checkGrammarForGenerator(node); } if (checkMode === 1 && isContextSensitive(node)) { @@ -34316,7 +34377,7 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 150) { + if (produceDiagnostics && node.kind !== 151) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithCapturedNewTargetVariable(node, node.name); @@ -34324,7 +34385,7 @@ var ts; return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); var returnOrPromisedType = node.type && ((functionFlags & 3) === 2 ? @@ -34337,7 +34398,7 @@ var ts; if (!node.type) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 206) { + if (node.body.kind === 207) { checkSourceElement(node.body); } else { @@ -34372,10 +34433,10 @@ var ts; function isReferenceToReadonlyEntity(expr, symbol) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 && - (expr.kind === 178 || expr.kind === 179) && - expr.expression.kind === 98) { + (expr.kind === 179 || expr.kind === 180) && + expr.expression.kind === 99) { var func = ts.getContainingFunction(expr); - if (!(func && func.kind === 151)) + if (!(func && func.kind === 152)) return true; return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent); } @@ -34384,13 +34445,13 @@ var ts; return false; } function isReferenceThroughNamespaceImport(expr) { - if (expr.kind === 178 || expr.kind === 179) { + if (expr.kind === 179 || expr.kind === 180) { var node = ts.skipParentheses(expr.expression); - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol.flags & 8388608) { var declaration = getDeclarationOfAliasSymbol(symbol); - return declaration && declaration.kind === 239; + return declaration && declaration.kind === 240; } } } @@ -34398,7 +34459,7 @@ var ts; } function checkReferenceExpression(expr, invalidReferenceMessage) { var node = ts.skipParentheses(expr); - if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) { error(expr, invalidReferenceMessage); return false; } @@ -34407,7 +34468,7 @@ var ts; function checkDeleteExpression(node) { checkExpression(node.expression); var expr = ts.skipParentheses(node.expression); - if (expr.kind !== 178 && expr.kind !== 179) { + if (expr.kind !== 179 && expr.kind !== 180) { error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } @@ -34443,25 +34504,25 @@ var ts; if (operandType === silentNeverType) { return silentNeverType; } - if (node.operator === 37 && node.operand.kind === 8) { + if (node.operator === 38 && node.operand.kind === 8) { return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text)); } switch (node.operator) { - case 36: case 37: - case 51: + case 38: + case 52: checkNonNullType(operandType, node.operand); if (maybeTypeOfKind(operandType, 512)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; - case 50: + case 51: var facts = getTypeFacts(operandType) & (1048576 | 2097152); return facts === 1048576 ? falseType : facts === 2097152 ? trueType : booleanType; - case 42: case 43: + case 44: var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access); @@ -34565,9 +34626,9 @@ var ts; return sourceType; } function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) { - if (property.kind === 260 || property.kind === 261) { + if (property.kind === 261 || property.kind === 262) { var name = property.name; - if (name.kind === 143) { + if (name.kind === 144) { checkComputedPropertyName(name); } if (isComputedNonLiteralName(name)) { @@ -34580,7 +34641,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) || getIndexTypeOfType(objectLiteralType, 0); if (type) { - if (property.kind === 261) { + if (property.kind === 262) { return checkDestructuringAssignment(property, type); } else { @@ -34591,7 +34652,7 @@ var ts; error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name)); } } - else if (property.kind === 262) { + else if (property.kind === 263) { if (languageVersion < 5) { checkExternalEmitHelpers(property, 4); } @@ -34622,8 +34683,8 @@ var ts; function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { var elements = node.elements; var element = elements[elementIndex]; - if (element.kind !== 199) { - if (element.kind !== 197) { + if (element.kind !== 200) { + if (element.kind !== 198) { var propName = "" + elementIndex; var type = isTypeAny(sourceType) ? sourceType @@ -34649,7 +34710,7 @@ var ts; } else { var restExpression = element.expression; - if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) { + if (restExpression.kind === 194 && restExpression.operatorToken.kind === 58) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -34662,7 +34723,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) { var target; - if (exprOrAssignment.kind === 261) { + if (exprOrAssignment.kind === 262) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && @@ -34676,21 +34737,21 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 193 && target.operatorToken.kind === 57) { + if (target.kind === 194 && target.operatorToken.kind === 58) { checkBinaryExpression(target, checkMode); target = target.left; } - if (target.kind === 177) { + if (target.kind === 178) { return checkObjectLiteralAssignment(target, sourceType); } - if (target.kind === 176) { + if (target.kind === 177) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { var targetType = checkExpression(target, checkMode); - var error = target.parent.kind === 262 ? + var error = target.parent.kind === 263 ? ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; if (checkReferenceExpression(target, error)) { @@ -34701,49 +34762,49 @@ var ts; function isSideEffectFree(node) { node = ts.skipParentheses(node); switch (node.kind) { - case 70: + case 71: case 9: - case 11: - case 182: - case 195: case 12: + case 183: + case 196: + case 13: case 8: - case 100: - case 85: - case 94: - case 138: - case 185: - case 198: + case 101: + case 86: + case 95: + case 139: case 186: - case 176: + case 199: + case 187: case 177: - case 188: - case 202: + case 178: + case 189: + case 203: + case 250: case 249: - case 248: return true; - case 194: + case 195: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 193: + case 194: if (ts.isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 191: case 192: + case 193: switch (node.operator) { - case 50: - case 36: - case 37: case 51: + case 37: + case 38: + case 52: return true; } return false; - case 189: - case 183: - case 201: + case 190: + case 184: + case 202: default: return false; } @@ -34763,34 +34824,34 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; - if (operator === 57 && (left.kind === 177 || left.kind === 176)) { + if (operator === 58 && (left.kind === 178 || left.kind === 177)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode); } var leftType = checkExpression(left, checkMode); var rightType = checkExpression(right, checkMode); switch (operator) { - case 38: case 39: - case 60: - case 61: case 40: + case 61: case 62: case 41: case 63: - case 37: - case 59: - case 44: + case 42: case 64: + case 38: + case 60: case 45: case 65: case 46: case 66: - case 48: - case 68: - case 49: - case 69: case 47: case 67: + case 49: + case 69: + case 50: + case 70: + case 48: + case 68: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -34810,8 +34871,8 @@ var ts; } } return numberType; - case 36: - case 58: + case 37: + case 59: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -34838,14 +34899,14 @@ var ts; reportOperatorError(); return anyType; } - if (operator === 58) { + if (operator === 59) { checkAssignmentOperator(resultType); } return resultType; - case 26: - case 28: + case 27: case 29: case 30: + case 31: if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); @@ -34854,10 +34915,10 @@ var ts; } } return booleanType; - case 31: case 32: case 33: case 34: + case 35: var leftIsLiteral = isLiteralType(leftType); var rightIsLiteral = isLiteralType(rightType); if (!leftIsLiteral || !rightIsLiteral) { @@ -34868,29 +34929,29 @@ var ts; reportOperatorError(); } return booleanType; - case 92: + case 93: return checkInstanceOfExpression(left, right, leftType, rightType); - case 91: + case 92: return checkInExpression(left, right, leftType, rightType); - case 52: + case 53: return getTypeFacts(leftType) & 1048576 ? includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) : leftType; - case 53: + case 54: return getTypeFacts(leftType) & 2097152 ? getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : leftType; - case 57: + case 58: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); - case 25: + case 26: if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } function isEvalNode(node) { - return node.kind === 70 && node.text === "eval"; + return node.kind === 71 && node.text === "eval"; } function checkForDisallowedESSymbolOperand(operator) { var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left : @@ -34904,21 +34965,21 @@ var ts; } function getSuggestedBooleanOperator(operator) { switch (operator) { + case 49: + case 69: + return 54; + case 50: + case 70: + return 35; case 48: case 68: return 53; - case 49: - case 69: - return 34; - case 47: - case 67: - return 52; default: return undefined; } } function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 57 && operator <= 69) { + if (produceDiagnostics && operator >= 58 && operator <= 70) { if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) { checkTypeAssignableTo(valueType, leftType, left, undefined); } @@ -35004,9 +35065,9 @@ var ts; return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text)); case 8: return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text)); - case 100: + case 101: return trueType; - case 85: + case 86: return falseType; } } @@ -35040,7 +35101,7 @@ var ts; } function isTypeAssertion(node) { node = ts.skipParentheses(node); - return node.kind === 183 || node.kind === 201; + return node.kind === 184 || node.kind === 202; } function checkDeclarationInitializer(declaration) { var type = getTypeOfExpression(declaration.initializer, true); @@ -35066,14 +35127,14 @@ var ts; return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -35095,7 +35156,7 @@ var ts; return type; } function getTypeOfExpression(node, cache) { - if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) { + if (node.kind === 181 && node.expression.kind !== 97 && !ts.isRequireCall(node, true)) { var funcType = checkNonNullExpression(node.expression); var signature = getSingleCallSignature(funcType); if (signature && !signature.typeParameters) { @@ -35113,7 +35174,7 @@ var ts; } function checkExpression(node, checkMode) { var type; - if (node.kind === 142) { + if (node.kind === 143) { type = checkQualifiedName(node); } else { @@ -35121,9 +35182,9 @@ var ts; type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 178 && node.parent.expression === node) || - (node.parent.kind === 179 && node.parent.expression === node) || - ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 179 && node.parent.expression === node) || + (node.parent.kind === 180 && node.parent.expression === node) || + ((node.kind === 71 || node.kind === 143) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -35132,83 +35193,83 @@ var ts; } function checkExpressionWorker(node, checkMode) { switch (node.kind) { - case 70: + case 71: return checkIdentifier(node); - case 98: + case 99: return checkThisExpression(node); - case 96: + case 97: return checkSuperExpression(node); - case 94: + case 95: return nullWideningType; case 9: case 8: - case 100: - case 85: + case 101: + case 86: return checkLiteralExpression(node); - case 195: + case 196: return checkTemplateExpression(node); - case 12: + case 13: return stringType; - case 11: + case 12: return globalRegExpType; - case 176: - return checkArrayLiteral(node, checkMode); case 177: - return checkObjectLiteral(node, checkMode); + return checkArrayLiteral(node, checkMode); case 178: - return checkPropertyAccessExpression(node); + return checkObjectLiteral(node, checkMode); case 179: - return checkIndexedAccess(node); + return checkPropertyAccessExpression(node); case 180: + return checkIndexedAccess(node); case 181: - return checkCallExpression(node); case 182: + return checkCallExpression(node); + case 183: return checkTaggedTemplateExpression(node); - case 184: + case 185: return checkExpression(node.expression, checkMode); - case 198: + case 199: return checkClassExpression(node); - case 185: case 186: + case 187: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 188: + case 189: return checkTypeOfExpression(node); - case 183: - case 201: - return checkAssertion(node); + case 184: case 202: - return checkNonNullAssertion(node); + return checkAssertion(node); case 203: + return checkNonNullAssertion(node); + case 204: return checkMetaProperty(node); - case 187: + case 188: return checkDeleteExpression(node); - case 189: - return checkVoidExpression(node); case 190: - return checkAwaitExpression(node); + return checkVoidExpression(node); case 191: - return checkPrefixUnaryExpression(node); + return checkAwaitExpression(node); case 192: - return checkPostfixUnaryExpression(node); + return checkPrefixUnaryExpression(node); case 193: - return checkBinaryExpression(node, checkMode); + return checkPostfixUnaryExpression(node); case 194: + return checkBinaryExpression(node, checkMode); + case 195: return checkConditionalExpression(node, checkMode); - case 197: + case 198: return checkSpreadExpression(node, checkMode); - case 199: + case 200: return undefinedWideningType; - case 196: + case 197: return checkYieldExpression(node); - case 255: + case 256: return checkJsxExpression(node, checkMode); - case 248: - return checkJsxElement(node); case 249: + return checkJsxElement(node); + case 250: return checkJsxSelfClosingElement(node); - case 253: + case 254: return checkJsxAttributes(node, checkMode); - case 250: + case 251: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -35238,7 +35299,7 @@ var ts; var func = ts.getContainingFunction(node); if (ts.getModifierFlags(node) & 92) { func = ts.getContainingFunction(node); - if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 152 && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -35249,7 +35310,7 @@ var ts; if (ts.indexOf(func.parameters, node) !== 0) { error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); } - if (func.kind === 151 || func.kind === 155 || func.kind === 160) { + if (func.kind === 152 || func.kind === 156 || func.kind === 161) { error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); } } @@ -35261,7 +35322,7 @@ var ts; if (parameterList) { for (var i = 0; i < parameterList.length; i++) { var param = parameterList[i]; - if (param.name.kind === 70 && + if (param.name.kind === 71 && param.name.text === parameter.text) { return i; } @@ -35311,13 +35372,13 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { + case 187: + case 155: + case 228: case 186: - case 154: - case 227: - case 185: - case 159: + case 160: + case 151: case 150: - case 149: var parent = node.parent; if (node === parent.type) { return parent; @@ -35331,13 +35392,13 @@ var ts; continue; } var name = element.name; - if (name.kind === 70 && + if (name.kind === 71 && name.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name.kind === 174 || - name.kind === 173) { + else if (name.kind === 175 || + name.kind === 174) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) { return true; } @@ -35345,12 +35406,12 @@ var ts; } } function checkSignatureDeclaration(node) { - if (node.kind === 156) { + if (node.kind === 157) { checkGrammarIndexSignature(node); } - else if (node.kind === 159 || node.kind === 227 || node.kind === 160 || - node.kind === 154 || node.kind === 151 || - node.kind === 155) { + else if (node.kind === 160 || node.kind === 228 || node.kind === 161 || + node.kind === 155 || node.kind === 152 || + node.kind === 156) { checkGrammarFunctionLikeDeclaration(node); } var functionFlags = ts.getFunctionFlags(node); @@ -35377,10 +35438,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (noImplicitAny && !node.type) { switch (node.kind) { - case 155: + case 156: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 154: + case 155: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -35421,7 +35482,7 @@ var ts; var staticNames = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151) { + if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; if (ts.isParameterPropertyDeclaration(param)) { @@ -35435,16 +35496,16 @@ var ts; var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); if (memberName) { switch (member.kind) { - case 152: + case 153: addName(names, member.name, memberName, 1); break; - case 153: + case 154: addName(names, member.name, memberName, 2); break; - case 148: + case 149: addName(names, member.name, memberName, 3); break; - case 150: + case 151: addName(names, member.name, memberName, 4); break; } @@ -35496,12 +35557,12 @@ var ts; var names = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 147) { + if (member.kind === 148) { var memberName = void 0; switch (member.name.kind) { case 9: case 8: - case 70: + case 71: memberName = member.name.text; break; default: @@ -35518,7 +35579,7 @@ var ts; } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 229) { + if (node.kind === 230) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -35533,7 +35594,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 135: + case 136: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -35541,7 +35602,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 132: + case 133: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -35597,15 +35658,15 @@ var ts; return ts.forEachChild(n, containsSuperCall); } function markThisReferencesAsErrors(n) { - if (n.kind === 98) { + if (n.kind === 99) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 185 && n.kind !== 227) { + else if (n.kind !== 186 && n.kind !== 228) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 148 && + return n.kind === 149 && !(ts.getModifierFlags(n) & 32) && !!n.initializer; } @@ -35625,7 +35686,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) { var statement = statements_3[_i]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { superCallStatement = statement; break; } @@ -35648,18 +35709,18 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 152) { + if (node.kind === 153) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) { if (!(node.flags & 256)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { - var otherKind = node.kind === 152 ? 153 : 152; + var otherKind = node.kind === 153 ? 154 : 153; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) { @@ -35673,7 +35734,7 @@ var ts; } } var returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 152) { + if (node.kind === 153) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -35783,9 +35844,9 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); - if (n.parent.kind !== 229 && - n.parent.kind !== 228 && - n.parent.kind !== 198 && + if (n.parent.kind !== 230 && + n.parent.kind !== 229 && + n.parent.kind !== 199 && ts.isInAmbientContext(n)) { if (!(flags & 2)) { flags |= 1; @@ -35862,7 +35923,7 @@ var ts; if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 150 || node.kind === 149) && + var reportError = (node.kind === 151 || node.kind === 150) && (ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32); if (reportError) { var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; @@ -35895,11 +35956,11 @@ var ts; var current = declarations_5[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 230 || node.parent.kind === 163 || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) { + if (node.kind === 228 || node.kind === 151 || node.kind === 150 || node.kind === 152) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -36010,16 +36071,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 229: + case 230: return 2097152; - case 232: + case 233: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; - case 228: - case 231: + case 229: + case 232: return 2097152 | 1048576; - case 236: + case 237: var result_3 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); }); @@ -36141,7 +36202,7 @@ var ts; var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; if (promiseConstructorType === unknownType) { - if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { + if (promiseConstructorName.kind === 71 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { @@ -36176,22 +36237,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 228: + case 229: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 145: + case 146: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 148: + case 149: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 150: - case 152: + case 151: case 153: + case 154: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -36202,7 +36263,7 @@ var ts; function markTypeNodeAsReferenced(node) { var typeName = node && ts.getEntityNameFromTypeNode(node); var rootName = typeName && getFirstIdentifier(typeName); - var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 70 ? 793064 : 1920) | 8388608, undefined, undefined); + var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined); if (rootSymbol && rootSymbol.flags & 8388608 && symbolIsValue(rootSymbol) @@ -36225,13 +36286,13 @@ var ts; } var firstDecorator = node.decorators[0]; checkExternalEmitHelpers(firstDecorator, 8); - if (node.kind === 145) { + if (node.kind === 146) { checkExternalEmitHelpers(firstDecorator, 32); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16); switch (node.kind) { - case 228: + case 229: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) { @@ -36240,19 +36301,19 @@ var ts; } } break; - case 150: - case 152: + case 151: case 153: + case 154: for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markTypeNodeAsReferenced(node.type); break; - case 148: + case 149: markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); break; - case 145: + case 146: markTypeNodeAsReferenced(node.type); break; } @@ -36273,7 +36334,7 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var functionFlags = ts.getFunctionFlags(node); - if (node.name && node.name.kind === 143) { + if (node.name && node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -36317,43 +36378,43 @@ var ts; for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { var node = deferredUnusedIdentifierNodes_1[_i]; switch (node.kind) { - case 264: - case 232: + case 265: + case 233: checkUnusedModuleMembers(node); break; - case 228: - case 198: + case 229: + case 199: checkUnusedClassMembers(node); checkUnusedTypeParameters(node); break; - case 229: + case 230: checkUnusedTypeParameters(node); break; - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: checkUnusedLocalsAndParameters(node); break; - case 151: - case 185: - case 227: - case 186: - case 150: case 152: + case 186: + case 228: + case 187: + case 151: case 153: + case 154: if (node.body) { checkUnusedLocalsAndParameters(node); } checkUnusedTypeParameters(node); break; - case 149: - case 154: + case 150: case 155: case 156: - case 159: + case 157: case 160: + case 161: checkUnusedTypeParameters(node); break; } @@ -36361,10 +36422,10 @@ var ts; } } function checkUnusedLocalsAndParameters(node) { - if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + if (node.parent.kind !== 230 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { node.locals.forEach(function (local) { if (!local.isReferenced) { - if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) { + if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) { var parameter = ts.getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !ts.isParameterPropertyDeclaration(parameter) && @@ -36390,13 +36451,13 @@ var ts; function errorUnusedLocal(node, name) { if (isIdentifierThatStartsWithUnderScore(node)) { var declaration = ts.getRootDeclaration(node.parent); - if (declaration.kind === 225 && - (declaration.parent.parent.kind === 214 || - declaration.parent.parent.kind === 215)) { + if (declaration.kind === 226 && + (declaration.parent.parent.kind === 215 || + declaration.parent.parent.kind === 216)) { return; } } - if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) { + if (!isRemovedPropertyFromObjectSpread(node.kind === 71 ? node.parent : node)) { error(node, ts.Diagnostics._0_is_declared_but_never_used, name); } } @@ -36404,19 +36465,19 @@ var ts; return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node) { - return node.kind === 70 && node.text.charCodeAt(0) === 95; + return node.kind === 71 && node.text.charCodeAt(0) === 95; } function checkUnusedClassMembers(node) { if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { if (node.members) { for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 150 || member.kind === 148) { + if (member.kind === 151 || member.kind === 149) { if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) { error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); } } - else if (member.kind === 151) { + else if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) { @@ -36460,7 +36521,7 @@ var ts; } } function checkBlock(node) { - if (node.kind === 206) { + if (node.kind === 207) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -36482,19 +36543,19 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 148 || - node.kind === 147 || + if (node.kind === 149 || + node.kind === 148 || + node.kind === 151 || node.kind === 150 || - node.kind === 149 || - node.kind === 152 || - node.kind === 153) { + node.kind === 153 || + node.kind === 154) { return false; } if (ts.isInAmbientContext(node)) { return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 146 && ts.nodeIsMissing(root.parent.body)) { return false; } return true; @@ -36512,7 +36573,7 @@ var ts; function checkIfThisIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration_1 = node.kind !== 70; + var isDeclaration_1 = node.kind !== 71; if (isDeclaration_1) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -36526,7 +36587,7 @@ var ts; function checkIfNewTargetIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 8) { - var isDeclaration_2 = node.kind !== 70; + var isDeclaration_2 = node.kind !== 71; if (isDeclaration_2) { error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } @@ -36546,7 +36607,7 @@ var ts; return; } if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_3 = node.kind !== 70; + var isDeclaration_3 = node.kind !== 71; if (isDeclaration_3) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -36562,11 +36623,11 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -36574,11 +36635,11 @@ var ts; if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -36586,7 +36647,7 @@ var ts; if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) { return; } - if (node.kind === 225 && !node.initializer) { + if (node.kind === 226 && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -36596,15 +36657,15 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226); - var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 227); + var container = varDeclList.parent.kind === 208 && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; var namesShareScope = container && - (container.kind === 206 && ts.isFunctionLike(container.parent) || + (container.kind === 207 && ts.isFunctionLike(container.parent) || + container.kind === 234 || container.kind === 233 || - container.kind === 232 || - container.kind === 264); + container.kind === 265); if (!namesShareScope) { var name = symbolToString(localDeclarationSymbol); error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -36614,7 +36675,7 @@ var ts; } } function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 145) { + if (ts.getRootDeclaration(node).kind !== 146) { return; } var func = ts.getContainingFunction(node); @@ -36623,10 +36684,10 @@ var ts; if (ts.isTypeNode(n) || ts.isDeclarationName(n)) { return; } - if (n.kind === 178) { + if (n.kind === 179) { return visit(n.expression); } - else if (n.kind === 70) { + else if (n.kind === 71) { var symbol = resolveName(n, n.text, 107455 | 8388608, undefined, undefined); if (!symbol || symbol === unknownSymbol || !symbol.valueDeclaration) { return; @@ -36637,8 +36698,8 @@ var ts; } var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (enclosingContainer === func) { - if (symbol.valueDeclaration.kind === 145 || - symbol.valueDeclaration.kind === 175) { + if (symbol.valueDeclaration.kind === 146 || + symbol.valueDeclaration.kind === 176) { if (symbol.valueDeclaration.pos < node.pos) { return; } @@ -36647,7 +36708,7 @@ var ts; return "quit"; } return ts.isFunctionLike(current.parent) || - (current.parent.kind === 148 && + (current.parent.kind === 149 && !(ts.hasModifier(current.parent, 32)) && ts.isClassLike(current.parent.parent)); })) { @@ -36668,17 +36729,17 @@ var ts; function checkVariableLikeDeclaration(node) { checkDecorators(node); checkSourceElement(node.type); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 175) { - if (node.parent.kind === 173 && languageVersion < 5) { + if (node.kind === 176) { + if (node.parent.kind === 174 && languageVersion < 5) { checkExternalEmitHelpers(node, 4); } - if (node.propertyName && node.propertyName.kind === 143) { + if (node.propertyName && node.propertyName.kind === 144) { checkComputedPropertyName(node.propertyName); } var parent = node.parent.parent; @@ -36691,17 +36752,17 @@ var ts; } } if (ts.isBindingPattern(node.name)) { - if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) { + if (node.name.kind === 175 && languageVersion < 2 && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512); } ts.forEach(node.name.elements, checkSourceElement); } - if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 146 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (ts.isBindingPattern(node.name)) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); checkParameterInitializer(node); } @@ -36710,7 +36771,7 @@ var ts; var symbol = getSymbolOfNode(node); var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol)); if (node === symbol.valueDeclaration) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); checkParameterInitializer(node); } @@ -36728,9 +36789,9 @@ var ts; error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); } } - if (node.kind !== 148 && node.kind !== 147) { + if (node.kind !== 149 && node.kind !== 148) { checkExportsOnMergedDeclarations(node); - if (node.kind === 225 || node.kind === 175) { + if (node.kind === 226 || node.kind === 176) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -36741,8 +36802,8 @@ var ts; } } function areDeclarationFlagsIdentical(left, right) { - if ((left.kind === 145 && right.kind === 225) || - (left.kind === 225 && right.kind === 145)) { + if ((left.kind === 146 && right.kind === 226) || + (left.kind === 226 && right.kind === 146)) { return true; } if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) { @@ -36769,7 +36830,7 @@ var ts; ts.forEach(node.declarationList.declarations, checkSourceElement); } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { - if (node.modifiers && node.parent.kind === 177) { + if (node.modifiers && node.parent.kind === 178) { if (ts.getFunctionFlags(node) & 2) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -36788,7 +36849,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 208) { + if (node.thenStatement.kind === 209) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -36805,12 +36866,12 @@ var ts; } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 226) { + if (node.initializer && node.initializer.kind === 227) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -36828,7 +36889,7 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.kind === 215) { + if (node.kind === 216) { if (node.awaitModifier) { if (languageVersion < 4) { checkExternalEmitHelpers(node, 8192); @@ -36838,13 +36899,13 @@ var ts; checkExternalEmitHelpers(node, 256); } } - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { @@ -36863,7 +36924,7 @@ var ts; function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); var rightType = checkNonNullExpression(node.expression); - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -36873,7 +36934,7 @@ var ts; else { var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { @@ -37085,7 +37146,7 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } function isGetAccessorWithAnnotatedSetAccessor(node) { - return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153))); + return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154))); } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2 @@ -37110,12 +37171,12 @@ var ts; if (functionFlags & 1) { return; } - if (func.kind === 153) { + if (func.kind === 154) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } } - else if (func.kind === 151) { + else if (func.kind === 152) { if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) { error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -37133,7 +37194,7 @@ var ts; } } } - else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + else if (func.kind !== 152 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } } @@ -37159,7 +37220,7 @@ var ts; var expressionType = checkExpression(node.expression); var expressionIsLiteral = isLiteralType(expressionType); ts.forEach(node.caseBlock.clauses, function (clause) { - if (clause.kind === 257 && !hasDuplicateDefaultClause) { + if (clause.kind === 258 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -37171,7 +37232,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 256) { + if (produceDiagnostics && clause.kind === 257) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); var caseIsLiteral = isLiteralType(caseType); @@ -37196,7 +37257,7 @@ var ts; if (ts.isFunctionLike(current)) { return "quit"; } - if (current.kind === 221 && current.label.text === node.label.text) { + if (current.kind === 222 && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); return true; @@ -37288,7 +37349,7 @@ var ts; return; } var errorNode; - if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) { + if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) { errorNode = propDeclaration; } else if (indexDeclaration) { @@ -37510,7 +37571,7 @@ var ts; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { return ts.filter(symbol.declarations, function (d) { - return d.kind === 228 || d.kind === 229; + return d.kind === 229 || d.kind === 230; }); } function checkKindsOfPropertyMemberOverrides(type, baseType) { @@ -37528,7 +37589,7 @@ var ts; if (derived === base) { var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) { - if (derivedClassDecl.kind === 198) { + if (derivedClassDecl.kind === 199) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -37568,7 +37629,7 @@ var ts; } } function isAccessor(kind) { - return kind === 152 || kind === 153; + return kind === 153 || kind === 154; } function checkInheritedPropertiesAreIdentical(type, typeNode) { var baseTypes = getBaseTypes(type); @@ -37610,7 +37671,7 @@ var ts; checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 230); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -37706,18 +37767,18 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 191: + case 192: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; } switch (e.operator) { - case 36: return value_1; - case 37: return -value_1; - case 51: return ~value_1; + case 37: return value_1; + case 38: return -value_1; + case 52: return ~value_1; } return undefined; - case 193: + case 194: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -37727,38 +37788,38 @@ var ts; return undefined; } switch (e.operatorToken.kind) { - case 48: return left | right; - case 47: return left & right; - case 45: return left >> right; - case 46: return left >>> right; - case 44: return left << right; - case 49: return left ^ right; - case 38: return left * right; - case 40: return left / right; - case 36: return left + right; - case 37: return left - right; - case 41: return left % right; + case 49: return left | right; + case 48: return left & right; + case 46: return left >> right; + case 47: return left >>> right; + case 45: return left << right; + case 50: return left ^ right; + case 39: return left * right; + case 41: return left / right; + case 37: return left + right; + case 38: return left - right; + case 42: return left % right; } return undefined; case 8: checkGrammarNumericLiteral(e); return +e.text; - case 184: + case 185: return evalConstant(e.expression); - case 70: + case 71: + case 180: case 179: - case 178: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; var propertyName = void 0; - if (e.kind === 70) { + if (e.kind === 71) { enumType_1 = currentType; propertyName = e.text; } else { var expression = void 0; - if (e.kind === 179) { + if (e.kind === 180) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9) { return undefined; @@ -37772,10 +37833,10 @@ var ts; } var current = expression; while (current) { - if (current.kind === 70) { + if (current.kind === 71) { break; } - else if (current.kind === 178) { + else if (current.kind === 179) { current = current.expression; } else { @@ -37836,7 +37897,7 @@ var ts; } var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 231) { + if (declaration.kind !== 232) { return false; } var enumDeclaration = declaration; @@ -37859,8 +37920,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { var declaration = declarations_8[_i]; - if ((declaration.kind === 228 || - (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 229 || + (declaration.kind === 228 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -37919,7 +37980,7 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - var mergedClass = ts.getDeclarationOfKind(symbol, 228); + var mergedClass = ts.getDeclarationOfKind(symbol, 229); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768; @@ -37962,22 +38023,22 @@ var ts; } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 207: + case 208: for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 242: case 243: + case 244: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 236: case 237: + case 238: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 175: - case 225: + case 176: + case 226: var name = node.name; if (ts.isBindingPattern(name)) { for (var _b = 0, _c = name.elements; _b < _c.length; _b++) { @@ -37986,12 +38047,12 @@ var ts; } break; } - case 228: - case 231: - case 227: case 229: case 232: + case 228: case 230: + case 233: + case 231: if (isGlobalAugmentation) { return; } @@ -38007,17 +38068,17 @@ var ts; } function getFirstIdentifier(node) { switch (node.kind) { - case 70: + case 71: return node; - case 142: + case 143: do { node = node.left; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; - case 178: + case 179: do { node = node.expression; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; } } @@ -38027,9 +38088,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 264 && !inAmbientExternalModule) { - error(moduleName, node.kind === 243 ? + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 265 && !inAmbientExternalModule) { + error(moduleName, node.kind === 244 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -38050,7 +38111,7 @@ var ts; (symbol.flags & 793064 ? 793064 : 0) | (symbol.flags & 1920 ? 1920 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 245 ? + var message = node.kind === 246 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -38077,7 +38138,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239) { + if (importClause.namedBindings.kind === 240) { checkImportBinding(importClause.namedBindings); } else { @@ -38128,10 +38189,10 @@ var ts; if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 && + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 234 && !node.moduleSpecifier && ts.isInAmbientContext(node); - if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + if (node.parent.kind !== 265 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -38144,7 +38205,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232; + var isInAppropriateContext = node.parent.kind === 265 || node.parent.kind === 234 || node.parent.kind === 233; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -38167,8 +38228,8 @@ var ts; if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { return; } - var container = node.parent.kind === 264 ? node.parent : node.parent.parent; - if (container.kind === 232 && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 265 ? node.parent : node.parent.parent; + if (container.kind === 233 && !ts.isAmbientModule(container)) { if (node.isExportEquals) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } @@ -38180,7 +38241,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { markExportAsReferenced(node); } else { @@ -38235,7 +38296,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return (declaration.kind !== 227 && declaration.kind !== 150) || + return (declaration.kind !== 228 && declaration.kind !== 151) || !!declaration.body; } } @@ -38246,123 +38307,123 @@ var ts; var kind = node.kind; if (cancellationToken) { switch (kind) { - case 232: - case 228: + case 233: case 229: - case 227: + case 230: + case 228: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 144: - return checkTypeParameter(node); case 145: + return checkTypeParameter(node); + case 146: return checkParameter(node); + case 149: case 148: - case 147: return checkPropertyDeclaration(node); - case 159: case 160: - case 154: + case 161: case 155: - return checkSignatureDeclaration(node); case 156: return checkSignatureDeclaration(node); + case 157: + return checkSignatureDeclaration(node); + case 151: case 150: - case 149: return checkMethodDeclaration(node); - case 151: - return checkConstructorDeclaration(node); case 152: + return checkConstructorDeclaration(node); case 153: + case 154: return checkAccessorDeclaration(node); - case 158: + case 159: return checkTypeReferenceNode(node); - case 157: + case 158: return checkTypePredicate(node); - case 161: - return checkTypeQuery(node); case 162: - return checkTypeLiteral(node); + return checkTypeQuery(node); case 163: - return checkArrayType(node); + return checkTypeLiteral(node); case 164: - return checkTupleType(node); + return checkArrayType(node); case 165: + return checkTupleType(node); case 166: - return checkUnionOrIntersectionType(node); case 167: - case 169: - return checkSourceElement(node.type); + return checkUnionOrIntersectionType(node); + case 168: case 170: - return checkIndexedAccessType(node); + return checkSourceElement(node.type); case 171: + return checkIndexedAccessType(node); + case 172: return checkMappedType(node); - case 227: + case 228: return checkFunctionDeclaration(node); - case 206: - case 233: - return checkBlock(node); case 207: + case 234: + return checkBlock(node); + case 208: return checkVariableStatement(node); - case 209: - return checkExpressionStatement(node); case 210: - return checkIfStatement(node); + return checkExpressionStatement(node); case 211: - return checkDoStatement(node); + return checkIfStatement(node); case 212: - return checkWhileStatement(node); + return checkDoStatement(node); case 213: - return checkForStatement(node); + return checkWhileStatement(node); case 214: - return checkForInStatement(node); + return checkForStatement(node); case 215: - return checkForOfStatement(node); + return checkForInStatement(node); case 216: + return checkForOfStatement(node); case 217: - return checkBreakOrContinueStatement(node); case 218: - return checkReturnStatement(node); + return checkBreakOrContinueStatement(node); case 219: - return checkWithStatement(node); + return checkReturnStatement(node); case 220: - return checkSwitchStatement(node); + return checkWithStatement(node); case 221: - return checkLabeledStatement(node); + return checkSwitchStatement(node); case 222: - return checkThrowStatement(node); + return checkLabeledStatement(node); case 223: + return checkThrowStatement(node); + case 224: return checkTryStatement(node); - case 225: + case 226: return checkVariableDeclaration(node); - case 175: + case 176: return checkBindingElement(node); - case 228: - return checkClassDeclaration(node); case 229: - return checkInterfaceDeclaration(node); + return checkClassDeclaration(node); case 230: - return checkTypeAliasDeclaration(node); + return checkInterfaceDeclaration(node); case 231: - return checkEnumDeclaration(node); + return checkTypeAliasDeclaration(node); case 232: + return checkEnumDeclaration(node); + case 233: return checkModuleDeclaration(node); - case 237: + case 238: return checkImportDeclaration(node); - case 236: + case 237: return checkImportEqualsDeclaration(node); - case 243: + case 244: return checkExportDeclaration(node); - case 242: + case 243: return checkExportAssignment(node); - case 208: + case 209: checkGrammarStatementInAmbientContext(node); return; - case 224: + case 225: checkGrammarStatementInAmbientContext(node); return; - case 246: + case 247: return checkMissingDeclaration(node); } } @@ -38375,17 +38436,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 185: case 186: + case 187: + case 151: case 150: - case 149: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 152: case 153: + case 154: checkAccessorDeclaration(node); break; - case 198: + case 199: checkClassExpressionDeferred(node); break; } @@ -38473,7 +38534,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 219 && node.parent.statement === node) { + if (node.parent.kind === 220 && node.parent.statement === node) { return true; } node = node.parent; @@ -38495,28 +38556,28 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931); break; - case 231: + case 232: copySymbols(getSymbolOfNode(location).exports, meaning & 8); break; - case 198: + case 199: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 228: case 229: + case 230: if (!(memberFlags & 32)) { copySymbols(getSymbolOfNode(location).members, meaning & 793064); } break; - case 185: + case 186: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -38548,33 +38609,33 @@ var ts; } } function isTypeDeclarationName(name) { - return name.kind === 70 && + return name.kind === 71 && isTypeDeclaration(name.parent) && name.parent.name === name; } function isTypeDeclaration(node) { switch (node.kind) { - case 144: - case 228: + case 145: case 229: case 230: case 231: + case 232: return true; } } function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 142) { + while (node.parent && node.parent.kind === 143) { node = node.parent; } - return node.parent && (node.parent.kind === 158 || node.parent.kind === 276); + return node.parent && (node.parent.kind === 159 || node.parent.kind === 277); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 178) { + while (node.parent && node.parent.kind === 179) { node = node.parent; } - return node.parent && node.parent.kind === 200; + return node.parent && node.parent.kind === 201; } function forEachEnclosingClass(node, callback) { var result; @@ -38591,13 +38652,13 @@ var ts; return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 142) { + while (nodeOnRightSide.parent.kind === 143) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 236) { + if (nodeOnRightSide.parent.kind === 237) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 242) { + if (nodeOnRightSide.parent.kind === 243) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -38622,18 +38683,18 @@ var ts; return getSymbolOfNode(entityName.parent); } if (ts.isInJavaScriptFile(entityName) && - entityName.parent.kind === 178 && + entityName.parent.kind === 179 && entityName.parent === entityName.parent.parent.left) { var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); if (specialPropertyAssignmentSymbol) { return specialPropertyAssignmentSymbol; } } - if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) { + if (entityName.parent.kind === 243 && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608); } - if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) { - var importEqualsDeclaration = ts.getAncestor(entityName, 236); + if (entityName.kind !== 179 && isInRightSideOfImportOrExportAssignment(entityName)) { + var importEqualsDeclaration = ts.getAncestor(entityName, 237); ts.Debug.assert(importEqualsDeclaration !== undefined); return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true); } @@ -38642,7 +38703,7 @@ var ts; } if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0; - if (entityName.parent.kind === 200) { + if (entityName.parent.kind === 201) { meaning = 793064; if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455; @@ -38661,20 +38722,20 @@ var ts; if (ts.nodeIsMissing(entityName)) { return undefined; } - if (entityName.kind === 70) { + if (entityName.kind === 71) { if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { return getIntrinsicTagSymbol(entityName.parent); } return resolveEntityName(entityName, 107455, false, true); } - else if (entityName.kind === 178) { + else if (entityName.kind === 179) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 142) { + else if (entityName.kind === 143) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -38683,19 +38744,19 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920; + var meaning = (entityName.parent.kind === 159 || entityName.parent.kind === 277) ? 793064 : 1920; return resolveEntityName(entityName, meaning, false, true); } - else if (entityName.parent.kind === 252) { + else if (entityName.parent.kind === 253) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 157) { + if (entityName.parent.kind === 158) { return resolveEntityName(entityName, 1); } return undefined; } function getSymbolAtLocation(node) { - if (node.kind === 264) { + if (node.kind === 265) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } if (isInsideWithStatementBody(node)) { @@ -38707,12 +38768,12 @@ var ts; else if (ts.isLiteralComputedPropertyDeclarationName(node)) { return getSymbolOfNode(node.parent.parent); } - if (node.kind === 70) { + if (node.kind === 71) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 175 && - node.parent.parent.kind === 173 && + else if (node.parent.kind === 176 && + node.parent.parent.kind === 174 && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -38722,11 +38783,11 @@ var ts; } } switch (node.kind) { - case 70: - case 178: - case 142: + case 71: + case 179: + case 143: return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 98: + case 99: var container = ts.getThisContainer(node, false); if (ts.isFunctionLike(container)) { var sig = getSignatureFromDeclaration(container); @@ -38734,21 +38795,21 @@ var ts; return sig.thisParameter; } } - case 96: + case 97: var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 168: + case 169: return getTypeFromTypeNode(node).symbol; - case 122: + case 123: var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 151) { + if (constructorDeclaration && constructorDeclaration.kind === 152) { return constructorDeclaration.parent.symbol; } return undefined; case 9: if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 237 || node.parent.kind === 243) && + ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } @@ -38756,7 +38817,7 @@ var ts; return resolveExternalModuleName(node, node); } case 8: - if (node.parent.kind === 179 && node.parent.argumentExpression === node) { + if (node.parent.kind === 180 && node.parent.argumentExpression === node) { var objectType = getTypeOfExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -38770,7 +38831,7 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 261) { + if (location && location.kind === 262) { return resolveEntityName(location.name, 107455 | 8388608); } return undefined; @@ -38829,20 +38890,20 @@ var ts; return unknownType; } function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { - ts.Debug.assert(expr.kind === 177 || expr.kind === 176); - if (expr.parent.kind === 215) { + ts.Debug.assert(expr.kind === 178 || expr.kind === 177); + if (expr.parent.kind === 216) { var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 193) { + if (expr.parent.kind === 194) { var iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 260) { + if (expr.parent.kind === 261) { var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); } - ts.Debug.assert(expr.parent.kind === 176); + ts.Debug.assert(expr.parent.kind === 177); var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType; return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType); @@ -38910,7 +38971,7 @@ var ts; if (!ts.isGeneratedIdentifier(node)) { node = ts.getParseTreeNode(node, ts.isIdentifier); if (node) { - var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node; + var isPropertyName_1 = node.parent.kind === 179 && node.parent.name === node; return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol; } } @@ -38953,7 +39014,7 @@ var ts; } var parentSymbol_1 = getParentOfSymbol(symbol); if (parentSymbol_1) { - if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) { + if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 265) { var symbolFile = parentSymbol_1.valueDeclaration; var referenceFile = ts.getSourceFileOfNode(node); var symbolIsUmdExport = symbolFile !== referenceFile; @@ -38987,7 +39048,7 @@ var ts; else if (nodeLinks_1.flags & 131072) { var isDeclaredInLoop = nodeLinks_1.flags & 262144; var inLoopInitializer = ts.isIterationStatement(container, false); - var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false); + var inLoopBodyBlock = container.kind === 207 && ts.isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { @@ -39023,18 +39084,18 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 236: - case 238: + case 237: case 239: - case 241: - case 245: + case 240: + case 242: + case 246: return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); - case 243: + case 244: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 242: + case 243: return node.expression - && node.expression.kind === 70 + && node.expression.kind === 71 ? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) : true; } @@ -39042,7 +39103,7 @@ var ts; } function isTopLevelValueImportEqualsWithEntityName(node) { node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration); - if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node === undefined || node.parent.kind !== 265 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -39095,15 +39156,15 @@ var ts; } function canHaveConstantValue(node) { switch (node.kind) { - case 263: - case 178: + case 264: case 179: + case 180: return true; } return false; } function getConstantValue(node) { - if (node.kind === 263) { + if (node.kind === 264) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -39297,7 +39358,7 @@ var ts; if (!fileToDirective) { return undefined; } - var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node)) + var meaning = (node.kind === 179) || (node.kind === 71 && isInTypeQuery(node)) ? 107455 | 1048576 : 793064 | 1920; var symbol = resolveEntityName(node, meaning, true); @@ -39340,7 +39401,7 @@ var ts; break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) { + if (current.valueDeclaration && current.valueDeclaration.kind === 265 && current.flags & 512) { return false; } for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { @@ -39359,7 +39420,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 264); + return ts.getDeclarationOfKind(moduleSymbol, 265); } function initializeTypeChecker() { for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) { @@ -39464,14 +39525,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 150 && !ts.nodeIsPresent(node.body)) { + if (node.kind === 151 && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 152 || node.kind === 153) { + else if (node.kind === 153 || node.kind === 154) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -39488,28 +39549,28 @@ var ts; var flags = 0; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 130) { - if (node.kind === 147 || node.kind === 149) { + if (modifier.kind !== 131) { + if (node.kind === 148 || node.kind === 150) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); } - if (node.kind === 156) { + if (node.kind === 157) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 75: - if (node.kind !== 231 && node.parent.kind === 228) { - return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75)); + case 76: + if (node.kind !== 232 && node.parent.kind === 229) { + return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(76)); } break; + case 114: case 113: case 112: - case 111: var text = visibilityToString(ts.modifierToFlag(modifier.kind)); - if (modifier.kind === 112) { + if (modifier.kind === 113) { lastProtected = modifier; } - else if (modifier.kind === 111) { + else if (modifier.kind === 112) { lastPrivate = modifier; } if (flags & 28) { @@ -39524,11 +39585,11 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128) { - if (modifier.kind === 111) { + if (modifier.kind === 112) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -39537,7 +39598,7 @@ var ts; } flags |= ts.modifierToFlag(modifier.kind); break; - case 114: + case 115: if (flags & 32) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } @@ -39547,10 +39608,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128) { @@ -39559,17 +39620,17 @@ var ts; flags |= 32; lastStatic = modifier; break; - case 130: + case 131: if (flags & 64) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); } - else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) { + else if (node.kind !== 149 && node.kind !== 148 && node.kind !== 157 && node.kind !== 146) { return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64; lastReadonly = modifier; break; - case 83: + case 84: if (flags & 1) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } @@ -39582,45 +39643,45 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1; break; - case 123: + case 124: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 234) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 2; lastDeclare = modifier; break; - case 116: + case 117: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 228) { - if (node.kind !== 150 && - node.kind !== 148 && - node.kind !== 152 && - node.kind !== 153) { + if (node.kind !== 229) { + if (node.kind !== 151 && + node.kind !== 149 && + node.kind !== 153 && + node.kind !== 154) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) { + if (!(node.parent.kind === 229 && ts.getModifierFlags(node.parent) & 128)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32) { @@ -39632,14 +39693,14 @@ var ts; } flags |= 128; break; - case 119: + case 120: if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256; @@ -39647,7 +39708,7 @@ var ts; break; } } - if (node.kind === 151) { + if (node.kind === 152) { if (flags & 32) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -39662,13 +39723,13 @@ var ts; } return; } - else if ((node.kind === 237 || node.kind === 236) && flags & 2) { + else if ((node.kind === 238 || node.kind === 237) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) { + else if (node.kind === 146 && (flags & 92) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); } - else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) { + else if (node.kind === 146 && (flags & 92) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256) { @@ -39684,38 +39745,38 @@ var ts; } function shouldReportBadModifier(node) { switch (node.kind) { - case 152: case 153: - case 151: + case 154: + case 152: + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 156: - case 232: + case 157: + case 233: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 185: case 186: - case 145: + case 187: + case 146: return false; default: - if (node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 234 || node.parent.kind === 265) { return false; } switch (node.kind) { - case 227: - return nodeHasAnyModifiersExcept(node, 119); case 228: - return nodeHasAnyModifiersExcept(node, 116); + return nodeHasAnyModifiersExcept(node, 120); case 229: - case 207: + return nodeHasAnyModifiersExcept(node, 117); case 230: - return true; + case 208: case 231: - return nodeHasAnyModifiersExcept(node, 75); + return true; + case 232: + return nodeHasAnyModifiersExcept(node, 76); default: ts.Debug.fail(); return false; @@ -39727,10 +39788,10 @@ var ts; } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 150: - case 227: - case 185: + case 151: + case 228: case 186: + case 187: return false; } return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -39793,7 +39854,7 @@ var ts; return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 186) { + if (node.kind === 187) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -39828,7 +39889,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 135 && parameter.type.kind !== 132) { + if (parameter.type.kind !== 136 && parameter.type.kind !== 133) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -39855,7 +39916,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_4 = args; _i < args_4.length; _i++) { var arg = args_4[_i]; - if (arg.kind === 199) { + if (arg.kind === 200) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -39881,7 +39942,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } @@ -39894,7 +39955,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -39909,14 +39970,14 @@ var ts; if (node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -39925,19 +39986,19 @@ var ts; return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 143) { + if (node.kind !== 144) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) { + if (computedPropertyName.expression.kind === 194 && computedPropertyName.expression.operatorToken.kind === 26) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 227 || - node.kind === 185 || - node.kind === 150); + ts.Debug.assert(node.kind === 228 || + node.kind === 186 || + node.kind === 151); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -39959,39 +40020,39 @@ var ts; var GetOrSetAccessor = GetAccessor | SetAccessor; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262) { + if (prop.kind === 263) { continue; } var name = prop.name; - if (name.kind === 143) { + if (name.kind === 144) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 262 && !inDestructuring && prop.objectAssignmentInitializer) { return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); } if (prop.modifiers) { for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { var mod = _c[_b]; - if (mod.kind !== 119 || prop.kind !== 150) { + if (mod.kind !== 120 || prop.kind !== 151) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } } } var currentKind = void 0; - if (prop.kind === 260 || prop.kind === 261) { + if (prop.kind === 261 || prop.kind === 262) { checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8) { checkGrammarNumericLiteral(name); } currentKind = Property; } - else if (prop.kind === 150) { + else if (prop.kind === 151) { currentKind = Property; } - else if (prop.kind === 152) { + else if (prop.kind === 153) { currentKind = GetAccessor; } - else if (prop.kind === 153) { + else if (prop.kind === 154) { currentKind = SetAccessor; } else { @@ -40027,7 +40088,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 254) { + if (attr.kind === 255) { continue; } var jsxAttr = attr; @@ -40039,7 +40100,7 @@ var ts; return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 255 && !initializer.expression) { + if (initializer && initializer.kind === 256 && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -40048,12 +40109,12 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 216 && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & 16384) === 0) { return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); } } - if (forInOrOfStatement.initializer.kind === 226) { + if (forInOrOfStatement.initializer.kind === 227) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -40061,20 +40122,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -40101,11 +40162,11 @@ var ts; return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 152 ? + return grammarErrorOnNode(accessor.name, kind === 153 ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 153) { + else if (kind === 154) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -40124,10 +40185,10 @@ var ts; } } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 153 ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 153 ? 1 : 2)) { return ts.getThisParameter(accessor); } } @@ -40142,7 +40203,7 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 177) { + if (node.parent.kind === 178) { if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } @@ -40158,10 +40219,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -40172,9 +40233,9 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 221: + case 222: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 216 + var isMisplacedContinueLabel = node.kind === 217 && !ts.isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -40182,8 +40243,8 @@ var ts; return false; } break; - case 220: - if (node.kind === 217 && !node.label) { + case 221: + if (node.kind === 218 && !node.label) { return false; } break; @@ -40196,13 +40257,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -40214,7 +40275,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } - if (node.name.kind === 174 || node.name.kind === 173) { + if (node.name.kind === 175 || node.name.kind === 174) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -40224,11 +40285,11 @@ var ts; } function isStringOrNumberLiteralExpression(expr) { return expr.kind === 9 || expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8; } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) { + if (node.parent.parent.kind !== 215 && node.parent.parent.kind !== 216) { if (ts.isInAmbientContext(node)) { if (node.initializer) { if (ts.isConst(node) && !node.type) { @@ -40263,7 +40324,7 @@ var ts; return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { - if (name.kind === 70) { + if (name.kind === 71) { if (ts.unescapeIdentifier(name.text) === "__esModule") { return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); } @@ -40279,8 +40340,8 @@ var ts; } } function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 70) { - if (name.originalKeywordKind === 109) { + if (name.kind === 71) { + if (name.originalKeywordKind === 110) { return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); } } @@ -40305,15 +40366,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 210: case 211: case 212: - case 219: case 213: + case 220: case 214: case 215: + case 216: return false; - case 221: + case 222: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -40329,7 +40390,7 @@ var ts; } } function checkGrammarMetaProperty(node) { - if (node.keywordToken === 93) { + if (node.keywordToken === 94) { if (node.name.text !== "target") { return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target"); } @@ -40375,7 +40436,7 @@ var ts; return true; } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -40383,7 +40444,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -40396,13 +40457,13 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 229 || - node.kind === 230 || + if (node.kind === 230 || + node.kind === 231 || + node.kind === 238 || node.kind === 237 || - node.kind === 236 || + node.kind === 244 || node.kind === 243 || - node.kind === 242 || - node.kind === 235 || + node.kind === 236 || ts.getModifierFlags(node) & (2 | 1 | 512)) { return false; } @@ -40411,7 +40472,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 207) { + if (ts.isDeclaration(decl) || decl.kind === 208) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -40430,7 +40491,7 @@ var ts; if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 207 || node.parent.kind === 234 || node.parent.kind === 265) { var links_1 = getNodeLinks(node.parent); if (!links_1.hasReportedStatementInAmbientContext) { return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -40446,14 +40507,14 @@ var ts; if (languageVersion >= 1) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 172)) { + else if (ts.isChildOfNodeWithKind(node, 173)) { diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 263)) { + else if (ts.isChildOfNodeWithKind(node, 264)) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { - var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37; + var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 38; var literal = (withMinus ? "-" : "") + "0o" + node.text; return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal); } @@ -40585,243 +40646,243 @@ var ts; return undefined; } var kind = node.kind; - if ((kind > 0 && kind <= 141) || kind === 168) { + if ((kind > 0 && kind <= 142) || kind === 169) { return node; } switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 297: - case 246: + case 206: + case 209: + case 200: + case 225: + case 298: + case 247: return node; - case 142: - return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); case 143: + return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); + case 144: return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression)); - case 159: - return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 160: + return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 161: return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 154: - return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 155: + return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 156: return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 149: + case 150: return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken)); - case 156: + case 157: return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 145: - return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 146: + return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 147: return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression)); - case 158: + case 159: return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode)); - case 157: + case 158: return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 161: - return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 162: - return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); + return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 163: - return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); + return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); case 164: - return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); + return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); case 165: + return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); case 166: - return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); case 167: + return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); + case 168: throw ts.Debug.fail("not implemented."); - case 169: - return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 170: - return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); + return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 171: - return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); case 172: + return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + case 173: return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression)); - case 144: + case 145: return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode)); - case 147: - return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 148: + return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 149: return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 150: - return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 151: - return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); + return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 152: - return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); case 153: + return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 154: return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); - case 173: - return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 174: - return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); + return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 175: - return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); case 176: - return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); + return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); case 177: - return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); + return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); case 178: - return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); case 179: - return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); + return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); case 180: - return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); case 181: - return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 182: - return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); + return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 183: - return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); case 184: - return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 185: - return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); case 186: - return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 187: - return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 188: - return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); case 189: - return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); case 190: + return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + case 191: return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression)); - case 193: + case 194: return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression)); - case 191: - return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); case 192: + return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); + case 193: return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 194: - return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 195: - return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); + return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 196: - return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); case 197: - return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); case 198: + return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + case 199: return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 200: - return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 201: - return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 202: + return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + case 203: return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 204: + case 205: return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail)); - case 206: - return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 207: + return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 208: return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList)); - case 209: - return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 210: - return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 211: - return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); case 212: - return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); case 213: - return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 214: - return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 215: - return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 216: - return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 217: - return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); case 218: - return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); case 219: - return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); case 220: - return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); + return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 221: - return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); case 222: - return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 223: + return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + case 224: return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock)); - case 225: - return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 226: - return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); + return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 227: - return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); case 228: + return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 229: return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 231: - return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 232: - return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); + return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 233: - return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); case 234: + return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 235: return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause)); - case 236: - return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 237: - return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 238: - return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); + return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 239: - return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); case 240: - return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); + return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); case 241: - return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); case 242: - return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); case 243: - return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); case 244: - return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 245: + return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + case 246: return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); - case 247: - return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); case 248: + return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); + case 249: return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement)); - case 253: + case 254: return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike)); - case 249: - return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 250: - return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); + return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 251: - return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 252: + return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + case 253: return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression)); - case 254: - return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 255: - return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 256: - return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); case 257: - return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); case 258: - return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); + return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 259: - return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); + return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); case 260: - return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); case 261: - return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); + return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); case 262: - return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); case 263: - return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); case 264: + return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + case 265: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); - case 295: + case 296: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); default: return node; @@ -40847,45 +40908,45 @@ var ts; var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft; var cbNodes = cbNodeArray || cbNode; var kind = node.kind; - if ((kind > 0 && kind <= 141)) { + if ((kind > 0 && kind <= 142)) { return initial; } - if ((kind >= 157 && kind <= 172)) { + if ((kind >= 158 && kind <= 173)) { return initial; } var result = initial; switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 294: + case 206: + case 209: + case 200: + case 225: + case 295: break; - case 142: + case 143: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 143: + case 144: result = reduceNode(node.expression, cbNode, result); break; - case 145: + case 146: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 146: + case 147: result = reduceNode(node.expression, cbNode, result); break; - case 148: + case 149: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 150: + case 151: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -40894,12 +40955,12 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 151: + case 152: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 152: + case 153: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -40907,55 +40968,55 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 153: + case 154: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 173: case 174: + case 175: result = reduceNodes(node.elements, cbNodes, result); break; - case 175: + case 176: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 176: + case 177: result = reduceNodes(node.elements, cbNodes, result); break; - case 177: + case 178: result = reduceNodes(node.properties, cbNodes, result); break; - case 178: + case 179: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 179: + case 180: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.argumentExpression, cbNode, result); break; - case 180: + case 181: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 181: + case 182: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 182: + case 183: result = reduceNode(node.tag, cbNode, result); result = reduceNode(node.template, cbNode, result); break; - case 183: + case 184: result = reduceNode(node.type, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 185: + case 186: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); @@ -40963,124 +41024,124 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 186: + case 187: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 184: - case 187: + case 185: case 188: case 189: case 190: - case 196: + case 191: case 197: - case 202: + case 198: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 191: case 192: + case 193: result = reduceNode(node.operand, cbNode, result); break; - case 193: + case 194: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 194: + case 195: result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.whenTrue, cbNode, result); result = reduceNode(node.whenFalse, cbNode, result); break; - case 195: + case 196: result = reduceNode(node.head, cbNode, result); result = reduceNodes(node.templateSpans, cbNodes, result); break; - case 198: + case 199: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 200: + case 201: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); break; - case 201: + case 202: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.type, cbNode, result); break; - case 202: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 204: + case 205: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.literal, cbNode, result); break; - case 206: + case 207: result = reduceNodes(node.statements, cbNodes, result); break; - case 207: + case 208: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.declarationList, cbNode, result); break; - case 209: + case 210: result = reduceNode(node.expression, cbNode, result); break; - case 210: + case 211: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.thenStatement, cbNode, result); result = reduceNode(node.elseStatement, cbNode, result); break; - case 211: + case 212: result = reduceNode(node.statement, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 212: - case 219: + case 213: + case 220: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 213: + case 214: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.incrementor, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 214: case 215: + case 216: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 218: - case 222: + case 219: + case 223: result = reduceNode(node.expression, cbNode, result); break; - case 220: + case 221: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.caseBlock, cbNode, result); break; - case 221: + case 222: result = reduceNode(node.label, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 223: + case 224: result = reduceNode(node.tryBlock, cbNode, result); result = reduceNode(node.catchClause, cbNode, result); result = reduceNode(node.finallyBlock, cbNode, result); break; - case 225: + case 226: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 226: + case 227: result = reduceNodes(node.declarations, cbNodes, result); break; - case 227: + case 228: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -41089,7 +41150,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 228: + case 229: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -41097,123 +41158,123 @@ var ts; result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 231: + case 232: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.members, cbNodes, result); break; - case 232: + case 233: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 233: + case 234: result = reduceNodes(node.statements, cbNodes, result); break; - case 234: + case 235: result = reduceNodes(node.clauses, cbNodes, result); break; - case 236: + case 237: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.moduleReference, cbNode, result); break; - case 237: + case 238: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.importClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 238: - result = reduceNode(node.name, cbNode, result); - result = reduceNode(node.namedBindings, cbNode, result); - break; case 239: result = reduceNode(node.name, cbNode, result); + result = reduceNode(node.namedBindings, cbNode, result); break; case 240: - case 244: - result = reduceNodes(node.elements, cbNodes, result); + result = reduceNode(node.name, cbNode, result); break; case 241: case 245: + result = reduceNodes(node.elements, cbNodes, result); + break; + case 242: + case 246: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 242: + case 243: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 243: + case 244: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.exportClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 247: + case 248: result = reduceNode(node.expression, cbNode, result); break; - case 248: + case 249: result = reduceNode(node.openingElement, cbNode, result); result = ts.reduceLeft(node.children, cbNode, result); result = reduceNode(node.closingElement, cbNode, result); break; - case 249: case 250: + case 251: result = reduceNode(node.tagName, cbNode, result); result = reduceNode(node.attributes, cbNode, result); break; - case 253: + case 254: result = reduceNodes(node.properties, cbNodes, result); break; - case 251: + case 252: result = reduceNode(node.tagName, cbNode, result); break; - case 252: + case 253: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 254: - result = reduceNode(node.expression, cbNode, result); - break; case 255: result = reduceNode(node.expression, cbNode, result); break; case 256: result = reduceNode(node.expression, cbNode, result); + break; case 257: + result = reduceNode(node.expression, cbNode, result); + case 258: result = reduceNodes(node.statements, cbNodes, result); break; - case 258: + case 259: result = reduceNodes(node.types, cbNodes, result); break; - case 259: + case 260: result = reduceNode(node.variableDeclaration, cbNode, result); result = reduceNode(node.block, cbNode, result); break; - case 260: + case 261: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 261: + case 262: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.objectAssignmentInitializer, cbNode, result); break; - case 262: + case 263: result = reduceNode(node.expression, cbNode, result); break; - case 263: + case 264: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 264: + case 265: result = reduceNodes(node.statements, cbNodes, result); break; - case 295: + case 296: result = reduceNode(node.expression, cbNode, result); break; default: @@ -41266,7 +41327,7 @@ var ts; return subtreeFlags; } function aggregateTransformFlagsForSubtree(node) { - if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) { + if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 201)) { return 0; } return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes); @@ -41654,8 +41715,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); context.enableSubstitution(179); + context.enableSubstitution(180); var currentSourceFile; var currentNamespace; var currentNamespaceContainerName; @@ -41688,15 +41749,15 @@ var ts; } function onBeforeVisitNode(node) { switch (node.kind) { - case 264: + case 265: + case 235: case 234: - case 233: - case 206: + case 207: currentScope = node; currentScopeFirstDeclarationsOfName = undefined; break; + case 229: case 228: - case 227: if (ts.hasModifier(node, 2)) { break; } @@ -41721,13 +41782,13 @@ var ts; } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 242: - return visitExportAssignment(node); case 243: + return visitExportAssignment(node); + case 244: return visitExportDeclaration(node); default: return visitorWorker(node); @@ -41737,11 +41798,11 @@ var ts; return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 243 || - node.kind === 237 || + if (node.kind === 244 || node.kind === 238 || - (node.kind === 236 && - node.moduleReference.kind === 247)) { + node.kind === 239 || + (node.kind === 237 && + node.moduleReference.kind === 248)) { return undefined; } else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) { @@ -41757,15 +41818,15 @@ var ts; } function classElementVisitorWorker(node) { switch (node.kind) { - case 151: - return undefined; - case 148: - case 156: case 152: + return undefined; + case 149: + case 157: case 153: - case 150: + case 154: + case 151: return visitorWorker(node); - case 205: + case 206: return node; default: ts.Debug.failBadSyntaxKind(node); @@ -41776,7 +41837,7 @@ var ts; if (ts.modifierToFlag(node.kind) & 2270) { return undefined; } - else if (currentNamespace && node.kind === 83) { + else if (currentNamespace && node.kind === 84) { return undefined; } return node; @@ -41786,33 +41847,32 @@ var ts; return ts.createNotEmittedStatement(node); } switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return currentNamespace ? undefined : node; - case 113: - case 111: + case 114: case 112: - case 116: - case 75: - case 123: - case 130: - case 163: + case 113: + case 117: + case 76: + case 124: + case 131: case 164: - case 162: - case 157: - case 144: - case 118: - case 121: - case 135: - case 132: - case 129: - case 104: + case 165: + case 163: + case 158: + case 145: + case 119: + case 122: case 136: + case 133: + case 130: + case 105: + case 137: + case 161: case 160: + case 162: case 159: - case 161: - case 158: - case 165: case 166: case 167: case 168: @@ -41820,57 +41880,58 @@ var ts; case 170: case 171: case 172: - case 156: - case 146: - case 230: - case 148: + case 173: + case 157: + case 147: + case 231: + case 149: return undefined; - case 151: + case 152: return visitConstructor(node); - case 229: + case 230: return ts.createNotEmittedStatement(node); - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 258: + case 259: return visitHeritageClause(node); - case 200: + case 201: return visitExpressionWithTypeArguments(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessor(node); case 153: + return visitGetAccessor(node); + case 154: return visitSetAccessor(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 184: + case 185: return visitParenthesizedExpression(node); - case 183: - case 201: + case 184: + case 202: return visitAssertionExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 202: + case 203: return visitNonNullExpression(node); - case 231: + case 232: return visitEnumDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 232: + case 233: return visitModuleDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); default: ts.Debug.failBadSyntaxKind(node); @@ -41961,7 +42022,7 @@ var ts; function visitClassExpression(node) { var staticProperties = getInitializedProperties(node, true); var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; })); + var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 85; })); var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members); ts.setOriginalNode(classExpression, node); ts.setTextRange(classExpression, node); @@ -42032,7 +42093,7 @@ var ts; return index; } var statement = statements[index]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { result.push(ts.visitNode(statement, visitor, ts.isStatement)); return index + 1; } @@ -42066,7 +42127,7 @@ var ts; return isInitializedProperty(member, false); } function isInitializedProperty(member, isStatic) { - return member.kind === 148 + return member.kind === 149 && isStatic === ts.hasModifier(member, 32) && member.initializer !== undefined; } @@ -42139,12 +42200,12 @@ var ts; } function getAllDecoratorsOfClassElement(node, member) { switch (member.kind) { - case 152: case 153: + case 154: return getAllDecoratorsOfAccessors(node, member); - case 150: + case 151: return getAllDecoratorsOfMethod(member); - case 148: + case 149: return getAllDecoratorsOfProperty(member); default: return undefined; @@ -42223,7 +42284,7 @@ var ts; var prefix = getClassMemberPrefix(node, member); var memberName = getExpressionForPropertyName(member, true); var descriptor = languageVersion > 0 - ? member.kind === 148 + ? member.kind === 149 ? ts.createVoidZero() : ts.createNull() : undefined; @@ -42292,13 +42353,13 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { var properties = void 0; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeParameterTypesOfNode(node, container)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeReturnTypeOfNode(node)))); } if (properties) { decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true))); @@ -42307,37 +42368,37 @@ var ts; } function shouldAddTypeMetadata(node) { var kind = node.kind; - return kind === 150 - || kind === 152 + return kind === 151 || kind === 153 - || kind === 148; + || kind === 154 + || kind === 149; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 150; + return node.kind === 151; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 228: - case 198: + case 229: + case 199: return ts.getFirstConstructorWithBody(node) !== undefined; - case 150: - case 152: + case 151: case 153: + case 154: return true; } return false; } function serializeTypeOfNode(node) { switch (node.kind) { - case 148: - case 145: - case 152: - return serializeTypeNode(node.type); + case 149: + case 146: case 153: + return serializeTypeNode(node.type); + case 154: return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); - case 228: - case 198: - case 150: + case 229: + case 199: + case 151: return ts.createIdentifier("Function"); default: return ts.createVoidZero(); @@ -42369,7 +42430,7 @@ var ts; return ts.createArrayLiteral(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 152) { + if (container && node.kind === 153) { var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor; if (setAccessor) { return setAccessor.parameters; @@ -42391,58 +42452,58 @@ var ts; return ts.createIdentifier("Object"); } switch (node.kind) { - case 104: - case 138: - case 94: - case 129: + case 105: + case 139: + case 95: + case 130: return ts.createVoidZero(); - case 167: + case 168: return serializeTypeNode(node.type); - case 159: case 160: + case 161: return ts.createIdentifier("Function"); - case 163: case 164: + case 165: return ts.createIdentifier("Array"); - case 157: - case 121: + case 158: + case 122: return ts.createIdentifier("Boolean"); - case 135: + case 136: return ts.createIdentifier("String"); - case 133: + case 134: return ts.createIdentifier("Object"); - case 172: + case 173: switch (node.literal.kind) { case 9: return ts.createIdentifier("String"); case 8: return ts.createIdentifier("Number"); - case 100: - case 85: + case 101: + case 86: return ts.createIdentifier("Boolean"); default: ts.Debug.failBadSyntaxKind(node.literal); break; } break; - case 132: + case 133: return ts.createIdentifier("Number"); - case 136: + case 137: return languageVersion < 2 ? getGlobalSymbolNameWithFallback() : ts.createIdentifier("Symbol"); - case 158: + case 159: return serializeTypeReferenceNode(node); + case 167: case 166: - case 165: return serializeUnionOrIntersectionType(node); - case 161: - case 169: + case 162: case 170: case 171: - case 162: - case 118: - case 168: + case 172: + case 163: + case 119: + case 169: break; default: ts.Debug.failBadSyntaxKind(node); @@ -42509,7 +42570,7 @@ var ts; } function serializeEntityNameAsExpression(node, useFallback) { switch (node.kind) { - case 70: + case 71: var name = ts.getMutableClone(node); name.flags &= ~8; name.original = undefined; @@ -42518,13 +42579,13 @@ var ts; return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name); } return name; - case 142: + case 143: return serializeQualifiedNameAsExpression(node, useFallback); } } function serializeQualifiedNameAsExpression(node, useFallback) { var left; - if (node.left.kind === 70) { + if (node.left.kind === 71) { left = serializeEntityNameAsExpression(node.left, useFallback); } else if (useFallback) { @@ -42569,9 +42630,9 @@ var ts; } } function visitHeritageClause(node) { - if (node.token === 84) { + if (node.token === 85) { var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1); - return ts.setTextRange(ts.createHeritageClause(84, types), node); + return ts.setTextRange(ts.createHeritageClause(85, types), node); } return undefined; } @@ -42803,7 +42864,7 @@ var ts; ts.setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 231) { + if (node.kind === 232) { ts.setSourceMapRange(statement.declarationList, node); } else { @@ -42864,7 +42925,7 @@ var ts; var statementsLocation; var blockLocation; var body = node.body; - if (body.kind === 233) { + if (body.kind === 234) { saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); }); statementsLocation = body.statements; blockLocation = body; @@ -42888,13 +42949,13 @@ var ts; currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true); ts.setTextRange(block, blockLocation); - if (body.kind !== 233) { + if (body.kind !== 234) { ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 232) { + if (moduleDeclaration.body.kind === 233) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -42914,7 +42975,7 @@ var ts; return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined; } function visitNamedImportBindings(node) { - if (node.kind === 239) { + if (node.kind === 240) { return resolver.isReferencedAliasDeclaration(node) ? node : undefined; } else { @@ -43035,29 +43096,29 @@ var ts; function enableSubstitutionForNonQualifiedEnumMembers() { if ((enabledSubstitutions & 8) === 0) { enabledSubstitutions |= 8; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionForClassAliases() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(70); + context.enableSubstitution(71); classAliases = []; } } function enableSubstitutionForNamespaceExports() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); - context.enableSubstitution(261); - context.enableEmitNotification(232); + context.enableSubstitution(71); + context.enableSubstitution(262); + context.enableEmitNotification(233); } } function isTransformedModuleDeclaration(node) { - return ts.getOriginalNode(node).kind === 232; + return ts.getOriginalNode(node).kind === 233; } function isTransformedEnumDeclaration(node) { - return ts.getOriginalNode(node).kind === 231; + return ts.getOriginalNode(node).kind === 232; } function onEmitNode(hint, node, emitCallback) { var savedApplicableSubstitutions = applicableSubstitutions; @@ -43101,11 +43162,11 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 178: - return substitutePropertyAccessExpression(node); case 179: + return substitutePropertyAccessExpression(node); + case 180: return substituteElementAccessExpression(node); } return node; @@ -43135,9 +43196,9 @@ var ts; function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 264) { - var substitute = (applicableSubstitutions & 2 && container.kind === 232) || - (applicableSubstitutions & 8 && container.kind === 231); + if (container && container.kind !== 265) { + var substitute = (applicableSubstitutions & 2 && container.kind === 233) || + (applicableSubstitutions & 8 && container.kind === 232); if (substitute) { return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node); } @@ -43256,17 +43317,17 @@ var ts; return node; } switch (node.kind) { - case 119: + case 120: return undefined; - case 190: + case 191: return visitAwaitExpression(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); default: return ts.visitEachChild(node, visitor, context); @@ -43300,7 +43361,7 @@ var ts; var original = ts.getOriginalNode(node, ts.isFunctionLike); var nodeType = original.type; var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined; - var isArrowFunction = node.kind === 186; + var isArrowFunction = node.kind === 187; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0; if (!isArrowFunction) { var statements = []; @@ -43356,14 +43417,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -43388,23 +43449,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -43423,11 +43484,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -43447,7 +43508,7 @@ var ts; }; function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(awaiterHelper); - var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body); + var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body); (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072; return ts.createCall(ts.getHelperName("__awaiter"), undefined, [ ts.createThis(), @@ -43501,7 +43562,7 @@ var ts; return visitorWorker(node, true); } function visitorNoAsyncModifier(node) { - if (node.kind === 119) { + if (node.kind === 120) { return undefined; } return node; @@ -43511,43 +43572,43 @@ var ts; return node; } switch (node.kind) { - case 190: + case 191: return visitAwaitExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 221: + case 222: return visitLabeledStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 193: + case 194: return visitBinaryExpression(node, noDestructuringValue); - case 225: + case 226: return visitVariableDeclaration(node); - case 215: + case 216: return visitForOfStatement(node, undefined); - case 213: + case 214: return visitForStatement(node); - case 189: + case 190: return visitVoidExpression(node); - case 151: + case 152: return visitConstructorDeclaration(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessorDeclaration(node); case 153: + return visitGetAccessorDeclaration(node); + case 154: return visitSetAccessorDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 209: + case 210: return visitExpressionStatement(node); - case 184: + case 185: return visitParenthesizedExpression(node, noDestructuringValue); default: return ts.visitEachChild(node, visitor, context); @@ -43574,7 +43635,7 @@ var ts; function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) { var statement = ts.unwrapInnermostStatementOfLabel(node); - if (statement.kind === 215 && statement.awaitModifier) { + if (statement.kind === 216 && statement.awaitModifier) { return visitForOfStatement(statement, node); } return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node); @@ -43586,7 +43647,7 @@ var ts; var objects = []; for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) { var e = elements_4[_i]; - if (e.kind === 262) { + if (e.kind === 263) { if (chunkObject) { objects.push(ts.createObjectLiteral(chunkObject)); chunkObject = undefined; @@ -43598,7 +43659,7 @@ var ts; if (!chunkObject) { chunkObject = []; } - if (e.kind === 260) { + if (e.kind === 261) { var p = e; chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression))); } @@ -43615,7 +43676,7 @@ var ts; function visitObjectLiteralExpression(node) { if (node.transformFlags & 1048576) { var objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 177) { + if (objects.length && objects[0].kind !== 178) { objects.unshift(ts.createObjectLiteral()); } return createAssignHelper(context, objects); @@ -43632,7 +43693,7 @@ var ts; if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 1048576) { return ts.flattenDestructuringAssignment(node, visitor, context, 1, !noDestructuringValue); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return ts.updateBinary(node, ts.visitNode(node.left, visitorNoDestructuringValue, ts.isExpression), ts.visitNode(node.right, noDestructuringValue ? visitorNoDestructuringValue : visitor, ts.isExpression)); } return ts.visitEachChild(node, visitor, context); @@ -43811,7 +43872,7 @@ var ts; var statements = []; var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor); appendObjectRestAssignmentsIfNeeded(statements, node); - statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); + statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(39), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); ts.addRange(statements, endLexicalEnvironment()); var block = ts.updateBlock(node.body, statements); if (languageVersion >= 2) { @@ -43862,14 +43923,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -43894,23 +43955,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -43929,11 +43990,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -44016,11 +44077,11 @@ var ts; } function visitorWorker(node) { switch (node.kind) { - case 248: - return visitJsxElement(node, false); case 249: + return visitJsxElement(node, false); + case 250: return visitJsxSelfClosingElement(node, false); - case 255: + case 256: return visitJsxExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -44030,11 +44091,11 @@ var ts; switch (node.kind) { case 10: return visitJsxText(node); - case 255: + case 256: return visitJsxExpression(node); - case 248: - return visitJsxElement(node, true); case 249: + return visitJsxElement(node, true); + case 250: return visitJsxSelfClosingElement(node, true); default: ts.Debug.failBadSyntaxKind(node); @@ -44088,7 +44149,7 @@ var ts; var decoded = tryDecodeEntities(node.text); return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node; } - else if (node.kind === 255) { + else if (node.kind === 256) { if (node.expression === undefined) { return ts.createTrue(); } @@ -44148,7 +44209,7 @@ var ts; return decoded === text ? undefined : decoded; } function getTagName(node) { - if (node.kind === 248) { + if (node.kind === 249) { return getTagName(node.openingElement); } else { @@ -44447,7 +44508,7 @@ var ts; return node; } switch (node.kind) { - case 193: + case 194: return visitBinaryExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -44455,9 +44516,9 @@ var ts; } function visitBinaryExpression(node) { switch (node.operatorToken.kind) { - case 61: + case 62: return visitExponentiationAssignmentExpression(node); - case 39: + case 40: return visitExponentiationExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -44601,7 +44662,7 @@ var ts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { return hierarchyFacts & 4096 - && node.kind === 218 + && node.kind === 219 && !node.expression; } function shouldVisitNode(node) { @@ -44625,104 +44686,104 @@ var ts; return node; } function callExpressionVisitor(node) { - if (node.kind === 96) { + if (node.kind === 97) { return visitSuperKeyword(true); } return visitor(node); } function visitJavaScript(node) { switch (node.kind) { - case 114: + case 115: return undefined; - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 145: + case 146: return visitParameter(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 186: + case 187: return visitArrowFunction(node); - case 185: + case 186: return visitFunctionExpression(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 70: + case 71: return visitIdentifier(node); - case 226: + case 227: return visitVariableDeclarationList(node); - case 220: + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 206: + case 207: return visitBlock(node, false); + case 218: case 217: - case 216: return visitBreakOrContinueStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 211: case 212: - return visitDoOrWhileStatement(node, undefined); case 213: - return visitForStatement(node, undefined); + return visitDoOrWhileStatement(node, undefined); case 214: - return visitForInStatement(node, undefined); + return visitForStatement(node, undefined); case 215: + return visitForInStatement(node, undefined); + case 216: return visitForOfStatement(node, undefined); - case 209: + case 210: return visitExpressionStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 259: + case 260: return visitCatchClause(node); - case 261: + case 262: return visitShorthandPropertyAssignment(node); - case 143: + case 144: return visitComputedPropertyName(node); - case 176: + case 177: return visitArrayLiteralExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 184: + case 185: return visitParenthesizedExpression(node, true); - case 193: + case 194: return visitBinaryExpression(node, true); - case 12: case 13: case 14: case 15: + case 16: return visitTemplateLiteral(node); case 9: return visitStringLiteral(node); case 8: return visitNumericLiteral(node); - case 182: + case 183: return visitTaggedTemplateExpression(node); - case 195: - return visitTemplateExpression(node); case 196: - return visitYieldExpression(node); + return visitTemplateExpression(node); case 197: + return visitYieldExpression(node); + case 198: return visitSpreadElement(node); - case 96: + case 97: return visitSuperKeyword(false); - case 98: + case 99: return visitThisKeyword(node); - case 203: + case 204: return visitMetaProperty(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: return ts.visitEachChild(node, visitor, context); @@ -44800,13 +44861,13 @@ var ts; } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - var jump = node.kind === 217 ? 2 : 4; + var jump = node.kind === 218 ? 2 : 4; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { var labelMarker = void 0; if (!node.label) { - if (node.kind === 217) { + if (node.kind === 218) { convertedLoopState.nonLocalJumps |= 2; labelMarker = "break"; } @@ -44816,7 +44877,7 @@ var ts; } } else { - if (node.kind === 217) { + if (node.kind === 218) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, true, node.label.text, labelMarker); } @@ -44835,10 +44896,10 @@ var ts; expr = copyExpr; } else { - expr = ts.createBinary(expr, 25, copyExpr); + expr = ts.createBinary(expr, 26, copyExpr); } } - returnExpression = ts.createBinary(expr, 25, returnExpression); + returnExpression = ts.createBinary(expr, 26, returnExpression); } return ts.createReturn(returnExpression); } @@ -44896,7 +44957,7 @@ var ts; addExtendsHelperIfNeeded(statements, node, extendsClauseElement); addConstructor(statements, node, extendsClauseElement); addClassMembers(statements, node); - var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 17); + var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18); var localName = ts.getLocalName(node); var outer = ts.createPartiallyEmittedExpression(localName); outer.end = closingBraceLocation.end; @@ -44952,7 +45013,7 @@ var ts; } ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); } - var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94; + var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 95; var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); if (superCaptureStatus === 1 || superCaptureStatus === 2) { statementOffset++; @@ -44980,17 +45041,17 @@ var ts; return block; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 218) { + if (statement.kind === 219) { return true; } - else if (statement.kind === 210) { + else if (statement.kind === 211) { var ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } } - else if (statement.kind === 206) { + else if (statement.kind === 207) { var lastStatement = ts.lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -45019,7 +45080,7 @@ var ts; var ctorStatements = ctor.body.statements; if (statementOffset < ctorStatements.length) { firstStatement = ctorStatements[statementOffset]; - if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) { + if (firstStatement.kind === 210 && ts.isSuperCall(firstStatement.expression)) { superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -45027,8 +45088,8 @@ var ts; && statementOffset === ctorStatements.length - 1 && !(ctor.transformFlags & (16384 | 32768))) { var returnStatement = ts.createReturn(superCallExpression); - if (superCallExpression.kind !== 193 - || superCallExpression.left.kind !== 180) { + if (superCallExpression.kind !== 194 + || superCallExpression.left.kind !== 181) { ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'."); } ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536))); @@ -45102,7 +45163,7 @@ var ts; statements.push(statement); } function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return node && node.dotDotDotToken && node.name.kind === 70 && !inConstructorWithSynthesizedSuper; + return node && node.dotDotDotToken && node.name.kind === 71 && !inConstructorWithSynthesizedSuper; } function addRestParameterIfNeeded(statements, node, inConstructorWithSynthesizedSuper) { var parameter = ts.lastOrUndefined(node.parameters); @@ -45129,7 +45190,7 @@ var ts; statements.push(forStatement); } function addCaptureThisForNodeIfNeeded(statements, node) { - if (node.transformFlags & 32768 && node.kind !== 186) { + if (node.transformFlags & 32768 && node.kind !== 187) { captureThisForNode(statements, node, ts.createThis()); } } @@ -45147,19 +45208,19 @@ var ts; if (hierarchyFacts & 16384) { var newTarget = void 0; switch (node.kind) { - case 186: + case 187: return statements; - case 150: - case 152: + case 151: case 153: + case 154: newTarget = ts.createVoidZero(); break; - case 151: + case 152: newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"); break; - case 227: - case 185: - newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); + case 228: + case 186: + newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 93, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); break; default: ts.Debug.failBadSyntaxKind(node); @@ -45179,20 +45240,20 @@ var ts; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; switch (member.kind) { - case 205: + case 206: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 150: + case 151: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 151: + case 152: break; default: ts.Debug.failBadSyntaxKind(node); @@ -45317,7 +45378,7 @@ var ts; : enterSubtree(16286, 65); var parameters = ts.visitParameterList(node.parameters, visitor, context); var body = transformFunctionBody(node); - if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) { + if (hierarchyFacts & 16384 && !name && (node.kind === 228 || node.kind === 186)) { name = ts.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 49152, 0); @@ -45351,7 +45412,7 @@ var ts; } } else { - ts.Debug.assert(node.kind === 186); + ts.Debug.assert(node.kind === 187); statementsLocation = ts.moveRangeEnd(body, -1); var equalsGreaterThanToken = node.equalsGreaterThanToken; if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) { @@ -45381,7 +45442,7 @@ var ts; ts.setEmitFlags(block, 1); } if (closeBraceLocation) { - ts.setTokenSourceMapRange(block, 17, closeBraceLocation); + ts.setTokenSourceMapRange(block, 18, closeBraceLocation); } ts.setOriginalNode(block, node.body); return block; @@ -45403,9 +45464,9 @@ var ts; } function visitExpressionStatement(node) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateStatement(node, visitBinaryExpression(node.expression, false)); } return ts.visitEachChild(node, visitor, context); @@ -45413,9 +45474,9 @@ var ts; function visitParenthesizedExpression(node, needsDestructuringValue) { if (!needsDestructuringValue) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateParen(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateParen(node, visitBinaryExpression(node.expression, false)); } } @@ -45441,13 +45502,13 @@ var ts; assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0); } else { - assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression)); + assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression)); } assignments = ts.append(assignments, assignment); } } if (assignments) { - updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node); + updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node); } else { updated = undefined; @@ -45539,14 +45600,14 @@ var ts; } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 211: case 212: - return visitDoOrWhileStatement(node, outermostLabeledStatement); case 213: - return visitForStatement(node, outermostLabeledStatement); + return visitDoOrWhileStatement(node, outermostLabeledStatement); case 214: - return visitForInStatement(node, outermostLabeledStatement); + return visitForStatement(node, outermostLabeledStatement); case 215: + return visitForInStatement(node, outermostLabeledStatement); + case 216: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -45672,7 +45733,7 @@ var ts; && i < numInitialPropertiesWithoutYield) { numInitialPropertiesWithoutYield = i; } - if (property.name.kind === 143) { + if (property.name.kind === 144) { numInitialProperties = i; break; } @@ -45703,7 +45764,7 @@ var ts; } visit(node.name); function visit(node) { - if (node.kind === 70) { + if (node.kind === 71) { state.hoistedLocalVariables.push(node); } else { @@ -45734,11 +45795,11 @@ var ts; var functionName = ts.createUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 213: case 214: case 215: + case 216: var initializer = node.initializer; - if (initializer && initializer.kind === 226) { + if (initializer && initializer.kind === 227) { loopInitializer = initializer; } break; @@ -45793,7 +45854,7 @@ var ts; loopBodyFlags |= 131072; } var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([ - ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(38) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) + ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) ]), 1048576)); var statements = [convertedLoopVariable]; var extraVariableDeclarations; @@ -45859,7 +45920,7 @@ var ts; function copyOutParameter(outParam, copyDirection) { var source = copyDirection === 0 ? outParam.outParamName : outParam.originalName; var target = copyDirection === 0 ? outParam.originalName : outParam.outParamName; - return ts.createBinary(target, 57, source); + return ts.createBinary(target, 58, source); } function copyOutParameters(outParams, copyDirection, statements) { for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) { @@ -45875,7 +45936,7 @@ var ts; !state.labeledNonLocalContinues; var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; })); var callResult = isAsyncBlockContainingAwait - ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304)) + ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304)) : call; if (isSimpleLoop) { statements.push(ts.createStatement(callResult)); @@ -45895,10 +45956,10 @@ var ts; else { returnStatement = ts.createReturn(ts.createPropertyAccess(loopResultName, "value")); } - statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 33, ts.createLiteral("object")), returnStatement)); + statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 34, ts.createLiteral("object")), returnStatement)); } if (state.nonLocalJumps & 2) { - statements.push(ts.createIf(ts.createBinary(loopResultName, 33, ts.createLiteral("break")), ts.createBreak())); + statements.push(ts.createIf(ts.createBinary(loopResultName, 34, ts.createLiteral("break")), ts.createBreak())); } if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { var caseClauses = []; @@ -45964,20 +46025,20 @@ var ts; for (var i = start; i < numProperties; i++) { var property = properties[i]; switch (property.kind) { - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine)); } break; - case 150: + case 151: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 260: + case 261: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 261: + case 262: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -46080,7 +46141,7 @@ var ts; } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { var _a = ts.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { ts.setEmitFlags(thisArg, 4); } var resultingCall; @@ -46090,7 +46151,7 @@ var ts; else { resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node); } - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var actualThis = ts.createThis(); ts.setEmitFlags(actualThis, 4); var initializer = ts.createLogicalOr(resultingCall, actualThis); @@ -46127,7 +46188,7 @@ var ts; else { if (segments.length === 1) { var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 + return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 ? ts.createArraySlice(segments[0]) : segments[0]; } @@ -46195,7 +46256,7 @@ var ts; } function getRawLiteral(node) { var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - var isLast = node.kind === 12 || node.kind === 15; + var isLast = node.kind === 13 || node.kind === 16; text = text.substring(1, text.length - (isLast ? 1 : 2)); text = text.replace(/\r\n?/g, "\n"); return ts.setTextRange(ts.createLiteral(text), node); @@ -46237,7 +46298,7 @@ var ts; : ts.createIdentifier("_super"); } function visitMetaProperty(node) { - if (node.keywordToken === 93 && node.name.text === "target") { + if (node.keywordToken === 94 && node.name.text === "target") { if (hierarchyFacts & 8192) { hierarchyFacts |= 32768; } @@ -46262,20 +46323,20 @@ var ts; function enableSubstitutionsForBlockScopedBindings() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(98); - context.enableEmitNotification(151); - context.enableEmitNotification(150); + context.enableSubstitution(99); context.enableEmitNotification(152); + context.enableEmitNotification(151); context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(187); context.enableEmitNotification(186); - context.enableEmitNotification(185); - context.enableEmitNotification(227); + context.enableEmitNotification(228); } } function onSubstituteNode(hint, node) { @@ -46300,10 +46361,10 @@ var ts; function isNameOfDeclarationWithCollidingName(node) { var parent = node.parent; switch (parent.kind) { - case 175: - case 228: - case 231: - case 225: + case 176: + case 229: + case 232: + case 226: return parent.name === node && resolver.isDeclarationWithCollidingName(parent); } @@ -46311,9 +46372,9 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 98: + case 99: return substituteThisKeyword(node); } return node; @@ -46346,19 +46407,19 @@ var ts; return false; } var statement = ts.firstOrUndefined(constructor.body.statements); - if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) { + if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 210) { return false; } var statementExpression = statement.expression; - if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) { + if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 181) { return false; } var callTarget = statementExpression.expression; - if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 96) { + if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 97) { return false; } var callArgument = ts.singleOrUndefined(statementExpression.arguments); - if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) { + if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 198) { return false; } var expression = callArgument.expression; @@ -46501,13 +46562,13 @@ var ts; } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 220: - return visitSwitchStatement(node); case 221: + return visitSwitchStatement(node); + case 222: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -46515,24 +46576,24 @@ var ts; } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 213: - return visitForStatement(node); case 214: + return visitForStatement(node); + case 215: return visitForInStatement(node); - case 217: + case 218: return visitBreakStatement(node); - case 216: + case 217: return visitContinueStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: if (node.transformFlags & 16777216) { @@ -46548,21 +46609,21 @@ var ts; } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 193: - return visitBinaryExpression(node); case 194: + return visitBinaryExpression(node); + case 195: return visitConditionalExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 176: - return visitArrayLiteralExpression(node); case 177: + return visitArrayLiteralExpression(node); + case 178: return visitObjectLiteralExpression(node); - case 179: - return visitElementAccessExpression(node); case 180: - return visitCallExpression(node); + return visitElementAccessExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -46570,9 +46631,9 @@ var ts; } function visitGenerator(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); default: ts.Debug.failBadSyntaxKind(node); @@ -46705,23 +46766,23 @@ var ts; } } function isCompoundAssignment(kind) { - return kind >= 58 - && kind <= 69; + return kind >= 59 + && kind <= 70; } function getOperatorForCompoundAssignment(kind) { switch (kind) { - case 58: return 36; case 59: return 37; case 60: return 38; case 61: return 39; case 62: return 40; case 63: return 41; - case 64: return 44; + case 64: return 42; case 65: return 45; case 66: return 46; case 67: return 47; case 68: return 48; case 69: return 49; + case 70: return 50; } } function visitRightAssociativeBinaryExpression(node) { @@ -46729,10 +46790,10 @@ var ts; if (containsYield(right)) { var target = void 0; switch (left.kind) { - case 178: + case 179: target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name); break; - case 179: + case 180: target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression))); break; default: @@ -46754,7 +46815,7 @@ var ts; if (ts.isLogicalOperator(node.operatorToken.kind)) { return visitLogicalBinaryExpression(node); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return visitCommaExpression(node); } var clone_5 = ts.getMutableClone(node); @@ -46768,7 +46829,7 @@ var ts; var resultLabel = defineLabel(); var resultLocal = declareLocal(); emitAssignment(resultLocal, ts.visitNode(node.left, visitor, ts.isExpression), node.left); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { emitBreakWhenFalse(resultLabel, resultLocal, node.left); } else { @@ -46784,7 +46845,7 @@ var ts; visit(node.right); return ts.inlineExpressions(pendingExpressions); function visit(node) { - if (ts.isBinaryExpression(node) && node.operatorToken.kind === 25) { + if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) { visit(node.left); visit(node.right); } @@ -46933,35 +46994,35 @@ var ts; } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 206: + case 207: return transformAndEmitBlock(node); - case 209: - return transformAndEmitExpressionStatement(node); case 210: - return transformAndEmitIfStatement(node); + return transformAndEmitExpressionStatement(node); case 211: - return transformAndEmitDoStatement(node); + return transformAndEmitIfStatement(node); case 212: - return transformAndEmitWhileStatement(node); + return transformAndEmitDoStatement(node); case 213: - return transformAndEmitForStatement(node); + return transformAndEmitWhileStatement(node); case 214: + return transformAndEmitForStatement(node); + case 215: return transformAndEmitForInStatement(node); - case 216: - return transformAndEmitContinueStatement(node); case 217: - return transformAndEmitBreakStatement(node); + return transformAndEmitContinueStatement(node); case 218: - return transformAndEmitReturnStatement(node); + return transformAndEmitBreakStatement(node); case 219: - return transformAndEmitWithStatement(node); + return transformAndEmitReturnStatement(node); case 220: - return transformAndEmitSwitchStatement(node); + return transformAndEmitWithStatement(node); case 221: - return transformAndEmitLabeledStatement(node); + return transformAndEmitSwitchStatement(node); case 222: - return transformAndEmitThrowStatement(node); + return transformAndEmitLabeledStatement(node); case 223: + return transformAndEmitThrowStatement(node); + case 224: return transformAndEmitTryStatement(node); default: return emitStatement(ts.visitNode(node, visitor, ts.isStatement)); @@ -47247,7 +47308,7 @@ var ts; for (var i = 0; i < numClauses; i++) { var clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 257 && defaultClauseIndex === -1) { + if (clause.kind === 258 && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -47257,7 +47318,7 @@ var ts; var defaultClausesSkipped = 0; for (var i = clausesWritten; i < numClauses; i++) { var clause = caseBlock.clauses[i]; - if (clause.kind === 256) { + if (clause.kind === 257) { var caseClause = clause; if (containsYield(caseClause.expression) && pendingClauses.length > 0) { break; @@ -47495,7 +47556,7 @@ var ts; if (!renamedCatchVariables) { renamedCatchVariables = ts.createMap(); renamedCatchVariableDeclarations = []; - context.enableSubstitution(70); + context.enableSubstitution(71); } renamedCatchVariables.set(text, true); renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name; @@ -48064,24 +48125,24 @@ var ts; if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(250); context.enableEmitNotification(251); - context.enableEmitNotification(249); + context.enableEmitNotification(252); + context.enableEmitNotification(250); noSubstitution = []; } var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); - context.enableSubstitution(260); + context.enableSubstitution(179); + context.enableSubstitution(261); return transformSourceFile; function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 250: case 251: - case 249: + case 252: + case 250: var tagName = node.tagName; noSubstitution[ts.getOriginalNodeId(tagName)] = true; break; @@ -48117,7 +48178,7 @@ var ts; } function trySubstituteReservedName(name) { var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined); - if (token >= 71 && token <= 106) { + if (token >= 72 && token <= 107) { return ts.setTextRange(ts.createLiteral(name), name); } return undefined; @@ -48145,12 +48206,12 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableSubstitution(261); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableSubstitution(262); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var currentSourceFile; @@ -48307,23 +48368,23 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return visitExportDeclaration(node); - case 242: + case 243: return visitExportAssignment(node); - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return node; @@ -48521,7 +48582,7 @@ var ts; } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -48553,10 +48614,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -48657,14 +48718,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)]; noSubstitution = []; @@ -48704,12 +48765,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); + case 193: case 192: - case 191: return substituteUnaryExpression(node); } return node; @@ -48724,7 +48785,7 @@ var ts; } if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node)); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node); } var importDeclaration = resolver.getReferencedImportDeclaration(node); @@ -48760,15 +48821,15 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 - ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node) + var expression = node.kind === 193 + ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 43 ? 59 : 60), ts.createLiteral(1)), node) : node; for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) { var exportName = exportedNames_2[_i]; @@ -48809,11 +48870,11 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var exportFunctionsMap = []; @@ -48919,7 +48980,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) { var externalImport = _a[_i]; - if (externalImport.kind === 243 && externalImport.exportClause) { + if (externalImport.kind === 244 && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -48942,7 +49003,7 @@ var ts; } for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) { var externalImport = _e[_d]; - if (externalImport.kind !== 243) { + if (externalImport.kind !== 244) { continue; } var exportDecl = externalImport; @@ -48994,15 +49055,15 @@ var ts; var entry = _b[_a]; var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile); switch (entry.kind) { - case 237: + case 238: if (!entry.importClause) { break; } - case 236: + case 237: ts.Debug.assert(importVariableName !== undefined); statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName))); break; - case 243: + case 244: ts.Debug.assert(importVariableName !== undefined); if (entry.exportClause) { var properties = []; @@ -49024,13 +49085,13 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return undefined; - case 242: + case 243: return visitExportAssignment(node); default: return nestedElementVisitor(node); @@ -49151,7 +49212,7 @@ var ts; } function shouldHoistVariableDeclarationList(node) { return (ts.getEmitFlags(node) & 1048576) === 0 - && (enclosingBlockScopedContainer.kind === 264 + && (enclosingBlockScopedContainer.kind === 265 || (ts.getOriginalNode(node).flags & 3) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { @@ -49173,7 +49234,7 @@ var ts; : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); var isExportedDeclaration = ts.hasModifier(node.original, 1); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -49206,10 +49267,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -49308,43 +49369,43 @@ var ts; } function nestedElementVisitor(node) { switch (node.kind) { - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 213: - return visitForStatement(node); case 214: - return visitForInStatement(node); + return visitForStatement(node); case 215: + return visitForInStatement(node); + case 216: return visitForOfStatement(node); - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 219: - return visitWithStatement(node); case 220: + return visitWithStatement(node); + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 256: - return visitCaseClause(node); case 257: + return visitCaseClause(node); + case 258: return visitDefaultClause(node); - case 223: + case 224: return visitTryStatement(node); - case 259: + case 260: return visitCatchClause(node); - case 206: + case 207: return visitBlock(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return destructuringVisitor(node); @@ -49438,7 +49499,7 @@ var ts; } function destructuringVisitor(node) { if (node.transformFlags & 1024 - && node.kind === 193) { + && node.kind === 194) { return visitDestructuringAssignment(node); } else if (node.transformFlags & 2048) { @@ -49475,7 +49536,7 @@ var ts; } else if (ts.isIdentifier(node)) { var container = resolver.getReferencedExportContainer(node); - return container !== undefined && container.kind === 264; + return container !== undefined && container.kind === 265; } else { return false; @@ -49483,14 +49544,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { var id = ts.getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -49521,12 +49582,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); - case 191: case 192: + case 193: return substituteUnaryExpression(node); } return node; @@ -49571,22 +49632,22 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 + var expression = node.kind === 193 ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node) : node; for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) { var exportName = exportedNames_4[_i]; expression = createExportExpression(exportName, preventSubstitution(expression)); } - if (node.kind === 192) { - expression = node.operator === 42 + if (node.kind === 193) { + expression = node.operator === 43 ? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1)) : ts.createAdd(preventSubstitution(expression), ts.createLiteral(1)); } @@ -49602,7 +49663,7 @@ var ts; || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { var exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration)); } exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]); @@ -49630,8 +49691,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(264); - context.enableSubstitution(70); + context.enableEmitNotification(265); + context.enableSubstitution(71); var currentSourceFile; return transformSourceFile; function transformSourceFile(node) { @@ -49655,9 +49716,9 @@ var ts; } function visitor(node) { switch (node.kind) { - case 236: + case 237: return undefined; - case 242: + case 243: return visitExportAssignment(node); } return node; @@ -49750,7 +49811,7 @@ var ts; } ts.getTransformers = getTransformers; function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(298); + var enabledSyntaxKindFeatures = new Array(299); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -49957,8 +50018,8 @@ var ts; } ts.getDeclarationDiagnostics = getDeclarationDiagnostics; function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; - var isBundledEmit = sourceFileOrBundle.kind === 265; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var isBundledEmit = sourceFileOrBundle.kind === 266; var newLine = host.getNewLine(); var compilerOptions = host.getCompilerOptions(); var write; @@ -50020,7 +50081,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 237); + ts.Debug.assert(aliasEmitInfo.node.kind === 238); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -50093,10 +50154,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 225) { + if (declaration.kind === 226) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) { + else if (declaration.kind === 241 || declaration.kind === 242 || declaration.kind === 239) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -50107,7 +50168,7 @@ var ts; moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); } if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 237) { + if (moduleElementEmitInfo.node.kind === 238) { moduleElementEmitInfo.isVisible = true; } else { @@ -50115,12 +50176,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -50182,7 +50243,7 @@ var ts; function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) { writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; write(": "); - var shouldUseResolverType = declaration.kind === 145 && + var shouldUseResolverType = declaration.kind === 146 && resolver.isRequiredInitializedParameter(declaration); if (type && !shouldUseResolverType) { emitType(type); @@ -50242,74 +50303,74 @@ var ts; } function emitType(type) { switch (type.kind) { - case 118: - case 135: - case 132: - case 121: - case 133: + case 119: case 136: - case 104: - case 138: - case 94: - case 129: - case 168: - case 172: + case 133: + case 122: + case 134: + case 137: + case 105: + case 139: + case 95: + case 130: + case 169: + case 173: return writeTextOfNode(currentText, type); - case 200: + case 201: return emitExpressionWithTypeArguments(type); - case 158: + case 159: return emitTypeReference(type); - case 161: + case 162: return emitTypeQuery(type); - case 163: - return emitArrayType(type); case 164: - return emitTupleType(type); + return emitArrayType(type); case 165: - return emitUnionType(type); + return emitTupleType(type); case 166: - return emitIntersectionType(type); + return emitUnionType(type); case 167: + return emitIntersectionType(type); + case 168: return emitParenType(type); - case 169: - return emitTypeOperator(type); case 170: - return emitIndexedAccessType(type); + return emitTypeOperator(type); case 171: + return emitIndexedAccessType(type); + case 172: return emitMappedType(type); - case 159: case 160: + case 161: return emitSignatureDeclarationWithJsDocComments(type); - case 162: + case 163: return emitTypeLiteral(type); - case 70: + case 71: return emitEntityName(type); - case 142: + case 143: return emitEntityName(type); - case 157: + case 158: return emitTypePredicate(type); } function writeEntityName(entityName) { - if (entityName.kind === 70) { + if (entityName.kind === 71) { writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 142 ? entityName.left : entityName.expression; - var right = entityName.kind === 142 ? entityName.right : entityName.name; + var left = entityName.kind === 143 ? entityName.left : entityName.expression; + var right = entityName.kind === 143 ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 237 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isEntityNameExpression(node.expression)) { - ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178); + ts.Debug.assert(node.expression.kind === 71 || node.expression.kind === 179); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -50426,7 +50487,7 @@ var ts; } } function emitExportAssignment(node) { - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { write(node.isExportEquals ? "export = " : "export default "); writeTextOfNode(currentText, node.expression); } @@ -50447,7 +50508,7 @@ var ts; } write(";"); writeLine(); - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { var nodes = resolver.collectLinkedAliases(node.expression); writeAsynchronousModuleElements(nodes); } @@ -50465,10 +50526,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 236 || - (node.parent.kind === 264 && isCurrentFileExternalModule)) { + else if (node.kind === 237 || + (node.parent.kind === 265 && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 265) { asynchronousSubModuleDeclarationEmitInfo.push({ node: node, outputPos: writer.getTextPos(), @@ -50477,7 +50538,7 @@ var ts; }); } else { - if (node.kind === 237) { + if (node.kind === 238) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -50495,30 +50556,30 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 227: + case 228: return writeFunctionDeclaration(node); - case 207: + case 208: return writeVariableStatement(node); - case 229: + case 230: return writeInterfaceDeclaration(node); - case 228: + case 229: return writeClassDeclaration(node); - case 230: - return writeTypeAliasDeclaration(node); case 231: - return writeEnumDeclaration(node); + return writeTypeAliasDeclaration(node); case 232: + return writeEnumDeclaration(node); + case 233: return writeModuleDeclaration(node); - case 236: - return writeImportEqualsDeclaration(node); case 237: + return writeImportEqualsDeclaration(node); + case 238: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); } } function emitModuleElementDeclarationFlags(node) { - if (node.parent.kind === 264) { + if (node.parent.kind === 265) { var modifiers = ts.getModifierFlags(node); if (modifiers & 1) { write("export "); @@ -50526,7 +50587,7 @@ var ts; if (modifiers & 512) { write("default "); } - else if (node.kind !== 229 && !noDeclare) { + else if (node.kind !== 230 && !noDeclare) { write("declare "); } } @@ -50576,7 +50637,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 239) { + if (namedBindings.kind === 240) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -50599,7 +50660,7 @@ var ts; if (currentWriterPos !== writer.getTextPos()) { write(", "); } - if (node.importClause.namedBindings.kind === 239) { + if (node.importClause.namedBindings.kind === 240) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -50616,13 +50677,13 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 233; var moduleSpecifier; - if (parent.kind === 236) { + if (parent.kind === 237) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 232) { + else if (parent.kind === 233) { moduleSpecifier = parent.name; } else { @@ -50690,7 +50751,7 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body && node.body.kind !== 233) { + while (node.body && node.body.kind !== 234) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -50760,7 +50821,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 150 && ts.hasModifier(node.parent, 8); + return node.parent.kind === 151 && ts.hasModifier(node.parent, 8); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -50770,15 +50831,15 @@ var ts; writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.constraint); } else { @@ -50787,15 +50848,15 @@ var ts; } if (node.default && !isPrivateMethodTypeParameter(node)) { write(" = "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.default); } else { @@ -50805,34 +50866,34 @@ var ts; function getTypeParameterConstraintVisibilityError() { var diagnosticMessage; switch (node.parent.kind) { - case 228: + case 229: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 229: + case 230: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 155: + case 156: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 154: + case 155: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 227: + case 228: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 230: + case 231: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -50860,7 +50921,7 @@ var ts; if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } - else if (!isImplementsList && node.expression.kind === 94) { + else if (!isImplementsList && node.expression.kind === 95) { write("null"); } else { @@ -50871,7 +50932,7 @@ var ts; } function getHeritageClauseVisibilityError() { var diagnosticMessage; - if (node.parent.parent.kind === 228) { + if (node.parent.parent.kind === 229) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1; @@ -50955,17 +51016,17 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 225 || resolver.isDeclarationVisible(node)) { + if (node.kind !== 226 || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } else { writeTextOfNode(currentText, node.name); - if ((node.kind === 148 || node.kind === 147 || - (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { + if ((node.kind === 149 || node.kind === 148 || + (node.kind === 146 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) { + if ((node.kind === 149 || node.kind === 148) && node.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (resolver.isLiteralConstDeclaration(node)) { @@ -50978,14 +51039,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 225) { + if (node.kind === 226) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 148 || node.kind === 147) { + else if (node.kind === 149 || node.kind === 148) { if (ts.hasModifier(node, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -50993,7 +51054,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -51019,7 +51080,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 199) { + if (element.kind !== 200) { elements.push(element); } } @@ -51085,7 +51146,7 @@ var ts; accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { - var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 153 ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -51098,7 +51159,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 152 + return accessor.kind === 153 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type @@ -51107,7 +51168,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 153) { + if (accessorWithTypeAnnotation.kind === 154) { if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : @@ -51153,17 +51214,17 @@ var ts; } if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 227) { + if (node.kind === 228) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 150 || node.kind === 151) { + else if (node.kind === 151 || node.kind === 152) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); } - if (node.kind === 227) { + if (node.kind === 228) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 151) { + else if (node.kind === 152) { write("constructor"); } else { @@ -51183,15 +51244,15 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; var closeParenthesizedFunctionType = false; - if (node.kind === 156) { + if (node.kind === 157) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); write("["); } else { - if (node.kind === 155 || node.kind === 160) { + if (node.kind === 156 || node.kind === 161) { write("new "); } - else if (node.kind === 159) { + else if (node.kind === 160) { var currentOutput = writer.getText(); if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") { closeParenthesizedFunctionType = true; @@ -51202,20 +51263,20 @@ var ts; write("("); } emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 156) { + if (node.kind === 157) { write("]"); } else { write(")"); } - var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160; - if (isFunctionTypeOrConstructorType || node.parent.kind === 162) { + var isFunctionTypeOrConstructorType = node.kind === 160 || node.kind === 161; + if (isFunctionTypeOrConstructorType || node.parent.kind === 163) { if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 151 && !ts.hasModifier(node, 8)) { + else if (node.kind !== 152 && !ts.hasModifier(node, 8)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -51229,23 +51290,23 @@ var ts; function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 155: + case 156: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 154: + case 155: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 156: + case 157: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; + case 151: case 150: - case 149: if (ts.hasModifier(node, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -51253,7 +51314,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -51266,7 +51327,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 227: + case 228: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -51298,9 +51359,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - node.parent.parent.kind === 162) { + if (node.parent.kind === 160 || + node.parent.kind === 161 || + node.parent.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!ts.hasModifier(node.parent, 8)) { @@ -51316,26 +51377,26 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 151: + case 152: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 155: + case 156: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 154: + case 155: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 156: + case 157: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -51343,7 +51404,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -51355,7 +51416,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 227: + case 228: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -51366,12 +51427,12 @@ var ts; } } function emitBindingPattern(bindingPattern) { - if (bindingPattern.kind === 173) { + if (bindingPattern.kind === 174) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 174) { + else if (bindingPattern.kind === 175) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -51382,10 +51443,10 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 199) { + if (bindingElement.kind === 200) { write(" "); } - else if (bindingElement.kind === 175) { + else if (bindingElement.kind === 176) { if (bindingElement.propertyName) { writeTextOfNode(currentText, bindingElement.propertyName); write(": "); @@ -51395,7 +51456,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - ts.Debug.assert(bindingElement.name.kind === 70); + ts.Debug.assert(bindingElement.name.kind === 71); if (bindingElement.dotDotDotToken) { write("..."); } @@ -51407,39 +51468,39 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 227: - case 232: - case 236: - case 229: case 228: + case 233: + case 237: case 230: + case 229: case 231: + case 232: return emitModuleElement(node, isModuleElementVisible(node)); - case 207: + case 208: return emitModuleElement(node, isVariableStatementVisible(node)); - case 237: + case 238: return emitModuleElement(node, !node.importClause); - case 243: + case 244: return emitExportDeclaration(node); + case 152: case 151: case 150: - case 149: return writeFunctionDeclaration(node); - case 155: - case 154: case 156: + case 155: + case 157: return emitSignatureDeclarationWithJsDocComments(node); - case 152: case 153: + case 154: return emitAccessorDeclaration(node); + case 149: case 148: - case 147: return emitPropertyDeclaration(node); - case 263: + case 264: return emitEnumMemberDeclaration(node); - case 242: + case 243: return emitExportAssignment(node); - case 264: + case 265: return emitSourceFile(node); } } @@ -51458,7 +51519,7 @@ var ts; } return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFileOrBundle) { - var isBundledEmit = sourceFileOrBundle.kind === 265; + var isBundledEmit = sourceFileOrBundle.kind === 266; if (isBundledEmit && !addBundledFileReference) { return; } @@ -51472,7 +51533,7 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); @@ -51557,7 +51618,7 @@ var ts; } if (compilerOptions.mapRoot) { sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (sourceFileOrBundle.kind === 264) { + if (sourceFileOrBundle.kind === 265) { sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir)); } if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { @@ -51657,7 +51718,7 @@ var ts; var emitNode = node.emitNode; var emitFlags = emitNode && emitNode.flags; var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end; - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 16) === 0 && pos >= 0) { emitPos(ts.skipTrivia(currentSourceText, pos)); @@ -51670,7 +51731,7 @@ var ts; else { emitCallback(hint, node); } - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 32) === 0 && end >= 0) { emitPos(end); @@ -51810,7 +51871,7 @@ var ts; if (extendedDiagnostics) { ts.performance.mark("preEmitNodeWithComment"); } - var isEmittedNode = node.kind !== 294; + var isEmittedNode = node.kind !== 295; var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0; var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0; if (!skipLeadingComments) { @@ -51824,7 +51885,7 @@ var ts; } if (!skipTrailingComments) { containerEnd = end; - if (node.kind === 226) { + if (node.kind === 227) { declarationListContainerEnd = end; } } @@ -52164,8 +52225,8 @@ var ts; } } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) { - var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; - var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined; + var bundle = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle : undefined; + var sourceFile = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle); if (bundle) { @@ -52201,7 +52262,7 @@ var ts; } function emitHelpers(node, writeLines) { var helpersEmitted = false; - var bundle = node.kind === 265 ? node : undefined; + var bundle = node.kind === 266 ? node : undefined; if (bundle && moduleKind === ts.ModuleKind.None) { return; } @@ -52274,8 +52335,8 @@ var ts; break; } switch (node.kind) { - case 264: return printFile(node); - case 265: return printBundle(node); + case 265: return printFile(node); + case 266: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); return endPrint(); @@ -52406,196 +52467,196 @@ var ts; return; } switch (kind) { - case 13: case 14: case 15: + case 16: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 142: - return emitQualifiedName(node); case 143: - return emitComputedPropertyName(node); + return emitQualifiedName(node); case 144: - return emitTypeParameter(node); + return emitComputedPropertyName(node); case 145: - return emitParameter(node); + return emitTypeParameter(node); case 146: - return emitDecorator(node); + return emitParameter(node); case 147: - return emitPropertySignature(node); + return emitDecorator(node); case 148: - return emitPropertyDeclaration(node); + return emitPropertySignature(node); case 149: - return emitMethodSignature(node); + return emitPropertyDeclaration(node); case 150: - return emitMethodDeclaration(node); + return emitMethodSignature(node); case 151: - return emitConstructor(node); + return emitMethodDeclaration(node); case 152: + return emitConstructor(node); case 153: - return emitAccessorDeclaration(node); case 154: - return emitCallSignature(node); + return emitAccessorDeclaration(node); case 155: - return emitConstructSignature(node); + return emitCallSignature(node); case 156: - return emitIndexSignature(node); + return emitConstructSignature(node); case 157: - return emitTypePredicate(node); + return emitIndexSignature(node); case 158: - return emitTypeReference(node); + return emitTypePredicate(node); case 159: - return emitFunctionType(node); + return emitTypeReference(node); case 160: - return emitConstructorType(node); + return emitFunctionType(node); case 161: - return emitTypeQuery(node); + return emitConstructorType(node); case 162: - return emitTypeLiteral(node); + return emitTypeQuery(node); case 163: - return emitArrayType(node); + return emitTypeLiteral(node); case 164: - return emitTupleType(node); + return emitArrayType(node); case 165: - return emitUnionType(node); + return emitTupleType(node); case 166: - return emitIntersectionType(node); + return emitUnionType(node); case 167: + return emitIntersectionType(node); + case 168: return emitParenthesizedType(node); - case 200: + case 201: return emitExpressionWithTypeArguments(node); - case 168: - return emitThisType(); case 169: - return emitTypeOperator(node); + return emitThisType(); case 170: - return emitIndexedAccessType(node); + return emitTypeOperator(node); case 171: - return emitMappedType(node); + return emitIndexedAccessType(node); case 172: - return emitLiteralType(node); + return emitMappedType(node); case 173: - return emitObjectBindingPattern(node); + return emitLiteralType(node); case 174: - return emitArrayBindingPattern(node); + return emitObjectBindingPattern(node); case 175: + return emitArrayBindingPattern(node); + case 176: return emitBindingElement(node); - case 204: - return emitTemplateSpan(node); case 205: - return emitSemicolonClassElement(); + return emitTemplateSpan(node); case 206: - return emitBlock(node); + return emitSemicolonClassElement(); case 207: - return emitVariableStatement(node); + return emitBlock(node); case 208: - return emitEmptyStatement(); + return emitVariableStatement(node); case 209: - return emitExpressionStatement(node); + return emitEmptyStatement(); case 210: - return emitIfStatement(node); + return emitExpressionStatement(node); case 211: - return emitDoStatement(node); + return emitIfStatement(node); case 212: - return emitWhileStatement(node); + return emitDoStatement(node); case 213: - return emitForStatement(node); + return emitWhileStatement(node); case 214: - return emitForInStatement(node); + return emitForStatement(node); case 215: - return emitForOfStatement(node); + return emitForInStatement(node); case 216: - return emitContinueStatement(node); + return emitForOfStatement(node); case 217: - return emitBreakStatement(node); + return emitContinueStatement(node); case 218: - return emitReturnStatement(node); + return emitBreakStatement(node); case 219: - return emitWithStatement(node); + return emitReturnStatement(node); case 220: - return emitSwitchStatement(node); + return emitWithStatement(node); case 221: - return emitLabeledStatement(node); + return emitSwitchStatement(node); case 222: - return emitThrowStatement(node); + return emitLabeledStatement(node); case 223: - return emitTryStatement(node); + return emitThrowStatement(node); case 224: - return emitDebuggerStatement(node); + return emitTryStatement(node); case 225: - return emitVariableDeclaration(node); + return emitDebuggerStatement(node); case 226: - return emitVariableDeclarationList(node); + return emitVariableDeclaration(node); case 227: - return emitFunctionDeclaration(node); + return emitVariableDeclarationList(node); case 228: - return emitClassDeclaration(node); + return emitFunctionDeclaration(node); case 229: - return emitInterfaceDeclaration(node); + return emitClassDeclaration(node); case 230: - return emitTypeAliasDeclaration(node); + return emitInterfaceDeclaration(node); case 231: - return emitEnumDeclaration(node); + return emitTypeAliasDeclaration(node); case 232: - return emitModuleDeclaration(node); + return emitEnumDeclaration(node); case 233: - return emitModuleBlock(node); + return emitModuleDeclaration(node); case 234: + return emitModuleBlock(node); + case 235: return emitCaseBlock(node); - case 236: - return emitImportEqualsDeclaration(node); case 237: - return emitImportDeclaration(node); + return emitImportEqualsDeclaration(node); case 238: - return emitImportClause(node); + return emitImportDeclaration(node); case 239: - return emitNamespaceImport(node); + return emitImportClause(node); case 240: - return emitNamedImports(node); + return emitNamespaceImport(node); case 241: - return emitImportSpecifier(node); + return emitNamedImports(node); case 242: - return emitExportAssignment(node); + return emitImportSpecifier(node); case 243: - return emitExportDeclaration(node); + return emitExportAssignment(node); case 244: - return emitNamedExports(node); + return emitExportDeclaration(node); case 245: - return emitExportSpecifier(node); + return emitNamedExports(node); case 246: - return; + return emitExportSpecifier(node); case 247: + return; + case 248: return emitExternalModuleReference(node); case 10: return emitJsxText(node); - case 250: - return emitJsxOpeningElement(node); case 251: - return emitJsxClosingElement(node); + return emitJsxOpeningElement(node); case 252: - return emitJsxAttribute(node); + return emitJsxClosingElement(node); case 253: - return emitJsxAttributes(node); + return emitJsxAttribute(node); case 254: - return emitJsxSpreadAttribute(node); + return emitJsxAttributes(node); case 255: - return emitJsxExpression(node); + return emitJsxSpreadAttribute(node); case 256: - return emitCaseClause(node); + return emitJsxExpression(node); case 257: - return emitDefaultClause(node); + return emitCaseClause(node); case 258: - return emitHeritageClause(node); + return emitDefaultClause(node); case 259: - return emitCatchClause(node); + return emitHeritageClause(node); case 260: - return emitPropertyAssignment(node); + return emitCatchClause(node); case 261: - return emitShorthandPropertyAssignment(node); + return emitPropertyAssignment(node); case 262: - return emitSpreadAssignment(node); + return emitShorthandPropertyAssignment(node); case 263: + return emitSpreadAssignment(node); + case 264: return emitEnumMember(node); } if (ts.isExpression(node)) { @@ -52612,77 +52673,77 @@ var ts; case 8: return emitNumericLiteral(node); case 9: - case 11: case 12: + case 13: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 85: - case 94: - case 96: - case 100: - case 98: + case 86: + case 95: + case 97: + case 101: + case 99: writeTokenText(kind); return; - case 176: - return emitArrayLiteralExpression(node); case 177: - return emitObjectLiteralExpression(node); + return emitArrayLiteralExpression(node); case 178: - return emitPropertyAccessExpression(node); + return emitObjectLiteralExpression(node); case 179: - return emitElementAccessExpression(node); + return emitPropertyAccessExpression(node); case 180: - return emitCallExpression(node); + return emitElementAccessExpression(node); case 181: - return emitNewExpression(node); + return emitCallExpression(node); case 182: - return emitTaggedTemplateExpression(node); + return emitNewExpression(node); case 183: - return emitTypeAssertionExpression(node); + return emitTaggedTemplateExpression(node); case 184: - return emitParenthesizedExpression(node); + return emitTypeAssertionExpression(node); case 185: - return emitFunctionExpression(node); + return emitParenthesizedExpression(node); case 186: - return emitArrowFunction(node); + return emitFunctionExpression(node); case 187: - return emitDeleteExpression(node); + return emitArrowFunction(node); case 188: - return emitTypeOfExpression(node); + return emitDeleteExpression(node); case 189: - return emitVoidExpression(node); + return emitTypeOfExpression(node); case 190: - return emitAwaitExpression(node); + return emitVoidExpression(node); case 191: - return emitPrefixUnaryExpression(node); + return emitAwaitExpression(node); case 192: - return emitPostfixUnaryExpression(node); + return emitPrefixUnaryExpression(node); case 193: - return emitBinaryExpression(node); + return emitPostfixUnaryExpression(node); case 194: - return emitConditionalExpression(node); + return emitBinaryExpression(node); case 195: - return emitTemplateExpression(node); + return emitConditionalExpression(node); case 196: - return emitYieldExpression(node); + return emitTemplateExpression(node); case 197: - return emitSpreadExpression(node); + return emitYieldExpression(node); case 198: - return emitClassExpression(node); + return emitSpreadExpression(node); case 199: + return emitClassExpression(node); + case 200: return; - case 201: - return emitAsExpression(node); case 202: - return emitNonNullExpression(node); + return emitAsExpression(node); case 203: + return emitNonNullExpression(node); + case 204: return emitMetaProperty(node); - case 248: - return emitJsxElement(node); case 249: + return emitJsxElement(node); + case 250: return emitJsxSelfClosingElement(node); - case 295: + case 296: return emitPartiallyEmittedExpression(node); } } @@ -52716,7 +52777,7 @@ var ts; emit(node.right); } function emitEntityName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -52786,7 +52847,7 @@ var ts; function emitAccessorDeclaration(node) { emitDecorators(node, node.decorators); emitModifiers(node, node.modifiers); - write(node.kind === 152 ? "get " : "set "); + write(node.kind === 153 ? "get " : "set "); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); } @@ -52965,7 +53026,7 @@ var ts; if (!(ts.getEmitFlags(node) & 65536)) { var dotRangeStart = node.expression.end; var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1; - var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd }; + var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd }; indentBeforeDot = needsIndentation(node, node.expression, dotToken); indentAfterDot = needsIndentation(node, dotToken, node.name); } @@ -52982,7 +53043,7 @@ var ts; if (ts.isNumericLiteral(expression)) { var text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(ts.tokenToString(22)) < 0; + && text.indexOf(ts.tokenToString(23)) < 0; } else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) { var constantValue = ts.getConstantValue(expression); @@ -53063,16 +53124,16 @@ var ts; } function shouldEmitWhitespaceBeforeOperand(node) { var operand = node.operand; - return operand.kind === 191 - && ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42)) - || (node.operator === 37 && (operand.operator === 37 || operand.operator === 43))); + return operand.kind === 192 + && ((node.operator === 37 && (operand.operator === 37 || operand.operator === 43)) + || (node.operator === 38 && (operand.operator === 38 || operand.operator === 44))); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand); writeTokenText(node.operator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 25; + var isCommaOperator = node.operatorToken.kind !== 26; var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); emitExpression(node.left); @@ -53140,17 +53201,17 @@ var ts; } function emitBlock(node) { if (isSingleLineEmptyBlock(node)) { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); write(" "); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } else { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); emitBlockStatements(node); increaseIndent(); emitLeadingCommentsOfPosition(node.statements.end); decreaseIndent(); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } } function emitBlockStatements(node) { @@ -53174,16 +53235,16 @@ var ts; write(";"); } function emitIfStatement(node) { - var openParenPos = writeToken(89, node.pos, node); + var openParenPos = writeToken(90, node.pos, node); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitExpression(node.expression); - writeToken(19, node.expression.end, node); + writeToken(20, node.expression.end, node); emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node); - writeToken(81, node.thenStatement.end, node); - if (node.elseStatement.kind === 210) { + writeToken(82, node.thenStatement.end, node); + if (node.elseStatement.kind === 211) { write(" "); emit(node.elseStatement); } @@ -53212,9 +53273,9 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitForBinding(node.initializer); write(";"); emitExpressionWithPrefix(" ", node.condition); @@ -53224,29 +53285,29 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" in "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); emitWithSuffix(node.awaitModifier, " "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" of "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForBinding(node) { if (node !== undefined) { - if (node.kind === 226) { + if (node.kind === 227) { emit(node); } else { @@ -53255,17 +53316,17 @@ var ts; } } function emitContinueStatement(node) { - writeToken(76, node.pos); + writeToken(77, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitBreakStatement(node) { - writeToken(71, node.pos); + writeToken(72, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitReturnStatement(node) { - writeToken(95, node.pos, node); + writeToken(96, node.pos, node); emitExpressionWithPrefix(" ", node.expression); write(";"); } @@ -53276,11 +53337,11 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - var openParenPos = writeToken(97, node.pos); + var openParenPos = writeToken(98, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); write(" "); emit(node.caseBlock); } @@ -53308,7 +53369,7 @@ var ts; } } function emitDebuggerStatement(node) { - writeToken(77, node.pos); + writeToken(78, node.pos); write(";"); } function emitVariableDeclaration(node) { @@ -53418,7 +53479,7 @@ var ts; emitBlockFunctionBody(body); } decreaseIndent(); - writeToken(17, body.statements.end, body); + writeToken(18, body.statements.end, body); } function emitBlockFunctionBodyOnSingleLine(body) { emitBlockFunctionBodyWorker(body, true); @@ -53495,7 +53556,7 @@ var ts; write(node.flags & 16 ? "namespace " : "module "); emit(node.name); var body = node.body; - while (body.kind === 232) { + while (body.kind === 233) { write("."); emit(body.name); body = body.body; @@ -53516,9 +53577,9 @@ var ts; } } function emitCaseBlock(node) { - writeToken(16, node.pos); + writeToken(17, node.pos); emitList(node, node.clauses, 65); - writeToken(17, node.clauses.end); + writeToken(18, node.clauses.end); } function emitImportEqualsDeclaration(node) { emitModifiers(node, node.modifiers); @@ -53529,7 +53590,7 @@ var ts; write(";"); } function emitModuleReference(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -53659,7 +53720,7 @@ var ts; } } function emitJsxTagName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -53696,11 +53757,11 @@ var ts; emitList(node, node.types, 272); } function emitCatchClause(node) { - var openParenPos = writeToken(73, node.pos); + var openParenPos = writeToken(74, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emit(node.variableDeclaration); - writeToken(19, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); + writeToken(20, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); write(" "); emit(node.block); } @@ -54034,7 +54095,7 @@ var ts; for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) { var line = lines_1[_a]; for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { - if (!ts.isWhiteSpace(line.charCodeAt(i))) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { if (indentation === undefined || i < indentation) { indentation = i; break; @@ -54157,7 +54218,7 @@ var ts; && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile); } function skipSynthesizedParentheses(node) { - while (node.kind === 184 && ts.nodeIsSynthesized(node)) { + while (node.kind === 185 && ts.nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -54285,23 +54346,23 @@ var ts; } function generateNameForNode(node) { switch (node.kind) { - case 70: + case 71: return makeUniqueName(getTextOfNode(node)); + case 233: case 232: - case 231: return generateNameForModuleOrEnum(node); - case 237: - case 243: + case 238: + case 244: return generateNameForImportOrExportDeclaration(node); - case 227: case 228: - case 242: + case 229: + case 243: return generateNameForExportDefault(); - case 198: + case 199: return generateNameForClassExpression(); - case 150: - case 152: + case 151: case 153: + case 154: return generateNameForMethodOrAccessor(node); default: return makeTempVariableName(0); @@ -55113,57 +55174,57 @@ var ts; return diagnostics; function walk(node) { switch (parent.kind) { - case 145: - case 148: + case 146: + case 149: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); return; } - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: - case 225: + case 228: + case 187: + case 228: + case 226: if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); return; } } switch (node.kind) { - case 236: + case 237: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return; - case 242: + case 243: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return; } break; - case 258: + case 259: var heritageClause = node; - if (heritageClause.token === 107) { + if (heritageClause.token === 108) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return; } break; - case 229: + case 230: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return; - case 232: + case 233: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return; - case 230: + case 231: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return; - case 231: + case 232: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return; - case 183: + case 184: var typeAssertionExpression = node; diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return; @@ -55178,45 +55239,45 @@ var ts; diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } switch (parent.kind) { - case 228: - case 150: - case 149: + case 229: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: + case 228: + case 187: + case 228: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return; } - case 207: + case 208: if (nodes === parent.modifiers) { - return checkModifiers(nodes, parent.kind === 207); + return checkModifiers(nodes, parent.kind === 208); } break; - case 148: + case 149: if (nodes === parent.modifiers) { for (var _i = 0, _a = nodes; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 114) { + if (modifier.kind !== 115) { diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); } } return; } break; - case 145: + case 146: if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return; } break; - case 180: case 181: - case 200: + case 182: + case 201: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); return; @@ -55232,21 +55293,21 @@ var ts; for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { var modifier = modifiers_1[_i]; switch (modifier.kind) { - case 75: + case 76: if (isConstValid) { continue; } - case 113: - case 111: + case 114: case 112: - case 130: - case 123: - case 116: + case 113: + case 131: + case 124: + case 117: diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); break; - case 114: - case 83: - case 78: + case 115: + case 84: + case 79: } } } @@ -55345,9 +55406,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { + case 238: case 237: - case 236: - case 243: + case 244: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9) { break; @@ -55359,7 +55420,7 @@ var ts; (imports || (imports = [])).push(moduleNameExpr); } break; - case 232: + case 233: if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) { var moduleName = node.name; if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { @@ -57383,34 +57444,34 @@ var ts; })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {})); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 145: - case 225: - case 175: + case 146: + case 226: + case 176: + case 149: case 148: - case 147: - case 260: case 261: - case 263: - case 150: - case 149: + case 262: + case 264: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: case 186: - case 259: - case 252: + case 187: + case 260: + case 253: return 1; - case 144: - case 229: + case 145: case 230: - case 162: - return 2; - case 228: case 231: - return 1 | 2; + case 163: + return 2; + case 229: case 232: + return 1 | 2; + case 233: if (ts.isAmbientModule(node)) { return 4 | 1; } @@ -57420,24 +57481,24 @@ var ts; else { return 4; } - case 240: case 241: - case 236: - case 237: case 242: + case 237: + case 238: case 243: + case 244: return 1 | 2 | 4; - case 264: + case 265: return 4 | 1; } return 1 | 2 | 4; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { - if (node.kind === 264) { + if (node.kind === 265) { return 1; } - else if (node.parent.kind === 242) { + else if (node.parent.kind === 243) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { @@ -57458,16 +57519,16 @@ var ts; } ts.getMeaningFromLocation = getMeaningFromLocation; function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 70); - if (node.parent.kind === 142 && + ts.Debug.assert(node.kind === 71); + if (node.parent.kind === 143 && node.parent.right === node && - node.parent.parent.kind === 236) { + node.parent.parent.kind === 237) { return 1 | 2 | 4; } return 4; } function isInRightSideOfImport(node) { - while (node.parent.kind === 142) { + while (node.parent.kind === 143) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -57478,27 +57539,27 @@ var ts; function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 142) { - while (root.parent && root.parent.kind === 142) { + if (root.parent.kind === 143) { + while (root.parent && root.parent.kind === 143) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 158 && !isLastClause; + return root.parent.kind === 159 && !isLastClause; } function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 178) { - while (root.parent && root.parent.kind === 178) { + if (root.parent.kind === 179) { + while (root.parent && root.parent.kind === 179) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 200 && root.parent.parent.kind === 258) { + if (!isLastClause && root.parent.kind === 201 && root.parent.parent.kind === 259) { var decl = root.parent.parent.parent; - return (decl.kind === 228 && root.parent.parent.token === 107) || - (decl.kind === 229 && root.parent.parent.token === 84); + return (decl.kind === 229 && root.parent.parent.token === 108) || + (decl.kind === 230 && root.parent.parent.token === 85); } return false; } @@ -57506,17 +57567,17 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 158 || - (node.parent.kind === 200 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || - (node.kind === 98 && !ts.isPartOfExpression(node)) || - node.kind === 168; + return node.parent.kind === 159 || + (node.parent.kind === 201 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + (node.kind === 99 && !ts.isPartOfExpression(node)) || + node.kind === 169; } function isCallExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 180); + return isCallOrNewExpressionTarget(node, 181); } ts.isCallExpressionTarget = isCallExpressionTarget; function isNewExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 181); + return isCallOrNewExpressionTarget(node, 182); } ts.isNewExpressionTarget = isNewExpressionTarget; function isCallOrNewExpressionTarget(node, kind) { @@ -57529,7 +57590,7 @@ var ts; ts.climbPastPropertyAccess = climbPastPropertyAccess; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 221 && referenceNode.label.text === labelName) { + if (referenceNode.kind === 222 && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -57538,14 +57599,14 @@ var ts; } ts.getTargetLabel = getTargetLabel; function isJumpStatementTarget(node) { - return node.kind === 70 && - (node.parent.kind === 217 || node.parent.kind === 216) && + return node.kind === 71 && + (node.parent.kind === 218 || node.parent.kind === 217) && node.parent.label === node; } ts.isJumpStatementTarget = isJumpStatementTarget; function isLabelOfLabeledStatement(node) { - return node.kind === 70 && - node.parent.kind === 221 && + return node.kind === 71 && + node.parent.kind === 222 && node.parent.label === node; } function isLabelName(node) { @@ -57553,38 +57614,38 @@ var ts; } ts.isLabelName = isLabelName; function isRightSideOfQualifiedName(node) { - return node.parent.kind === 142 && node.parent.right === node; + return node.parent.kind === 143 && node.parent.right === node; } ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName; function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 178 && node.parent.name === node; + return node && node.parent && node.parent.kind === 179 && node.parent.name === node; } ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess; function isNameOfModuleDeclaration(node) { - return node.parent.kind === 232 && node.parent.name === node; + return node.parent.kind === 233 && node.parent.name === node; } ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration; function isNameOfFunctionDeclaration(node) { - return node.kind === 70 && + return node.kind === 71 && ts.isFunctionLike(node.parent) && node.parent.name === node; } ts.isNameOfFunctionDeclaration = isNameOfFunctionDeclaration; function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 || node.kind === 8) { switch (node.parent.kind) { + case 149: case 148: - case 147: - case 260: - case 263: + case 261: + case 264: + case 151: case 150: - case 149: - case 152: case 153: - case 232: + case 154: + case 233: return node.parent.name === node; - case 179: + case 180: return node.parent.argumentExpression === node; - case 143: + case 144: return true; } } @@ -57628,17 +57689,17 @@ var ts; return undefined; } switch (node.kind) { - case 264: + case 265: + case 151: case 150: - case 149: - case 227: - case 185: - case 152: - case 153: case 228: + case 186: + case 153: + case 154: case 229: - case 231: + case 230: case 232: + case 233: return node; } } @@ -57646,46 +57707,46 @@ var ts; ts.getContainerNode = getContainerNode; function getNodeKind(node) { switch (node.kind) { - case 264: + case 265: return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement; - case 232: + case 233: return ts.ScriptElementKind.moduleElement; - case 228: - case 198: + case 229: + case 199: return ts.ScriptElementKind.classElement; - case 229: return ts.ScriptElementKind.interfaceElement; - case 230: return ts.ScriptElementKind.typeElement; - case 231: return ts.ScriptElementKind.enumElement; - case 225: + case 230: return ts.ScriptElementKind.interfaceElement; + case 231: return ts.ScriptElementKind.typeElement; + case 232: return ts.ScriptElementKind.enumElement; + case 226: return getKindOfVariableDeclaration(node); - case 175: + case 176: return getKindOfVariableDeclaration(ts.getRootDeclaration(node)); + case 187: + case 228: case 186: - case 227: - case 185: return ts.ScriptElementKind.functionElement; - case 152: return ts.ScriptElementKind.memberGetAccessorElement; - case 153: return ts.ScriptElementKind.memberSetAccessorElement; + case 153: return ts.ScriptElementKind.memberGetAccessorElement; + case 154: return ts.ScriptElementKind.memberSetAccessorElement; + case 151: case 150: - case 149: return ts.ScriptElementKind.memberFunctionElement; + case 149: case 148: - case 147: return ts.ScriptElementKind.memberVariableElement; - case 156: return ts.ScriptElementKind.indexSignatureElement; - case 155: return ts.ScriptElementKind.constructSignatureElement; - case 154: return ts.ScriptElementKind.callSignatureElement; - case 151: return ts.ScriptElementKind.constructorImplementationElement; - case 144: return ts.ScriptElementKind.typeParameterElement; - case 263: return ts.ScriptElementKind.enumMemberElement; - case 145: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; - case 236: - case 241: - case 238: - case 245: + case 157: return ts.ScriptElementKind.indexSignatureElement; + case 156: return ts.ScriptElementKind.constructSignatureElement; + case 155: return ts.ScriptElementKind.callSignatureElement; + case 152: return ts.ScriptElementKind.constructorImplementationElement; + case 145: return ts.ScriptElementKind.typeParameterElement; + case 264: return ts.ScriptElementKind.enumMemberElement; + case 146: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; + case 237: + case 242: case 239: + case 246: + case 240: return ts.ScriptElementKind.alias; - case 289: + case 290: return ts.ScriptElementKind.typeElement; default: return ts.ScriptElementKind.unknown; @@ -57701,10 +57762,10 @@ var ts; ts.getNodeKind = getNodeKind; function isThis(node) { switch (node.kind) { - case 98: + case 99: return true; - case 70: - return ts.identifierIsThisKeyword(node) && node.parent.kind === 145; + case 71: + return ts.identifierIsThisKeyword(node) && node.parent.kind === 146; default: return false; } @@ -57748,107 +57809,107 @@ var ts; return false; } switch (n.kind) { - case 228: case 229: - case 231: - case 177: - case 173: - case 162: - case 206: - case 233: + case 230: + case 232: + case 178: + case 174: + case 163: + case 207: case 234: - case 240: - case 244: - return nodeEndsWith(n, 17, sourceFile); - case 259: + case 235: + case 241: + case 245: + return nodeEndsWith(n, 18, sourceFile); + case 260: return isCompletedNode(n.block, sourceFile); - case 181: + case 182: if (!n.arguments) { return true; } - case 180: - case 184: - case 167: - return nodeEndsWith(n, 19, sourceFile); - case 159: + case 181: + case 185: + case 168: + return nodeEndsWith(n, 20, sourceFile); case 160: + case 161: return isCompletedNode(n.type, sourceFile); - case 151: case 152: case 153: - case 227: - case 185: - case 150: - case 149: - case 155: case 154: + case 228: case 186: + case 151: + case 150: + case 156: + case 155: + case 187: if (n.body) { return isCompletedNode(n.body, sourceFile); } if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 19, sourceFile); - case 232: + return hasChildOfKind(n, 20, sourceFile); + case 233: return n.body && isCompletedNode(n.body, sourceFile); - case 210: + case 211: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 209: + case 210: return isCompletedNode(n.expression, sourceFile) || - hasChildOfKind(n, 24); - case 176: - case 174: - case 179: - case 143: - case 164: - return nodeEndsWith(n, 21, sourceFile); - case 156: + hasChildOfKind(n, 25); + case 177: + case 175: + case 180: + case 144: + case 165: + return nodeEndsWith(n, 22, sourceFile); + case 157: if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 21, sourceFile); - case 256: + return hasChildOfKind(n, 22, sourceFile); case 257: + case 258: return false; - case 213: case 214: case 215: - case 212: + case 216: + case 213: return isCompletedNode(n.statement, sourceFile); - case 211: - var hasWhileKeyword = findChildOfKind(n, 105, sourceFile); + case 212: + var hasWhileKeyword = findChildOfKind(n, 106, sourceFile); if (hasWhileKeyword) { - return nodeEndsWith(n, 19, sourceFile); + return nodeEndsWith(n, 20, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 161: + case 162: return isCompletedNode(n.exprName, sourceFile); - case 188: - case 187: case 189: - case 196: + case 188: + case 190: case 197: + case 198: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 182: + case 183: return isCompletedNode(n.template, sourceFile); - case 195: + case 196: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 204: + case 205: return ts.nodeIsPresent(n.literal); - case 243: - case 237: + case 244: + case 238: return ts.nodeIsPresent(n.moduleSpecifier); - case 191: + case 192: return isCompletedNode(n.operand, sourceFile); - case 193: - return isCompletedNode(n.right, sourceFile); case 194: + return isCompletedNode(n.right, sourceFile); + case 195: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -57862,7 +57923,7 @@ var ts; if (last.kind === expectedLastToken) { return true; } - else if (last.kind === 24 && children.length !== 1) { + else if (last.kind === 25 && children.length !== 1) { return children[children.length - 2].kind === expectedLastToken; } } @@ -57891,7 +57952,7 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 293 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 294 && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -58026,7 +58087,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 264); + ts.Debug.assert(startNode !== undefined || n.kind === 265); if (children.length) { var candidate = findRightmostChildNodeWithTokens(children, children.length); return candidate && findRightmostToken(candidate); @@ -58068,16 +58129,16 @@ var ts; if (token.kind === 10) { return true; } - if (token.kind === 26 && token.parent.kind === 10) { + if (token.kind === 27 && token.parent.kind === 10) { return true; } - if (token.kind === 26 && token.parent.kind === 255) { + if (token.kind === 27 && token.parent.kind === 256) { return true; } - if (token && token.kind === 17 && token.parent.kind === 255) { + if (token && token.kind === 18 && token.parent.kind === 256) { return true; } - if (token.kind === 26 && token.parent.kind === 251) { + if (token.kind === 27 && token.parent.kind === 252) { return true; } return false; @@ -58116,9 +58177,9 @@ var ts; var node = ts.getTokenAtPosition(sourceFile, position); if (ts.isToken(node)) { switch (node.kind) { - case 103: - case 109: - case 75: + case 104: + case 110: + case 76: node = node.parent === undefined ? undefined : node.parent.parent; break; default: @@ -58168,17 +58229,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 158 || node.kind === 180) { + if (node.kind === 159 || node.kind === 181) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 228 || node.kind === 229) { + if (ts.isFunctionLike(node) || node.kind === 229 || node.kind === 230) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isWord(kind) { - return kind === 70 || ts.isKeyword(kind); + return kind === 71 || ts.isKeyword(kind); } ts.isWord = isWord; function isPropertyName(kind) { @@ -58190,7 +58251,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 - || kind === 11 + || kind === 12 || ts.isTemplateLiteralKind(kind)) { return true; } @@ -58198,7 +58259,7 @@ var ts; } ts.isStringOrRegularExpressionOrTemplateLiteral = isStringOrRegularExpressionOrTemplateLiteral; function isPunctuation(kind) { - return 16 <= kind && kind <= 69; + return 17 <= kind && kind <= 70; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { @@ -58208,9 +58269,9 @@ var ts; ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function isAccessibilityModifier(kind) { switch (kind) { - case 113: - case 111: + case 114: case 112: + case 113: return true; } return false; @@ -58233,18 +58294,18 @@ var ts; } ts.compareDataObjects = compareDataObjects; function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 176 || - node.kind === 177) { - if (node.parent.kind === 193 && + if (node.kind === 177 || + node.kind === 178) { + if (node.parent.kind === 194 && node.parent.left === node && - node.parent.operatorToken.kind === 57) { + node.parent.operatorToken.kind === 58) { return true; } - if (node.parent.kind === 215 && + if (node.parent.kind === 216 && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 261 ? node.parent.parent : node.parent)) { return true; } } @@ -58278,14 +58339,14 @@ var ts; ts.createTextSpanFromNode = createTextSpanFromNode; function isTypeKeyword(kind) { switch (kind) { - case 118: - case 121: - case 129: - case 132: + case 119: + case 122: + case 130: case 133: - case 135: + case 134: case 136: - case 104: + case 137: + case 105: return true; default: return false; @@ -58308,7 +58369,7 @@ var ts; })(ts || (ts = {})); (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 146; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -58481,7 +58542,7 @@ var ts; } ts.signatureToDisplayParts = signatureToDisplayParts; function getDeclaredName(typeChecker, symbol, location) { - if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143) { + if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 144) { return location.text; } var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol); @@ -58490,7 +58551,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 241 || location.parent.kind === 245) && + (location.parent.kind === 242 || location.parent.kind === 246) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -58547,7 +58608,7 @@ var ts; } ts.sanitizeConfigFile = sanitizeConfigFile; function getFirstNonSpaceCharacterPosition(text, position) { - while (ts.isWhiteSpace(text.charCodeAt(position))) { + while (ts.isWhiteSpaceLike(text.charCodeAt(position))) { position += 1; } return position; @@ -58609,176 +58670,176 @@ var ts; function spanInNode(node) { if (node) { switch (node.kind) { - case 207: + case 208: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 225: + case 226: + case 149: case 148: - case 147: return spanInVariableDeclaration(node); - case 145: + case 146: return spanInParameterDeclaration(node); - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: - case 151: - case 185: + case 154: + case 152: case 186: + case 187: return spanInFunctionDeclaration(node); - case 206: + case 207: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 233: + case 234: return spanInBlock(node); - case 259: + case 260: return spanInBlock(node.block); - case 209: + case 210: return textSpan(node.expression); - case 218: + case 219: return textSpan(node.getChildAt(0), node.expression); - case 212: + case 213: return textSpanEndingAtNextToken(node, node.expression); - case 211: + case 212: return spanInNode(node.statement); - case 224: + case 225: return textSpan(node.getChildAt(0)); - case 210: + case 211: return textSpanEndingAtNextToken(node, node.expression); - case 221: + case 222: return spanInNode(node.statement); + case 218: case 217: - case 216: return textSpan(node.getChildAt(0), node.label); - case 213: - return spanInForStatement(node); case 214: - return textSpanEndingAtNextToken(node, node.expression); + return spanInForStatement(node); case 215: + return textSpanEndingAtNextToken(node, node.expression); + case 216: return spanInInitializerOfForLike(node); - case 220: + case 221: return textSpanEndingAtNextToken(node, node.expression); - case 256: case 257: + case 258: return spanInNode(node.statements[0]); - case 223: + case 224: return spanInBlock(node.tryBlock); - case 222: + case 223: return textSpan(node, node.expression); - case 242: + case 243: return textSpan(node, node.expression); - case 236: - return textSpan(node, node.moduleReference); case 237: + return textSpan(node, node.moduleReference); + case 238: return textSpan(node, node.moduleSpecifier); - case 243: + case 244: return textSpan(node, node.moduleSpecifier); - case 232: + case 233: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } - case 228: - case 231: - case 263: - case 175: + case 229: + case 232: + case 264: + case 176: return textSpan(node); - case 219: + case 220: return spanInNode(node.statement); - case 146: + case 147: return spanInNodeArray(node.parent.decorators); - case 173: case 174: + case 175: return spanInBindingPattern(node); - case 229: case 230: + case 231: return undefined; - case 24: + case 25: case 1: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 25: + case 26: return spanInPreviousNode(node); - case 16: - return spanInOpenBraceToken(node); case 17: + return spanInOpenBraceToken(node); + case 18: return spanInCloseBraceToken(node); - case 21: + case 22: return spanInCloseBracketToken(node); - case 18: - return spanInOpenParenToken(node); case 19: + return spanInOpenParenToken(node); + case 20: return spanInCloseParenToken(node); - case 55: + case 56: return spanInColonToken(node); - case 28: - case 26: + case 29: + case 27: return spanInGreaterThanOrLessThanToken(node); - case 105: + case 106: return spanInWhileKeyword(node); - case 81: - case 73: - case 86: + case 82: + case 74: + case 87: return spanInNextNode(node); - case 141: + case 142: return spanInOfKeyword(node); default: if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 70 || - node.kind === 197 || - node.kind === 260 || - node.kind === 261) && + if ((node.kind === 71 || + node.kind === 198 || + node.kind === 261 || + node.kind === 262) && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } - if (node.kind === 193) { + if (node.kind === 194) { var binaryExpression = node; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); } - if (binaryExpression.operatorToken.kind === 57 && + if (binaryExpression.operatorToken.kind === 58 && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { return textSpan(node); } - if (binaryExpression.operatorToken.kind === 25) { + if (binaryExpression.operatorToken.kind === 26) { return spanInNode(binaryExpression.left); } } if (ts.isPartOfExpression(node)) { switch (node.parent.kind) { - case 211: + case 212: return spanInPreviousNode(node); - case 146: + case 147: return spanInNode(node.parent); - case 213: - case 215: + case 214: + case 216: return textSpan(node); - case 193: - if (node.parent.operatorToken.kind === 25) { + case 194: + if (node.parent.operatorToken.kind === 26) { return textSpan(node); } break; - case 186: + case 187: if (node.parent.body === node) { return textSpan(node); } break; } } - if (node.parent.kind === 260 && + if (node.parent.kind === 261 && node.parent.name === node && !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } - if (node.parent.kind === 183 && node.parent.type === node) { + if (node.parent.kind === 184 && node.parent.type === node) { return spanInNextNode(node.parent.type); } if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } - if ((node.parent.kind === 225 || - node.parent.kind === 145)) { + if ((node.parent.kind === 226 || + node.parent.kind === 146)) { var paramOrVarDecl = node.parent; if (paramOrVarDecl.initializer === node || paramOrVarDecl.type === node || @@ -58786,7 +58847,7 @@ var ts; return spanInPreviousNode(node); } } - if (node.parent.kind === 193) { + if (node.parent.kind === 194) { var binaryExpression = node.parent; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && (binaryExpression.right === node || @@ -58798,7 +58859,7 @@ var ts; } } function textSpanFromVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.kind === 226 && + if (variableDeclaration.parent.kind === 227 && variableDeclaration.parent.declarations[0] === variableDeclaration) { return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); } @@ -58807,7 +58868,7 @@ var ts; } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 214) { + if (variableDeclaration.parent.parent.kind === 215) { return spanInNode(variableDeclaration.parent.parent); } if (ts.isBindingPattern(variableDeclaration.name)) { @@ -58815,10 +58876,10 @@ var ts; } if (variableDeclaration.initializer || ts.hasModifier(variableDeclaration, 1) || - variableDeclaration.parent.parent.kind === 215) { + variableDeclaration.parent.parent.kind === 216) { return textSpanFromVariableDeclaration(variableDeclaration); } - if (variableDeclaration.parent.kind === 226 && + if (variableDeclaration.parent.kind === 227 && variableDeclaration.parent.declarations[0] !== variableDeclaration) { return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } @@ -58847,7 +58908,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return ts.hasModifier(functionDeclaration, 1) || - (functionDeclaration.parent.kind === 228 && functionDeclaration.kind !== 151); + (functionDeclaration.parent.kind === 229 && functionDeclaration.kind !== 152); } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -58867,22 +58928,22 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 232: + case 233: if (ts.getModuleInstanceState(block.parent) !== 1) { return undefined; } - case 212: - case 210: - case 214: - return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); case 213: + case 211: case 215: + return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); + case 214: + case 216: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 226) { + if (forLikeStatement.initializer.kind === 227) { var variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -58904,62 +58965,62 @@ var ts; } } function spanInBindingPattern(bindingPattern) { - var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 ? element : undefined; }); + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 200 ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 175) { + if (bindingPattern.parent.kind === 176) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { - ts.Debug.assert(node.kind !== 174 && node.kind !== 173); - var elements = node.kind === 176 ? + ts.Debug.assert(node.kind !== 175 && node.kind !== 174); + var elements = node.kind === 177 ? node.elements : node.properties; - var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 ? element : undefined; }); + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 200 ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node.parent.kind === 193 ? node.parent : node); + return textSpan(node.parent.kind === 194 ? node.parent : node); } function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 231: + case 232: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 228: + case 229: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 234: + case 235: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 233: + case 234: if (ts.getModuleInstanceState(node.parent.parent) !== 1) { return undefined; } - case 231: - case 228: + case 232: + case 229: return textSpan(node); - case 206: + case 207: if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 259: + case 260: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 234: + case 235: var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; - case 173: + case 174: var bindingPattern = node.parent; return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -58972,7 +59033,7 @@ var ts; } function spanInCloseBracketToken(node) { switch (node.parent.kind) { - case 174: + case 175: var bindingPattern = node.parent; return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -58984,33 +59045,33 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 211 || - node.parent.kind === 180 || - node.parent.kind === 181) { + if (node.parent.kind === 212 || + node.parent.kind === 181 || + node.parent.kind === 182) { return spanInPreviousNode(node); } - if (node.parent.kind === 184) { + if (node.parent.kind === 185) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInCloseParenToken(node) { switch (node.parent.kind) { - case 185: - case 227: case 186: + case 228: + case 187: + case 151: case 150: - case 149: - case 152: case 153: - case 151: - case 212: - case 211: + case 154: + case 152: case 213: - case 215: - case 180: + case 212: + case 214: + case 216: case 181: - case 184: + case 182: + case 185: return spanInPreviousNode(node); default: return spanInNode(node.parent); @@ -59018,26 +59079,26 @@ var ts; } function spanInColonToken(node) { if (ts.isFunctionLike(node.parent) || - node.parent.kind === 260 || - node.parent.kind === 145) { + node.parent.kind === 261 || + node.parent.kind === 146) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 183) { + if (node.parent.kind === 184) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 211) { + if (node.parent.kind === 212) { return textSpanEndingAtNextToken(node, node.parent.expression); } return spanInNode(node.parent); } function spanInOfKeyword(node) { - if (node.parent.kind === 215) { + if (node.parent.kind === 216) { return spanInNextNode(node); } return spanInNode(node.parent); @@ -59052,25 +59113,25 @@ var ts; function createClassifier() { var scanner = ts.createScanner(5, false); var noRegexTable = []; - noRegexTable[70] = true; + noRegexTable[71] = true; noRegexTable[9] = true; noRegexTable[8] = true; - noRegexTable[11] = true; - noRegexTable[98] = true; - noRegexTable[42] = true; + noRegexTable[12] = true; + noRegexTable[99] = true; noRegexTable[43] = true; - noRegexTable[19] = true; - noRegexTable[21] = true; - noRegexTable[17] = true; - noRegexTable[100] = true; - noRegexTable[85] = true; + noRegexTable[44] = true; + noRegexTable[20] = true; + noRegexTable[22] = true; + noRegexTable[18] = true; + noRegexTable[101] = true; + noRegexTable[86] = true; var templateStack = []; function canFollow(keyword1, keyword2) { if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 124 || - keyword2 === 134 || - keyword2 === 122 || - keyword2 === 114) { + if (keyword2 === 125 || + keyword2 === 135 || + keyword2 === 123 || + keyword2 === 115) { return true; } return false; @@ -59153,7 +59214,7 @@ var ts; text = "}\n" + text; offset = 2; case 6: - templateStack.push(13); + templateStack.push(14); break; } scanner.setText(text); @@ -59165,55 +59226,55 @@ var ts; do { token = scanner.scan(); if (!ts.isTrivia(token)) { - if ((token === 40 || token === 62) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 11) { - token = 11; + if ((token === 41 || token === 63) && !noRegexTable[lastNonTriviaToken]) { + if (scanner.reScanSlashToken() === 12) { + token = 12; } } - else if (lastNonTriviaToken === 22 && isKeyword(token)) { - token = 70; + else if (lastNonTriviaToken === 23 && isKeyword(token)) { + token = 71; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - token = 70; + token = 71; } - else if (lastNonTriviaToken === 70 && - token === 26) { + else if (lastNonTriviaToken === 71 && + token === 27) { angleBracketStack++; } - else if (token === 28 && angleBracketStack > 0) { + else if (token === 29 && angleBracketStack > 0) { angleBracketStack--; } - else if (token === 118 || - token === 135 || - token === 132 || - token === 121 || - token === 136) { + else if (token === 119 || + token === 136 || + token === 133 || + token === 122 || + token === 137) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - token = 70; + token = 71; } } - else if (token === 13) { + else if (token === 14) { templateStack.push(token); } - else if (token === 16) { + else if (token === 17) { if (templateStack.length > 0) { templateStack.push(token); } } - else if (token === 17) { + else if (token === 18) { if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 13) { + if (lastTemplateStackToken === 14) { token = scanner.reScanTemplateToken(); - if (token === 15) { + if (token === 16) { templateStack.pop(); } else { - ts.Debug.assert(token === 14, "Should have been a template middle. Was " + token); + ts.Debug.assert(token === 15, "Should have been a template middle. Was " + token); } } else { - ts.Debug.assert(lastTemplateStackToken === 16, "Should have been an open brace. Was: " + token); + ts.Debug.assert(lastTemplateStackToken === 17, "Should have been an open brace. Was: " + token); templateStack.pop(); } } @@ -59251,10 +59312,10 @@ var ts; } else if (ts.isTemplateLiteralKind(token)) { if (scanner.isUnterminated()) { - if (token === 15) { + if (token === 16) { result.endOfLineState = 5; } - else if (token === 12) { + else if (token === 13) { result.endOfLineState = 4; } else { @@ -59262,7 +59323,7 @@ var ts; } } } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 13) { + else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 14) { result.endOfLineState = 6; } } @@ -59286,43 +59347,43 @@ var ts; } function isBinaryExpressionOperatorToken(token) { switch (token) { - case 38: - case 40: + case 39: case 41: - case 36: + case 42: case 37: - case 44: + case 38: case 45: case 46: - case 26: - case 28: + case 47: + case 27: case 29: case 30: - case 92: - case 91: - case 117: case 31: + case 93: + case 92: + case 118: case 32: case 33: case 34: - case 47: - case 49: + case 35: case 48: - case 52: + case 50: + case 49: case 53: - case 68: - case 67: + case 54: case 69: - case 64: + case 68: + case 70: case 65: case 66: - case 58: + case 67: case 59: case 60: - case 62: + case 61: case 63: - case 57: - case 25: + case 64: + case 58: + case 26: return true; default: return false; @@ -59330,19 +59391,19 @@ var ts; } function isPrefixUnaryExpressionOperatorToken(token) { switch (token) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 42: case 43: + case 44: return true; default: return false; } } function isKeyword(token) { - return token >= 71 && token <= 141; + return token >= 72 && token <= 142; } function classFromKind(token) { if (isKeyword(token)) { @@ -59351,7 +59412,7 @@ var ts; else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { return 5; } - else if (token >= 16 && token <= 69) { + else if (token >= 17 && token <= 70) { return 10; } switch (token) { @@ -59359,7 +59420,7 @@ var ts; return 4; case 9: return 6; - case 11: + case 12: return 7; case 7: case 3: @@ -59368,7 +59429,7 @@ var ts; case 5: case 4: return 8; - case 70: + case 71: default: if (ts.isTemplateLiteralKind(token)) { return 6; @@ -59388,10 +59449,10 @@ var ts; ts.getSemanticClassifications = getSemanticClassifications; function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 232: - case 228: + case 233: case 229: - case 227: + case 230: + case 228: cancellationToken.throwIfCancellationRequested(); } } @@ -59435,7 +59496,7 @@ var ts; return undefined; function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 232 && + return declaration.kind === 233 && ts.getModuleInstanceState(declaration) === 1; }); } @@ -59444,7 +59505,7 @@ var ts; if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { var kind = node.kind; checkForClassificationCancellation(cancellationToken, kind); - if (kind === 70 && !ts.nodeIsMissing(node)) { + if (kind === 71 && !ts.nodeIsMissing(node)) { var identifier = node; if (classifiableNames.get(identifier.text)) { var symbol = typeChecker.getSymbolAtLocation(node); @@ -59576,16 +59637,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18); pos = tag.tagName.end; switch (tag.kind) { - case 285: + case 286: processJSDocParameterTag(tag); break; - case 288: + case 289: processJSDocTemplateTag(tag); break; - case 287: + case 288: processElement(tag.typeExpression); break; - case 286: + case 287: processElement(tag.typeExpression); break; } @@ -59666,22 +59727,22 @@ var ts; } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 250: + case 251: if (token.parent.tagName === token) { return 19; } break; - case 251: + case 252: if (token.parent.tagName === token) { return 20; } break; - case 249: + case 250: if (token.parent.tagName === token) { return 21; } break; - case 252: + case 253: if (token.parent.name === token) { return 22; } @@ -59693,25 +59754,25 @@ var ts; if (ts.isKeyword(tokenKind)) { return 3; } - if (tokenKind === 26 || tokenKind === 28) { + if (tokenKind === 27 || tokenKind === 29) { if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { return 10; } } if (ts.isPunctuation(tokenKind)) { if (token) { - if (tokenKind === 57) { - if (token.parent.kind === 225 || - token.parent.kind === 148 || - token.parent.kind === 145 || - token.parent.kind === 252) { + if (tokenKind === 58) { + if (token.parent.kind === 226 || + token.parent.kind === 149 || + token.parent.kind === 146 || + token.parent.kind === 253) { return 5; } } - if (token.parent.kind === 193 || - token.parent.kind === 191 || + if (token.parent.kind === 194 || token.parent.kind === 192 || - token.parent.kind === 194) { + token.parent.kind === 193 || + token.parent.kind === 195) { return 5; } } @@ -59721,9 +59782,9 @@ var ts; return 4; } else if (tokenKind === 9) { - return token.parent.kind === 252 ? 24 : 6; + return token.parent.kind === 253 ? 24 : 6; } - else if (tokenKind === 11) { + else if (tokenKind === 12) { return 6; } else if (ts.isTemplateLiteralKind(tokenKind)) { @@ -59732,35 +59793,35 @@ var ts; else if (tokenKind === 10) { return 23; } - else if (tokenKind === 70) { + else if (tokenKind === 71) { if (token) { switch (token.parent.kind) { - case 228: + case 229: if (token.parent.name === token) { return 11; } return; - case 144: + case 145: if (token.parent.name === token) { return 15; } return; - case 229: + case 230: if (token.parent.name === token) { return 13; } return; - case 231: + case 232: if (token.parent.name === token) { return 12; } return; - case 232: + case 233: if (token.parent.name === token) { return 14; } return; - case 145: + case 146: if (token.parent.name === token) { return ts.isThisIdentifier(token) ? 3 : 17; } @@ -60224,7 +60285,7 @@ var ts; else { if (!symbols || symbols.length === 0) { if (sourceFile.languageVariant === 1 && - location.parent && location.parent.kind === 251) { + location.parent && location.parent.kind === 252) { var tagName = location.parent.parent.openingElement.tagName; entries.push({ name: tagName.text, @@ -60304,15 +60365,15 @@ var ts; if (!node || node.kind !== 9) { return undefined; } - if (node.parent.kind === 260 && - node.parent.parent.kind === 177 && + if (node.parent.kind === 261 && + node.parent.parent.kind === 178 && node.parent.name === node) { return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log); } else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) { return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log); } - else if (node.parent.kind === 237 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) { + else if (node.parent.kind === 238 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) { return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker); } else if (isEqualityExpression(node.parent)) { @@ -60462,9 +60523,9 @@ var ts; requestJsDocTagName = true; } switch (tag.kind) { - case 287: - case 285: + case 288: case 286: + case 287: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -60500,12 +60561,12 @@ var ts; return undefined; } var parent = contextToken.parent; - if (contextToken.kind === 22) { - if (parent.kind === 178) { + if (contextToken.kind === 23) { + if (parent.kind === 179) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent.kind === 142) { + else if (parent.kind === 143) { node = contextToken.parent.left; isRightOfDot = true; } @@ -60514,25 +60575,25 @@ var ts; } } else if (sourceFile.languageVariant === 1) { - if (parent && parent.kind === 178) { + if (parent && parent.kind === 179) { contextToken = parent; parent = parent.parent; } switch (parent.kind) { - case 251: - if (contextToken.kind === 40) { + case 252: + if (contextToken.kind === 41) { isStartingCloseTag = true; location = contextToken; } break; - case 193: + case 194: if (!(parent.left.flags & 32768)) { break; } - case 249: - case 248: case 250: - if (contextToken.kind === 26) { + case 249: + case 251: + if (contextToken.kind === 27) { isRightOfOpenTag = true; location = contextToken; } @@ -60579,7 +60640,7 @@ var ts; isGlobalCompletion = false; isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 70 || node.kind === 142 || node.kind === 178) { + if (node.kind === 71 || node.kind === 143 || node.kind === 179) { var symbol = typeChecker.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { symbol = typeChecker.getAliasedSymbol(symbol); @@ -60625,7 +60686,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType = void 0; - if ((jsxContainer.kind === 249) || (jsxContainer.kind === 250)) { + if ((jsxContainer.kind === 250) || (jsxContainer.kind === 251)) { attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer); if (attrsType) { symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties); @@ -60646,9 +60707,9 @@ var ts; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; if (scopeNode) { isGlobalCompletion = - scopeNode.kind === 264 || - scopeNode.kind === 195 || - scopeNode.kind === 255 || + scopeNode.kind === 265 || + scopeNode.kind === 196 || + scopeNode.kind === 256 || ts.isStatement(scopeNode); } var symbolMeanings = 793064 | 107455 | 1920 | 8388608; @@ -60675,12 +60736,12 @@ var ts; if (contextToken.kind === 10) { return true; } - if (contextToken.kind === 28 && contextToken.parent) { - if (contextToken.parent.kind === 250) { + if (contextToken.kind === 29 && contextToken.parent) { + if (contextToken.parent.kind === 251) { return true; } - if (contextToken.parent.kind === 251 || contextToken.parent.kind === 249) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 248; + if (contextToken.parent.kind === 252 || contextToken.parent.kind === 250) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 249; } } return false; @@ -60689,41 +60750,41 @@ var ts; if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { - case 25: - return containingNodeKind === 180 - || containingNodeKind === 151 - || containingNodeKind === 181 - || containingNodeKind === 176 - || containingNodeKind === 193 - || containingNodeKind === 159; - case 18: - return containingNodeKind === 180 - || containingNodeKind === 151 - || containingNodeKind === 181 - || containingNodeKind === 184 - || containingNodeKind === 167; - case 20: - return containingNodeKind === 176 - || containingNodeKind === 156 - || containingNodeKind === 143; - case 127: + case 26: + return containingNodeKind === 181 + || containingNodeKind === 152 + || containingNodeKind === 182 + || containingNodeKind === 177 + || containingNodeKind === 194 + || containingNodeKind === 160; + case 19: + return containingNodeKind === 181 + || containingNodeKind === 152 + || containingNodeKind === 182 + || containingNodeKind === 185 + || containingNodeKind === 168; + case 21: + return containingNodeKind === 177 + || containingNodeKind === 157 + || containingNodeKind === 144; case 128: + case 129: return true; - case 22: - return containingNodeKind === 232; - case 16: - return containingNodeKind === 228; - case 57: - return containingNodeKind === 225 - || containingNodeKind === 193; - case 13: - return containingNodeKind === 195; + case 23: + return containingNodeKind === 233; + case 17: + return containingNodeKind === 229; + case 58: + return containingNodeKind === 226 + || containingNodeKind === 194; case 14: - return containingNodeKind === 204; - case 113: - case 111: + return containingNodeKind === 196; + case 15: + return containingNodeKind === 205; + case 114: case 112: - return containingNodeKind === 148; + case 113: + return containingNodeKind === 149; } switch (previousToken.getText()) { case "public": @@ -60736,7 +60797,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 - || contextToken.kind === 11 + || contextToken.kind === 12 || ts.isTemplateLiteralKind(contextToken.kind)) { var start_3 = contextToken.getStart(); var end = contextToken.getEnd(); @@ -60745,7 +60806,7 @@ var ts; } if (position === end) { return !!contextToken.isUnterminated - || contextToken.kind === 11; + || contextToken.kind === 12; } } return false; @@ -60754,22 +60815,22 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 177) { + if (objectLikeContainer.kind === 178) { isNewIdentifierLocation = true; typeForObject = typeChecker.getContextualType(objectLikeContainer); typeForObject = typeForObject && typeForObject.getNonNullableType(); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 173) { + else if (objectLikeContainer.kind === 174) { isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); if (ts.isVariableLike(rootDeclaration)) { var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type); - if (!canGetType && rootDeclaration.kind === 145) { + if (!canGetType && rootDeclaration.kind === 146) { if (ts.isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); } - else if (rootDeclaration.parent.kind === 150 || rootDeclaration.parent.kind === 153) { + else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) { canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -60795,9 +60856,9 @@ var ts; return true; } function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 240 ? - 237 : - 243; + var declarationKind = namedImportsOrExports.kind === 241 ? + 238 : + 244; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -60817,10 +60878,10 @@ var ts; function tryGetObjectLikeCompletionContainer(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16: - case 25: + case 17: + case 26: var parent = contextToken.parent; - if (parent && (parent.kind === 177 || parent.kind === 173)) { + if (parent && (parent.kind === 178 || parent.kind === 174)) { return parent; } break; @@ -60831,11 +60892,11 @@ var ts; function tryGetNamedImportsOrExportsForCompletion(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16: - case 25: + case 17: + case 26: switch (contextToken.parent.kind) { - case 240: - case 244: + case 241: + case 245: return contextToken.parent; } } @@ -60846,32 +60907,32 @@ var ts; if (contextToken) { var parent = contextToken.parent; switch (contextToken.kind) { - case 27: - case 40: - case 70: - case 178: - case 253: - case 252: + case 28: + case 41: + case 71: + case 179: case 254: - if (parent && (parent.kind === 249 || parent.kind === 250)) { + case 253: + case 255: + if (parent && (parent.kind === 250 || parent.kind === 251)) { return parent; } - else if (parent.kind === 252) { + else if (parent.kind === 253) { return parent.parent.parent; } break; case 9: - if (parent && ((parent.kind === 252) || (parent.kind === 254))) { + if (parent && ((parent.kind === 253) || (parent.kind === 255))) { return parent.parent.parent; } break; - case 17: + case 18: if (parent && - parent.kind === 255 && - parent.parent && parent.parent.kind === 252) { + parent.kind === 256 && + parent.parent && parent.parent.kind === 253) { return parent.parent.parent.parent; } - if (parent && parent.kind === 254) { + if (parent && parent.kind === 255) { return parent.parent.parent; } break; @@ -60884,9 +60945,9 @@ var ts; return false; } switch (kind) { - case 151: + case 152: + case 161: case 160: - case 159: return false; default: return true; @@ -60895,67 +60956,67 @@ var ts; function isSolelyIdentifierDefinitionLocation(contextToken) { var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { - case 25: - return containingNodeKind === 225 || - containingNodeKind === 226 || - containingNodeKind === 207 || - containingNodeKind === 231 || + case 26: + return containingNodeKind === 226 || + containingNodeKind === 227 || + containingNodeKind === 208 || + containingNodeKind === 232 || isFunction(containingNodeKind) || - containingNodeKind === 228 || - containingNodeKind === 198 || containingNodeKind === 229 || - containingNodeKind === 174 || - containingNodeKind === 230; - case 22: - return containingNodeKind === 174; - case 55: + containingNodeKind === 199 || + containingNodeKind === 230 || + containingNodeKind === 175 || + containingNodeKind === 231; + case 23: return containingNodeKind === 175; - case 20: - return containingNodeKind === 174; - case 18: - return containingNodeKind === 259 || + case 56: + return containingNodeKind === 176; + case 21: + return containingNodeKind === 175; + case 19: + return containingNodeKind === 260 || isFunction(containingNodeKind); - case 16: - return containingNodeKind === 231 || - containingNodeKind === 229 || - containingNodeKind === 162; - case 24: - return containingNodeKind === 147 && + case 17: + return containingNodeKind === 232 || + containingNodeKind === 230 || + containingNodeKind === 163; + case 25: + return containingNodeKind === 148 && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 229 || - contextToken.parent.parent.kind === 162); - case 26: - return containingNodeKind === 228 || - containingNodeKind === 198 || - containingNodeKind === 229 || + (contextToken.parent.parent.kind === 230 || + contextToken.parent.parent.kind === 163); + case 27: + return containingNodeKind === 229 || + containingNodeKind === 199 || containingNodeKind === 230 || + containingNodeKind === 231 || isFunction(containingNodeKind); - case 114: - return containingNodeKind === 148; - case 23: - return containingNodeKind === 145 || + case 115: + return containingNodeKind === 149; + case 24: + return containingNodeKind === 146 || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 174); - case 113: - case 111: + contextToken.parent.parent.kind === 175); + case 114: case 112: - return containingNodeKind === 145; - case 117: - return containingNodeKind === 241 || - containingNodeKind === 245 || - containingNodeKind === 239; - case 74: - case 82: - case 108: - case 88: - case 103: - case 124: - case 134: - case 90: - case 109: + case 113: + return containingNodeKind === 146; + case 118: + return containingNodeKind === 242 || + containingNodeKind === 246 || + containingNodeKind === 240; case 75: - case 115: - case 137: + case 83: + case 109: + case 89: + case 104: + case 125: + case 135: + case 91: + case 110: + case 76: + case 116: + case 138: return true; } switch (contextToken.getText()) { @@ -61007,20 +61068,20 @@ var ts; var existingMemberNames = ts.createMap(); for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; - if (m.kind !== 260 && - m.kind !== 261 && - m.kind !== 175 && - m.kind !== 150 && - m.kind !== 152 && - m.kind !== 153) { + if (m.kind !== 261 && + m.kind !== 262 && + m.kind !== 176 && + m.kind !== 151 && + m.kind !== 153 && + m.kind !== 154) { continue; } if (m.getStart() <= position && position <= m.getEnd()) { continue; } var existingName = void 0; - if (m.kind === 175 && m.propertyName) { - if (m.propertyName.kind === 70) { + if (m.kind === 176 && m.propertyName) { + if (m.propertyName.kind === 71) { existingName = m.propertyName.text; } } @@ -61038,7 +61099,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 252) { + if (attr.kind === 253) { seenNames.set(attr.name.text, true); } } @@ -61071,7 +61132,7 @@ var ts; return name; } var keywordCompletions = []; - for (var i = 71; i <= 141; i++) { + for (var i = 72; i <= 142; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ts.ScriptElementKind.keyword, @@ -61083,10 +61144,10 @@ var ts; return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind); } function isEqualityOperatorKind(kind) { - return kind === 31 || - kind === 32 || + return kind === 32 || kind === 33 || - kind === 34; + kind === 34 || + kind === 35; } })(Completions = ts.Completions || (ts.Completions = {})); })(ts || (ts = {})); @@ -61146,74 +61207,74 @@ var ts; return undefined; } switch (node.kind) { - case 89: - case 81: - if (hasKind(node.parent, 210)) { + case 90: + case 82: + if (hasKind(node.parent, 211)) { return getIfElseOccurrences(node.parent, sourceFile); } break; - case 95: - if (hasKind(node.parent, 218)) { + case 96: + if (hasKind(node.parent, 219)) { return highlightSpans(getReturnOccurrences(node.parent)); } break; - case 99: - if (hasKind(node.parent, 222)) { + case 100: + if (hasKind(node.parent, 223)) { return highlightSpans(getThrowOccurrences(node.parent)); } break; - case 101: - case 73: - case 86: - var tryStatement = node.kind === 73 ? parent(parent(node)) : parent(node); - if (hasKind(tryStatement, 223)) { + case 102: + case 74: + case 87: + var tryStatement = node.kind === 74 ? parent(parent(node)) : parent(node); + if (hasKind(tryStatement, 224)) { return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile)); } break; - case 97: - if (hasKind(node.parent, 220)) { + case 98: + if (hasKind(node.parent, 221)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent)); } break; - case 72: - case 78: - if (hasKind(parent(parent(parent(node))), 220)) { + case 73: + case 79: + if (hasKind(parent(parent(parent(node))), 221)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent)); } break; - case 71: - case 76: - if (hasKind(node.parent, 217) || hasKind(node.parent, 216)) { + case 72: + case 77: + if (hasKind(node.parent, 218) || hasKind(node.parent, 217)) { return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent)); } break; - case 87: - if (hasKind(node.parent, 213) || - hasKind(node.parent, 214) || - hasKind(node.parent, 215)) { + case 88: + if (hasKind(node.parent, 214) || + hasKind(node.parent, 215) || + hasKind(node.parent, 216)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 105: - case 80: - if (hasKind(node.parent, 212) || hasKind(node.parent, 211)) { + case 106: + case 81: + if (hasKind(node.parent, 213) || hasKind(node.parent, 212)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 122: - if (hasKind(node.parent, 151)) { + case 123: + if (hasKind(node.parent, 152)) { return highlightSpans(getConstructorOccurrences(node.parent)); } break; - case 124: - case 134: - if (hasKind(node.parent, 152) || hasKind(node.parent, 153)) { + case 125: + case 135: + if (hasKind(node.parent, 153) || hasKind(node.parent, 154)) { return highlightSpans(getGetAndSetOccurrences(node.parent)); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 207)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 208)) { return highlightSpans(getModifierOccurrences(node.kind, node.parent)); } } @@ -61226,10 +61287,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 222) { + if (node.kind === 223) { statementAccumulator.push(node); } - else if (node.kind === 223) { + else if (node.kind === 224) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -61250,10 +61311,10 @@ var ts; var child = throwStatement; while (child.parent) { var parent_2 = child.parent; - if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264) { + if (ts.isFunctionBlock(parent_2) || parent_2.kind === 265) { return parent_2; } - if (parent_2.kind === 223) { + if (parent_2.kind === 224) { var tryStatement = parent_2; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; @@ -61268,7 +61329,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 217 || node.kind === 216) { + if (node.kind === 218 || node.kind === 217) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -61283,15 +61344,15 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node = statement.parent; node; node = node.parent) { switch (node.kind) { - case 220: - if (statement.kind === 216) { + case 221: + if (statement.kind === 217) { continue; } - case 213: case 214: case 215: + case 216: + case 213: case 212: - case 211: if (!statement.label || isLabeledBy(node, statement.label.text)) { return node; } @@ -61308,24 +61369,24 @@ var ts; function getModifierOccurrences(modifier, declaration) { var container = declaration.parent; if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 228 || - container.kind === 198 || - (declaration.kind === 145 && hasKind(container, 151)))) { + if (!(container.kind === 229 || + container.kind === 199 || + (declaration.kind === 146 && hasKind(container, 152)))) { return undefined; } } - else if (modifier === 114) { - if (!(container.kind === 228 || container.kind === 198)) { + else if (modifier === 115) { + if (!(container.kind === 229 || container.kind === 199)) { return undefined; } } - else if (modifier === 83 || modifier === 123) { - if (!(container.kind === 233 || container.kind === 264)) { + else if (modifier === 84 || modifier === 124) { + if (!(container.kind === 234 || container.kind === 265)) { return undefined; } } - else if (modifier === 116) { - if (!(container.kind === 228 || declaration.kind === 228)) { + else if (modifier === 117) { + if (!(container.kind === 229 || declaration.kind === 229)) { return undefined; } } @@ -61336,8 +61397,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 233: - case 264: + case 234: + case 265: if (modifierFlag & 128) { nodes = declaration.members.concat(declaration); } @@ -61345,15 +61406,15 @@ var ts; nodes = container.statements; } break; - case 151: + case 152: nodes = container.parameters.concat(container.parent.members); break; - case 228: - case 198: + case 229: + case 199: nodes = container.members; if (modifierFlag & 28) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 151 && member; + return member.kind === 152 && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -61374,19 +61435,19 @@ var ts; return keywords; function getFlagFromModifier(modifier) { switch (modifier) { - case 113: + case 114: return 4; - case 111: - return 8; case 112: + return 8; + case 113: return 16; - case 114: + case 115: return 32; - case 83: + case 84: return 1; - case 123: + case 124: return 2; - case 116: + case 117: return 128; default: ts.Debug.fail(); @@ -61406,13 +61467,13 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 152); tryPushAccessorKeyword(accessorDeclaration.symbol, 153); + tryPushAccessorKeyword(accessorDeclaration.symbol, 154); return keywords; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 134); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 125, 135); }); } } } @@ -61421,18 +61482,18 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 122); + return pushKeywordIf(keywords, token, 123); }); }); return keywords; } function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) { - if (loopNode.kind === 211) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 88, 106, 81)) { + if (loopNode.kind === 212) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 105)) { + if (pushKeywordIf(keywords, loopTokens[i], 106)) { break; } } @@ -61441,7 +61502,7 @@ var ts; var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71, 76); + pushKeywordIf(keywords, statement.getFirstToken(), 72, 77); } }); return keywords; @@ -61450,13 +61511,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 213: case 214: case 215: - case 211: + case 216: case 212: + case 213: return getLoopBreakContinueOccurrences(owner); - case 220: + case 221: return getSwitchCaseDefaultOccurrences(owner); } } @@ -61464,13 +61525,13 @@ var ts; } function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 97); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 98); ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 72, 78); + pushKeywordIf(keywords, clause.getFirstToken(), 73, 79); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71); + pushKeywordIf(keywords, statement.getFirstToken(), 72); } }); }); @@ -61478,13 +61539,13 @@ var ts; } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 101); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 102); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 74); } if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 86); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 87); } return keywords; } @@ -61495,50 +61556,50 @@ var ts; } var keywords = []; ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100); }); if (ts.isFunctionBlock(owner)) { ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96); }); } return keywords; } function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); - if (!(func && hasKind(func.body, 206))) { + if (!(func && hasKind(func.body, 207))) { return undefined; } var keywords = []; ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96); }); ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100); }); return keywords; } function getIfElseOccurrences(ifStatement, sourceFile) { var keywords = []; - while (hasKind(ifStatement.parent, 210) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 211) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } while (ifStatement) { var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 89); + pushKeywordIf(keywords, children[0], 90); for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 81)) { + if (pushKeywordIf(keywords, children[i], 82)) { break; } } - if (!hasKind(ifStatement.elseStatement, 210)) { + if (!hasKind(ifStatement.elseStatement, 211)) { break; } ifStatement = ifStatement.elseStatement; } var result = []; for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 81 && i < keywords.length - 1) { + if (keywords[i].kind === 82 && i < keywords.length - 1) { var elseKeyword = keywords[i]; var ifKeyword = keywords[i + 1]; var shouldCombindElseAndIf = true; @@ -61563,7 +61624,7 @@ var ts; return result; } function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 221; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 222; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -61728,12 +61789,12 @@ var ts; } cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 180: + case 181: if (!isAvailableThroughGlobal) { var parent = direct.parent; - if (exportKind === 2 && parent.kind === 225) { + if (exportKind === 2 && parent.kind === 226) { var name = parent.name; - if (name.kind === 70) { + if (name.kind === 71) { directImports.push(name); break; } @@ -61741,19 +61802,19 @@ var ts; addIndirectUser(direct.getSourceFile()); } break; - case 236: + case 237: handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1)); break; - case 237: + case 238: var namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { handleNamespaceImport(direct, namedBindings.name); } else { directImports.push(direct); } break; - case 243: + case 244: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); } @@ -61770,7 +61831,7 @@ var ts; } else if (!isAvailableThroughGlobal) { var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - ts.Debug.assert(sourceFileLike.kind === 264 || sourceFileLike.kind === 232); + ts.Debug.assert(sourceFileLike.kind === 265 || sourceFileLike.kind === 233); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUsers(sourceFileLike); } @@ -61818,26 +61879,26 @@ var ts; } return { importSearches: importSearches, singleReferences: singleReferences }; function handleImport(decl) { - if (decl.kind === 236) { + if (decl.kind === 237) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } return; } - if (decl.kind === 70) { + if (decl.kind === 71) { handleNamespaceImportLike(decl); return; } if (decl.moduleSpecifier.kind !== 9) { return; } - if (decl.kind === 243) { + if (decl.kind === 244) { searchForNamedImport(decl.exportClause); return; } var importClause = decl.importClause; var namedBindings = importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { handleNamespaceImportLike(namedBindings.name); return; } @@ -61876,7 +61937,7 @@ var ts; } } else { - var localSymbol = element.kind === 245 && element.propertyName + var localSymbol = element.kind === 246 && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); @@ -61887,7 +61948,7 @@ var ts; function findNamespaceReExports(sourceFileLike, name, checker) { var namespaceImportSymbol = checker.getSymbolAtLocation(name); return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) { - if (statement.kind !== 243) + if (statement.kind !== 244) return; var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier; if (moduleSpecifier || !exportClause) @@ -61920,7 +61981,7 @@ var ts; return map; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return ts.forEach(sourceFileLike.kind === 264 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { + return ts.forEach(sourceFileLike.kind === 265 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action)); }); } @@ -61934,18 +61995,18 @@ var ts; else { forEachPossibleImportOrExportStatement(sourceFile, function (statement) { switch (statement.kind) { - case 243: - case 237: { + case 244: + case 238: { var decl = statement; if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9) { action(decl, decl.moduleSpecifier); } break; } - case 236: { + case 237: { var decl = statement; var moduleReference = decl.moduleReference; - if (moduleReference.kind === 247 && + if (moduleReference.kind === 248 && moduleReference.expression.kind === 9) { action(decl, moduleReference.expression); } @@ -61967,10 +62028,10 @@ var ts; } function importerFromModuleSpecifier(moduleSpecifier) { var decl = moduleSpecifier.parent; - if (decl.kind === 237 || decl.kind === 243) { + if (decl.kind === 238 || decl.kind === 244) { return decl; } - ts.Debug.assert(decl.kind === 247); + ts.Debug.assert(decl.kind === 248); return decl.parent; } function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { @@ -61978,8 +62039,8 @@ var ts; function getExport() { var parent = node.parent; if (symbol.flags & 7340032) { - if (parent.kind === 178) { - return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 + if (parent.kind === 179) { + return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194 ? getSpecialPropertyExport(parent.parent, false) : undefined; } @@ -61990,9 +62051,9 @@ var ts; } } else { - var exportNode = parent.kind === 225 ? ts.getAncestor(parent, 207) : parent; - if (ts.hasModifier(exportNode, 1)) { - if (exportNode.kind === 236 && exportNode.moduleReference === node) { + var exportNode = getExportNode(parent); + if (exportNode && ts.hasModifier(exportNode, 1)) { + if (exportNode.kind === 237 && exportNode.moduleReference === node) { if (comingFromExport) { return undefined; } @@ -62003,15 +62064,15 @@ var ts; return exportInfo(symbol, getExportKindForDeclaration(exportNode)); } } - else if (parent.kind === 242) { + else if (parent.kind === 243) { var exportingModuleSymbol = parent.symbol.parent; ts.Debug.assert(!!exportingModuleSymbol); return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } }; } - else if (parent.kind === 193) { + else if (parent.kind === 194) { return getSpecialPropertyExport(parent, true); } - else if (parent.parent.kind === 193) { + else if (parent.parent.kind === 194) { return getSpecialPropertyExport(parent.parent, true); } } @@ -62055,17 +62116,26 @@ var ts; } } FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; + function getExportNode(parent) { + if (parent.kind === 226) { + var p = parent; + return p.parent.kind === 260 ? undefined : p.parent.parent.kind === 208 ? p.parent.parent : undefined; + } + else { + return parent; + } + } function isNodeImport(node) { var parent = node.parent; switch (parent.kind) { - case 236: + case 237: return parent.name === node && isExternalModuleImportEquals(parent) ? { isNamedImport: false } : undefined; - case 241: + case 242: return parent.propertyName ? undefined : { isNamedImport: true }; - case 238: case 239: + case 240: ts.Debug.assert(parent.name === node); return { isNamedImport: false }; default: @@ -62083,7 +62153,7 @@ var ts; } var name = ts.forEach(symbol.declarations, function (_a) { var name = _a.name; - return name && name.kind === 70 && name.text; + return name && name.kind === 71 && name.text; }); ts.Debug.assert(!!name); return name; @@ -62102,22 +62172,22 @@ var ts; return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 180) { + if (node.kind === 181) { return node.getSourceFile(); } var parent = node.parent; - if (parent.kind === 264) { + if (parent.kind === 265) { return parent; } - ts.Debug.assert(parent.kind === 233 && isAmbientModuleDeclaration(parent.parent)); + ts.Debug.assert(parent.kind === 234 && isAmbientModuleDeclaration(parent.parent)); return parent.parent; } function isAmbientModuleDeclaration(node) { - return node.kind === 232 && node.name.kind === 9; + return node.kind === 233 && node.name.kind === 9; } function isExternalModuleImportEquals(_a) { var moduleReference = _a.moduleReference; - return moduleReference.kind === 247 && moduleReference.expression.kind === 9; + return moduleReference.kind === 248 && moduleReference.expression.kind === 9; } })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); })(ts || (ts = {})); @@ -62151,12 +62221,12 @@ var ts; } FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition; function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) { - if (node.parent.kind === 261) { + if (node.parent.kind === 262) { var result_4 = []; FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); }); return result_4; } - else if (node.kind === 96 || ts.isSuperProperty(node.parent)) { + else if (node.kind === 97 || ts.isSuperProperty(node.parent)) { var symbol = typeChecker.getSymbolAtLocation(node); return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; } @@ -62262,16 +62332,16 @@ var ts; if (symbol) { return getDefinitionKindAndDisplayParts(symbol, node, checker); } - else if (node.kind === 177) { + else if (node.kind === 178) { return { kind: ts.ScriptElementKind.interfaceElement, - displayParts: [ts.punctuationPart(18), ts.textPart("object literal"), ts.punctuationPart(19)] + displayParts: [ts.punctuationPart(19), ts.textPart("object literal"), ts.punctuationPart(20)] }; } - else if (node.kind === 198) { + else if (node.kind === 199) { return { kind: ts.ScriptElementKind.localClassElement, - displayParts: [ts.punctuationPart(18), ts.textPart("anonymous local class"), ts.punctuationPart(19)] + displayParts: [ts.punctuationPart(19), ts.textPart("anonymous local class"), ts.punctuationPart(20)] }; } else { @@ -62304,17 +62374,17 @@ var ts; return ts.createTextSpanFromBounds(start, end); } function isWriteAccess(node) { - if (node.kind === 70 && ts.isDeclarationName(node)) { + if (node.kind === 71 && ts.isDeclarationName(node)) { return true; } var parent = node.parent; if (parent) { - if (parent.kind === 192 || parent.kind === 191) { + if (parent.kind === 193 || parent.kind === 192) { return true; } - else if (parent.kind === 193 && parent.left === node) { + else if (parent.kind === 194 && parent.left === node) { var operator = parent.operatorToken.kind; - return 57 <= operator && operator <= 69; + return 58 <= operator && operator <= 70; } } return false; @@ -62328,7 +62398,7 @@ var ts; (function (Core) { function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) { if (options === void 0) { options = {}; } - if (node.kind === 264) { + if (node.kind === 265) { return undefined; } if (!options.implementations) { @@ -62366,7 +62436,7 @@ var ts; if (ts.isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 96) { + if (node.kind === 97) { return getReferencesForSuperKeyword(node); } return undefined; @@ -62404,7 +62474,7 @@ var ts; var symbolIdToReferences = []; var inheritsFromCache = ts.createMap(); var sourceFileToSeenSymbols = []; - var isForConstructor = originalLocation.kind === 122; + var isForConstructor = originalLocation.kind === 123; var importTracker; return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference, markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() }); @@ -62494,14 +62564,14 @@ var ts; checker.getPropertySymbolOfDestructuringAssignment(location); } function isObjectBindingPatternElementWithoutPropertyName(symbol) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175); + var bindingElement = ts.getDeclarationOfKind(symbol, 176); return bindingElement && - bindingElement.parent.kind === 173 && + bindingElement.parent.kind === 174 && !bindingElement.propertyName; } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) { if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175); + var bindingElement = ts.getDeclarationOfKind(symbol, 176); var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); } @@ -62509,7 +62579,7 @@ var ts; } function getSymbolScope(symbol) { var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 185 || valueDeclaration.kind === 198)) { + if (valueDeclaration && (valueDeclaration.kind === 186 || valueDeclaration.kind === 199)) { return valueDeclaration; } if (!declarations) { @@ -62518,7 +62588,7 @@ var ts; if (flags & (4 | 8192)) { var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 228); + return ts.getAncestor(privateDeclaration, 229); } } if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { @@ -62537,7 +62607,7 @@ var ts; if (scope && scope !== container) { return undefined; } - if (!container || container.kind === 264 && !ts.isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 265 && !ts.isExternalOrCommonJsModule(container)) { return undefined; } scope = container; @@ -62585,7 +62655,7 @@ var ts; } function isValidReferencePosition(node, searchSymbolName) { switch (node && node.kind) { - case 70: + case 71: return node.getWidth() === searchSymbolName.length; case 9: return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) && @@ -62650,7 +62720,7 @@ var ts; return; } if (ts.isExportSpecifier(parent)) { - ts.Debug.assert(referenceLocation.kind === 70); + ts.Debug.assert(referenceLocation.kind === 71); getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state); return; } @@ -62691,7 +62761,7 @@ var ts; } } if (!(referenceLocation === propertyName && state.isForRename)) { - var exportKind = referenceLocation.originalKeywordKind === 78 ? 1 : 0; + var exportKind = referenceLocation.originalKeywordKind === 79 ? 1 : 0; var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker); ts.Debug.assert(!!exportInfo); searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state); @@ -62768,16 +62838,16 @@ var ts; function findOwnConstructorReferences(classSymbol, sourceFile, addNode) { for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) { var decl = _a[_i]; - var ctrKeyword = ts.findChildOfKind(decl, 122, sourceFile); - ts.Debug.assert(decl.kind === 151 && !!ctrKeyword); + var ctrKeyword = ts.findChildOfKind(decl, 123, sourceFile); + ts.Debug.assert(decl.kind === 152 && !!ctrKeyword); addNode(ctrKeyword); } classSymbol.exports.forEach(function (member) { var decl = member.valueDeclaration; - if (decl && decl.kind === 150) { + if (decl && decl.kind === 151) { var body = decl.body; if (body) { - forEachDescendantOfKind(body, 98, function (thisKeyword) { + forEachDescendantOfKind(body, 99, function (thisKeyword) { if (ts.isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -62794,10 +62864,10 @@ var ts; } for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - ts.Debug.assert(decl.kind === 151); + ts.Debug.assert(decl.kind === 152); var body = decl.body; if (body) { - forEachDescendantOfKind(body, 96, function (node) { + forEachDescendantOfKind(body, 97, function (node) { if (ts.isCallExpressionTarget(node)) { addNode(node); } @@ -62810,10 +62880,10 @@ var ts; addReference(refNode.parent); return; } - if (refNode.kind !== 70) { + if (refNode.kind !== 71) { return; } - if (refNode.parent.kind === 261) { + if (refNode.parent.kind === 262) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference); } var containingClass = getContainingClassIfInHeritageClause(refNode); @@ -62828,7 +62898,7 @@ var ts; addReference(parent.initializer); } else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) { - if (parent.body.kind === 206) { + if (parent.body.kind === 207) { ts.forEachReturnStatement(parent.body, function (returnStatement) { if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) { addReference(returnStatement.expression); @@ -62869,12 +62939,12 @@ var ts; } function getContainingClassIfInHeritageClause(node) { if (node && node.parent) { - if (node.kind === 200 - && node.parent.kind === 258 + if (node.kind === 201 + && node.parent.kind === 259 && ts.isClassLike(node.parent.parent)) { return node.parent.parent; } - else if (node.kind === 70 || node.kind === 178) { + else if (node.kind === 71 || node.kind === 179) { return getContainingClassIfInHeritageClause(node.parent); } } @@ -62882,13 +62952,13 @@ var ts; } function isImplementationExpression(node) { switch (node.kind) { - case 184: + case 185: return isImplementationExpression(node.expression); + case 187: case 186: - case 185: + case 178: + case 199: case 177: - case 198: - case 176: return true; default: return false; @@ -62922,7 +62992,7 @@ var ts; } return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); } - else if (declaration.kind === 229) { + else if (declaration.kind === 230) { if (parentIsInterface) { return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference); } @@ -62949,13 +63019,13 @@ var ts; } var staticFlag = 32; switch (searchSpaceNode.kind) { - case 148: - case 147: - case 150: case 149: + case 148: case 151: + case 150: case 152: case 153: + case 154: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -62968,7 +63038,7 @@ var ts; for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) { var position = possiblePositions_4[_i]; var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 96) { + if (!node || node.kind !== 97) { continue; } var container = ts.getSuperContainer(node, false); @@ -62982,32 +63052,32 @@ var ts; var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); var staticFlag = 32; switch (searchSpaceNode.kind) { + case 151: case 150: - case 149: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } + case 149: case 148: - case 147: - case 151: case 152: case 153: + case 154: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 264: + case 265: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } - case 227: - case 185: + case 228: + case 186: break; default: return undefined; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 264) { + if (searchSpaceNode.kind === 265) { ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); @@ -63031,26 +63101,26 @@ var ts; } var container = ts.getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 185: - case 227: + case 186: + case 228: if (searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; + case 151: case 150: - case 149: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 198: - case 228: + case 199: + case 229: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32) === staticFlag) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 264: - if (container.kind === 264 && !ts.isExternalModule(container)) { + case 265: + if (container.kind === 265 && !ts.isExternalModule(container)) { result.push(FindAllReferences.nodeEntry(node)); } break; @@ -63084,7 +63154,7 @@ var ts; var result = [symbol]; var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location); if (containingObjectLiteralElement) { - if (containingObjectLiteralElement.kind !== 261) { + if (containingObjectLiteralElement.kind !== 262) { var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); if (propertySymbol) { result.push(propertySymbol); @@ -63098,7 +63168,7 @@ var ts; result.push(shorthandValueSymbol); } } - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 146 && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -63130,7 +63200,7 @@ var ts; getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 229) { + else if (declaration.kind === 230) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -63187,7 +63257,7 @@ var ts; }); } function getNameFromObjectLiteralElement(node) { - if (node.name.kind === 143) { + if (node.name.kind === 144) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression)) { return nameExpression.text; @@ -63242,7 +63312,7 @@ var ts; if (node.initializer) { return true; } - else if (node.kind === 225) { + else if (node.kind === 226) { var parentStatement = getParentStatementOfVariableDeclaration(node); return parentStatement && ts.hasModifier(parentStatement, 2); } @@ -63252,18 +63322,18 @@ var ts; } else { switch (node.kind) { - case 228: - case 198: - case 231: + case 229: + case 199: case 232: + case 233: return true; } } return false; } function getParentStatementOfVariableDeclaration(node) { - if (node.parent && node.parent.parent && node.parent.parent.kind === 207) { - ts.Debug.assert(node.parent.kind === 226); + if (node.parent && node.parent.parent && node.parent.parent.kind === 208) { + ts.Debug.assert(node.parent.kind === 227); return node.parent.parent; } } @@ -63355,13 +63425,13 @@ var ts; } if (symbol.flags & 8388608) { var declaration = symbol.declarations[0]; - if (node.kind === 70 && + if (node.kind === 71 && (node.parent === declaration || - (declaration.kind === 241 && declaration.parent && declaration.parent.kind === 240))) { + (declaration.kind === 242 && declaration.parent && declaration.parent.kind === 241))) { symbol = typeChecker.getAliasedSymbol(symbol); } } - if (node.parent.kind === 261) { + if (node.parent.kind === 262) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -63431,7 +63501,7 @@ var ts; } return result; function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (ts.isNewExpressionTarget(location) || location.kind === 122) { + if (ts.isNewExpressionTarget(location) || location.kind === 123) { if (symbol.flags & 32) { for (var _i = 0, _a = symbol.getDeclarations(); _i < _a.length; _i++) { var declaration = _a[_i]; @@ -63458,7 +63528,7 @@ var ts; var definition; for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) { var d = signatureDeclarations_1[_i]; - if (selectConstructors ? d.kind === 151 : isSignatureDeclaration(d)) { + if (selectConstructors ? d.kind === 152 : isSignatureDeclaration(d)) { declarations.push(d); if (d.body) definition = d; @@ -63473,10 +63543,10 @@ var ts; } function isSignatureDeclaration(node) { switch (node.kind) { + case 152: + case 228: case 151: - case 227: case 150: - case 149: return true; default: return false; @@ -63626,7 +63696,7 @@ var ts; var doc = jsDocs_1[_i]; var tagsForDoc = doc.tags; if (tagsForDoc) { - tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283; }).map(function (jsDocTag) { + tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 284; }).map(function (jsDocTag) { return { name: jsDocTag.tagName.text, text: jsDocTag.comment @@ -63685,16 +63755,16 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 227: - case 150: - case 151: case 228: - case 207: + case 151: + case 152: + case 229: + case 208: break findOwner; - case 264: + case 265: return undefined; - case 232: - if (commentOwner.parent.kind === 232) { + case 233: + if (commentOwner.parent.kind === 233) { return undefined; } break findOwner; @@ -63711,7 +63781,7 @@ var ts; var docParams = ""; for (var i = 0; i < parameters.length; i++) { var currentName = parameters[i].name; - var paramName = currentName.kind === 70 ? + var paramName = currentName.kind === 71 ? currentName.text : "param" + i; if (isJavaScriptFile) { @@ -63734,7 +63804,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 207) { + if (commentOwner.kind === 208) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -63744,17 +63814,17 @@ var ts; return ts.emptyArray; } function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 184) { + while (rightHandSide.kind === 185) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 185: case 186: + case 187: return rightHandSide.parameters; - case 198: + case 199: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151) { + if (member.kind === 152) { return member.parameters; } } @@ -63970,7 +64040,7 @@ var ts; } rawItems = ts.filter(rawItems, function (item) { var decl = item.declaration; - if (decl.kind === 238 || decl.kind === 241 || decl.kind === 236) { + if (decl.kind === 239 || decl.kind === 242 || decl.kind === 237) { var importer = checker.getSymbolAtLocation(decl.name); var imported = checker.getAliasedSymbol(importer); return importer.name !== imported.name; @@ -63997,7 +64067,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 || + if (node.kind === 71 || node.kind === 9 || node.kind === 8) { return node.text; @@ -64011,7 +64081,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 143) { + else if (declaration.name.kind === 144) { return tryAddComputedPropertyName(declaration.name.expression, containers, true); } else { @@ -64028,7 +64098,7 @@ var ts; } return true; } - if (expression.kind === 178) { + if (expression.kind === 179) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -64039,7 +64109,7 @@ var ts; } function getContainers(declaration) { var containers = []; - if (declaration.name.kind === 143) { + if (declaration.name.kind === 144) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) { return undefined; } @@ -64190,7 +64260,7 @@ var ts; return; } switch (node.kind) { - case 151: + case 152: var ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) { @@ -64200,28 +64270,28 @@ var ts; } } break; - case 150: - case 152: + case 151: case 153: - case 149: + case 154: + case 150: if (!ts.hasDynamicName(node)) { addNodeWithRecursiveChild(node, node.body); } break; + case 149: case 148: - case 147: if (!ts.hasDynamicName(node)) { addLeafNode(node); } break; - case 238: + case 239: var importClause = node; if (importClause.name) { addLeafNode(importClause); } var namedBindings = importClause.namedBindings; if (namedBindings) { - if (namedBindings.kind === 239) { + if (namedBindings.kind === 240) { addLeafNode(namedBindings); } else { @@ -64232,8 +64302,8 @@ var ts; } } break; - case 175: - case 225: + case 176: + case 226: var decl = node; var name = decl.name; if (ts.isBindingPattern(name)) { @@ -64246,12 +64316,12 @@ var ts; addNodeWithRecursiveChild(decl, decl.initializer); } break; + case 187: + case 228: case 186: - case 227: - case 185: addNodeWithRecursiveChild(node, node.body); break; - case 231: + case 232: startNode(node); for (var _d = 0, _e = node.members; _d < _e.length; _d++) { var member = _e[_d]; @@ -64261,9 +64331,9 @@ var ts; } endNode(); break; - case 228: - case 198: case 229: + case 199: + case 230: startNode(node); for (var _f = 0, _g = node.members; _f < _g.length; _f++) { var member = _g[_f]; @@ -64271,21 +64341,21 @@ var ts; } endNode(); break; - case 232: + case 233: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 245: - case 236: - case 156: - case 154: + case 246: + case 237: + case 157: case 155: - case 230: + case 156: + case 231: addLeafNode(node); break; default: ts.forEach(node.jsDoc, function (jsDoc) { ts.forEach(jsDoc.tags, function (tag) { - if (tag.kind === 289) { + if (tag.kind === 290) { addLeafNode(tag); } }); @@ -64333,12 +64403,12 @@ var ts; } }); function shouldReallyMerge(a, b) { - return a.kind === b.kind && (a.kind !== 232 || areSameModule(a, b)); + return a.kind === b.kind && (a.kind !== 233 || areSameModule(a, b)); function areSameModule(a, b) { if (a.body.kind !== b.body.kind) { return false; } - if (a.body.kind !== 232) { + if (a.body.kind !== 233) { return true; } return areSameModule(a.body, b.body); @@ -64372,7 +64442,7 @@ var ts; } } function tryGetName(node) { - if (node.kind === 232) { + if (node.kind === 233) { return getModuleName(node); } var decl = node; @@ -64380,18 +64450,18 @@ var ts; return ts.getPropertyNameForPropertyNameNode(decl.name); } switch (node.kind) { - case 185: case 186: - case 198: + case 187: + case 199: return getFunctionOrClassName(node); - case 289: + case 290: return getJSDocTypedefTagName(node); default: return undefined; } } function getItemName(node) { - if (node.kind === 232) { + if (node.kind === 233) { return getModuleName(node); } var name = node.name; @@ -64402,29 +64472,29 @@ var ts; } } switch (node.kind) { - case 264: + case 265: var sourceFile = node; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; - case 186: - case 227: - case 185: + case 187: case 228: - case 198: + case 186: + case 229: + case 199: if (ts.getModifierFlags(node) & 512) { return "default"; } return getFunctionOrClassName(node); - case 151: + case 152: return "constructor"; - case 155: + case 156: return "new()"; - case 154: + case 155: return "()"; - case 156: + case 157: return "[]"; - case 289: + case 290: return getJSDocTypedefTagName(node); default: return ""; @@ -64436,10 +64506,10 @@ var ts; } else { var parentNode = node.parent && node.parent.parent; - if (parentNode && parentNode.kind === 207) { + if (parentNode && parentNode.kind === 208) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70) { + if (nameIdentifier.kind === 71) { return nameIdentifier.text; } } @@ -64464,24 +64534,24 @@ var ts; return topLevel; function isTopLevel(item) { switch (navigationBarNodeKind(item)) { - case 228: - case 198: - case 231: case 229: + case 199: case 232: - case 264: case 230: - case 289: + case 233: + case 265: + case 231: + case 290: return true; - case 151: - case 150: case 152: + case 151: case 153: - case 225: + case 154: + case 226: return hasSomeImportantChild(item); + case 187: + case 228: case 186: - case 227: - case 185: return isTopLevelFunctionDeclaration(item); default: return false; @@ -64491,10 +64561,10 @@ var ts; return false; } switch (navigationBarNodeKind(item.parent)) { - case 233: - case 264: - case 150: + case 234: + case 265: case 151: + case 152: return true; default: return hasSomeImportantChild(item); @@ -64503,7 +64573,7 @@ var ts; function hasSomeImportantChild(item) { return ts.forEach(item.children, function (child) { var childKind = navigationBarNodeKind(child); - return childKind !== 225 && childKind !== 175; + return childKind !== 226 && childKind !== 176; }); } } @@ -64557,25 +64627,25 @@ var ts; } var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 232) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 233) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } return result.join("."); } function getInteriorModule(decl) { - return decl.body.kind === 232 ? getInteriorModule(decl.body) : decl; + return decl.body.kind === 233 ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 143; + return !member.name || member.name.kind === 144; } function getNodeSpan(node) { - return node.kind === 264 + return node.kind === 265 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromNode(node, curSourceFile); } function getModifiers(node) { - if (node.parent && node.parent.kind === 225) { + if (node.parent && node.parent.kind === 226) { node = node.parent; } return ts.getNodeModifiers(node); @@ -64584,14 +64654,14 @@ var ts; if (node.name && ts.getFullWidth(node.name) > 0) { return ts.declarationNameToString(node.name); } - else if (node.parent.kind === 225) { + else if (node.parent.kind === 226) { return ts.declarationNameToString(node.parent.name); } - else if (node.parent.kind === 193 && - node.parent.operatorToken.kind === 57) { + else if (node.parent.kind === 194 && + node.parent.operatorToken.kind === 58) { return nodeText(node.parent.left).replace(whiteSpaceRegex, ""); } - else if (node.parent.kind === 260 && node.parent.name) { + else if (node.parent.kind === 261 && node.parent.name) { return nodeText(node.parent.name); } else if (ts.getModifierFlags(node) & 512) { @@ -64602,7 +64672,7 @@ var ts; } } function isFunctionOrClassExpression(node) { - return node.kind === 185 || node.kind === 186 || node.kind === 198; + return node.kind === 186 || node.kind === 187 || node.kind === 199; } })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); @@ -64675,7 +64745,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 186; + return ts.isFunctionBlock(node) && node.parent.kind !== 187; } var depth = 0; var maxDepth = 20; @@ -64688,30 +64758,30 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 206: + case 207: if (!ts.isFunctionBlock(n)) { var parent = n.parent; - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); - if (parent.kind === 211 || - parent.kind === 214 || + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); + if (parent.kind === 212 || parent.kind === 215 || + parent.kind === 216 || + parent.kind === 214 || + parent.kind === 211 || parent.kind === 213 || - parent.kind === 210 || - parent.kind === 212 || - parent.kind === 219 || - parent.kind === 259) { + parent.kind === 220 || + parent.kind === 260) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 223) { + if (parent.kind === 224) { var tryStatement = parent; if (tryStatement.tryBlock === n) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87, sourceFile); if (finallyKeyword) { addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); break; @@ -64727,25 +64797,25 @@ var ts; }); break; } - case 233: { - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); + case 234: { + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 228: case 229: - case 231: - case 177: - case 234: { - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); + case 230: + case 232: + case 178: + case 235: { + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 176: - var openBracket = ts.findChildOfKind(n, 20, sourceFile); - var closeBracket = ts.findChildOfKind(n, 21, sourceFile); + case 177: + var openBracket = ts.findChildOfKind(n, 21, sourceFile); + var closeBracket = ts.findChildOfKind(n, 22, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); break; } @@ -65183,10 +65253,10 @@ var ts; var externalModule = false; function nextToken() { var token = ts.scanner.scan(); - if (token === 16) { + if (token === 17) { braceNesting++; } - else if (token === 17) { + else if (token === 18) { braceNesting--; } return token; @@ -65234,9 +65304,9 @@ var ts; } function tryConsumeDeclare() { var token = ts.scanner.getToken(); - if (token === 123) { + if (token === 124) { token = nextToken(); - if (token === 127) { + if (token === 128) { token = nextToken(); if (token === 9) { recordAmbientExternalModule(); @@ -65248,42 +65318,42 @@ var ts; } function tryConsumeImport() { var token = ts.scanner.getToken(); - if (token === 90) { + if (token === 91) { token = nextToken(); if (token === 9) { recordModuleName(); return true; } else { - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); return true; } } - else if (token === 57) { + else if (token === 58) { if (tryConsumeRequireCall(true)) { return true; } } - else if (token === 25) { + else if (token === 26) { token = nextToken(); } else { return true; } } - if (token === 16) { + if (token === 17) { token = nextToken(); - while (token !== 17 && token !== 1) { + while (token !== 18 && token !== 1) { token = nextToken(); } - if (token === 17) { + if (token === 18) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65291,13 +65361,13 @@ var ts; } } } - else if (token === 38) { + else if (token === 39) { token = nextToken(); - if (token === 117) { + if (token === 118) { token = nextToken(); - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65313,17 +65383,17 @@ var ts; } function tryConsumeExport() { var token = ts.scanner.getToken(); - if (token === 83) { + if (token === 84) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 16) { + if (token === 17) { token = nextToken(); - while (token !== 17 && token !== 1) { + while (token !== 18 && token !== 1) { token = nextToken(); } - if (token === 17) { + if (token === 18) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65331,20 +65401,20 @@ var ts; } } } - else if (token === 38) { + else if (token === 39) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); } } } - else if (token === 90) { + else if (token === 91) { token = nextToken(); - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 57) { + if (token === 58) { if (tryConsumeRequireCall(true)) { return true; } @@ -65357,9 +65427,9 @@ var ts; } function tryConsumeRequireCall(skipCurrentToken) { var token = skipCurrentToken ? nextToken() : ts.scanner.getToken(); - if (token === 131) { + if (token === 132) { token = nextToken(); - if (token === 18) { + if (token === 19) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65371,27 +65441,27 @@ var ts; } function tryConsumeDefine() { var token = ts.scanner.getToken(); - if (token === 70 && ts.scanner.getTokenValue() === "define") { + if (token === 71 && ts.scanner.getTokenValue() === "define") { token = nextToken(); - if (token !== 18) { + if (token !== 19) { return true; } token = nextToken(); if (token === 9) { token = nextToken(); - if (token === 25) { + if (token === 26) { token = nextToken(); } else { return true; } } - if (token !== 20) { + if (token !== 21) { return true; } token = nextToken(); var i = 0; - while (token !== 21 && token !== 1) { + while (token !== 22 && token !== 1) { if (token === 9) { recordModuleName(); i++; @@ -65484,8 +65554,8 @@ var ts; if (ts.some(declarations, isDefinedInLibraryFile)) { return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); } - if (node.kind === 70 && - node.originalKeywordKind === 78 && + if (node.kind === 71 && + node.originalKeywordKind === 79 && symbol.parent.flags & 1536) { return undefined; } @@ -65534,7 +65604,7 @@ var ts; return ts.createTextSpan(start, width); } function nodeIsEligibleForRename(node) { - return node.kind === 70 || + return node.kind === 71 || node.kind === 9 || ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || ts.isThis(node); @@ -65578,14 +65648,14 @@ var ts; } SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; function createJavaScriptSignatureHelpItems(argumentInfo, program) { - if (argumentInfo.invocation.kind !== 180) { + if (argumentInfo.invocation.kind !== 181) { return undefined; } var callExpression = argumentInfo.invocation; var expression = callExpression.expression; - var name = expression.kind === 70 + var name = expression.kind === 71 ? expression - : expression.kind === 178 + : expression.kind === 179 ? expression.name : undefined; if (!name || !name.text) { @@ -65614,10 +65684,10 @@ var ts; } } function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { - if (node.parent.kind === 180 || node.parent.kind === 181) { + if (node.parent.kind === 181 || node.parent.kind === 182) { var callExpression = node.parent; - if (node.kind === 26 || - node.kind === 18) { + if (node.kind === 27 || + node.kind === 19) { var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; ts.Debug.assert(list !== undefined); @@ -65646,24 +65716,24 @@ var ts; } return undefined; } - else if (node.kind === 12 && node.parent.kind === 182) { + else if (node.kind === 13 && node.parent.kind === 183) { if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, 0, sourceFile); } } - else if (node.kind === 13 && node.parent.parent.kind === 182) { + else if (node.kind === 14 && node.parent.parent.kind === 183) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195); + ts.Debug.assert(templateExpression.kind === 196); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } - else if (node.parent.kind === 204 && node.parent.parent.parent.kind === 182) { + else if (node.parent.kind === 205 && node.parent.parent.parent.kind === 183) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195); - if (node.kind === 15 && !ts.isInsideTemplateLiteral(node, position)) { + ts.Debug.assert(templateExpression.kind === 196); + if (node.kind === 16 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); @@ -65692,7 +65762,7 @@ var ts; if (child === node) { break; } - if (child.kind !== 25) { + if (child.kind !== 26) { argumentIndex++; } } @@ -65700,8 +65770,8 @@ var ts; } function getArgumentCount(argumentsList) { var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 25) { + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 26; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 26) { argumentCount++; } return argumentCount; @@ -65717,7 +65787,7 @@ var ts; return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { - var argumentCount = tagExpression.template.kind === 12 + var argumentCount = tagExpression.template.kind === 13 ? 1 : tagExpression.template.templateSpans.length + 1; ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); @@ -65738,7 +65808,7 @@ var ts; var template = taggedTemplate.template; var applicableSpanStart = template.getStart(); var applicableSpanEnd = template.getEnd(); - if (template.kind === 195) { + if (template.kind === 196) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -65747,7 +65817,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node, position, sourceFile) { - for (var n = node; n.kind !== 264; n = n.parent) { + for (var n = node; n.kind !== 265; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -65800,10 +65870,10 @@ var ts; var isVariadic; if (isTypeParameterList) { isVariadic = false; - prefixDisplayParts.push(ts.punctuationPart(26)); + prefixDisplayParts.push(ts.punctuationPart(27)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(28)); + suffixDisplayParts.push(ts.punctuationPart(29)); var parameterParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.thisParameter, candidateSignature.parameters, writer, invocation); }); @@ -65815,10 +65885,10 @@ var ts; return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); }); ts.addRange(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(18)); + prefixDisplayParts.push(ts.punctuationPart(19)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(19)); + suffixDisplayParts.push(ts.punctuationPart(20)); } var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); @@ -65828,7 +65898,7 @@ var ts; isVariadic: isVariadic, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(25), ts.spacePart()], + separatorDisplayParts: [ts.punctuationPart(26), ts.spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment(), tags: candidateSignature.getJsDocTags() @@ -65880,7 +65950,7 @@ var ts; function getSymbolKind(typeChecker, symbol, location) { var flags = symbol.flags; if (flags & 32) - return ts.getDeclarationOfKind(symbol, 198) ? + return ts.getDeclarationOfKind(symbol, 199) ? ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement; if (flags & 384) return ts.ScriptElementKind.enumElement; @@ -65911,7 +65981,7 @@ var ts; if (typeChecker.isArgumentsSymbol(symbol)) { return ts.ScriptElementKind.localVariableElement; } - if (location.kind === 98 && ts.isExpression(location)) { + if (location.kind === 99 && ts.isExpression(location)) { return ts.ScriptElementKind.parameterElement; } var flags = symbol.flags; @@ -65976,7 +66046,7 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); var hasAddedSymbolInfo; - var isThisExpression = location.kind === 98 && ts.isExpression(location); + var isThisExpression = location.kind === 99 && ts.isExpression(location); var type; if (symbolKind !== ts.ScriptElementKind.unknown || symbolFlags & 32 || symbolFlags & 8388608) { if (symbolKind === ts.ScriptElementKind.memberGetAccessorElement || symbolKind === ts.ScriptElementKind.memberSetAccessorElement) { @@ -65985,14 +66055,14 @@ var ts; var signature = void 0; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 178) { + if (location.parent && location.parent.kind === 179) { var right = location.parent.name; if (right === location || (right && right.getFullWidth() === 0)) { location = location.parent; } } var callExpressionLike = void 0; - if (location.kind === 180 || location.kind === 181) { + if (location.kind === 181 || location.kind === 182) { callExpressionLike = location; } else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) { @@ -66007,7 +66077,7 @@ var ts; if (!signature && candidateSignatures.length) { signature = candidateSignatures[0]; } - var useConstructSignatures = callExpressionLike.kind === 181 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96); + var useConstructSignatures = callExpressionLike.kind === 182 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 97); var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : undefined; @@ -66022,7 +66092,7 @@ var ts; pushTypePart(symbolKind); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93)); + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } addFullSymbolName(symbol); @@ -66038,10 +66108,10 @@ var ts; case ts.ScriptElementKind.letElement: case ts.ScriptElementKind.parameterElement: case ts.ScriptElementKind.localVariableElement: - displayParts.push(ts.punctuationPart(55)); + displayParts.push(ts.punctuationPart(56)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93)); + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } if (!(type.flags & 32768 && type.objectFlags & 16) && type.symbol) { @@ -66056,21 +66126,21 @@ var ts; } } else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 122 && location.parent.kind === 151)) { + (location.kind === 123 && location.parent.kind === 152)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 151 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + var allSignatures = functionDeclaration.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 151) { + if (functionDeclaration.kind === 152) { symbolKind = ts.ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -66079,11 +66149,11 @@ var ts; } } if (symbolFlags & 32 && !hasAddedSymbolInfo && !isThisExpression) { - if (ts.getDeclarationOfKind(symbol, 198)) { + if (ts.getDeclarationOfKind(symbol, 199)) { pushTypePart(ts.ScriptElementKind.localClassElement); } else { - displayParts.push(ts.keywordPart(74)); + displayParts.push(ts.keywordPart(75)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); @@ -66091,45 +66161,45 @@ var ts; } if ((symbolFlags & 64) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(108)); + displayParts.push(ts.keywordPart(109)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(137)); + displayParts.push(ts.keywordPart(138)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512)); } if (symbolFlags & 384) { addNewLineIfDisplayPartsExist(); if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(75)); + displayParts.push(ts.keywordPart(76)); displayParts.push(ts.spacePart()); } - displayParts.push(ts.keywordPart(82)); + displayParts.push(ts.keywordPart(83)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 232); - var isNamespace = declaration && declaration.name && declaration.name.kind === 70; - displayParts.push(ts.keywordPart(isNamespace ? 128 : 127)); + var declaration = ts.getDeclarationOfKind(symbol, 233); + var isNamespace = declaration && declaration.name && declaration.name.kind === 71; + displayParts.push(ts.keywordPart(isNamespace ? 129 : 128)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if ((symbolFlags & 262144) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.textPart("type parameter")); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.textPart("type parameter")); + displayParts.push(ts.punctuationPart(20)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); if (symbol.parent) { @@ -66138,25 +66208,25 @@ var ts; writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - var declaration = ts.getDeclarationOfKind(symbol, 144); + var declaration = ts.getDeclarationOfKind(symbol, 145); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { addInPrefix(); var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 155) { - displayParts.push(ts.keywordPart(93)); + if (declaration.kind === 156) { + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 154 && declaration.name) { + else if (declaration.kind !== 155 && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32)); } - else if (declaration.kind === 230) { + else if (declaration.kind === 231) { addInPrefix(); - displayParts.push(ts.keywordPart(137)); + displayParts.push(ts.keywordPart(138)); displayParts.push(ts.spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -66168,11 +66238,11 @@ var ts; symbolKind = ts.ScriptElementKind.enumMemberElement; addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 263) { + if (declaration.kind === 264) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral)); } @@ -66180,33 +66250,33 @@ var ts; } if (symbolFlags & 8388608) { addNewLineIfDisplayPartsExist(); - if (symbol.declarations[0].kind === 235) { - displayParts.push(ts.keywordPart(83)); + if (symbol.declarations[0].kind === 236) { + displayParts.push(ts.keywordPart(84)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(128)); + displayParts.push(ts.keywordPart(129)); } else { - displayParts.push(ts.keywordPart(90)); + displayParts.push(ts.keywordPart(91)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 236) { + if (declaration.kind === 237) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(131)); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); + displayParts.push(ts.keywordPart(132)); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); + displayParts.push(ts.punctuationPart(20)); } else { var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); if (internalAliasSymbol) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); addFullSymbolName(internalAliasSymbol, enclosingDeclaration); } @@ -66220,7 +66290,7 @@ var ts; if (type) { if (isThisExpression) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(98)); + displayParts.push(ts.keywordPart(99)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); @@ -66230,7 +66300,7 @@ var ts; symbolFlags & 3 || symbolKind === ts.ScriptElementKind.localVariableElement || isThisExpression) { - displayParts.push(ts.punctuationPart(55)); + displayParts.push(ts.punctuationPart(56)); displayParts.push(ts.spacePart()); if (type.symbol && type.symbol.flags & 262144) { var typeParameterParts = ts.mapToDisplayParts(function (writer) { @@ -66261,10 +66331,10 @@ var ts; documentation = symbol.getDocumentationComment(); tags = symbol.getJsDocTags(); if (documentation.length === 0 && symbol.flags & 4) { - if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264; })) { + if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 265; })) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (!declaration.parent || declaration.parent.kind !== 193) { + if (!declaration.parent || declaration.parent.kind !== 194) { continue; } var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -66288,7 +66358,7 @@ var ts; } function addInPrefix() { displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(91)); + displayParts.push(ts.keywordPart(92)); displayParts.push(ts.spacePart()); } function addFullSymbolName(symbol, enclosingDeclaration) { @@ -66313,9 +66383,9 @@ var ts; displayParts.push(ts.textOrKeywordPart(symbolKind)); return; default: - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.textOrKeywordPart(symbolKind)); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.textOrKeywordPart(symbolKind)); + displayParts.push(ts.punctuationPart(20)); return; } } @@ -66323,12 +66393,12 @@ var ts; ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32)); if (allSignatures.length > 1) { displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.operatorPart(36)); + displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.operatorPart(37)); displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), ts.SymbolDisplayPartKind.numericLiteral)); displayParts.push(ts.spacePart()); displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.punctuationPart(20)); } documentation = signature.getDocumentationComment(); tags = signature.getJsDocTags(); @@ -66346,14 +66416,14 @@ var ts; return false; } return ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 185) { + if (declaration.kind === 186) { return true; } - if (declaration.kind !== 225 && declaration.kind !== 227) { + if (declaration.kind !== 226 && declaration.kind !== 228) { return false; } for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { - if (parent.kind === 264 || parent.kind === 233) { + if (parent.kind === 265 || parent.kind === 234) { return false; } } @@ -66541,11 +66611,11 @@ var ts; function shouldRescanGreaterThanToken(node) { if (node) { switch (node.kind) { - case 30: - case 65: + case 31: case 66: + case 67: + case 47: case 46: - case 45: return true; } } @@ -66554,11 +66624,11 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { + case 253: + case 251: case 252: case 250: - case 251: - case 249: - return node.kind === 70; + return node.kind === 71; } } return false; @@ -66567,14 +66637,14 @@ var ts; return node && node.kind === 10; } function shouldRescanSlashToken(container) { - return container.kind === 11; + return container.kind === 12; } function shouldRescanTemplateToken(container) { - return container.kind === 14 || - container.kind === 15; + return container.kind === 15 || + container.kind === 16; } function startsWithSlashToken(t) { - return t === 40 || t === 62; + return t === 41 || t === 63; } function readTokenInfo(n) { ts.Debug.assert(scanner !== undefined); @@ -66605,7 +66675,7 @@ var ts; scanner.scan(); } var currentToken = scanner.getToken(); - if (expectedScanAction === 1 && currentToken === 28) { + if (expectedScanAction === 1 && currentToken === 29) { currentToken = scanner.reScanGreaterToken(); ts.Debug.assert(n.kind === currentToken); lastScanAction = 1; @@ -66615,11 +66685,11 @@ var ts; ts.Debug.assert(n.kind === currentToken); lastScanAction = 2; } - else if (expectedScanAction === 3 && currentToken === 17) { + else if (expectedScanAction === 3 && currentToken === 18) { currentToken = scanner.reScanTemplateToken(); lastScanAction = 3; } - else if (expectedScanAction === 4 && currentToken === 70) { + else if (expectedScanAction === 4 && currentToken === 71) { currentToken = scanner.scanJsxIdentifier(); lastScanAction = 4; } @@ -66753,8 +66823,8 @@ var ts; return startLine === endLine; }; FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 16, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 17, this.sourceFile); + var openBrace = ts.findChildOfKind(node, 17, this.sourceFile); + var closeBrace = ts.findChildOfKind(node, 18, this.sourceFile); if (openBrace && closeBrace) { var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; @@ -66921,91 +66991,91 @@ var ts; function Rules() { this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1)); this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1)); - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromRange(0, 141, [19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2)); - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17, 81), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17, 105), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2)); + this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2)); + this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromRange(0, 142, [20])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(18, 82), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(18, 106), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromTokens([22, 26, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8)); this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([70, 3, 74, 83, 90]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19, 3, 80, 101, 86, 81]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); - this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8)); - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); + this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([71, 3, 75, 84, 91]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20, 3, 81, 102, 87, 82]); + this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); + this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); + this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8)); + this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); + this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 42), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(42, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(36, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(36, 42), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(43, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(37, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(37, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([103, 99, 93, 79, 95, 102, 120]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109, 75]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); - this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19, 80, 81, 72]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2)); - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101, 86]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 134]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(44, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(43, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(37, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(37, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(44, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(38, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 100, 94, 80, 96, 103, 121]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110, 76]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); + this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20, 81, 82, 73]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([102, 87]), 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125, 135]), 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127, 131]), 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 130, 134, 114, 137, 139, 126]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 139])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); - this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(23, 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.FromTokens([19, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(19, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.FromTokens([18, 20, 28, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8)); - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 134, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38, formatting.Shared.TokenRange.FromTokens([70, 18])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115, 38]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2)); - this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(119, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(119, 88), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(70, formatting.Shared.TokenRange.FromTokens([12, 13])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 40), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8)); + this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128, 132]), 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117, 75, 124, 79, 83, 84, 85, 125, 108, 91, 109, 128, 129, 112, 114, 113, 131, 135, 115, 138, 140, 127]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([85, 108, 140])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); + this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(36, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(24, 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.FromTokens([20, 26])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 27), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(20, 27), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 29), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.FromTokens([19, 21, 29, 26])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8)); + this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([117, 71, 84, 79, 75, 115, 114, 112, 113, 125, 135, 21, 39])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2)); + this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(89, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8)); + this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(39, formatting.Shared.TokenRange.FromTokens([71, 19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2)); + this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(116, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8)); + this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 39]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2)); + this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(120, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(120, 89), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(71, formatting.Shared.TokenRange.FromTokens([13, 14])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 41), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(41, 29), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8)); this.HighPriorityCommonRules = [ this.IgnoreBeforeComment, this.IgnoreAfterLineComment, this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, @@ -67060,41 +67130,41 @@ var ts; this.SpaceAfterSemicolon, this.SpaceBetweenStatements, this.SpaceAfterTryFinally ]; - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8)); + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8)); this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8)); this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8)); - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8)); - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8)); - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(18, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(20, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13, 14]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13, 14]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14, 15])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14, 15])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); - this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); - this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); - this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8)); - this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8)); - this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2)); + this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2)); + this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8)); + this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); + this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); + this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); + this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); + this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8)); + this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8)); + this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2)); } Rules.prototype.getRuleName = function (rule) { var o = this; @@ -67106,36 +67176,36 @@ var ts; throw new Error("Unknown rule"); }; Rules.IsForContext = function (context) { - return context.contextNode.kind === 213; + return context.contextNode.kind === 214; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 193: case 194: - case 201: - case 245: - case 241: - case 157: - case 165: + case 195: + case 202: + case 246: + case 242: + case 158: case 166: + case 167: return true; - case 175: - case 230: - case 236: - case 225: - case 145: - case 263: + case 176: + case 231: + case 237: + case 226: + case 146: + case 264: + case 149: case 148: - case 147: - return context.currentTokenSpan.kind === 57 || context.nextTokenSpan.kind === 57; - case 214: - case 144: - return context.currentTokenSpan.kind === 91 || context.nextTokenSpan.kind === 91; + return context.currentTokenSpan.kind === 58 || context.nextTokenSpan.kind === 58; case 215: - return context.currentTokenSpan.kind === 141 || context.nextTokenSpan.kind === 141; + case 145: + return context.currentTokenSpan.kind === 92 || context.nextTokenSpan.kind === 92; + case 216: + return context.currentTokenSpan.kind === 142 || context.nextTokenSpan.kind === 142; } return false; }; @@ -67143,13 +67213,13 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 194; + return context.contextNode.kind === 195; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); }; Rules.IsBraceWrappedContext = function (context) { - return context.contextNode.kind === 173 || Rules.IsSingleLineBlockContext(context); + return context.contextNode.kind === 174 || Rules.IsSingleLineBlockContext(context); }; Rules.IsBeforeMultilineBlockContext = function (context) { return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -67171,65 +67241,65 @@ var ts; return true; } switch (node.kind) { - case 206: + case 207: + case 235: + case 178: case 234: - case 177: - case 233: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: case 154: - case 185: - case 151: + case 155: case 186: - case 229: + case 152: + case 187: + case 230: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 227 || context.contextNode.kind === 185; + return context.contextNode.kind === 228 || context.contextNode.kind === 186; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 228: - case 198: case 229: - case 231: - case 162: + case 199: + case 230: case 232: - case 243: + case 163: + case 233: case 244: - case 237: - case 240: + case 245: + case 238: + case 241: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 228: - case 232: - case 231: - case 259: + case 229: case 233: - case 220: + case 232: + case 260: + case 234: + case 221: return true; - case 206: { + case 207: { var blockParent = context.currentTokenParent.parent; - if (blockParent.kind !== 186 && - blockParent.kind !== 185) { + if (blockParent.kind !== 187 && + blockParent.kind !== 186) { return true; } } @@ -67238,59 +67308,59 @@ var ts; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 210: - case 220: - case 213: + case 211: + case 221: case 214: case 215: + case 216: + case 213: + case 224: case 212: - case 223: - case 211: - case 219: - case 259: + case 220: + case 260: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 177; + return context.contextNode.kind === 178; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 180; + return context.contextNode.kind === 181; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 181; + return context.contextNode.kind === 182; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); }; Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 25; + return context.currentTokenSpan.kind !== 26; }; Rules.IsNextTokenNotCloseBracket = function (context) { - return context.nextTokenSpan.kind !== 21; + return context.nextTokenSpan.kind !== 22; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 186; + return context.contextNode.kind === 187; }; Rules.IsNonJsxSameLineTokenContext = function (context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 10; }; Rules.IsNonJsxElementContext = function (context) { - return context.contextNode.kind !== 248; + return context.contextNode.kind !== 249; }; Rules.IsJsxExpressionContext = function (context) { - return context.contextNode.kind === 255; + return context.contextNode.kind === 256; }; Rules.IsNextTokenParentJsxAttribute = function (context) { - return context.nextTokenParent.kind === 252; + return context.nextTokenParent.kind === 253; }; Rules.IsJsxAttributeContext = function (context) { - return context.contextNode.kind === 252; + return context.contextNode.kind === 253; }; Rules.IsJsxSelfClosingElementContext = function (context) { - return context.contextNode.kind === 249; + return context.contextNode.kind === 250; }; Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); @@ -67305,42 +67375,42 @@ var ts; while (ts.isPartOfExpression(node)) { node = node.parent; } - return node.kind === 146; + return node.kind === 147; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 226 && + return context.currentTokenParent.kind === 227 && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 232; + return context.contextNode.kind === 233; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 162; + return context.contextNode.kind === 163; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { - if (token.kind !== 26 && token.kind !== 28) { + if (token.kind !== 27 && token.kind !== 29) { return false; } switch (parent.kind) { - case 158: - case 183: + case 159: + case 184: + case 231: + case 229: + case 199: case 230: case 228: - case 198: - case 229: - case 227: - case 185: case 186: + case 187: + case 151: case 150: - case 149: - case 154: case 155: - case 180: + case 156: case 181: - case 200: + case 182: + case 201: return true; default: return false; @@ -67351,16 +67421,16 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 183; + return context.contextNode.kind === 184; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 189; + return context.currentTokenSpan.kind === 105 && context.currentTokenParent.kind === 190; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 196 && context.contextNode.expression !== undefined; + return context.contextNode.kind === 197 && context.contextNode.expression !== undefined; }; Rules.IsNonNullAssertionContext = function (context) { - return context.contextNode.kind === 202; + return context.contextNode.kind === 203; }; return Rules; }()); @@ -67382,7 +67452,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 141 + 1; + this.mapRowLength = 142 + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); var rulesBucketConstructionStateList = new Array(this.map.length); this.FillRules(rules, rulesBucketConstructionStateList); @@ -67395,7 +67465,7 @@ var ts; }); }; RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - ts.Debug.assert(row <= 141 && column <= 141, "Must compute formatting context from tokens"); + ts.Debug.assert(row <= 142 && column <= 142, "Must compute formatting context from tokens"); var rulesBucketIndex = (row * this.mapRowLength) + column; return rulesBucketIndex; }; @@ -67559,7 +67629,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0; token <= 141; token++) { + for (var token = 0; token <= 142; token++) { result.push(token); } return result; @@ -67603,17 +67673,17 @@ var ts; }()); TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3])); - TokenRange.Keywords = TokenRange.FromRange(71, 141); - TokenRange.BinaryOperators = TokenRange.FromRange(26, 69); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 141, 117, 125]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42, 43, 51, 50]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 70, 18, 20, 16, 98, 93]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]); + TokenRange.Keywords = TokenRange.FromRange(72, 142); + TokenRange.BinaryOperators = TokenRange.FromRange(27, 70); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92, 93, 142, 118, 126]); + TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43, 44, 52, 51]); + TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 71, 19, 21, 17, 99, 94]); + TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]); + TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]); + TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]); + TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]); TokenRange.Comments = TokenRange.FromTokens([2, 3]); - TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 135, 121, 136, 104, 118]); + TokenRange.TypeNames = TokenRange.FromTokens([71, 133, 136, 122, 137, 105, 119]); Shared.TokenRange = TokenRange; })(Shared = formatting.Shared || (formatting.Shared = {})); })(formatting = ts.formatting || (ts.formatting = {})); @@ -67788,11 +67858,11 @@ var ts; } formatting.formatOnEnter = formatOnEnter; function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 24, sourceFile, options, rulesProvider, 3); + return formatOutermostParent(position, 25, sourceFile, options, rulesProvider, 3); } formatting.formatOnSemicolon = formatOnSemicolon; function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 17, sourceFile, options, rulesProvider, 4); + return formatOutermostParent(position, 18, sourceFile, options, rulesProvider, 4); } formatting.formatOnClosingCurly = formatOnClosingCurly; function formatDocument(sourceFile, rulesProvider, options) { @@ -67840,17 +67910,17 @@ var ts; } function isListElement(parent, node) { switch (parent.kind) { - case 228: case 229: + case 230: return ts.rangeContainsRange(parent.members, node); - case 232: - var body = parent.body; - return body && body.kind === 233 && ts.rangeContainsRange(body.statements, node); - case 264: - case 206: case 233: + var body = parent.body; + return body && body.kind === 234 && ts.rangeContainsRange(body.statements, node); + case 265: + case 207: + case 234: return ts.rangeContainsRange(parent.statements, node); - case 259: + case 260: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -68010,18 +68080,18 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 228: return 74; - case 229: return 108; - case 227: return 88; - case 231: return 231; - case 152: return 124; - case 153: return 134; - case 150: + case 229: return 75; + case 230: return 109; + case 228: return 89; + case 232: return 232; + case 153: return 125; + case 154: return 135; + case 151: if (node.asteriskToken) { - return 38; + return 39; } - case 148: - case 145: + case 149: + case 146: return node.name.kind; } } @@ -68029,9 +68099,9 @@ var ts; return { getIndentationForComment: function (kind, tokenIndentation, container) { switch (kind) { - case 17: - case 21: - case 19: + case 18: + case 22: + case 20: return indentation + getEffectiveDelta(delta, container); } return tokenIndentation !== -1 ? tokenIndentation : indentation; @@ -68043,26 +68113,26 @@ var ts; } } switch (kind) { - case 16: case 17: case 18: case 19: - case 81: - case 105: - case 56: + case 20: + case 82: + case 106: + case 57: return indentation; - case 40: - case 28: { - if (container.kind === 250 || - container.kind === 251 || - container.kind === 249) { + case 41: + case 29: { + if (container.kind === 251 || + container.kind === 252 || + container.kind === 250) { return indentation; } break; } - case 20: - case 21: { - if (container.kind !== 171) { + case 21: + case 22: { + if (container.kind !== 172) { return indentation; } break; @@ -68150,11 +68220,11 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 146 ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 147 ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent.kind === 176 && inheritedIndentation === -1) { + if (isFirstListItem && parent.kind === 177 && inheritedIndentation === -1) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -68470,41 +68540,41 @@ var ts; } function getOpenTokenForList(node, list) { switch (node.kind) { + case 152: + case 228: + case 186: case 151: - case 227: - case 185: case 150: - case 149: - case 186: + case 187: if (node.typeParameters === list) { - return 26; + return 27; } else if (node.parameters === list) { - return 18; + return 19; } break; - case 180: case 181: + case 182: if (node.typeArguments === list) { - return 26; + return 27; } else if (node.arguments === list) { - return 18; + return 19; } break; - case 158: + case 159: if (node.typeArguments === list) { - return 26; + return 27; } } return 0; } function getCloseTokenForOpenToken(kind) { switch (kind) { - case 18: - return 19; - case 26: - return 28; + case 19: + return 20; + case 27: + return 29; } return 0; } @@ -68590,7 +68660,7 @@ var ts; var current_1 = position; while (current_1 > 0) { var char = sourceFile.text.charCodeAt(current_1); - if (!ts.isWhiteSpace(char)) { + if (!ts.isWhiteSpaceLike(char)) { break; } current_1--; @@ -68598,7 +68668,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 25 && precedingToken.parent.kind !== 193) { + if (precedingToken.kind === 26 && precedingToken.parent.kind !== 194) { var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1) { return actualIndentation; @@ -68701,7 +68771,7 @@ var ts; } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) && - (parent.kind === 264 || !parentAndChildShareLine); + (parent.kind === 265 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -68718,10 +68788,10 @@ var ts; if (!nextToken) { return 0; } - if (nextToken.kind === 16) { + if (nextToken.kind === 17) { return 1; } - else if (nextToken.kind === 17) { + else if (nextToken.kind === 18) { var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; return lineAtPosition === nextTokenStartLine ? 2 : 0; } @@ -68731,8 +68801,8 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 210 && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 81, sourceFile); + if (parent.kind === 211 && parent.elseStatement === child) { + var elseKeyword = ts.findChildOfKind(parent, 82, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -68746,37 +68816,37 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 158: + case 159: return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd()); - case 177: + case 178: return node.parent.properties; - case 176: + case 177: return node.parent.elements; - case 227: - case 185: + case 228: case 186: - case 150: - case 149: - case 154: + case 187: case 151: - case 160: - case 155: { + case 150: + case 155: + case 152: + case 161: + case 156: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd()); } - case 228: + case 229: return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd()); - case 181: - case 180: { + case 182: + case 181: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd()); } - case 226: + case 227: return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd()); - case 240: - case 244: + case 241: + case 245: return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd()); } } @@ -68792,11 +68862,11 @@ var ts; } } function getLineIndentationWhenExpressionIsInMultiLine(node, sourceFile, options) { - if (node.kind === 19) { + if (node.kind === 20) { return -1; } - if (node.parent && (node.parent.kind === 180 || - node.parent.kind === 181) && + if (node.parent && (node.parent.kind === 181 || + node.parent.kind === 182) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -68814,10 +68884,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 180: case 181: - case 178: + case 182: case 179: + case 180: node = node.expression; break; default: @@ -68831,7 +68901,7 @@ var ts; var node = list[index]; var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; i--) { - if (list[i].kind === 25) { + if (list[i].kind === 26) { continue; } var prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; @@ -68871,49 +68941,49 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 209: - case 228: - case 198: + case 210: case 229: - case 231: + case 199: case 230: - case 176: - case 206: - case 233: + case 232: + case 231: case 177: - case 162: - case 171: - case 164: + case 207: case 234: - case 257: - case 256: - case 184: case 178: - case 180: + case 163: + case 172: + case 165: + case 235: + case 258: + case 257: + case 185: + case 179: case 181: - case 207: - case 225: - case 242: - case 218: - case 194: + case 182: + case 208: + case 226: + case 243: + case 219: + case 195: + case 175: case 174: - case 173: + case 251: case 250: - case 249: - case 255: - case 149: - case 154: + case 256: + case 150: case 155: - case 145: - case 159: + case 156: + case 146: case 160: - case 167: - case 182: - case 190: - case 244: - case 240: + case 161: + case 168: + case 183: + case 191: case 245: case 241: + case 246: + case 242: return true; } return false; @@ -68921,27 +68991,27 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0; switch (parent.kind) { - case 211: case 212: - case 214: - case 215: case 213: - case 210: - case 227: - case 185: - case 150: + case 215: + case 216: + case 214: + case 211: + case 228: case 186: case 151: + case 187: case 152: case 153: - return childKind !== 206; - case 243: - return childKind !== 244; - case 237: - return childKind !== 238 || - (child.namedBindings && child.namedBindings.kind !== 240); - case 248: - return childKind !== 251; + case 154: + return childKind !== 207; + case 244: + return childKind !== 245; + case 238: + return childKind !== 239 || + (child.namedBindings && child.namedBindings.kind !== 241); + case 249: + return childKind !== 252; } return indentByDefault; } @@ -69024,7 +69094,7 @@ var ts; } textChanges.getAdjustedEndPosition = getAdjustedEndPosition; function isSeparator(node, candidate) { - return candidate && node.parent && (candidate.kind === 25 || (candidate.kind === 24 && node.parent.kind === 177)); + return candidate && node.parent && (candidate.kind === 26 || (candidate.kind === 25 && node.parent.kind === 178)); } function spaces(count) { var s = ""; @@ -69126,15 +69196,15 @@ var ts; ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) { if (options === void 0) { options = {}; } if ((ts.isStatementButNotDeclaration(after)) || + after.kind === 149 || after.kind === 148 || - after.kind === 147 || - after.kind === 149) { + after.kind === 150) { if (sourceFile.text.charCodeAt(after.end - 1) !== 59) { this.changes.push({ sourceFile: sourceFile, options: {}, range: { pos: after.end, end: after.end }, - node: ts.createToken(24) + node: ts.createToken(25) }); } } @@ -69185,11 +69255,11 @@ var ts; var separator = void 0; var multilineList = false; if (containingList.length === 1) { - separator = 25; + separator = 26; } else { var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile); - separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25; + separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 26; var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; } @@ -69390,7 +69460,7 @@ var ts; if (force || !isTrivia(s)) { this.lastNonTriviaPosition = this.writer.getTextPos(); var i = 0; - while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) { + while (ts.isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { i++; } this.lastNonTriviaPosition -= i; @@ -69551,10 +69621,10 @@ var ts; var sourceFile = context.sourceFile; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind !== 70) { + if (token.kind !== 71) { return undefined; } - if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98) { + if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99) { return undefined; } var classMemberDeclaration = ts.getThisContainer(token, false); @@ -69570,7 +69640,7 @@ var ts; function getActionsForAddMissingMemberInJavaScriptFile() { var memberName = token.getText(); if (isStatic) { - if (classDeclaration.kind === 198) { + if (classDeclaration.kind === 199) { return undefined; } var className = classDeclaration.name.getText(); @@ -69604,15 +69674,15 @@ var ts; } function getActionsForAddMissingMemberInTypeScriptFile() { var typeNode; - if (token.parent.parent.kind === 193) { + if (token.parent.parent.kind === 194) { var binaryExpression = token.parent.parent; var checker = context.program.getTypeChecker(); var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right))); typeNode = checker.typeToTypeNode(widenedType, classDeclaration); } - typeNode = typeNode || ts.createKeywordTypeNode(118); + typeNode = typeNode || ts.createKeywordTypeNode(119); var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile); - var property = ts.createProperty(undefined, isStatic ? [ts.createToken(114)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined); + var property = ts.createProperty(undefined, isStatic ? [ts.createToken(115)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined); var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter }); var actions = [{ @@ -69620,7 +69690,7 @@ var ts; changes: propertyChangeTracker.getChanges() }]; if (!isStatic) { - var stringTypeNode = ts.createKeywordTypeNode(135); + var stringTypeNode = ts.createKeywordTypeNode(136); var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined); var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode); var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69686,7 +69756,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 98) { + if (token.kind !== 99) { return undefined; } var constructor = ts.getContainingFunction(token); @@ -69694,7 +69764,7 @@ var ts; if (!superCall) { return undefined; } - if (superCall.expression && superCall.expression.kind === 180) { + if (superCall.expression && superCall.expression.kind === 181) { var arguments_1 = superCall.expression.arguments; for (var i = 0; i < arguments_1.length; i++) { if (arguments_1[i].expression === token) { @@ -69710,7 +69780,7 @@ var ts; changes: changeTracker.getChanges() }]; function findSuperCall(n) { - if (n.kind === 209 && ts.isSuperCall(n.expression)) { + if (n.kind === 210 && ts.isSuperCall(n.expression)) { return n; } if (ts.isFunctionLike(n)) { @@ -69731,7 +69801,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 122) { + if (token.kind !== 123) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69756,7 +69826,7 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); var classDeclNode = ts.getContainingClass(token); - if (!(token.kind === 70 && ts.isClassLike(classDeclNode))) { + if (!(token.kind === 71 && ts.isClassLike(classDeclNode))) { return undefined; } var heritageClauses = classDeclNode.heritageClauses; @@ -69764,15 +69834,15 @@ var ts; return undefined; } var extendsToken = heritageClauses[0].getFirstToken(); - if (!(extendsToken && extendsToken.kind === 84)) { + if (!(extendsToken && extendsToken.kind === 85)) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); - changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107)); + changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(108)); for (var i = 1; i < heritageClauses.length; i++) { var keywordToken = heritageClauses[i].getFirstToken(); if (keywordToken) { - changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25)); + changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(26)); } } var result = [{ @@ -69793,7 +69863,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 70) { + if (token.kind !== 71) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69819,15 +69889,15 @@ var ts; var sourceFile = context.sourceFile; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind === 20) { + if (token.kind === 21) { token = ts.getTokenAtPosition(sourceFile, start + 1); } switch (token.kind) { - case 70: + case 71: switch (token.parent.kind) { - case 225: + case 226: switch (token.parent.parent.parent.kind) { - case 213: + case 214: var forStatement = token.parent.parent.parent; var forInitializer = forStatement.initializer; if (forInitializer.declarations.length === 1) { @@ -69836,16 +69906,16 @@ var ts; else { return deleteNodeInList(token.parent); } - case 215: + case 216: var forOfStatement = token.parent.parent.parent; - if (forOfStatement.initializer.kind === 226) { + if (forOfStatement.initializer.kind === 227) { var forOfInitializer = forOfStatement.initializer; return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()); } break; - case 214: + case 215: return undefined; - case 259: + case 260: var catchClause = token.parent.parent; var parameter = catchClause.variableDeclaration.getChildren()[0]; return deleteNode(parameter); @@ -69858,15 +69928,15 @@ var ts; return deleteNodeInList(token.parent); } } - case 144: + case 145: var typeParameters = token.parent.parent.typeParameters; if (typeParameters.length === 1) { var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1); - if (!previousToken || previousToken.kind !== 26) { + if (!previousToken || previousToken.kind !== 27) { return deleteRange(typeParameters); } var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end); - if (!nextToken || nextToken.kind !== 28) { + if (!nextToken || nextToken.kind !== 29) { return deleteRange(typeParameters); } return deleteNodeRange(previousToken, nextToken); @@ -69874,7 +69944,7 @@ var ts; else { return deleteNodeInList(token.parent); } - case 145: + case 146: var functionDeclaration = token.parent.parent; if (functionDeclaration.parameters.length === 1) { return deleteNode(token.parent); @@ -69882,43 +69952,43 @@ var ts; else { return deleteNodeInList(token.parent); } - case 236: - var importEquals = ts.getAncestor(token, 236); + case 237: + var importEquals = ts.getAncestor(token, 237); return deleteNode(importEquals); - case 241: + case 242: var namedImports = token.parent.parent; if (namedImports.elements.length === 1) { - var importSpec = ts.getAncestor(token, 237); + var importSpec = ts.getAncestor(token, 238); return deleteNode(importSpec); } else { return deleteNodeInList(token.parent); } - case 238: + case 239: var importClause = token.parent; if (!importClause.namedBindings) { - var importDecl = ts.getAncestor(importClause, 237); + var importDecl = ts.getAncestor(importClause, 238); return deleteNode(importDecl); } else { var start_4 = importClause.name.getStart(sourceFile); var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end); - if (nextToken && nextToken.kind === 25) { + if (nextToken && nextToken.kind === 26) { return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) }); } else { return deleteNode(importClause.name); } } - case 239: + case 240: var namespaceImport = token.parent; if (namespaceImport.name === token && !namespaceImport.parent.name) { - var importDecl = ts.getAncestor(namespaceImport, 237); + var importDecl = ts.getAncestor(namespaceImport, 238); return deleteNode(importDecl); } else { var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1); - if (previousToken && previousToken.kind === 25) { + if (previousToken && previousToken.kind === 26) { var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart); return deleteRange({ pos: startPosition, end: namespaceImport.end }); } @@ -69926,8 +69996,8 @@ var ts; } } break; - case 148: - case 239: + case 149: + case 240: return deleteNode(token.parent); } if (ts.isDeclarationName(token)) { @@ -70115,10 +70185,10 @@ var ts; function getImportDeclaration(moduleSpecifier) { var node = moduleSpecifier; while (node) { - if (node.kind === 237) { + if (node.kind === 238) { return node; } - if (node.kind === 236) { + if (node.kind === 237) { return node; } node = node.parent; @@ -70151,9 +70221,9 @@ var ts; var existingModuleSpecifier; for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) { var declaration = declarations_14[_i]; - if (declaration.kind === 237) { + if (declaration.kind === 238) { var namedBindings = declaration.importClause && declaration.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { namespaceImportDeclaration = declaration; } else { @@ -70180,7 +70250,7 @@ var ts; } return actions; function getModuleSpecifierFromImportEqualsDeclaration(declaration) { - if (declaration.moduleReference && declaration.moduleReference.kind === 247) { + if (declaration.moduleReference && declaration.moduleReference.kind === 248) { return declaration.moduleReference.expression.getText(); } return declaration.moduleReference.getText(); @@ -70196,7 +70266,7 @@ var ts; } function getCodeActionForNamespaceImport(declaration) { var namespacePrefix; - if (declaration.kind === 237) { + if (declaration.kind === 238) { namespacePrefix = declaration.importClause.namedBindings.name.getText(); } else { @@ -70210,7 +70280,7 @@ var ts; if (!lastImportDeclaration) { for (var i = sourceFile.statements.length - 1; i >= 0; i--) { var statement = sourceFile.statements[i]; - if (statement.kind === 236 || statement.kind === 237) { + if (statement.kind === 237 || statement.kind === 238) { lastImportDeclaration = statement; break; } @@ -70244,7 +70314,7 @@ var ts; tryGetModuleNameFromRootDirs() || ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory)); function tryGetModuleNameFromAmbientModule() { - if (moduleSymbol.valueDeclaration.kind !== 264) { + if (moduleSymbol.valueDeclaration.kind !== 265) { return moduleSymbol.name; } } @@ -70506,15 +70576,15 @@ var ts; var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); var optional = !!(symbol.flags & 67108864); switch (declaration.kind) { - case 152: case 153: - case 147: + case 154: case 148: + case 149: var typeNode = checker.typeToTypeNode(type, enclosingDeclaration); - var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(54) : undefined, typeNode, undefined); + var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(55) : undefined, typeNode, undefined); return property; - case 149: case 150: + case 151: var signatures = checker.getSignaturesOfType(type, 0); if (!ts.some(signatures)) { return undefined; @@ -70549,12 +70619,12 @@ var ts; return undefined; } function signatureToMethodDeclaration(signature, enclosingDeclaration, body) { - var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150, enclosingDeclaration); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration); if (signatureDeclaration) { signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; - signatureDeclaration.questionToken = optional ? ts.createToken(54) : undefined; + signatureDeclaration.questionToken = optional ? ts.createToken(55) : undefined; signatureDeclaration.body = body; } return signatureDeclaration; @@ -70578,19 +70648,19 @@ var ts; var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); }); var parameters = []; for (var i = 0; i < maxNonRestArgs; i++) { - var anyType = ts.createKeywordTypeNode(118); - var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(54) : undefined, anyType, undefined); + var anyType = ts.createKeywordTypeNode(119); + var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(55) : undefined, anyType, undefined); parameters.push(newParameter); } if (someSigHasRestParameter) { - var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118)); - var restParameter = ts.createParameter(undefined, undefined, ts.createToken(23), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(54) : undefined, anyArrayType, undefined); + var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119)); + var restParameter = ts.createParameter(undefined, undefined, ts.createToken(24), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(55) : undefined, anyArrayType, undefined); parameters.push(restParameter); } return createStubbedMethod(modifiers, name, optional, undefined, parameters, undefined); } function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) { - return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(54) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); + return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); } codefix.createStubbedMethod = createStubbedMethod; function createStubbedMethodBody() { @@ -70598,10 +70668,10 @@ var ts; } function createVisibilityModifier(flags) { if (flags & 4) { - return ts.createToken(113); + return ts.createToken(114); } else if (flags & 16) { - return ts.createToken(112); + return ts.createToken(113); } return undefined; } @@ -70611,8 +70681,8 @@ var ts; (function (ts) { ts.servicesVersion = "0.5"; function createNode(kind, pos, end, parent) { - var node = kind >= 142 ? new NodeObject(kind, pos, end) : - kind === 70 ? new IdentifierObject(70, pos, end) : + var node = kind >= 143 ? new NodeObject(kind, pos, end) : + kind === 71 ? new IdentifierObject(71, pos, end) : new TokenObject(kind, pos, end); node.parent = parent; return node; @@ -70669,7 +70739,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(293, nodes.pos, nodes.end, this); + var list = createNode(294, nodes.pos, nodes.end, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) { @@ -70688,11 +70758,11 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 142) { + if (this.kind >= 143) { ts.scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos_3 = this.pos; - var useJSDocScanner_1 = this.kind >= 282 && this.kind <= 292; + var useJSDocScanner_1 = this.kind >= 283 && this.kind <= 293; var processNode = function (node) { var isJSDocTagNode = ts.isJSDocTag(node); if (!isJSDocTagNode && pos_3 < node.pos) { @@ -70745,8 +70815,8 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 266 || kid.kind > 292; }); - return child.kind < 142 ? + var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 293; }); + return child.kind < 143 ? child : child.getFirstToken(sourceFile); }; @@ -70756,7 +70826,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 142 ? child : child.getLastToken(sourceFile); + return child.kind < 143 ? child : child.getLastToken(sourceFile); }; NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) { return ts.forEachChild(this, cbNode, cbNodeArray); @@ -70861,7 +70931,7 @@ var ts; } return IdentifierObject; }(TokenOrIdentifierObject)); - IdentifierObject.prototype.kind = 70; + IdentifierObject.prototype.kind = 71; var TypeObject = (function () { function TypeObject(checker, flags) { this.checker = checker; @@ -70993,9 +71063,9 @@ var ts; if (result_7 !== undefined) { return result_7; } - if (declaration.name.kind === 143) { + if (declaration.name.kind === 144) { var expr = declaration.name.expression; - if (expr.kind === 178) { + if (expr.kind === 179) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -71005,7 +71075,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 || + if (node.kind === 71 || node.kind === 9 || node.kind === 8) { return node.text; @@ -71015,10 +71085,10 @@ var ts; } function visit(node) { switch (node.kind) { - case 227: - case 185: + case 228: + case 186: + case 151: case 150: - case 149: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -71035,30 +71105,30 @@ var ts; } ts.forEachChild(node, visit); break; - case 228: - case 198: case 229: + case 199: case 230: case 231: case 232: - case 236: - case 245: - case 241: - case 236: - case 238: + case 233: + case 237: + case 246: + case 242: + case 237: case 239: - case 152: + case 240: case 153: - case 162: + case 154: + case 163: addDeclaration(node); ts.forEachChild(node, visit); break; - case 145: + case 146: if (!ts.hasModifier(node, 92)) { break; } - case 225: - case 175: { + case 226: + case 176: { var decl = node; if (ts.isBindingPattern(decl.name)) { ts.forEachChild(decl.name, visit); @@ -71067,24 +71137,24 @@ var ts; if (decl.initializer) visit(decl.initializer); } - case 263: + case 264: + case 149: case 148: - case 147: addDeclaration(node); break; - case 243: + case 244: if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 237: + case 238: var importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239) { + if (importClause.namedBindings.kind === 240) { addDeclaration(importClause.namedBindings); } else { @@ -71550,12 +71620,12 @@ var ts; var symbol = typeChecker.getSymbolAtLocation(node); if (!symbol || typeChecker.isUnknownSymbol(symbol)) { switch (node.kind) { - case 70: - case 178: - case 142: - case 98: - case 168: - case 96: + case 71: + case 179: + case 143: + case 99: + case 169: + case 97: var type = typeChecker.getTypeAtLocation(node); if (type) { return { @@ -71684,16 +71754,16 @@ var ts; return; } switch (node.kind) { - case 178: - case 142: + case 179: + case 143: case 9: - case 85: - case 100: - case 94: - case 96: - case 98: - case 168: - case 70: + case 86: + case 101: + case 95: + case 97: + case 99: + case 169: + case 71: break; default: return; @@ -71704,7 +71774,7 @@ var ts; nodeForStartPos = nodeForStartPos.parent; } else if (ts.isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 232 && + if (nodeForStartPos.parent.parent.kind === 233 && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } @@ -71784,14 +71854,14 @@ var ts; return result; function getMatchingTokenKind(token) { switch (token.kind) { - case 16: return 17; - case 18: return 19; - case 20: return 21; - case 26: return 28; - case 17: return 16; - case 19: return 18; - case 21: return 20; - case 28: return 26; + case 17: return 18; + case 19: return 20; + case 21: return 22; + case 27: return 29; + case 18: return 17; + case 20: return 19; + case 22: return 21; + case 29: return 27; } return undefined; } @@ -71997,13 +72067,13 @@ var ts; sourceFile.nameTable = nameTable; function walk(node) { switch (node.kind) { - case 70: + case 71: setNameTable(node.text, node); break; case 9: case 8: if (ts.isDeclarationName(node) || - node.parent.kind === 247 || + node.parent.kind === 248 || isArgumentOfElementAccessExpression(node) || ts.isLiteralComputedPropertyDeclarationName(node)) { setNameTable(node.text, node); @@ -72025,13 +72095,13 @@ var ts; } function isObjectLiteralElement(node) { switch (node.kind) { - case 252: - case 254: - case 260: + case 253: + case 255: case 261: - case 150: - case 152: + case 262: + case 151: case 153: + case 154: return true; } return false; @@ -72040,12 +72110,12 @@ var ts; switch (node.kind) { case 9: case 8: - if (node.parent.kind === 143) { + if (node.parent.kind === 144) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined; } - case 70: + case 71: return isObjectLiteralElement(node.parent) && - (node.parent.parent.kind === 177 || node.parent.parent.kind === 253) && + (node.parent.parent.kind === 178 || node.parent.parent.kind === 254) && node.parent.name === node ? node.parent : undefined; } return undefined; @@ -72078,7 +72148,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 179 && + node.parent.kind === 180 && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { @@ -73599,7 +73669,7 @@ var ts; BuilderFileInfo.prototype.containsOnlyAmbientModules = function (sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; - if (statement.kind !== 232 || statement.name.kind !== 9) { + if (statement.kind !== 233 || statement.name.kind !== 9) { return false; } } diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 69940fd023f7f..756d8e4d62582 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -18,7 +18,7 @@ declare namespace ts { [index: string]: T; } interface Map { - get(key: string): T; + get(key: string): T | undefined; has(key: string): boolean; set(key: string, value: T): this; delete(key: string): boolean; @@ -66,323 +66,324 @@ declare namespace ts { NumericLiteral = 8, StringLiteral = 9, JsxText = 10, - RegularExpressionLiteral = 11, - NoSubstitutionTemplateLiteral = 12, - TemplateHead = 13, - TemplateMiddle = 14, - TemplateTail = 15, - OpenBraceToken = 16, - CloseBraceToken = 17, - OpenParenToken = 18, - CloseParenToken = 19, - OpenBracketToken = 20, - CloseBracketToken = 21, - DotToken = 22, - DotDotDotToken = 23, - SemicolonToken = 24, - CommaToken = 25, - LessThanToken = 26, - LessThanSlashToken = 27, - GreaterThanToken = 28, - LessThanEqualsToken = 29, - GreaterThanEqualsToken = 30, - EqualsEqualsToken = 31, - ExclamationEqualsToken = 32, - EqualsEqualsEqualsToken = 33, - ExclamationEqualsEqualsToken = 34, - EqualsGreaterThanToken = 35, - PlusToken = 36, - MinusToken = 37, - AsteriskToken = 38, - AsteriskAsteriskToken = 39, - SlashToken = 40, - PercentToken = 41, - PlusPlusToken = 42, - MinusMinusToken = 43, - LessThanLessThanToken = 44, - GreaterThanGreaterThanToken = 45, - GreaterThanGreaterThanGreaterThanToken = 46, - AmpersandToken = 47, - BarToken = 48, - CaretToken = 49, - ExclamationToken = 50, - TildeToken = 51, - AmpersandAmpersandToken = 52, - BarBarToken = 53, - QuestionToken = 54, - ColonToken = 55, - AtToken = 56, - EqualsToken = 57, - PlusEqualsToken = 58, - MinusEqualsToken = 59, - AsteriskEqualsToken = 60, - AsteriskAsteriskEqualsToken = 61, - SlashEqualsToken = 62, - PercentEqualsToken = 63, - LessThanLessThanEqualsToken = 64, - GreaterThanGreaterThanEqualsToken = 65, - GreaterThanGreaterThanGreaterThanEqualsToken = 66, - AmpersandEqualsToken = 67, - BarEqualsToken = 68, - CaretEqualsToken = 69, - Identifier = 70, - BreakKeyword = 71, - CaseKeyword = 72, - CatchKeyword = 73, - ClassKeyword = 74, - ConstKeyword = 75, - ContinueKeyword = 76, - DebuggerKeyword = 77, - DefaultKeyword = 78, - DeleteKeyword = 79, - DoKeyword = 80, - ElseKeyword = 81, - EnumKeyword = 82, - ExportKeyword = 83, - ExtendsKeyword = 84, - FalseKeyword = 85, - FinallyKeyword = 86, - ForKeyword = 87, - FunctionKeyword = 88, - IfKeyword = 89, - ImportKeyword = 90, - InKeyword = 91, - InstanceOfKeyword = 92, - NewKeyword = 93, - NullKeyword = 94, - ReturnKeyword = 95, - SuperKeyword = 96, - SwitchKeyword = 97, - ThisKeyword = 98, - ThrowKeyword = 99, - TrueKeyword = 100, - TryKeyword = 101, - TypeOfKeyword = 102, - VarKeyword = 103, - VoidKeyword = 104, - WhileKeyword = 105, - WithKeyword = 106, - ImplementsKeyword = 107, - InterfaceKeyword = 108, - LetKeyword = 109, - PackageKeyword = 110, - PrivateKeyword = 111, - ProtectedKeyword = 112, - PublicKeyword = 113, - StaticKeyword = 114, - YieldKeyword = 115, - AbstractKeyword = 116, - AsKeyword = 117, - AnyKeyword = 118, - AsyncKeyword = 119, - AwaitKeyword = 120, - BooleanKeyword = 121, - ConstructorKeyword = 122, - DeclareKeyword = 123, - GetKeyword = 124, - IsKeyword = 125, - KeyOfKeyword = 126, - ModuleKeyword = 127, - NamespaceKeyword = 128, - NeverKeyword = 129, - ReadonlyKeyword = 130, - RequireKeyword = 131, - NumberKeyword = 132, - ObjectKeyword = 133, - SetKeyword = 134, - StringKeyword = 135, - SymbolKeyword = 136, - TypeKeyword = 137, - UndefinedKeyword = 138, - FromKeyword = 139, - GlobalKeyword = 140, - OfKeyword = 141, - QualifiedName = 142, - ComputedPropertyName = 143, - TypeParameter = 144, - Parameter = 145, - Decorator = 146, - PropertySignature = 147, - PropertyDeclaration = 148, - MethodSignature = 149, - MethodDeclaration = 150, - Constructor = 151, - GetAccessor = 152, - SetAccessor = 153, - CallSignature = 154, - ConstructSignature = 155, - IndexSignature = 156, - TypePredicate = 157, - TypeReference = 158, - FunctionType = 159, - ConstructorType = 160, - TypeQuery = 161, - TypeLiteral = 162, - ArrayType = 163, - TupleType = 164, - UnionType = 165, - IntersectionType = 166, - ParenthesizedType = 167, - ThisType = 168, - TypeOperator = 169, - IndexedAccessType = 170, - MappedType = 171, - LiteralType = 172, - ObjectBindingPattern = 173, - ArrayBindingPattern = 174, - BindingElement = 175, - ArrayLiteralExpression = 176, - ObjectLiteralExpression = 177, - PropertyAccessExpression = 178, - ElementAccessExpression = 179, - CallExpression = 180, - NewExpression = 181, - TaggedTemplateExpression = 182, - TypeAssertionExpression = 183, - ParenthesizedExpression = 184, - FunctionExpression = 185, - ArrowFunction = 186, - DeleteExpression = 187, - TypeOfExpression = 188, - VoidExpression = 189, - AwaitExpression = 190, - PrefixUnaryExpression = 191, - PostfixUnaryExpression = 192, - BinaryExpression = 193, - ConditionalExpression = 194, - TemplateExpression = 195, - YieldExpression = 196, - SpreadElement = 197, - ClassExpression = 198, - OmittedExpression = 199, - ExpressionWithTypeArguments = 200, - AsExpression = 201, - NonNullExpression = 202, - MetaProperty = 203, - TemplateSpan = 204, - SemicolonClassElement = 205, - Block = 206, - VariableStatement = 207, - EmptyStatement = 208, - ExpressionStatement = 209, - IfStatement = 210, - DoStatement = 211, - WhileStatement = 212, - ForStatement = 213, - ForInStatement = 214, - ForOfStatement = 215, - ContinueStatement = 216, - BreakStatement = 217, - ReturnStatement = 218, - WithStatement = 219, - SwitchStatement = 220, - LabeledStatement = 221, - ThrowStatement = 222, - TryStatement = 223, - DebuggerStatement = 224, - VariableDeclaration = 225, - VariableDeclarationList = 226, - FunctionDeclaration = 227, - ClassDeclaration = 228, - InterfaceDeclaration = 229, - TypeAliasDeclaration = 230, - EnumDeclaration = 231, - ModuleDeclaration = 232, - ModuleBlock = 233, - CaseBlock = 234, - NamespaceExportDeclaration = 235, - ImportEqualsDeclaration = 236, - ImportDeclaration = 237, - ImportClause = 238, - NamespaceImport = 239, - NamedImports = 240, - ImportSpecifier = 241, - ExportAssignment = 242, - ExportDeclaration = 243, - NamedExports = 244, - ExportSpecifier = 245, - MissingDeclaration = 246, - ExternalModuleReference = 247, - JsxElement = 248, - JsxSelfClosingElement = 249, - JsxOpeningElement = 250, - JsxClosingElement = 251, - JsxAttribute = 252, - JsxAttributes = 253, - JsxSpreadAttribute = 254, - JsxExpression = 255, - CaseClause = 256, - DefaultClause = 257, - HeritageClause = 258, - CatchClause = 259, - PropertyAssignment = 260, - ShorthandPropertyAssignment = 261, - SpreadAssignment = 262, - EnumMember = 263, - SourceFile = 264, - Bundle = 265, - JSDocTypeExpression = 266, - JSDocAllType = 267, - JSDocUnknownType = 268, - JSDocArrayType = 269, - JSDocUnionType = 270, - JSDocTupleType = 271, - JSDocNullableType = 272, - JSDocNonNullableType = 273, - JSDocRecordType = 274, - JSDocRecordMember = 275, - JSDocTypeReference = 276, - JSDocOptionalType = 277, - JSDocFunctionType = 278, - JSDocVariadicType = 279, - JSDocConstructorType = 280, - JSDocThisType = 281, - JSDocComment = 282, - JSDocTag = 283, - JSDocAugmentsTag = 284, - JSDocParameterTag = 285, - JSDocReturnTag = 286, - JSDocTypeTag = 287, - JSDocTemplateTag = 288, - JSDocTypedefTag = 289, - JSDocPropertyTag = 290, - JSDocTypeLiteral = 291, - JSDocLiteralType = 292, - SyntaxList = 293, - NotEmittedStatement = 294, - PartiallyEmittedExpression = 295, - MergeDeclarationMarker = 296, - EndOfDeclarationMarker = 297, - Count = 298, - FirstAssignment = 57, - LastAssignment = 69, - FirstCompoundAssignment = 58, - LastCompoundAssignment = 69, - FirstReservedWord = 71, - LastReservedWord = 106, - FirstKeyword = 71, - LastKeyword = 141, - FirstFutureReservedWord = 107, - LastFutureReservedWord = 115, - FirstTypeNode = 157, - LastTypeNode = 172, - FirstPunctuation = 16, - LastPunctuation = 69, + JsxTextAllWhiteSpaces = 11, + RegularExpressionLiteral = 12, + NoSubstitutionTemplateLiteral = 13, + TemplateHead = 14, + TemplateMiddle = 15, + TemplateTail = 16, + OpenBraceToken = 17, + CloseBraceToken = 18, + OpenParenToken = 19, + CloseParenToken = 20, + OpenBracketToken = 21, + CloseBracketToken = 22, + DotToken = 23, + DotDotDotToken = 24, + SemicolonToken = 25, + CommaToken = 26, + LessThanToken = 27, + LessThanSlashToken = 28, + GreaterThanToken = 29, + LessThanEqualsToken = 30, + GreaterThanEqualsToken = 31, + EqualsEqualsToken = 32, + ExclamationEqualsToken = 33, + EqualsEqualsEqualsToken = 34, + ExclamationEqualsEqualsToken = 35, + EqualsGreaterThanToken = 36, + PlusToken = 37, + MinusToken = 38, + AsteriskToken = 39, + AsteriskAsteriskToken = 40, + SlashToken = 41, + PercentToken = 42, + PlusPlusToken = 43, + MinusMinusToken = 44, + LessThanLessThanToken = 45, + GreaterThanGreaterThanToken = 46, + GreaterThanGreaterThanGreaterThanToken = 47, + AmpersandToken = 48, + BarToken = 49, + CaretToken = 50, + ExclamationToken = 51, + TildeToken = 52, + AmpersandAmpersandToken = 53, + BarBarToken = 54, + QuestionToken = 55, + ColonToken = 56, + AtToken = 57, + EqualsToken = 58, + PlusEqualsToken = 59, + MinusEqualsToken = 60, + AsteriskEqualsToken = 61, + AsteriskAsteriskEqualsToken = 62, + SlashEqualsToken = 63, + PercentEqualsToken = 64, + LessThanLessThanEqualsToken = 65, + GreaterThanGreaterThanEqualsToken = 66, + GreaterThanGreaterThanGreaterThanEqualsToken = 67, + AmpersandEqualsToken = 68, + BarEqualsToken = 69, + CaretEqualsToken = 70, + Identifier = 71, + BreakKeyword = 72, + CaseKeyword = 73, + CatchKeyword = 74, + ClassKeyword = 75, + ConstKeyword = 76, + ContinueKeyword = 77, + DebuggerKeyword = 78, + DefaultKeyword = 79, + DeleteKeyword = 80, + DoKeyword = 81, + ElseKeyword = 82, + EnumKeyword = 83, + ExportKeyword = 84, + ExtendsKeyword = 85, + FalseKeyword = 86, + FinallyKeyword = 87, + ForKeyword = 88, + FunctionKeyword = 89, + IfKeyword = 90, + ImportKeyword = 91, + InKeyword = 92, + InstanceOfKeyword = 93, + NewKeyword = 94, + NullKeyword = 95, + ReturnKeyword = 96, + SuperKeyword = 97, + SwitchKeyword = 98, + ThisKeyword = 99, + ThrowKeyword = 100, + TrueKeyword = 101, + TryKeyword = 102, + TypeOfKeyword = 103, + VarKeyword = 104, + VoidKeyword = 105, + WhileKeyword = 106, + WithKeyword = 107, + ImplementsKeyword = 108, + InterfaceKeyword = 109, + LetKeyword = 110, + PackageKeyword = 111, + PrivateKeyword = 112, + ProtectedKeyword = 113, + PublicKeyword = 114, + StaticKeyword = 115, + YieldKeyword = 116, + AbstractKeyword = 117, + AsKeyword = 118, + AnyKeyword = 119, + AsyncKeyword = 120, + AwaitKeyword = 121, + BooleanKeyword = 122, + ConstructorKeyword = 123, + DeclareKeyword = 124, + GetKeyword = 125, + IsKeyword = 126, + KeyOfKeyword = 127, + ModuleKeyword = 128, + NamespaceKeyword = 129, + NeverKeyword = 130, + ReadonlyKeyword = 131, + RequireKeyword = 132, + NumberKeyword = 133, + ObjectKeyword = 134, + SetKeyword = 135, + StringKeyword = 136, + SymbolKeyword = 137, + TypeKeyword = 138, + UndefinedKeyword = 139, + FromKeyword = 140, + GlobalKeyword = 141, + OfKeyword = 142, + QualifiedName = 143, + ComputedPropertyName = 144, + TypeParameter = 145, + Parameter = 146, + Decorator = 147, + PropertySignature = 148, + PropertyDeclaration = 149, + MethodSignature = 150, + MethodDeclaration = 151, + Constructor = 152, + GetAccessor = 153, + SetAccessor = 154, + CallSignature = 155, + ConstructSignature = 156, + IndexSignature = 157, + TypePredicate = 158, + TypeReference = 159, + FunctionType = 160, + ConstructorType = 161, + TypeQuery = 162, + TypeLiteral = 163, + ArrayType = 164, + TupleType = 165, + UnionType = 166, + IntersectionType = 167, + ParenthesizedType = 168, + ThisType = 169, + TypeOperator = 170, + IndexedAccessType = 171, + MappedType = 172, + LiteralType = 173, + ObjectBindingPattern = 174, + ArrayBindingPattern = 175, + BindingElement = 176, + ArrayLiteralExpression = 177, + ObjectLiteralExpression = 178, + PropertyAccessExpression = 179, + ElementAccessExpression = 180, + CallExpression = 181, + NewExpression = 182, + TaggedTemplateExpression = 183, + TypeAssertionExpression = 184, + ParenthesizedExpression = 185, + FunctionExpression = 186, + ArrowFunction = 187, + DeleteExpression = 188, + TypeOfExpression = 189, + VoidExpression = 190, + AwaitExpression = 191, + PrefixUnaryExpression = 192, + PostfixUnaryExpression = 193, + BinaryExpression = 194, + ConditionalExpression = 195, + TemplateExpression = 196, + YieldExpression = 197, + SpreadElement = 198, + ClassExpression = 199, + OmittedExpression = 200, + ExpressionWithTypeArguments = 201, + AsExpression = 202, + NonNullExpression = 203, + MetaProperty = 204, + TemplateSpan = 205, + SemicolonClassElement = 206, + Block = 207, + VariableStatement = 208, + EmptyStatement = 209, + ExpressionStatement = 210, + IfStatement = 211, + DoStatement = 212, + WhileStatement = 213, + ForStatement = 214, + ForInStatement = 215, + ForOfStatement = 216, + ContinueStatement = 217, + BreakStatement = 218, + ReturnStatement = 219, + WithStatement = 220, + SwitchStatement = 221, + LabeledStatement = 222, + ThrowStatement = 223, + TryStatement = 224, + DebuggerStatement = 225, + VariableDeclaration = 226, + VariableDeclarationList = 227, + FunctionDeclaration = 228, + ClassDeclaration = 229, + InterfaceDeclaration = 230, + TypeAliasDeclaration = 231, + EnumDeclaration = 232, + ModuleDeclaration = 233, + ModuleBlock = 234, + CaseBlock = 235, + NamespaceExportDeclaration = 236, + ImportEqualsDeclaration = 237, + ImportDeclaration = 238, + ImportClause = 239, + NamespaceImport = 240, + NamedImports = 241, + ImportSpecifier = 242, + ExportAssignment = 243, + ExportDeclaration = 244, + NamedExports = 245, + ExportSpecifier = 246, + MissingDeclaration = 247, + ExternalModuleReference = 248, + JsxElement = 249, + JsxSelfClosingElement = 250, + JsxOpeningElement = 251, + JsxClosingElement = 252, + JsxAttribute = 253, + JsxAttributes = 254, + JsxSpreadAttribute = 255, + JsxExpression = 256, + CaseClause = 257, + DefaultClause = 258, + HeritageClause = 259, + CatchClause = 260, + PropertyAssignment = 261, + ShorthandPropertyAssignment = 262, + SpreadAssignment = 263, + EnumMember = 264, + SourceFile = 265, + Bundle = 266, + JSDocTypeExpression = 267, + JSDocAllType = 268, + JSDocUnknownType = 269, + JSDocArrayType = 270, + JSDocUnionType = 271, + JSDocTupleType = 272, + JSDocNullableType = 273, + JSDocNonNullableType = 274, + JSDocRecordType = 275, + JSDocRecordMember = 276, + JSDocTypeReference = 277, + JSDocOptionalType = 278, + JSDocFunctionType = 279, + JSDocVariadicType = 280, + JSDocConstructorType = 281, + JSDocThisType = 282, + JSDocComment = 283, + JSDocTag = 284, + JSDocAugmentsTag = 285, + JSDocParameterTag = 286, + JSDocReturnTag = 287, + JSDocTypeTag = 288, + JSDocTemplateTag = 289, + JSDocTypedefTag = 290, + JSDocPropertyTag = 291, + JSDocTypeLiteral = 292, + JSDocLiteralType = 293, + SyntaxList = 294, + NotEmittedStatement = 295, + PartiallyEmittedExpression = 296, + MergeDeclarationMarker = 297, + EndOfDeclarationMarker = 298, + Count = 299, + FirstAssignment = 58, + LastAssignment = 70, + FirstCompoundAssignment = 59, + LastCompoundAssignment = 70, + FirstReservedWord = 72, + LastReservedWord = 107, + FirstKeyword = 72, + LastKeyword = 142, + FirstFutureReservedWord = 108, + LastFutureReservedWord = 116, + FirstTypeNode = 158, + LastTypeNode = 173, + FirstPunctuation = 17, + LastPunctuation = 70, FirstToken = 0, - LastToken = 141, + LastToken = 142, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, - LastLiteralToken = 12, - FirstTemplateToken = 12, - LastTemplateToken = 15, - FirstBinaryOperator = 26, - LastBinaryOperator = 69, - FirstNode = 142, - FirstJSDocNode = 266, - LastJSDocNode = 292, - FirstJSDocTagNode = 282, - LastJSDocTagNode = 292, + LastLiteralToken = 13, + FirstTemplateToken = 13, + LastTemplateToken = 16, + FirstBinaryOperator = 27, + LastBinaryOperator = 70, + FirstNode = 143, + FirstJSDocNode = 267, + LastJSDocNode = 293, + FirstJSDocTagNode = 283, + LastJSDocTagNode = 293, } const enum NodeFlags { None = 0, @@ -1040,6 +1041,7 @@ declare namespace ts { } interface JsxText extends Node { kind: SyntaxKind.JsxText; + containsOnlyWhiteSpaces: boolean; parent?: JsxElement; } type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; @@ -2355,7 +2357,7 @@ declare namespace ts { function tokenToString(t: SyntaxKind): string; function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; - function isWhiteSpace(ch: number): boolean; + function isWhiteSpaceLike(ch: number): boolean; function isWhiteSpaceSingleLine(ch: number): boolean; function isLineBreak(ch: number): boolean; function couldStartTrivia(text: string, pos: number): boolean; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index d6cde4873fe17..6cb84d3811b2e 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -46,323 +46,324 @@ var ts; SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral"; SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral"; - SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail"; - SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken"; - SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken"; - SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken"; - SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier"; - SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword"; - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword"; - SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword"; - SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword"; - SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword"; - SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword"; - SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword"; - SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword"; - SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword"; - SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword"; - SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword"; - SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName"; - SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator"; - SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature"; - SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType"; - SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator"; - SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType"; - SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType"; - SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType"; - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement"; - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement"; - SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression"; - SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression"; - SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty"; - SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement"; - SyntaxKind[SyntaxKind["Block"] = 206] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock"; - SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression"; - SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause"; - SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment"; - SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember"; - SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile"; - SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle"; - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression"; - SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType"; - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag"; - SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral"; - SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType"; - SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList"; - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["Count"] = 298] = "Count"; - SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment"; - SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 11] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 12] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 13] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 14] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 15] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 16] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 17] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 18] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 19] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 20] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 21] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 22] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 23] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 24] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 25] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 26] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 27] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 28] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 29] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 30] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 31] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 32] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 33] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 34] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 35] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 36] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 37] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 38] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 39] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 40] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 41] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 42] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 43] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 44] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 45] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 47] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 48] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 49] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 50] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 51] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 52] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 53] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 54] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 55] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 56] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 57] = "AtToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 58] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 59] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 60] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 61] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 62] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 63] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 64] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 65] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 67] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 68] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 69] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 70] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 71] = "Identifier"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 72] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 73] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 74] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 75] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 76] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 77] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 78] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 79] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 80] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 81] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 82] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 83] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 84] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 85] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 86] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 87] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 88] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 89] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 90] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 91] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 92] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 93] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 94] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 95] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 96] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 97] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 98] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 99] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 100] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 101] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 102] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 103] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 104] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 105] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 106] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 107] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 108] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 109] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 110] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 111] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 112] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 113] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 114] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 115] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 116] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 117] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 118] = "AsKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 119] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 120] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 121] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 122] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 123] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 124] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 125] = "GetKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 126] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 127] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 128] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 129] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 130] = "NeverKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 131] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 132] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 133] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 134] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 135] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 136] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 137] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 138] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 139] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 140] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 141] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 142] = "OfKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 143] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 144] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 145] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 146] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 147] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 148] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 149] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 150] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 151] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 152] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 153] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 154] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 155] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 156] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 157] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 158] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 159] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 160] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 161] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 162] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 163] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 164] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 165] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 166] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 167] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 168] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 169] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 170] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 171] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 172] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 173] = "LiteralType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 174] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 175] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 176] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 177] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 178] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 179] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 180] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 181] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 182] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 183] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 184] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 185] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 186] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 187] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 188] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 189] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 190] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 191] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 192] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 193] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 194] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 195] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 196] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 197] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 198] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 199] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 200] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 201] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 202] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 203] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 204] = "MetaProperty"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 205] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 206] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 207] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 208] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 209] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 210] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 211] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 212] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 213] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 214] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 215] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 216] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 217] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 218] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 219] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 220] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 221] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 222] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 223] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 224] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 225] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 226] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 227] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 228] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 229] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 230] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 231] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 232] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 233] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 234] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 235] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 236] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 237] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 238] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 239] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 240] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 241] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 242] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 243] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 244] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 245] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 246] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 247] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 248] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 249] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 250] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 251] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 252] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 253] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 254] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 255] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 256] = "JsxExpression"; + SyntaxKind[SyntaxKind["CaseClause"] = 257] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 258] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 259] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 260] = "CatchClause"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 261] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 262] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 263] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 264] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 265] = "SourceFile"; + SyntaxKind[SyntaxKind["Bundle"] = 266] = "Bundle"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 267] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 268] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 269] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 270] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 271] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 272] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 273] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 274] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 275] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 276] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 277] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 278] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 279] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 280] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 281] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 282] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType"; + SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["Count"] = 299] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 70] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 72] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 107] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 72] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 142] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 108] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 116] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 158] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 173] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 17] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 70] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 142] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode"; - SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode"; - SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 13] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 13] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 16] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 27] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); var NodeFlags; (function (NodeFlags) { @@ -3940,6 +3941,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -4298,135 +4300,135 @@ var ts; var ts; (function (ts) { function tokenIsIdentifierOrKeyword(token) { - return token >= 70; + return token >= 71; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116, - "any": 118, - "as": 117, - "boolean": 121, - "break": 71, - "case": 72, - "catch": 73, - "class": 74, - "continue": 76, - "const": 75, - "constructor": 122, - "debugger": 77, - "declare": 123, - "default": 78, - "delete": 79, - "do": 80, - "else": 81, - "enum": 82, - "export": 83, - "extends": 84, - "false": 85, - "finally": 86, - "for": 87, - "from": 139, - "function": 88, - "get": 124, - "if": 89, - "implements": 107, - "import": 90, - "in": 91, - "instanceof": 92, - "interface": 108, - "is": 125, - "keyof": 126, - "let": 109, - "module": 127, - "namespace": 128, - "never": 129, - "new": 93, - "null": 94, - "number": 132, - "object": 133, - "package": 110, - "private": 111, - "protected": 112, - "public": 113, - "readonly": 130, - "require": 131, - "global": 140, - "return": 95, - "set": 134, - "static": 114, - "string": 135, - "super": 96, - "switch": 97, - "symbol": 136, - "this": 98, - "throw": 99, - "true": 100, - "try": 101, - "type": 137, - "typeof": 102, - "undefined": 138, - "var": 103, - "void": 104, - "while": 105, - "with": 106, - "yield": 115, - "async": 119, - "await": 120, - "of": 141, - "{": 16, - "}": 17, - "(": 18, - ")": 19, - "[": 20, - "]": 21, - ".": 22, - "...": 23, - ";": 24, - ",": 25, - "<": 26, - ">": 28, - "<=": 29, - ">=": 30, - "==": 31, - "!=": 32, - "===": 33, - "!==": 34, - "=>": 35, - "+": 36, - "-": 37, - "**": 39, - "*": 38, - "/": 40, - "%": 41, - "++": 42, - "--": 43, - "<<": 44, - ">": 45, - ">>>": 46, - "&": 47, - "|": 48, - "^": 49, - "!": 50, - "~": 51, - "&&": 52, - "||": 53, - "?": 54, - ":": 55, - "=": 57, - "+=": 58, - "-=": 59, - "*=": 60, - "**=": 61, - "/=": 62, - "%=": 63, - "<<=": 64, - ">>=": 65, - ">>>=": 66, - "&=": 67, - "|=": 68, - "^=": 69, - "@": 56, + "abstract": 117, + "any": 119, + "as": 118, + "boolean": 122, + "break": 72, + "case": 73, + "catch": 74, + "class": 75, + "continue": 77, + "const": 76, + "constructor": 123, + "debugger": 78, + "declare": 124, + "default": 79, + "delete": 80, + "do": 81, + "else": 82, + "enum": 83, + "export": 84, + "extends": 85, + "false": 86, + "finally": 87, + "for": 88, + "from": 140, + "function": 89, + "get": 125, + "if": 90, + "implements": 108, + "import": 91, + "in": 92, + "instanceof": 93, + "interface": 109, + "is": 126, + "keyof": 127, + "let": 110, + "module": 128, + "namespace": 129, + "never": 130, + "new": 94, + "null": 95, + "number": 133, + "object": 134, + "package": 111, + "private": 112, + "protected": 113, + "public": 114, + "readonly": 131, + "require": 132, + "global": 141, + "return": 96, + "set": 135, + "static": 115, + "string": 136, + "super": 97, + "switch": 98, + "symbol": 137, + "this": 99, + "throw": 100, + "true": 101, + "try": 102, + "type": 138, + "typeof": 103, + "undefined": 139, + "var": 104, + "void": 105, + "while": 106, + "with": 107, + "yield": 116, + "async": 120, + "await": 121, + "of": 142, + "{": 17, + "}": 18, + "(": 19, + ")": 20, + "[": 21, + "]": 22, + ".": 23, + "...": 24, + ";": 25, + ",": 26, + "<": 27, + ">": 29, + "<=": 30, + ">=": 31, + "==": 32, + "!=": 33, + "===": 34, + "!==": 35, + "=>": 36, + "+": 37, + "-": 38, + "**": 40, + "*": 39, + "/": 41, + "%": 42, + "++": 43, + "--": 44, + "<<": 45, + ">": 46, + ">>>": 47, + "&": 48, + "|": 49, + "^": 50, + "!": 51, + "~": 52, + "&&": 53, + "||": 54, + "?": 55, + ":": 56, + "=": 58, + "+=": 59, + "-=": 60, + "*=": 61, + "**=": 62, + "/=": 63, + "%=": 64, + "<<=": 65, + ">>=": 66, + ">>>=": 67, + "&=": 68, + "|=": 69, + "^=": 70, + "@": 57, }); var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 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, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 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, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 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, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 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, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; @@ -4538,10 +4540,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; function isWhiteSpaceSingleLine(ch) { return ch === 32 || ch === 9 || @@ -4657,7 +4659,7 @@ var ts; } break; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -4791,7 +4793,7 @@ var ts; } break scan; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -4889,8 +4891,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 || token > 106; }, - isReservedWord: function () { return token >= 71 && token <= 106; }, + isIdentifier: function () { return token === 71 || token > 107; }, + isReservedWord: function () { return token >= 72 && token <= 107; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -5028,20 +5030,20 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } var currChar = text.charCodeAt(pos); if (currChar === 96) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 : 14; + resultingToken = startedWithBacktick ? 14 : 15; break; } if (currChar === 92) { @@ -5206,7 +5208,7 @@ var ts; } } } - return token = 70; + return token = 71; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -5282,12 +5284,12 @@ var ts; case 33: if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 34; + return pos += 3, token = 35; } - return pos += 2, token = 32; + return pos += 2, token = 33; } pos++; - return token = 50; + return token = 51; case 34: case 39: tokenValue = scanString(); @@ -5296,68 +5298,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 63; + return pos += 2, token = 64; } pos++; - return token = 41; + return token = 42; case 38: if (text.charCodeAt(pos + 1) === 38) { - return pos += 2, token = 52; + return pos += 2, token = 53; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 67; + return pos += 2, token = 68; } pos++; - return token = 47; + return token = 48; case 40: pos++; - return token = 18; + return token = 19; case 41: pos++; - return token = 19; + return token = 20; case 42: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 60; + return pos += 2, token = 61; } if (text.charCodeAt(pos + 1) === 42) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 61; + return pos += 3, token = 62; } - return pos += 2, token = 39; + return pos += 2, token = 40; } pos++; - return token = 38; + return token = 39; case 43: if (text.charCodeAt(pos + 1) === 43) { - return pos += 2, token = 42; + return pos += 2, token = 43; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 58; + return pos += 2, token = 59; } pos++; - return token = 36; + return token = 37; case 44: pos++; - return token = 25; + return token = 26; case 45: if (text.charCodeAt(pos + 1) === 45) { - return pos += 2, token = 43; + return pos += 2, token = 44; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 59; + return pos += 2, token = 60; } pos++; - return token = 37; + return token = 38; case 46: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { - return pos += 3, token = 23; + return pos += 3, token = 24; } pos++; - return token = 22; + return token = 23; case 47: if (text.charCodeAt(pos + 1) === 47) { pos += 2; @@ -5401,10 +5403,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 62; + return pos += 2, token = 63; } pos++; - return token = 40; + return token = 41; case 48: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; @@ -5457,10 +5459,10 @@ var ts; return token = 8; case 58: pos++; - return token = 55; + return token = 56; case 59: pos++; - return token = 24; + return token = 25; case 60: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -5473,20 +5475,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 64; + return pos += 3, token = 65; } - return pos += 2, token = 44; + return pos += 2, token = 45; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 29; + return pos += 2, token = 30; } if (languageVariant === 1 && text.charCodeAt(pos + 1) === 47 && text.charCodeAt(pos + 2) !== 42) { - return pos += 2, token = 27; + return pos += 2, token = 28; } pos++; - return token = 26; + return token = 27; case 61: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -5499,15 +5501,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 33; + return pos += 3, token = 34; } - return pos += 2, token = 31; + return pos += 2, token = 32; } if (text.charCodeAt(pos + 1) === 62) { - return pos += 2, token = 35; + return pos += 2, token = 36; } pos++; - return token = 57; + return token = 58; case 62: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -5519,43 +5521,43 @@ var ts; } } pos++; - return token = 28; + return token = 29; case 63: pos++; - return token = 54; + return token = 55; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 94: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 69; + return pos += 2, token = 70; } pos++; - return token = 49; + return token = 50; case 123: pos++; - return token = 16; + return token = 17; case 124: if (text.charCodeAt(pos + 1) === 124) { - return pos += 2, token = 53; + return pos += 2, token = 54; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 68; + return pos += 2, token = 69; } pos++; - return token = 48; + return token = 49; case 125: pos++; - return token = 17; + return token = 18; case 126: pos++; - return token = 51; + return token = 52; case 64: pos++; - return token = 56; + return token = 57; case 92: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -5593,29 +5595,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28) { + if (token === 29) { if (text.charCodeAt(pos) === 62) { if (text.charCodeAt(pos + 1) === 62) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 66; + return pos += 3, token = 67; } - return pos += 2, token = 46; + return pos += 2, token = 47; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 65; + return pos += 2, token = 66; } pos++; - return token = 45; + return token = 46; } if (text.charCodeAt(pos) === 61) { pos++; - return token = 30; + return token = 31; } } return token; } function reScanSlashToken() { - if (token === 40 || token === 62) { + if (token === 41 || token === 63) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -5654,12 +5656,12 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11; + token = 12; } return token; } function reScanTemplateToken() { - ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -5676,17 +5678,17 @@ var ts; if (char === 60) { if (text.charCodeAt(pos + 1) === 47) { pos += 2; - return token = 27; + return token = 28; } pos++; - return token = 26; + return token = 27; } if (char === 123) { pos++; - return token = 16; + return token = 17; } + var firstNonWhitespace = 0; while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123) { break; @@ -5698,8 +5700,15 @@ var ts; } break; } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10; + return firstNonWhitespace === -1 ? 11 : 10; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -5746,42 +5755,42 @@ var ts; return token = 5; case 64: pos++; - return token = 56; + return token = 57; case 10: case 13: pos++; return token = 4; case 42: pos++; - return token = 38; + return token = 39; case 123: pos++; - return token = 16; + return token = 17; case 125: pos++; - return token = 17; + return token = 18; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 61: pos++; - return token = 57; + return token = 58; case 44: pos++; - return token = 25; + return token = 26; case 46: pos++; - return token = 22; + return token = 23; } if (isIdentifierStart(ch, 5)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) { pos++; } - return token = 70; + return token = 71; } else { return pos += 1, token = 0; @@ -8108,7 +8117,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 264) { + while (node && node.kind !== 265) { node = node.parent; } return node; @@ -8116,11 +8125,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: return true; } return false; @@ -8176,7 +8185,7 @@ var ts; } ts.nodeIsPresent = nodeIsPresent; function isToken(n) { - return n.kind >= 0 && n.kind <= 141; + return n.kind >= 0 && n.kind <= 142; } ts.isToken = isToken; function getTokenPosOfNode(node, sourceFile, includeJsDoc) { @@ -8189,18 +8198,18 @@ var ts; if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) { return getTokenPosOfNode(node.jsDoc[0]); } - if (node.kind === 293 && node._children.length > 0) { + if (node.kind === 294 && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; function isJSDocNode(node) { - return node.kind >= 266 && node.kind <= 292; + return node.kind >= 267 && node.kind <= 293; } ts.isJSDocNode = isJSDocNode; function isJSDocTag(node) { - return node.kind >= 282 && node.kind <= 292; + return node.kind >= 283 && node.kind <= 293; } ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { @@ -8238,13 +8247,13 @@ var ts; switch (node.kind) { case 9: return getQuotedEscapedLiteralText('"', node.text, '"'); - case 12: - return getQuotedEscapedLiteralText("`", node.text, "`"); case 13: - return getQuotedEscapedLiteralText("`", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "`"); case 14: - return getQuotedEscapedLiteralText("}", node.text, "${"); + return getQuotedEscapedLiteralText("`", node.text, "${"); case 15: + return getQuotedEscapedLiteralText("}", node.text, "${"); + case 16: return getQuotedEscapedLiteralText("}", node.text, "`"); case 8: return node.text; @@ -8270,11 +8279,11 @@ var ts; ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isCatchClauseVariableDeclarationOrBindingElement(declaration) { var node = getRootDeclaration(declaration); - return node.kind === 225 && node.parent.kind === 259; + return node.kind === 226 && node.parent.kind === 260; } ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement; function isAmbientModule(node) { - return node && node.kind === 232 && + return node && node.kind === 233 && (node.name.kind === 9 || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; @@ -8283,11 +8292,11 @@ var ts; } ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; function isShorthandAmbientModule(node) { - return node && node.kind === 232 && (!node.body); + return node && node.kind === 233 && (!node.body); } function isBlockScopedContainerTopLevel(node) { - return node.kind === 264 || - node.kind === 232 || + return node.kind === 265 || + node.kind === 233 || isFunctionLike(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; @@ -8300,9 +8309,9 @@ var ts; return false; } switch (node.parent.kind) { - case 264: + case 265: return ts.isExternalModule(node.parent); - case 233: + case 234: return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; @@ -8314,22 +8323,22 @@ var ts; ts.isEffectiveExternalModule = isEffectiveExternalModule; function isBlockScope(node, parentNode) { switch (node.kind) { - case 264: - case 234: - case 259: - case 232: - case 213: + case 265: + case 235: + case 260: + case 233: case 214: case 215: - case 151: - case 150: + case 216: case 152: + case 151: case 153: - case 227: - case 185: + case 154: + case 228: case 186: + case 187: return true; - case 206: + case 207: return parentNode && !isFunctionLike(parentNode); } return false; @@ -8355,12 +8364,12 @@ var ts; ts.getNameFromIndexInfo = getNameFromIndexInfo; function getTextOfPropertyName(name) { switch (name.kind) { - case 70: + case 71: return name.text; case 9: case 8: return name.text; - case 143: + case 144: if (isStringOrNumericLiteral(name.expression)) { return name.expression.text; } @@ -8370,11 +8379,11 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { - case 70: + case 71: return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name); - case 142: + case 143: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 178: + case 179: return entityNameToString(name.expression) + "." + entityNameToString(name.name); } } @@ -8411,7 +8420,7 @@ var ts; ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; function getErrorSpanForArrowFunction(sourceFile, node) { var pos = ts.skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 206) { + if (node.body && node.body.kind === 207) { var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; if (startLine < endLine) { @@ -8423,29 +8432,29 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 264: + case 265: var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); if (pos_1 === sourceFile.text.length) { return ts.createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 225: - case 175: - case 228: - case 198: + case 226: + case 176: case 229: + case 199: + case 230: + case 233: case 232: - case 231: - case 263: - case 227: - case 185: - case 150: - case 152: + case 264: + case 228: + case 186: + case 151: case 153: - case 230: + case 154: + case 231: errorNode = node.name; break; - case 186: + case 187: return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { @@ -8466,7 +8475,7 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 231 && isConst(node); + return node.kind === 232 && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isConst(node) { @@ -8479,11 +8488,11 @@ var ts; } ts.isLet = isLet; function isSuperCall(n) { - return n.kind === 180 && n.expression.kind === 96; + return n.kind === 181 && n.expression.kind === 97; } ts.isSuperCall = isSuperCall; function isPrologueDirective(node) { - return node.kind === 209 + return node.kind === 210 && node.expression.kind === 9; } ts.isPrologueDirective = isPrologueDirective; @@ -8496,10 +8505,10 @@ var ts; } ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJSDocCommentRanges(node, text) { - var commentRanges = (node.kind === 145 || - node.kind === 144 || - node.kind === 185 || - node.kind === 186) ? + var commentRanges = (node.kind === 146 || + node.kind === 145 || + node.kind === 186 || + node.kind === 187) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, function (comment) { @@ -8513,69 +8522,69 @@ var ts; ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (157 <= node.kind && node.kind <= 172) { + if (158 <= node.kind && node.kind <= 173) { return true; } switch (node.kind) { - case 118: - case 132: - case 135: - case 121: + case 119: + case 133: case 136: - case 138: - case 129: + case 122: + case 137: + case 139: + case 130: return true; - case 104: - return node.parent.kind !== 189; - case 200: + case 105: + return node.parent.kind !== 190; + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 70: - if (node.parent.kind === 142 && node.parent.right === node) { + case 71: + if (node.parent.kind === 143 && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 178 && node.parent.name === node) { + else if (node.parent.kind === 179 && node.parent.name === node) { node = node.parent; } - ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - case 142: - case 178: - case 98: + ts.Debug.assert(node.kind === 71 || node.kind === 143 || node.kind === 179, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + case 143: + case 179: + case 99: var parent = node.parent; - if (parent.kind === 161) { + if (parent.kind === 162) { return false; } - if (157 <= parent.kind && parent.kind <= 172) { + if (158 <= parent.kind && parent.kind <= 173) { return true; } switch (parent.kind) { - case 200: + case 201: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 144: + case 145: return node === parent.constraint; + case 149: case 148: - case 147: - case 145: - case 225: + case 146: + case 226: return node === parent.type; - case 227: - case 185: + case 228: case 186: + case 187: + case 152: case 151: case 150: - case 149: - case 152: case 153: - return node === parent.type; case 154: + return node === parent.type; case 155: case 156: + case 157: return node === parent.type; - case 183: + case 184: return node === parent.type; - case 180: case 181: - return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 182: + return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; + case 183: return false; } } @@ -8593,30 +8602,30 @@ var ts; } ts.isChildOfNodeWithKind = isChildOfNodeWithKind; function isPrefixUnaryExpression(node) { - return node.kind === 191; + return node.kind === 192; } ts.isPrefixUnaryExpression = isPrefixUnaryExpression; function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 218: + case 219: return visitor(node); - case 234: - case 206: - case 210: + case 235: + case 207: case 211: case 212: case 213: case 214: case 215: - case 219: + case 216: case 220: - case 256: - case 257: case 221: - case 223: - case 259: + case 257: + case 258: + case 222: + case 224: + case 260: return ts.forEachChild(node, traverse); } } @@ -8626,24 +8635,24 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 196: + case 197: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } return; - case 231: - case 229: case 232: case 230: - case 228: - case 198: + case 233: + case 231: + case 229: + case 199: return; default: if (isFunctionLike(node)) { var name = node.name; - if (name && name.kind === 143) { + if (name && name.kind === 144) { traverse(name.expression); return; } @@ -8656,10 +8665,10 @@ var ts; } ts.forEachYieldExpression = forEachYieldExpression; function getRestParameterElementType(node) { - if (node && node.kind === 163) { + if (node && node.kind === 164) { return node.elementType; } - else if (node && node.kind === 158) { + else if (node && node.kind === 159) { return ts.singleOrUndefined(node.typeArguments); } else { @@ -8670,14 +8679,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 175: - case 263: - case 145: - case 260: - case 148: - case 147: + case 176: + case 264: + case 146: case 261: - case 225: + case 149: + case 148: + case 262: + case 226: return true; } } @@ -8685,11 +8694,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 152 || node.kind === 153); + return node && (node.kind === 153 || node.kind === 154); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 228 || node.kind === 198); + return node && (node.kind === 229 || node.kind === 199); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -8698,19 +8707,19 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 151: - case 185: - case 227: + case 152: case 186: + case 228: + case 187: + case 151: case 150: - case 149: - case 152: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return true; } return false; @@ -8718,13 +8727,13 @@ var ts; ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: + case 186: return true; } return false; @@ -8732,13 +8741,13 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 213: case 214: case 215: - case 211: + case 216: case 212: + case 213: return true; - case 221: + case 222: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -8749,7 +8758,7 @@ var ts; if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 221) { + if (node.statement.kind !== 222) { return node.statement; } node = node.statement; @@ -8757,17 +8766,17 @@ var ts; } ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel; function isFunctionBlock(node) { - return node && node.kind === 206 && isFunctionLike(node.parent); + return node && node.kind === 207 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 150 && node.parent.kind === 177; + return node && node.kind === 151 && node.parent.kind === 178; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isObjectLiteralOrClassExpressionMethod(node) { - return node.kind === 150 && - (node.parent.kind === 177 || - node.parent.kind === 198); + return node.kind === 151 && + (node.parent.kind === 178 || + node.parent.kind === 199); } ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod; function isIdentifierTypePredicate(predicate) { @@ -8803,39 +8812,39 @@ var ts; return undefined; } switch (node.kind) { - case 143: + case 144: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 186: + case 187: if (!includeArrowFunctions) { continue; } - case 227: - case 185: - case 232: - case 148: - case 147: - case 150: + case 228: + case 186: + case 233: case 149: + case 148: case 151: + case 150: case 152: case 153: case 154: case 155: case 156: - case 231: - case 264: + case 157: + case 232: + case 265: return node; } } @@ -8845,9 +8854,9 @@ var ts; var container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 151: - case 227: - case 185: + case 152: + case 228: + case 186: return container; } } @@ -8861,25 +8870,25 @@ var ts; return node; } switch (node.kind) { - case 143: + case 144: node = node.parent; break; - case 227: - case 185: + case 228: case 186: + case 187: if (!stopOnFunctions) { continue; } - case 148: - case 147: - case 150: case 149: + case 148: case 151: + case 150: case 152: case 153: + case 154: return node; - case 146: - if (node.parent.kind === 145 && isClassElement(node.parent.parent)) { + case 147: + if (node.parent.kind === 146 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { @@ -8891,14 +8900,14 @@ var ts; } ts.getSuperContainer = getSuperContainer; function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 185 || func.kind === 186) { + if (func.kind === 186 || func.kind === 187) { var prev = func; var parent = func.parent; - while (parent.kind === 184) { + while (parent.kind === 185) { prev = parent; parent = parent.parent; } - if (parent.kind === 180 && parent.expression === prev) { + if (parent.kind === 181 && parent.expression === prev) { return parent; } } @@ -8906,21 +8915,21 @@ var ts; ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression; function isSuperProperty(node) { var kind = node.kind; - return (kind === 178 || kind === 179) - && node.expression.kind === 96; + return (kind === 179 || kind === 180) + && node.expression.kind === 97; } ts.isSuperProperty = isSuperProperty; function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 158: - case 276: + case 159: + case 277: return node.typeName; - case 200: + case 201: return isEntityNameExpression(node.expression) ? node.expression : undefined; - case 70: - case 142: + case 71: + case 143: return node; } return undefined; @@ -8928,12 +8937,12 @@ var ts; ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function isCallLikeExpression(node) { switch (node.kind) { + case 251: case 250: - case 249: - case 180: case 181: case 182: - case 146: + case 183: + case 147: return true; default: return false; @@ -8941,7 +8950,7 @@ var ts; } ts.isCallLikeExpression = isCallLikeExpression; function getInvokedExpression(node) { - if (node.kind === 182) { + if (node.kind === 183) { return node.tag; } else if (isJsxOpeningLikeElement(node)) { @@ -8952,21 +8961,21 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 228: + case 229: return true; - case 148: - return node.parent.kind === 228; - case 152: + case 149: + return node.parent.kind === 229; case 153: - case 150: + case 154: + case 151: return node.body !== undefined - && node.parent.kind === 228; - case 145: + && node.parent.kind === 229; + case 146: return node.parent.body !== undefined - && (node.parent.kind === 151 - || node.parent.kind === 150 - || node.parent.kind === 153) - && node.parent.parent.kind === 228; + && (node.parent.kind === 152 + || node.parent.kind === 151 + || node.parent.kind === 154) + && node.parent.parent.kind === 229; } return false; } @@ -8982,19 +8991,19 @@ var ts; ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; function childIsDecorated(node) { switch (node.kind) { - case 228: + case 229: return ts.forEach(node.members, nodeOrChildIsDecorated); - case 150: - case 153: + case 151: + case 154: return ts.forEach(node.parameters, nodeIsDecorated); } } ts.childIsDecorated = childIsDecorated; function isJSXTagName(node) { var parent = node.parent; - if (parent.kind === 250 || - parent.kind === 249 || - parent.kind === 251) { + if (parent.kind === 251 || + parent.kind === 250 || + parent.kind === 252) { return parent.tagName === node; } return false; @@ -9002,99 +9011,99 @@ var ts; ts.isJSXTagName = isJSXTagName; function isPartOfExpression(node) { switch (node.kind) { - case 98: - case 96: - case 94: - case 100: - case 85: - case 11: - case 176: + case 99: + case 97: + case 95: + case 101: + case 86: + case 12: case 177: case 178: case 179: case 180: case 181: case 182: - case 201: case 183: case 202: case 184: + case 203: case 185: - case 198: case 186: - case 189: + case 199: case 187: + case 190: case 188: - case 191: + case 189: case 192: case 193: case 194: - case 197: case 195: - case 12: - case 199: - case 248: - case 249: + case 198: case 196: - case 190: - case 203: + case 13: + case 200: + case 249: + case 250: + case 197: + case 191: + case 204: return true; - case 142: - while (node.parent.kind === 142) { + case 143: + while (node.parent.kind === 143) { node = node.parent; } - return node.parent.kind === 161 || isJSXTagName(node); - case 70: - if (node.parent.kind === 161 || isJSXTagName(node)) { + return node.parent.kind === 162 || isJSXTagName(node); + case 71: + if (node.parent.kind === 162 || isJSXTagName(node)) { return true; } case 8: case 9: - case 98: + case 99: var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 263: - case 260: - case 175: + case 264: + case 261: + case 176: return parent.initializer === node; - case 209: case 210: case 211: case 212: - case 218: + case 213: case 219: case 220: - case 256: - case 222: - case 220: + case 221: + case 257: + case 223: + case 221: return parent.expression === node; - case 213: + case 214: var forStatement = parent; - return (forStatement.initializer === node && forStatement.initializer.kind !== 226) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 227) || forStatement.condition === node || forStatement.incrementor === node; - case 214: case 215: + case 216: var forInStatement = parent; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 227) || forInStatement.expression === node; - case 183: - case 201: + case 184: + case 202: return node === parent.expression; - case 204: + case 205: return node === parent.expression; - case 143: + case 144: return node === parent.expression; - case 146: + case 147: + case 256: case 255: - case 254: - case 262: + case 263: return true; - case 200: + case 201: return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent); default: if (isPartOfExpression(parent)) { @@ -9112,7 +9121,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind === 247; + return node.kind === 237 && node.moduleReference.kind === 248; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -9121,7 +9130,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 && node.moduleReference.kind !== 247; + return node.kind === 237 && node.moduleReference.kind !== 248; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -9133,18 +9142,18 @@ var ts; } ts.isInJavaScriptFile = isInJavaScriptFile; function isRequireCall(callExpression, checkArgumentIsStringLiteral) { - if (callExpression.kind !== 180) { + if (callExpression.kind !== 181) { return false; } var _a = callExpression, expression = _a.expression, args = _a.arguments; - if (expression.kind !== 70 || expression.text !== "require") { + if (expression.kind !== 71 || expression.text !== "require") { return false; } if (args.length !== 1) { return false; } var arg = args[0]; - return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12; + return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 13; } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -9152,9 +9161,9 @@ var ts; } ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote; function isDeclarationOfFunctionOrClassExpression(s) { - if (s.valueDeclaration && s.valueDeclaration.kind === 225) { + if (s.valueDeclaration && s.valueDeclaration.kind === 226) { var declaration = s.valueDeclaration; - return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198); + return declaration.initializer && (declaration.initializer.kind === 186 || declaration.initializer.kind === 199); } return false; } @@ -9179,11 +9188,11 @@ var ts; return 0; } var expr = expression; - if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) { + if (expr.operatorToken.kind !== 58 || expr.left.kind !== 179) { return 0; } var lhs = expr.left; - if (lhs.expression.kind === 70) { + if (lhs.expression.kind === 71) { var lhsId = lhs.expression; if (lhsId.text === "exports") { return 1; @@ -9195,12 +9204,12 @@ var ts; return 5; } } - else if (lhs.expression.kind === 98) { + else if (lhs.expression.kind === 99) { return 4; } - else if (lhs.expression.kind === 178) { + else if (lhs.expression.kind === 179) { var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 70) { + if (innerPropertyAccess.expression.kind === 71) { var innerPropertyAccessIdentifier = innerPropertyAccess.expression; if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { return 1; @@ -9214,35 +9223,35 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 237) { + if (node.kind === 238) { return node.moduleSpecifier; } - if (node.kind === 236) { + if (node.kind === 237) { var reference = node.moduleReference; - if (reference.kind === 247) { + if (reference.kind === 248) { return reference.expression; } } - if (node.kind === 243) { + if (node.kind === 244) { return node.moduleSpecifier; } - if (node.kind === 232 && node.name.kind === 9) { + if (node.kind === 233 && node.name.kind === 9) { return node.name; } } ts.getExternalModuleName = getExternalModuleName; function getNamespaceDeclarationNode(node) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 240) { return importClause.namedBindings; } } ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode; function isDefaultImport(node) { - return node.kind === 237 + return node.kind === 238 && node.importClause && !!node.importClause.name; } @@ -9250,13 +9259,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 145: + case 146: + case 151: case 150: - case 149: + case 262: case 261: - case 260: + case 149: case 148: - case 147: return node.questionToken !== undefined; } } @@ -9264,9 +9273,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 278 && + return node.kind === 279 && node.parameters.length > 0 && - node.parameters[0].type.kind === 280; + node.parameters[0].type.kind === 281; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getCommentsFromJSDoc(node) { @@ -9274,7 +9283,7 @@ var ts; } ts.getCommentsFromJSDoc = getCommentsFromJSDoc; function hasJSDocParameterTags(node) { - var parameterTags = getJSDocTags(node, 285); + var parameterTags = getJSDocTags(node, 286); return parameterTags && parameterTags.length > 0; } ts.hasJSDocParameterTags = hasJSDocParameterTags; @@ -9284,7 +9293,7 @@ var ts; var result = []; for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) { var doc = docs_1[_i]; - if (doc.kind === 285) { + if (doc.kind === 286) { if (doc.kind === kind) { result.push(doc); } @@ -9313,9 +9322,9 @@ var ts; var parent = node.parent; var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) && parent.initializer === node && - parent.parent.parent.kind === 207; + parent.parent.parent.kind === 208; var isVariableOfVariableDeclarationStatement = isVariableLike(node) && - parent.parent.kind === 207; + parent.parent.kind === 208; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent : isVariableOfVariableDeclarationStatement ? parent.parent : undefined; @@ -9323,19 +9332,19 @@ var ts; getJSDocsWorker(variableStatementNode); } var isSourceOfAssignmentExpressionStatement = parent && parent.parent && - parent.kind === 193 && - parent.operatorToken.kind === 57 && - parent.parent.kind === 209; + parent.kind === 194 && + parent.operatorToken.kind === 58 && + parent.parent.kind === 210; if (isSourceOfAssignmentExpressionStatement) { getJSDocsWorker(parent.parent); } - var isModuleDeclaration = node.kind === 232 && - parent && parent.kind === 232; - var isPropertyAssignmentExpression = parent && parent.kind === 260; + var isModuleDeclaration = node.kind === 233 && + parent && parent.kind === 233; + var isPropertyAssignmentExpression = parent && parent.kind === 261; if (isModuleDeclaration || isPropertyAssignmentExpression) { getJSDocsWorker(parent); } - if (node.kind === 145) { + if (node.kind === 146) { cache = ts.concatenate(cache, getJSDocParameterTags(node)); } if (isVariableLike(node) && node.initializer) { @@ -9350,17 +9359,17 @@ var ts; return undefined; } var func = param.parent; - var tags = getJSDocTags(func, 285); + var tags = getJSDocTags(func, 286); if (!param.name) { var i = func.parameters.indexOf(param); - var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; }); + var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; }); if (paramTags && 0 <= i && i < paramTags.length) { return [paramTags[i]]; } } - else if (param.name.kind === 70) { + else if (param.name.kind === 71) { var name_1 = param.name.text; - return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; }); + return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; }); } else { return undefined; @@ -9368,8 +9377,8 @@ var ts; } ts.getJSDocParameterTags = getJSDocParameterTags; function getJSDocType(node) { - var tag = getFirstJSDocTag(node, 287); - if (!tag && node.kind === 145) { + var tag = getFirstJSDocTag(node, 288); + if (!tag && node.kind === 146) { var paramTags = getJSDocParameterTags(node); if (paramTags) { tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; }); @@ -9379,15 +9388,15 @@ var ts; } ts.getJSDocType = getJSDocType; function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, 284); + return getFirstJSDocTag(node, 285); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, 286); + return getFirstJSDocTag(node, 287); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, 288); + return getFirstJSDocTag(node, 289); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function hasRestParameter(s) { @@ -9400,8 +9409,8 @@ var ts; ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { if (node && (node.flags & 65536)) { - if (node.type && node.type.kind === 279 || - ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) { + if (node.type && node.type.kind === 280 || + ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 280; })) { return true; } } @@ -9422,30 +9431,30 @@ var ts; var parent = node.parent; while (true) { switch (parent.kind) { - case 193: + case 194: var binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? - binaryOperator === 57 ? 1 : 2 : + binaryOperator === 58 ? 1 : 2 : 0; - case 191: case 192: + case 193: var unaryOperator = parent.operator; - return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0; - case 214: + return unaryOperator === 43 || unaryOperator === 44 ? 2 : 0; case 215: + case 216: return parent.initializer === node ? 1 : 0; - case 184: - case 176: - case 197: + case 185: + case 177: + case 198: node = parent; break; - case 261: + case 262: if (parent.name !== node) { return 0; } node = parent.parent; break; - case 260: + case 261: if (parent.name === node) { return 0; } @@ -9463,14 +9472,14 @@ var ts; } ts.isAssignmentTarget = isAssignmentTarget; function isDeleteTarget(node) { - if (node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 179 && node.kind !== 180) { return false; } node = node.parent; - while (node && node.kind === 184) { + while (node && node.kind === 185) { node = node.parent; } - return node && node.kind === 187; + return node && node.kind === 188; } ts.isDeleteTarget = isDeleteTarget; function isNodeDescendantOf(node, ancestor) { @@ -9484,7 +9493,7 @@ var ts; ts.isNodeDescendantOf = isNodeDescendantOf; function isInAmbientContext(node) { while (node) { - if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) { + if (hasModifier(node, 2) || (node.kind === 265 && node.isDeclarationFile)) { return true; } node = node.parent; @@ -9493,11 +9502,11 @@ var ts; } ts.isInAmbientContext = isInAmbientContext; function isDeclarationName(name) { - if (name.kind !== 70 && name.kind !== 9 && name.kind !== 8) { + if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) { return false; } var parent = name.parent; - if (parent.kind === 241 || parent.kind === 245) { + if (parent.kind === 242 || parent.kind === 246) { if (parent.propertyName) { return true; } @@ -9510,48 +9519,48 @@ var ts; ts.isDeclarationName = isDeclarationName; function isLiteralComputedPropertyDeclarationName(node) { return (node.kind === 9 || node.kind === 8) && - node.parent.kind === 143 && + node.parent.kind === 144 && isDeclaration(node.parent.parent); } ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 152: case 153: - case 263: - case 260: - case 178: + case 154: + case 264: + case 261: + case 179: return parent.name === node; - case 142: + case 143: if (parent.right === node) { - while (parent.kind === 142) { + while (parent.kind === 143) { parent = parent.parent; } - return parent.kind === 161; + return parent.kind === 162; } return false; - case 175: - case 241: + case 176: + case 242: return parent.propertyName === node; - case 245: + case 246: return true; } return false; } ts.isIdentifierName = isIdentifierName; function isAliasSymbolDeclaration(node) { - return node.kind === 236 || - node.kind === 235 || - node.kind === 238 && !!node.name || - node.kind === 239 || - node.kind === 241 || - node.kind === 245 || - node.kind === 242 && exportAssignmentIsAlias(node); + return node.kind === 237 || + node.kind === 236 || + node.kind === 239 && !!node.name || + node.kind === 240 || + node.kind === 242 || + node.kind === 246 || + node.kind === 243 && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function exportAssignmentIsAlias(node) { @@ -9559,17 +9568,17 @@ var ts; } ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 107); + var heritageClause = getHeritageClause(node.heritageClauses, 108); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84); + var heritageClause = getHeritageClause(node.heritageClauses, 85); return heritageClause ? heritageClause.types : undefined; } ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; @@ -9637,7 +9646,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 71 <= token && token <= 141; + return 72 <= token && token <= 142; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -9657,13 +9666,13 @@ var ts; function getFunctionFlags(node) { var flags = 0; switch (node.kind) { - case 227: - case 185: - case 150: + case 228: + case 186: + case 151: if (node.asteriskToken) { flags |= 1; } - case 186: + case 187: if (hasModifier(node, 256)) { flags |= 2; } @@ -9677,10 +9686,10 @@ var ts; ts.getFunctionFlags = getFunctionFlags; function isAsyncFunction(node) { switch (node.kind) { - case 227: - case 185: + case 228: case 186: - case 150: + case 187: + case 151: return node.body !== undefined && node.asteriskToken === undefined && hasModifier(node, 256); @@ -9703,7 +9712,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 143 && + return name.kind === 144 && !isStringOrNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } @@ -9713,10 +9722,10 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) { + if (name.kind === 71 || name.kind === 9 || name.kind === 8 || name.kind === 146) { return name.text; } - if (name.kind === 143) { + if (name.kind === 144) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -9734,7 +9743,7 @@ var ts; } ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; function isESSymbolIdentifier(node) { - return node.kind === 70 && node.text === "Symbol"; + return node.kind === 71 && node.text === "Symbol"; } ts.isESSymbolIdentifier = isESSymbolIdentifier; function isPushOrUnshiftIdentifier(node) { @@ -9743,17 +9752,17 @@ var ts; ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier; function isModifierKind(token) { switch (token) { - case 116: - case 119: - case 75: - case 123: - case 78: - case 83: - case 113: - case 111: - case 112: - case 130: + case 117: + case 120: + case 76: + case 124: + case 79: + case 84: case 114: + case 112: + case 113: + case 131: + case 115: return true; } return false; @@ -9761,11 +9770,11 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 145; + return root.kind === 146; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 175) { + while (node.kind === 176) { node = node.parent.parent; } return node; @@ -9773,15 +9782,15 @@ var ts; ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(node) { var kind = node.kind; - return kind === 151 - || kind === 185 - || kind === 227 + return kind === 152 || kind === 186 - || kind === 150 - || kind === 152 + || kind === 228 + || kind === 187 + || kind === 151 || kind === 153 - || kind === 232 - || kind === 264; + || kind === 154 + || kind === 233 + || kind === 265; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function nodeIsSynthesized(node) { @@ -9790,7 +9799,7 @@ var ts; } ts.nodeIsSynthesized = nodeIsSynthesized; function getOriginalSourceFileOrBundle(sourceFileOrBundle) { - if (sourceFileOrBundle.kind === 265) { + if (sourceFileOrBundle.kind === 266) { return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile)); } return getOriginalSourceFile(sourceFileOrBundle); @@ -9815,38 +9824,38 @@ var ts; })(Associativity = ts.Associativity || (ts.Associativity = {})); function getExpressionAssociativity(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorAssociativity(expression.kind, operator, hasArguments); } ts.getExpressionAssociativity = getExpressionAssociativity; function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 181: + case 182: return hasArguments ? 0 : 1; - case 191: - case 188: + case 192: case 189: - case 187: case 190: - case 194: - case 196: + case 188: + case 191: + case 195: + case 197: return 1; - case 193: + case 194: switch (operator) { - case 39: - case 57: + case 40: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 1; } } @@ -9855,15 +9864,15 @@ var ts; ts.getOperatorAssociativity = getOperatorAssociativity; function getExpressionPrecedence(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 && expression.arguments !== undefined; return getOperatorPrecedence(expression.kind, operator, hasArguments); } ts.getExpressionPrecedence = getExpressionPrecedence; function getOperator(expression) { - if (expression.kind === 193) { + if (expression.kind === 194) { return expression.operatorToken.kind; } - else if (expression.kind === 191 || expression.kind === 192) { + else if (expression.kind === 192 || expression.kind === 193) { return expression.operator; } else { @@ -9873,106 +9882,106 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 98: - case 96: - case 70: - case 94: - case 100: - case 85: + case 99: + case 97: + case 71: + case 95: + case 101: + case 86: case 8: case 9: - case 176: case 177: - case 185: + case 178: case 186: - case 198: - case 248: + case 187: + case 199: case 249: - case 11: + case 250: case 12: - case 195: - case 184: - case 199: + case 13: + case 196: + case 185: + case 200: return 19; - case 182: - case 178: + case 183: case 179: + case 180: return 18; - case 181: + case 182: return hasArguments ? 18 : 17; - case 180: + case 181: return 17; - case 192: + case 193: return 16; - case 191: - case 188: + case 192: case 189: - case 187: case 190: + case 188: + case 191: return 15; - case 193: + case 194: switch (operatorKind) { - case 50: case 51: + case 52: return 15; - case 39: - case 38: case 40: + case 39: case 41: + case 42: return 14; - case 36: case 37: + case 38: return 13; - case 44: case 45: case 46: + case 47: return 12; - case 26: - case 29: - case 28: + case 27: case 30: - case 91: + case 29: + case 31: case 92: + case 93: return 11; - case 31: - case 33: case 32: case 34: + case 33: + case 35: return 10; - case 47: + case 48: return 9; - case 49: + case 50: return 8; - case 48: + case 49: return 7; - case 52: - return 6; case 53: + return 6; + case 54: return 5; - case 57: case 58: case 59: - case 61: case 60: case 62: + case 61: case 63: case 64: case 65: case 66: case 67: - case 69: case 68: + case 70: + case 69: return 3; - case 25: + case 26: return 0; default: return -1; } - case 194: + case 195: return 4; - case 196: - return 2; case 197: + return 2; + case 198: return 1; default: return -1; @@ -10288,7 +10297,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 151 && nodeIsPresent(member.body)) { + if (member.kind === 152 && nodeIsPresent(member.body)) { return member; } }); @@ -10315,11 +10324,11 @@ var ts; } ts.parameterIsThisKeyword = parameterIsThisKeyword; function isThisIdentifier(node) { - return node && node.kind === 70 && identifierIsThisKeyword(node); + return node && node.kind === 71 && identifierIsThisKeyword(node); } ts.isThisIdentifier = isThisIdentifier; function identifierIsThisKeyword(id) { - return id.originalKeywordKind === 98; + return id.originalKeywordKind === 99; } ts.identifierIsThisKeyword = identifierIsThisKeyword; function getAllAccessorDeclarations(declarations, accessor) { @@ -10329,10 +10338,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 152) { + if (accessor.kind === 153) { getAccessor = accessor; } - else if (accessor.kind === 153) { + else if (accessor.kind === 154) { setAccessor = accessor; } else { @@ -10341,7 +10350,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 152 || member.kind === 153) + if ((member.kind === 153 || member.kind === 154) && hasModifier(member, 32) === hasModifier(accessor, 32)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -10352,10 +10361,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 152 && !getAccessor) { + if (member.kind === 153 && !getAccessor) { getAccessor = member; } - if (member.kind === 153 && !setAccessor) { + if (member.kind === 154 && !setAccessor) { setAccessor = member; } } @@ -10538,7 +10547,7 @@ var ts; flags |= modifierToFlag(modifier.kind); } } - if (node.flags & 4 || (node.kind === 70 && node.isInJSDocNamespace)) { + if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) { flags |= 1; } node.modifierFlagsCache = flags | 536870912; @@ -10547,34 +10556,34 @@ var ts; ts.getModifierFlags = getModifierFlags; function modifierToFlag(token) { switch (token) { - case 114: return 32; - case 113: return 4; - case 112: return 16; - case 111: return 8; - case 116: return 128; - case 83: return 1; - case 123: return 2; - case 75: return 2048; - case 78: return 512; - case 119: return 256; - case 130: return 64; + case 115: return 32; + case 114: return 4; + case 113: return 16; + case 112: return 8; + case 117: return 128; + case 84: return 1; + case 124: return 2; + case 76: return 2048; + case 79: return 512; + case 120: return 256; + case 131: return 64; } return 0; } ts.modifierToFlag = modifierToFlag; function isLogicalOperator(token) { - return token === 53 - || token === 52 - || token === 50; + return token === 54 + || token === 53 + || token === 51; } ts.isLogicalOperator = isLogicalOperator; function isAssignmentOperator(token) { - return token >= 57 && token <= 69; + return token >= 58 && token <= 70; } ts.isAssignmentOperator = isAssignmentOperator; function tryGetClassExtendingExpressionWithTypeArguments(node) { - if (node.kind === 200 && - node.parent.token === 84 && + if (node.kind === 201 && + node.parent.token === 85 && isClassLike(node.parent.parent)) { return node.parent.parent; } @@ -10583,7 +10592,7 @@ var ts; function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment - ? node.operatorToken.kind === 57 + ? node.operatorToken.kind === 58 : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } @@ -10591,8 +10600,8 @@ var ts; function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { var kind = node.left.kind; - return kind === 177 - || kind === 176; + return kind === 178 + || kind === 177; } return false; } @@ -10602,7 +10611,7 @@ var ts; } ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 70) { + if (node.kind === 71) { return true; } else if (isPropertyAccessExpression(node)) { @@ -10617,31 +10626,31 @@ var ts; } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; function isExpressionWithTypeArgumentsInClassImplementsClause(node) { - return node.kind === 200 + return node.kind === 201 && isEntityNameExpression(node.expression) && node.parent - && node.parent.token === 107 + && node.parent.token === 108 && node.parent.parent && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause; function isEntityNameExpression(node) { - return node.kind === 70 || - node.kind === 178 && isEntityNameExpression(node.expression); + return node.kind === 71 || + node.kind === 179 && isEntityNameExpression(node.expression); } ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 142 && node.parent.right === node) || - (node.parent.kind === 178 && node.parent.name === node); + return (node.parent.kind === 143 && node.parent.right === node) || + (node.parent.kind === 179 && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteral(expression) { - return expression.kind === 177 && + return expression.kind === 178 && expression.properties.length === 0; } ts.isEmptyObjectLiteral = isEmptyObjectLiteral; function isEmptyArrayLiteral(expression) { - return expression.kind === 176 && + return expression.kind === 177 && expression.elements.length === 0; } ts.isEmptyArrayLiteral = isEmptyArrayLiteral; @@ -10733,49 +10742,49 @@ var ts; var kind = node.kind; if (kind === 9 || kind === 8 - || kind === 11 || kind === 12 - || kind === 70 - || kind === 98 - || kind === 96 - || kind === 100 - || kind === 85 - || kind === 94) { + || kind === 13 + || kind === 71 + || kind === 99 + || kind === 97 + || kind === 101 + || kind === 86 + || kind === 95) { return true; } - else if (kind === 178) { + else if (kind === 179) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 179) { + else if (kind === 180) { return isSimpleExpressionWorker(node.expression, depth + 1) && isSimpleExpressionWorker(node.argumentExpression, depth + 1); } - else if (kind === 191 - || kind === 192) { + else if (kind === 192 + || kind === 193) { return isSimpleExpressionWorker(node.operand, depth + 1); } - else if (kind === 193) { - return node.operatorToken.kind !== 39 + else if (kind === 194) { + return node.operatorToken.kind !== 40 && isSimpleExpressionWorker(node.left, depth + 1) && isSimpleExpressionWorker(node.right, depth + 1); } - else if (kind === 194) { + else if (kind === 195) { return isSimpleExpressionWorker(node.condition, depth + 1) && isSimpleExpressionWorker(node.whenTrue, depth + 1) && isSimpleExpressionWorker(node.whenFalse, depth + 1); } - else if (kind === 189 - || kind === 188 - || kind === 187) { + else if (kind === 190 + || kind === 189 + || kind === 188) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 176) { + else if (kind === 177) { return node.elements.length === 0; } - else if (kind === 177) { + else if (kind === 178) { return node.properties.length === 0; } - else if (kind === 180) { + else if (kind === 181) { if (!isSimpleExpressionWorker(node.expression, depth + 1)) { return false; } @@ -10896,8 +10905,8 @@ var ts; var parseNode = ts.getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 231: case 232: + case 233: return parseNode === parseNode.parent.name; } } @@ -10915,7 +10924,7 @@ var ts; if (node.symbol) { for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 228 && declaration !== node) { + if (declaration.kind === 229 && declaration !== node) { return true; } } @@ -10933,15 +10942,15 @@ var ts; } ts.isNodeArray = isNodeArray; function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 12; + return node.kind === 13; } ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral; function isLiteralKind(kind) { - return 8 <= kind && kind <= 12; + return 8 <= kind && kind <= 13; } ts.isLiteralKind = isLiteralKind; function isTextualLiteralKind(kind) { - return kind === 9 || kind === 12; + return kind === 9 || kind === 13; } ts.isTextualLiteralKind = isTextualLiteralKind; function isLiteralExpression(node) { @@ -10949,25 +10958,25 @@ var ts; } ts.isLiteralExpression = isLiteralExpression; function isTemplateLiteralKind(kind) { - return 12 <= kind && kind <= 15; + return 13 <= kind && kind <= 16; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isTemplateHead(node) { - return node.kind === 13; + return node.kind === 14; } ts.isTemplateHead = isTemplateHead; function isTemplateMiddleOrTemplateTail(node) { var kind = node.kind; - return kind === 14 - || kind === 15; + return kind === 15 + || kind === 16; } ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail; function isIdentifier(node) { - return node.kind === 70; + return node.kind === 71; } ts.isIdentifier = isIdentifier; function isVoidExpression(node) { - return node.kind === 189; + return node.kind === 190; } ts.isVoidExpression = isVoidExpression; function isGeneratedIdentifier(node) { @@ -10979,135 +10988,135 @@ var ts; } ts.isModifier = isModifier; function isQualifiedName(node) { - return node.kind === 142; + return node.kind === 143; } ts.isQualifiedName = isQualifiedName; function isComputedPropertyName(node) { - return node.kind === 143; + return node.kind === 144; } ts.isComputedPropertyName = isComputedPropertyName; function isEntityName(node) { var kind = node.kind; - return kind === 142 - || kind === 70; + return kind === 143 + || kind === 71; } ts.isEntityName = isEntityName; function isPropertyName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9 || kind === 8 - || kind === 143; + || kind === 144; } ts.isPropertyName = isPropertyName; function isModuleName(node) { var kind = node.kind; - return kind === 70 + return kind === 71 || kind === 9; } ts.isModuleName = isModuleName; function isBindingName(node) { var kind = node.kind; - return kind === 70 - || kind === 173 - || kind === 174; + return kind === 71 + || kind === 174 + || kind === 175; } ts.isBindingName = isBindingName; function isTypeParameter(node) { - return node.kind === 144; + return node.kind === 145; } ts.isTypeParameter = isTypeParameter; function isParameter(node) { - return node.kind === 145; + return node.kind === 146; } ts.isParameter = isParameter; function isDecorator(node) { - return node.kind === 146; + return node.kind === 147; } ts.isDecorator = isDecorator; function isMethodDeclaration(node) { - return node.kind === 150; + return node.kind === 151; } ts.isMethodDeclaration = isMethodDeclaration; function isClassElement(node) { var kind = node.kind; - return kind === 151 - || kind === 148 - || kind === 150 - || kind === 152 + return kind === 152 + || kind === 149 + || kind === 151 || kind === 153 - || kind === 156 - || kind === 205; + || kind === 154 + || kind === 157 + || kind === 206; } ts.isClassElement = isClassElement; function isObjectLiteralElementLike(node) { var kind = node.kind; - return kind === 260 - || kind === 261 + return kind === 261 || kind === 262 - || kind === 150 - || kind === 152 + || kind === 263 + || kind === 151 || kind === 153 - || kind === 246; + || kind === 154 + || kind === 247; } ts.isObjectLiteralElementLike = isObjectLiteralElementLike; function isTypeNodeKind(kind) { - return (kind >= 157 && kind <= 172) - || kind === 118 - || kind === 132 + return (kind >= 158 && kind <= 173) + || kind === 119 || kind === 133 - || kind === 121 - || kind === 135 + || kind === 134 + || kind === 122 || kind === 136 - || kind === 98 - || kind === 104 - || kind === 138 - || kind === 94 - || kind === 129 - || kind === 200; + || kind === 137 + || kind === 99 + || kind === 105 + || kind === 139 + || kind === 95 + || kind === 130 + || kind === 201; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } ts.isTypeNode = isTypeNode; function isArrayBindingPattern(node) { - return node.kind === 174; + return node.kind === 175; } ts.isArrayBindingPattern = isArrayBindingPattern; function isObjectBindingPattern(node) { - return node.kind === 173; + return node.kind === 174; } ts.isObjectBindingPattern = isObjectBindingPattern; function isBindingPattern(node) { if (node) { var kind = node.kind; - return kind === 174 - || kind === 173; + return kind === 175 + || kind === 174; } return false; } ts.isBindingPattern = isBindingPattern; function isAssignmentPattern(node) { var kind = node.kind; - return kind === 176 - || kind === 177; + return kind === 177 + || kind === 178; } ts.isAssignmentPattern = isAssignmentPattern; function isBindingElement(node) { - return node.kind === 175; + return node.kind === 176; } ts.isBindingElement = isBindingElement; function isArrayBindingElement(node) { var kind = node.kind; - return kind === 175 - || kind === 199; + return kind === 176 + || kind === 200; } ts.isArrayBindingElement = isArrayBindingElement; function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 225: - case 145: - case 175: + case 226: + case 146: + case 176: return true; } return false; @@ -11120,8 +11129,8 @@ var ts; ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern; function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 173: - case 177: + case 174: + case 178: return true; } return false; @@ -11129,100 +11138,100 @@ var ts; ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern; function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: + case 175: + case 177: return true; } return false; } ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern; function isArrayLiteralExpression(node) { - return node.kind === 176; + return node.kind === 177; } ts.isArrayLiteralExpression = isArrayLiteralExpression; function isObjectLiteralExpression(node) { - return node.kind === 177; + return node.kind === 178; } ts.isObjectLiteralExpression = isObjectLiteralExpression; function isPropertyAccessExpression(node) { - return node.kind === 178; + return node.kind === 179; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isPropertyAccessOrQualifiedName(node) { var kind = node.kind; - return kind === 178 - || kind === 142; + return kind === 179 + || kind === 143; } ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName; function isElementAccessExpression(node) { - return node.kind === 179; + return node.kind === 180; } ts.isElementAccessExpression = isElementAccessExpression; function isBinaryExpression(node) { - return node.kind === 193; + return node.kind === 194; } ts.isBinaryExpression = isBinaryExpression; function isConditionalExpression(node) { - return node.kind === 194; + return node.kind === 195; } ts.isConditionalExpression = isConditionalExpression; function isCallExpression(node) { - return node.kind === 180; + return node.kind === 181; } ts.isCallExpression = isCallExpression; function isTemplateLiteral(node) { var kind = node.kind; - return kind === 195 - || kind === 12; + return kind === 196 + || kind === 13; } ts.isTemplateLiteral = isTemplateLiteral; function isSpreadExpression(node) { - return node.kind === 197; + return node.kind === 198; } ts.isSpreadExpression = isSpreadExpression; function isExpressionWithTypeArguments(node) { - return node.kind === 200; + return node.kind === 201; } ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments; function isLeftHandSideExpressionKind(kind) { - return kind === 178 - || kind === 179 - || kind === 181 + return kind === 179 || kind === 180 - || kind === 248 - || kind === 249 || kind === 182 - || kind === 176 - || kind === 184 + || kind === 181 + || kind === 249 + || kind === 250 + || kind === 183 || kind === 177 - || kind === 198 || kind === 185 - || kind === 70 - || kind === 11 + || kind === 178 + || kind === 199 + || kind === 186 + || kind === 71 + || kind === 12 || kind === 8 || kind === 9 - || kind === 12 - || kind === 195 - || kind === 85 - || kind === 94 - || kind === 98 - || kind === 100 - || kind === 96 - || kind === 202 - || kind === 203; + || kind === 13 + || kind === 196 + || kind === 86 + || kind === 95 + || kind === 99 + || kind === 101 + || kind === 97 + || kind === 203 + || kind === 204; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind); } ts.isLeftHandSideExpression = isLeftHandSideExpression; function isUnaryExpressionKind(kind) { - return kind === 191 - || kind === 192 - || kind === 187 + return kind === 192 + || kind === 193 || kind === 188 || kind === 189 || kind === 190 - || kind === 183 + || kind === 191 + || kind === 184 || isLeftHandSideExpressionKind(kind); } function isUnaryExpression(node) { @@ -11230,13 +11239,13 @@ var ts; } ts.isUnaryExpression = isUnaryExpression; function isExpressionKind(kind) { - return kind === 194 - || kind === 196 - || kind === 186 - || kind === 193 + return kind === 195 || kind === 197 - || kind === 201 - || kind === 199 + || kind === 187 + || kind === 194 + || kind === 198 + || kind === 202 + || kind === 200 || isUnaryExpressionKind(kind); } function isExpression(node) { @@ -11245,16 +11254,16 @@ var ts; ts.isExpression = isExpression; function isAssertionExpression(node) { var kind = node.kind; - return kind === 183 - || kind === 201; + return kind === 184 + || kind === 202; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 295; + return node.kind === 296; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 294; + return node.kind === 295; } ts.isNotEmittedStatement = isNotEmittedStatement; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -11263,15 +11272,15 @@ var ts; } ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode; function isOmittedExpression(node) { - return node.kind === 199; + return node.kind === 200; } ts.isOmittedExpression = isOmittedExpression; function isTemplateSpan(node) { - return node.kind === 204; + return node.kind === 205; } ts.isTemplateSpan = isTemplateSpan; function isBlock(node) { - return node.kind === 206; + return node.kind === 207; } ts.isBlock = isBlock; function isConciseBody(node) { @@ -11289,135 +11298,135 @@ var ts; } ts.isForInitializer = isForInitializer; function isVariableDeclaration(node) { - return node.kind === 225; + return node.kind === 226; } ts.isVariableDeclaration = isVariableDeclaration; function isVariableDeclarationList(node) { - return node.kind === 226; + return node.kind === 227; } ts.isVariableDeclarationList = isVariableDeclarationList; function isCaseBlock(node) { - return node.kind === 234; + return node.kind === 235; } ts.isCaseBlock = isCaseBlock; function isModuleBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232 - || kind === 70; + return kind === 234 + || kind === 233 + || kind === 71; } ts.isModuleBody = isModuleBody; function isNamespaceBody(node) { var kind = node.kind; - return kind === 233 - || kind === 232; + return kind === 234 + || kind === 233; } ts.isNamespaceBody = isNamespaceBody; function isJSDocNamespaceBody(node) { var kind = node.kind; - return kind === 70 - || kind === 232; + return kind === 71 + || kind === 233; } ts.isJSDocNamespaceBody = isJSDocNamespaceBody; function isImportEqualsDeclaration(node) { - return node.kind === 236; + return node.kind === 237; } ts.isImportEqualsDeclaration = isImportEqualsDeclaration; function isImportClause(node) { - return node.kind === 238; + return node.kind === 239; } ts.isImportClause = isImportClause; function isNamedImportBindings(node) { var kind = node.kind; - return kind === 240 - || kind === 239; + return kind === 241 + || kind === 240; } ts.isNamedImportBindings = isNamedImportBindings; function isImportSpecifier(node) { - return node.kind === 241; + return node.kind === 242; } ts.isImportSpecifier = isImportSpecifier; function isNamedExports(node) { - return node.kind === 244; + return node.kind === 245; } ts.isNamedExports = isNamedExports; function isExportSpecifier(node) { - return node.kind === 245; + return node.kind === 246; } ts.isExportSpecifier = isExportSpecifier; function isModuleOrEnumDeclaration(node) { - return node.kind === 232 || node.kind === 231; + return node.kind === 233 || node.kind === 232; } ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration; function isDeclarationKind(kind) { - return kind === 186 - || kind === 175 + return kind === 187 + || kind === 176 + || kind === 229 + || kind === 199 + || kind === 152 + || kind === 232 + || kind === 264 + || kind === 246 || kind === 228 - || kind === 198 + || kind === 186 + || kind === 153 + || kind === 239 + || kind === 237 + || kind === 242 + || kind === 230 + || kind === 253 || kind === 151 - || kind === 231 - || kind === 263 - || kind === 245 - || kind === 227 - || kind === 185 - || kind === 152 - || kind === 238 - || kind === 236 - || kind === 241 - || kind === 229 - || kind === 252 || kind === 150 + || kind === 233 + || kind === 236 + || kind === 240 + || kind === 146 + || kind === 261 || kind === 149 - || kind === 232 - || kind === 235 - || kind === 239 - || kind === 145 - || kind === 260 || kind === 148 - || kind === 147 - || kind === 153 - || kind === 261 - || kind === 230 - || kind === 144 - || kind === 225 - || kind === 289; + || kind === 154 + || kind === 262 + || kind === 231 + || kind === 145 + || kind === 226 + || kind === 290; } function isDeclarationStatementKind(kind) { - return kind === 227 - || kind === 246 - || kind === 228 + return kind === 228 + || kind === 247 || kind === 229 || kind === 230 || kind === 231 || kind === 232 + || kind === 233 + || kind === 238 || kind === 237 - || kind === 236 + || kind === 244 || kind === 243 - || kind === 242 - || kind === 235; + || kind === 236; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 217 + return kind === 218 + || kind === 217 + || kind === 225 + || kind === 212 + || kind === 210 + || kind === 209 + || kind === 215 || kind === 216 - || kind === 224 + || kind === 214 || kind === 211 - || kind === 209 + || kind === 222 + || kind === 219 + || kind === 221 + || kind === 223 + || kind === 224 || kind === 208 - || kind === 214 - || kind === 215 || kind === 213 - || kind === 210 - || kind === 221 - || kind === 218 || kind === 220 - || kind === 222 - || kind === 223 - || kind === 207 - || kind === 212 - || kind === 219 - || kind === 294 - || kind === 297 - || kind === 296; + || kind === 295 + || kind === 298 + || kind === 297; } function isDeclaration(node) { return isDeclarationKind(node.kind); @@ -11435,98 +11444,98 @@ var ts; var kind = node.kind; return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) - || kind === 206; + || kind === 207; } ts.isStatement = isStatement; function isModuleReference(node) { var kind = node.kind; - return kind === 247 - || kind === 142 - || kind === 70; + return kind === 248 + || kind === 143 + || kind === 71; } ts.isModuleReference = isModuleReference; function isJsxOpeningElement(node) { - return node.kind === 250; + return node.kind === 251; } ts.isJsxOpeningElement = isJsxOpeningElement; function isJsxClosingElement(node) { - return node.kind === 251; + return node.kind === 252; } ts.isJsxClosingElement = isJsxClosingElement; function isJsxTagNameExpression(node) { var kind = node.kind; - return kind === 98 - || kind === 70 - || kind === 178; + return kind === 99 + || kind === 71 + || kind === 179; } ts.isJsxTagNameExpression = isJsxTagNameExpression; function isJsxChild(node) { var kind = node.kind; - return kind === 248 - || kind === 255 - || kind === 249 + return kind === 249 + || kind === 256 + || kind === 250 || kind === 10; } ts.isJsxChild = isJsxChild; function isJsxAttributes(node) { var kind = node.kind; - return kind === 253; + return kind === 254; } ts.isJsxAttributes = isJsxAttributes; function isJsxAttributeLike(node) { var kind = node.kind; - return kind === 252 - || kind === 254; + return kind === 253 + || kind === 255; } ts.isJsxAttributeLike = isJsxAttributeLike; function isJsxSpreadAttribute(node) { - return node.kind === 254; + return node.kind === 255; } ts.isJsxSpreadAttribute = isJsxSpreadAttribute; function isJsxAttribute(node) { - return node.kind === 252; + return node.kind === 253; } ts.isJsxAttribute = isJsxAttribute; function isStringLiteralOrJsxExpression(node) { var kind = node.kind; return kind === 9 - || kind === 255; + || kind === 256; } ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression; function isJsxOpeningLikeElement(node) { var kind = node.kind; - return kind === 250 - || kind === 249; + return kind === 251 + || kind === 250; } ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement; function isCaseOrDefaultClause(node) { var kind = node.kind; - return kind === 256 - || kind === 257; + return kind === 257 + || kind === 258; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isHeritageClause(node) { - return node.kind === 258; + return node.kind === 259; } ts.isHeritageClause = isHeritageClause; function isCatchClause(node) { - return node.kind === 259; + return node.kind === 260; } ts.isCatchClause = isCatchClause; function isPropertyAssignment(node) { - return node.kind === 260; + return node.kind === 261; } ts.isPropertyAssignment = isPropertyAssignment; function isShorthandPropertyAssignment(node) { - return node.kind === 261; + return node.kind === 262; } ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment; function isEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } ts.isEnumMember = isEnumMember; function isSourceFile(node) { - return node.kind === 264; + return node.kind === 265; } ts.isSourceFile = isSourceFile; function isWatchSet(options) { @@ -11666,9 +11675,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 144) { + if (d && d.kind === 145) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) { return current; } } @@ -11676,11 +11685,11 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent); + return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 175 || ts.isBindingPattern(node))) { + while (node && (node.kind === 176 || ts.isBindingPattern(node))) { node = node.parent; } return node; @@ -11688,14 +11697,14 @@ var ts; function getCombinedModifierFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = ts.getModifierFlags(node); - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= ts.getModifierFlags(node); node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= ts.getModifierFlags(node); } return flags; @@ -11704,14 +11713,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 225) { + if (node.kind === 226) { node = node.parent; } - if (node && node.kind === 226) { + if (node && node.kind === 227) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 207) { + if (node && node.kind === 208) { flags |= node.flags; } return flags; @@ -11872,7 +11881,7 @@ var ts; return node; } function createIdentifier(text) { - var node = createSynthesizedNode(70); + var node = createSynthesizedNode(71); node.text = ts.escapeIdentifier(text); node.originalKeywordKind = text ? ts.stringToToken(text) : 0; node.autoGenerateKind = 0; @@ -11922,27 +11931,27 @@ var ts; } ts.createToken = createToken; function createSuper() { - return createSynthesizedNode(96); + return createSynthesizedNode(97); } ts.createSuper = createSuper; function createThis() { - return createSynthesizedNode(98); + return createSynthesizedNode(99); } ts.createThis = createThis; function createNull() { - return createSynthesizedNode(94); + return createSynthesizedNode(95); } ts.createNull = createNull; function createTrue() { - return createSynthesizedNode(100); + return createSynthesizedNode(101); } ts.createTrue = createTrue; function createFalse() { - return createSynthesizedNode(85); + return createSynthesizedNode(86); } ts.createFalse = createFalse; function createQualifiedName(left, right) { - var node = createSynthesizedNode(142); + var node = createSynthesizedNode(143); node.left = left; node.right = asName(right); return node; @@ -11956,7 +11965,7 @@ var ts; } ts.updateQualifiedName = updateQualifiedName; function createComputedPropertyName(expression) { - var node = createSynthesizedNode(143); + var node = createSynthesizedNode(144); node.expression = expression; return node; } @@ -11983,7 +11992,7 @@ var ts; : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(159, typeParameters, parameters, type); + return createSignatureDeclaration(160, typeParameters, parameters, type); } ts.createFunctionTypeNode = createFunctionTypeNode; function updateFunctionTypeNode(node, typeParameters, parameters, type) { @@ -11991,7 +12000,7 @@ var ts; } ts.updateFunctionTypeNode = updateFunctionTypeNode; function createConstructorTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(160, typeParameters, parameters, type); + return createSignatureDeclaration(161, typeParameters, parameters, type); } ts.createConstructorTypeNode = createConstructorTypeNode; function updateConstructorTypeNode(node, typeParameters, parameters, type) { @@ -11999,7 +12008,7 @@ var ts; } ts.updateConstructorTypeNode = updateConstructorTypeNode; function createCallSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(154, typeParameters, parameters, type); + return createSignatureDeclaration(155, typeParameters, parameters, type); } ts.createCallSignatureDeclaration = createCallSignatureDeclaration; function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { @@ -12007,7 +12016,7 @@ var ts; } ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration; function createConstructSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(155, typeParameters, parameters, type); + return createSignatureDeclaration(156, typeParameters, parameters, type); } ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration; function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { @@ -12015,7 +12024,7 @@ var ts; } ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration; function createMethodSignature(typeParameters, parameters, type, name, questionToken) { - var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type); + var methodSignature = createSignatureDeclaration(150, typeParameters, parameters, type); methodSignature.name = asName(name); methodSignature.questionToken = questionToken; return methodSignature; @@ -12036,11 +12045,11 @@ var ts; } ts.createKeywordTypeNode = createKeywordTypeNode; function createThisTypeNode() { - return createSynthesizedNode(168); + return createSynthesizedNode(169); } ts.createThisTypeNode = createThisTypeNode; function createLiteralTypeNode(literal) { - var literalTypeNode = createSynthesizedNode(172); + var literalTypeNode = createSynthesizedNode(173); literalTypeNode.literal = literal; return literalTypeNode; } @@ -12052,7 +12061,7 @@ var ts; } ts.updateLiteralTypeNode = updateLiteralTypeNode; function createTypeReferenceNode(typeName, typeArguments) { - var typeReference = createSynthesizedNode(158); + var typeReference = createSynthesizedNode(159); typeReference.typeName = asName(typeName); typeReference.typeArguments = asNodeArray(typeArguments); return typeReference; @@ -12066,7 +12075,7 @@ var ts; } ts.updateTypeReferenceNode = updateTypeReferenceNode; function createTypePredicateNode(parameterName, type) { - var typePredicateNode = createSynthesizedNode(157); + var typePredicateNode = createSynthesizedNode(158); typePredicateNode.parameterName = asName(parameterName); typePredicateNode.type = type; return typePredicateNode; @@ -12080,7 +12089,7 @@ var ts; } ts.updateTypePredicateNode = updateTypePredicateNode; function createTypeQueryNode(exprName) { - var typeQueryNode = createSynthesizedNode(161); + var typeQueryNode = createSynthesizedNode(162); typeQueryNode.exprName = exprName; return typeQueryNode; } @@ -12090,7 +12099,7 @@ var ts; } ts.updateTypeQueryNode = updateTypeQueryNode; function createArrayTypeNode(elementType) { - var arrayTypeNode = createSynthesizedNode(163); + var arrayTypeNode = createSynthesizedNode(164); arrayTypeNode.elementType = elementType; return arrayTypeNode; } @@ -12114,7 +12123,7 @@ var ts; } ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode; function createTypeLiteralNode(members) { - var typeLiteralNode = createSynthesizedNode(162); + var typeLiteralNode = createSynthesizedNode(163); typeLiteralNode.members = createNodeArray(members); return typeLiteralNode; } @@ -12126,7 +12135,7 @@ var ts; } ts.updateTypeLiteralNode = updateTypeLiteralNode; function createTupleTypeNode(elementTypes) { - var tupleTypeNode = createSynthesizedNode(164); + var tupleTypeNode = createSynthesizedNode(165); tupleTypeNode.elementTypes = createNodeArray(elementTypes); return tupleTypeNode; } @@ -12138,7 +12147,7 @@ var ts; } ts.updateTypleTypeNode = updateTypleTypeNode; function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) { - var mappedTypeNode = createSynthesizedNode(171); + var mappedTypeNode = createSynthesizedNode(172); mappedTypeNode.readonlyToken = readonlyToken; mappedTypeNode.typeParameter = typeParameter; mappedTypeNode.questionToken = questionToken; @@ -12156,8 +12165,8 @@ var ts; } ts.updateMappedTypeNode = updateMappedTypeNode; function createTypeOperatorNode(type) { - var typeOperatorNode = createSynthesizedNode(169); - typeOperatorNode.operator = 126; + var typeOperatorNode = createSynthesizedNode(170); + typeOperatorNode.operator = 127; typeOperatorNode.type = type; return typeOperatorNode; } @@ -12167,7 +12176,7 @@ var ts; } ts.updateTypeOperatorNode = updateTypeOperatorNode; function createIndexedAccessTypeNode(objectType, indexType) { - var indexedAccessTypeNode = createSynthesizedNode(170); + var indexedAccessTypeNode = createSynthesizedNode(171); indexedAccessTypeNode.objectType = objectType; indexedAccessTypeNode.indexType = indexType; return indexedAccessTypeNode; @@ -12181,7 +12190,7 @@ var ts; } ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode; function createTypeParameterDeclaration(name, constraint, defaultType) { - var typeParameter = createSynthesizedNode(144); + var typeParameter = createSynthesizedNode(145); typeParameter.name = asName(name); typeParameter.constraint = constraint; typeParameter.default = defaultType; @@ -12197,7 +12206,7 @@ var ts; } ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration; function createPropertySignature(name, questionToken, type, initializer) { - var propertySignature = createSynthesizedNode(147); + var propertySignature = createSynthesizedNode(148); propertySignature.name = asName(name); propertySignature.questionToken = questionToken; propertySignature.type = type; @@ -12215,7 +12224,7 @@ var ts; } ts.updatePropertySignature = updatePropertySignature; function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) { - var indexSignature = createSynthesizedNode(156); + var indexSignature = createSynthesizedNode(157); indexSignature.decorators = asNodeArray(decorators); indexSignature.modifiers = asNodeArray(modifiers); indexSignature.parameters = createNodeArray(parameters); @@ -12233,7 +12242,7 @@ var ts; } ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration; function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - var node = createSynthesizedNode(145); + var node = createSynthesizedNode(146); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; @@ -12257,7 +12266,7 @@ var ts; } ts.updateParameter = updateParameter; function createDecorator(expression) { - var node = createSynthesizedNode(146); + var node = createSynthesizedNode(147); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -12269,7 +12278,7 @@ var ts; } ts.updateDecorator = updateDecorator; function createProperty(decorators, modifiers, name, questionToken, type, initializer) { - var node = createSynthesizedNode(148); + var node = createSynthesizedNode(149); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12290,7 +12299,7 @@ var ts; } ts.updateProperty = updateProperty; function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(150); + var node = createSynthesizedNode(151); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -12317,7 +12326,7 @@ var ts; } ts.updateMethod = updateMethod; function createConstructor(decorators, modifiers, parameters, body) { - var node = createSynthesizedNode(151); + var node = createSynthesizedNode(152); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.typeParameters = undefined; @@ -12337,7 +12346,7 @@ var ts; } ts.updateConstructor = updateConstructor; function createGetAccessor(decorators, modifiers, name, parameters, type, body) { - var node = createSynthesizedNode(152); + var node = createSynthesizedNode(153); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12360,7 +12369,7 @@ var ts; } ts.updateGetAccessor = updateGetAccessor; function createSetAccessor(decorators, modifiers, name, parameters, body) { - var node = createSynthesizedNode(153); + var node = createSynthesizedNode(154); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12381,7 +12390,7 @@ var ts; } ts.updateSetAccessor = updateSetAccessor; function createObjectBindingPattern(elements) { - var node = createSynthesizedNode(173); + var node = createSynthesizedNode(174); node.elements = createNodeArray(elements); return node; } @@ -12393,7 +12402,7 @@ var ts; } ts.updateObjectBindingPattern = updateObjectBindingPattern; function createArrayBindingPattern(elements) { - var node = createSynthesizedNode(174); + var node = createSynthesizedNode(175); node.elements = createNodeArray(elements); return node; } @@ -12405,7 +12414,7 @@ var ts; } ts.updateArrayBindingPattern = updateArrayBindingPattern; function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - var node = createSynthesizedNode(175); + var node = createSynthesizedNode(176); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -12423,7 +12432,7 @@ var ts; } ts.updateBindingElement = updateBindingElement; function createArrayLiteral(elements, multiLine) { - var node = createSynthesizedNode(176); + var node = createSynthesizedNode(177); node.elements = ts.parenthesizeListElements(createNodeArray(elements)); if (multiLine) { node.multiLine = true; @@ -12438,7 +12447,7 @@ var ts; } ts.updateArrayLiteral = updateArrayLiteral; function createObjectLiteral(properties, multiLine) { - var node = createSynthesizedNode(177); + var node = createSynthesizedNode(178); node.properties = createNodeArray(properties); if (multiLine) { node.multiLine = true; @@ -12453,7 +12462,7 @@ var ts; } ts.updateObjectLiteral = updateObjectLiteral; function createPropertyAccess(expression, name) { - var node = createSynthesizedNode(178); + var node = createSynthesizedNode(179); node.expression = ts.parenthesizeForAccess(expression); node.name = asName(name); setEmitFlags(node, 65536); @@ -12468,7 +12477,7 @@ var ts; } ts.updatePropertyAccess = updatePropertyAccess; function createElementAccess(expression, index) { - var node = createSynthesizedNode(179); + var node = createSynthesizedNode(180); node.expression = ts.parenthesizeForAccess(expression); node.argumentExpression = asExpression(index); return node; @@ -12482,7 +12491,7 @@ var ts; } ts.updateElementAccess = updateElementAccess; function createCall(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(180); + var node = createSynthesizedNode(181); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray)); @@ -12498,7 +12507,7 @@ var ts; } ts.updateCall = updateCall; function createNew(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(181); + var node = createSynthesizedNode(182); node.expression = ts.parenthesizeForNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined; @@ -12514,7 +12523,7 @@ var ts; } ts.updateNew = updateNew; function createTaggedTemplate(tag, template) { - var node = createSynthesizedNode(182); + var node = createSynthesizedNode(183); node.tag = ts.parenthesizeForAccess(tag); node.template = template; return node; @@ -12528,7 +12537,7 @@ var ts; } ts.updateTaggedTemplate = updateTaggedTemplate; function createTypeAssertion(type, expression) { - var node = createSynthesizedNode(183); + var node = createSynthesizedNode(184); node.type = type; node.expression = ts.parenthesizePrefixOperand(expression); return node; @@ -12542,7 +12551,7 @@ var ts; } ts.updateTypeAssertion = updateTypeAssertion; function createParen(expression) { - var node = createSynthesizedNode(184); + var node = createSynthesizedNode(185); node.expression = expression; return node; } @@ -12554,7 +12563,7 @@ var ts; } ts.updateParen = updateParen; function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(185); + var node = createSynthesizedNode(186); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -12578,12 +12587,12 @@ var ts; } ts.updateFunctionExpression = updateFunctionExpression; function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - var node = createSynthesizedNode(186); + var node = createSynthesizedNode(187); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35); + node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(36); node.body = ts.parenthesizeConciseBody(body); return node; } @@ -12599,7 +12608,7 @@ var ts; } ts.updateArrowFunction = updateArrowFunction; function createDelete(expression) { - var node = createSynthesizedNode(187); + var node = createSynthesizedNode(188); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -12611,7 +12620,7 @@ var ts; } ts.updateDelete = updateDelete; function createTypeOf(expression) { - var node = createSynthesizedNode(188); + var node = createSynthesizedNode(189); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -12623,7 +12632,7 @@ var ts; } ts.updateTypeOf = updateTypeOf; function createVoid(expression) { - var node = createSynthesizedNode(189); + var node = createSynthesizedNode(190); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -12635,7 +12644,7 @@ var ts; } ts.updateVoid = updateVoid; function createAwait(expression) { - var node = createSynthesizedNode(190); + var node = createSynthesizedNode(191); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -12647,7 +12656,7 @@ var ts; } ts.updateAwait = updateAwait; function createPrefix(operator, operand) { - var node = createSynthesizedNode(191); + var node = createSynthesizedNode(192); node.operator = operator; node.operand = ts.parenthesizePrefixOperand(operand); return node; @@ -12660,7 +12669,7 @@ var ts; } ts.updatePrefix = updatePrefix; function createPostfix(operand, operator) { - var node = createSynthesizedNode(192); + var node = createSynthesizedNode(193); node.operand = ts.parenthesizePostfixOperand(operand); node.operator = operator; return node; @@ -12673,7 +12682,7 @@ var ts; } ts.updatePostfix = updatePostfix; function createBinary(left, operator, right) { - var node = createSynthesizedNode(193); + var node = createSynthesizedNode(194); var operatorToken = asToken(operator); var operatorKind = operatorToken.kind; node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined); @@ -12690,11 +12699,11 @@ var ts; } ts.updateBinary = updateBinary; function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) { - var node = createSynthesizedNode(194); + var node = createSynthesizedNode(195); node.condition = ts.parenthesizeForConditionalHead(condition); - node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54); + node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(55); node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue); - node.colonToken = whenFalse ? colonToken : createToken(55); + node.colonToken = whenFalse ? colonToken : createToken(56); node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse); return node; } @@ -12708,7 +12717,7 @@ var ts; } ts.updateConditional = updateConditional; function createTemplateExpression(head, templateSpans) { - var node = createSynthesizedNode(195); + var node = createSynthesizedNode(196); node.head = head; node.templateSpans = createNodeArray(templateSpans); return node; @@ -12722,9 +12731,9 @@ var ts; } ts.updateTemplateExpression = updateTemplateExpression; function createYield(asteriskTokenOrExpression, expression) { - var node = createSynthesizedNode(196); - node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined; - node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression; + var node = createSynthesizedNode(197); + node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 39 ? asteriskTokenOrExpression : undefined; + node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 39 ? asteriskTokenOrExpression : expression; return node; } ts.createYield = createYield; @@ -12736,7 +12745,7 @@ var ts; } ts.updateYield = updateYield; function createSpread(expression) { - var node = createSynthesizedNode(197); + var node = createSynthesizedNode(198); node.expression = ts.parenthesizeExpressionForList(expression); return node; } @@ -12748,7 +12757,7 @@ var ts; } ts.updateSpread = updateSpread; function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(198); + var node = createSynthesizedNode(199); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12769,11 +12778,11 @@ var ts; } ts.updateClassExpression = updateClassExpression; function createOmittedExpression() { - return createSynthesizedNode(199); + return createSynthesizedNode(200); } ts.createOmittedExpression = createOmittedExpression; function createExpressionWithTypeArguments(typeArguments, expression) { - var node = createSynthesizedNode(200); + var node = createSynthesizedNode(201); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); return node; @@ -12787,7 +12796,7 @@ var ts; } ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments; function createAsExpression(expression, type) { - var node = createSynthesizedNode(201); + var node = createSynthesizedNode(202); node.expression = expression; node.type = type; return node; @@ -12801,7 +12810,7 @@ var ts; } ts.updateAsExpression = updateAsExpression; function createNonNullExpression(expression) { - var node = createSynthesizedNode(202); + var node = createSynthesizedNode(203); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -12813,7 +12822,7 @@ var ts; } ts.updateNonNullExpression = updateNonNullExpression; function createTemplateSpan(expression, literal) { - var node = createSynthesizedNode(204); + var node = createSynthesizedNode(205); node.expression = expression; node.literal = literal; return node; @@ -12827,7 +12836,7 @@ var ts; } ts.updateTemplateSpan = updateTemplateSpan; function createBlock(statements, multiLine) { - var block = createSynthesizedNode(206); + var block = createSynthesizedNode(207); block.statements = createNodeArray(statements); if (multiLine) block.multiLine = multiLine; @@ -12841,7 +12850,7 @@ var ts; } ts.updateBlock = updateBlock; function createVariableStatement(modifiers, declarationList) { - var node = createSynthesizedNode(207); + var node = createSynthesizedNode(208); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; @@ -12856,7 +12865,7 @@ var ts; } ts.updateVariableStatement = updateVariableStatement; function createVariableDeclarationList(declarations, flags) { - var node = createSynthesizedNode(226); + var node = createSynthesizedNode(227); node.flags |= flags; node.declarations = createNodeArray(declarations); return node; @@ -12869,7 +12878,7 @@ var ts; } ts.updateVariableDeclarationList = updateVariableDeclarationList; function createVariableDeclaration(name, type, initializer) { - var node = createSynthesizedNode(225); + var node = createSynthesizedNode(226); node.name = asName(name); node.type = type; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -12885,11 +12894,11 @@ var ts; } ts.updateVariableDeclaration = updateVariableDeclaration; function createEmptyStatement() { - return createSynthesizedNode(208); + return createSynthesizedNode(209); } ts.createEmptyStatement = createEmptyStatement; function createStatement(expression) { - var node = createSynthesizedNode(209); + var node = createSynthesizedNode(210); node.expression = ts.parenthesizeExpressionForExpressionStatement(expression); return node; } @@ -12901,7 +12910,7 @@ var ts; } ts.updateStatement = updateStatement; function createIf(expression, thenStatement, elseStatement) { - var node = createSynthesizedNode(210); + var node = createSynthesizedNode(211); node.expression = expression; node.thenStatement = thenStatement; node.elseStatement = elseStatement; @@ -12917,7 +12926,7 @@ var ts; } ts.updateIf = updateIf; function createDo(statement, expression) { - var node = createSynthesizedNode(211); + var node = createSynthesizedNode(212); node.statement = statement; node.expression = expression; return node; @@ -12931,7 +12940,7 @@ var ts; } ts.updateDo = updateDo; function createWhile(expression, statement) { - var node = createSynthesizedNode(212); + var node = createSynthesizedNode(213); node.expression = expression; node.statement = statement; return node; @@ -12945,7 +12954,7 @@ var ts; } ts.updateWhile = updateWhile; function createFor(initializer, condition, incrementor, statement) { - var node = createSynthesizedNode(213); + var node = createSynthesizedNode(214); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -12963,7 +12972,7 @@ var ts; } ts.updateFor = updateFor; function createForIn(initializer, expression, statement) { - var node = createSynthesizedNode(214); + var node = createSynthesizedNode(215); node.initializer = initializer; node.expression = expression; node.statement = statement; @@ -12979,7 +12988,7 @@ var ts; } ts.updateForIn = updateForIn; function createForOf(awaitModifier, initializer, expression, statement) { - var node = createSynthesizedNode(215); + var node = createSynthesizedNode(216); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; @@ -12997,7 +13006,7 @@ var ts; } ts.updateForOf = updateForOf; function createContinue(label) { - var node = createSynthesizedNode(216); + var node = createSynthesizedNode(217); node.label = asName(label); return node; } @@ -13009,7 +13018,7 @@ var ts; } ts.updateContinue = updateContinue; function createBreak(label) { - var node = createSynthesizedNode(217); + var node = createSynthesizedNode(218); node.label = asName(label); return node; } @@ -13021,7 +13030,7 @@ var ts; } ts.updateBreak = updateBreak; function createReturn(expression) { - var node = createSynthesizedNode(218); + var node = createSynthesizedNode(219); node.expression = expression; return node; } @@ -13033,7 +13042,7 @@ var ts; } ts.updateReturn = updateReturn; function createWith(expression, statement) { - var node = createSynthesizedNode(219); + var node = createSynthesizedNode(220); node.expression = expression; node.statement = statement; return node; @@ -13047,7 +13056,7 @@ var ts; } ts.updateWith = updateWith; function createSwitch(expression, caseBlock) { - var node = createSynthesizedNode(220); + var node = createSynthesizedNode(221); node.expression = ts.parenthesizeExpressionForList(expression); node.caseBlock = caseBlock; return node; @@ -13061,7 +13070,7 @@ var ts; } ts.updateSwitch = updateSwitch; function createLabel(label, statement) { - var node = createSynthesizedNode(221); + var node = createSynthesizedNode(222); node.label = asName(label); node.statement = statement; return node; @@ -13075,7 +13084,7 @@ var ts; } ts.updateLabel = updateLabel; function createThrow(expression) { - var node = createSynthesizedNode(222); + var node = createSynthesizedNode(223); node.expression = expression; return node; } @@ -13087,7 +13096,7 @@ var ts; } ts.updateThrow = updateThrow; function createTry(tryBlock, catchClause, finallyBlock) { - var node = createSynthesizedNode(223); + var node = createSynthesizedNode(224); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -13103,7 +13112,7 @@ var ts; } ts.updateTry = updateTry; function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(227); + var node = createSynthesizedNode(228); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -13129,7 +13138,7 @@ var ts; } ts.updateFunctionDeclaration = updateFunctionDeclaration; function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(228); + var node = createSynthesizedNode(229); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -13151,7 +13160,7 @@ var ts; } ts.updateClassDeclaration = updateClassDeclaration; function createEnumDeclaration(decorators, modifiers, name, members) { - var node = createSynthesizedNode(231); + var node = createSynthesizedNode(232); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -13169,7 +13178,7 @@ var ts; } ts.updateEnumDeclaration = updateEnumDeclaration; function createModuleDeclaration(decorators, modifiers, name, body, flags) { - var node = createSynthesizedNode(232); + var node = createSynthesizedNode(233); node.flags |= flags; node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); @@ -13188,7 +13197,7 @@ var ts; } ts.updateModuleDeclaration = updateModuleDeclaration; function createModuleBlock(statements) { - var node = createSynthesizedNode(233); + var node = createSynthesizedNode(234); node.statements = createNodeArray(statements); return node; } @@ -13200,7 +13209,7 @@ var ts; } ts.updateModuleBlock = updateModuleBlock; function createCaseBlock(clauses) { - var node = createSynthesizedNode(234); + var node = createSynthesizedNode(235); node.clauses = createNodeArray(clauses); return node; } @@ -13212,7 +13221,7 @@ var ts; } ts.updateCaseBlock = updateCaseBlock; function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) { - var node = createSynthesizedNode(236); + var node = createSynthesizedNode(237); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -13230,7 +13239,7 @@ var ts; } ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration; function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) { - var node = createSynthesizedNode(237); + var node = createSynthesizedNode(238); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; @@ -13247,7 +13256,7 @@ var ts; } ts.updateImportDeclaration = updateImportDeclaration; function createImportClause(name, namedBindings) { - var node = createSynthesizedNode(238); + var node = createSynthesizedNode(239); node.name = name; node.namedBindings = namedBindings; return node; @@ -13261,7 +13270,7 @@ var ts; } ts.updateImportClause = updateImportClause; function createNamespaceImport(name) { - var node = createSynthesizedNode(239); + var node = createSynthesizedNode(240); node.name = name; return node; } @@ -13273,7 +13282,7 @@ var ts; } ts.updateNamespaceImport = updateNamespaceImport; function createNamedImports(elements) { - var node = createSynthesizedNode(240); + var node = createSynthesizedNode(241); node.elements = createNodeArray(elements); return node; } @@ -13285,7 +13294,7 @@ var ts; } ts.updateNamedImports = updateNamedImports; function createImportSpecifier(propertyName, name) { - var node = createSynthesizedNode(241); + var node = createSynthesizedNode(242); node.propertyName = propertyName; node.name = name; return node; @@ -13299,7 +13308,7 @@ var ts; } ts.updateImportSpecifier = updateImportSpecifier; function createExportAssignment(decorators, modifiers, isExportEquals, expression) { - var node = createSynthesizedNode(242); + var node = createSynthesizedNode(243); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; @@ -13316,7 +13325,7 @@ var ts; } ts.updateExportAssignment = updateExportAssignment; function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) { - var node = createSynthesizedNode(243); + var node = createSynthesizedNode(244); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.exportClause = exportClause; @@ -13334,7 +13343,7 @@ var ts; } ts.updateExportDeclaration = updateExportDeclaration; function createNamedExports(elements) { - var node = createSynthesizedNode(244); + var node = createSynthesizedNode(245); node.elements = createNodeArray(elements); return node; } @@ -13346,7 +13355,7 @@ var ts; } ts.updateNamedExports = updateNamedExports; function createExportSpecifier(propertyName, name) { - var node = createSynthesizedNode(245); + var node = createSynthesizedNode(246); node.propertyName = asName(propertyName); node.name = asName(name); return node; @@ -13360,7 +13369,7 @@ var ts; } ts.updateExportSpecifier = updateExportSpecifier; function createExternalModuleReference(expression) { - var node = createSynthesizedNode(247); + var node = createSynthesizedNode(248); node.expression = expression; return node; } @@ -13372,7 +13381,7 @@ var ts; } ts.updateExternalModuleReference = updateExternalModuleReference; function createJsxElement(openingElement, children, closingElement) { - var node = createSynthesizedNode(248); + var node = createSynthesizedNode(249); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -13388,7 +13397,7 @@ var ts; } ts.updateJsxElement = updateJsxElement; function createJsxSelfClosingElement(tagName, attributes) { - var node = createSynthesizedNode(249); + var node = createSynthesizedNode(250); node.tagName = tagName; node.attributes = attributes; return node; @@ -13402,7 +13411,7 @@ var ts; } ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement; function createJsxOpeningElement(tagName, attributes) { - var node = createSynthesizedNode(250); + var node = createSynthesizedNode(251); node.tagName = tagName; node.attributes = attributes; return node; @@ -13416,7 +13425,7 @@ var ts; } ts.updateJsxOpeningElement = updateJsxOpeningElement; function createJsxClosingElement(tagName) { - var node = createSynthesizedNode(251); + var node = createSynthesizedNode(252); node.tagName = tagName; return node; } @@ -13428,7 +13437,7 @@ var ts; } ts.updateJsxClosingElement = updateJsxClosingElement; function createJsxAttributes(properties) { - var jsxAttributes = createSynthesizedNode(253); + var jsxAttributes = createSynthesizedNode(254); jsxAttributes.properties = createNodeArray(properties); return jsxAttributes; } @@ -13441,7 +13450,7 @@ var ts; } ts.updateJsxAttributes = updateJsxAttributes; function createJsxAttribute(name, initializer) { - var node = createSynthesizedNode(252); + var node = createSynthesizedNode(253); node.name = name; node.initializer = initializer; return node; @@ -13455,7 +13464,7 @@ var ts; } ts.updateJsxAttribute = updateJsxAttribute; function createJsxSpreadAttribute(expression) { - var node = createSynthesizedNode(254); + var node = createSynthesizedNode(255); node.expression = expression; return node; } @@ -13467,7 +13476,7 @@ var ts; } ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute; function createJsxExpression(dotDotDotToken, expression) { - var node = createSynthesizedNode(255); + var node = createSynthesizedNode(256); node.dotDotDotToken = dotDotDotToken; node.expression = expression; return node; @@ -13480,7 +13489,7 @@ var ts; } ts.updateJsxExpression = updateJsxExpression; function createHeritageClause(token, types) { - var node = createSynthesizedNode(258); + var node = createSynthesizedNode(259); node.token = token; node.types = createNodeArray(types); return node; @@ -13494,7 +13503,7 @@ var ts; } ts.updateHeritageClause = updateHeritageClause; function createCaseClause(expression, statements) { - var node = createSynthesizedNode(256); + var node = createSynthesizedNode(257); node.expression = ts.parenthesizeExpressionForList(expression); node.statements = createNodeArray(statements); return node; @@ -13508,7 +13517,7 @@ var ts; } ts.updateCaseClause = updateCaseClause; function createDefaultClause(statements) { - var node = createSynthesizedNode(257); + var node = createSynthesizedNode(258); node.statements = createNodeArray(statements); return node; } @@ -13521,7 +13530,7 @@ var ts; } ts.updateDefaultClause = updateDefaultClause; function createCatchClause(variableDeclaration, block) { - var node = createSynthesizedNode(259); + var node = createSynthesizedNode(260); node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration; node.block = block; return node; @@ -13535,7 +13544,7 @@ var ts; } ts.updateCatchClause = updateCatchClause; function createPropertyAssignment(name, initializer) { - var node = createSynthesizedNode(260); + var node = createSynthesizedNode(261); node.name = asName(name); node.questionToken = undefined; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -13550,7 +13559,7 @@ var ts; } ts.updatePropertyAssignment = updatePropertyAssignment; function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - var node = createSynthesizedNode(261); + var node = createSynthesizedNode(262); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined; return node; @@ -13564,7 +13573,7 @@ var ts; } ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment; function createSpreadAssignment(expression) { - var node = createSynthesizedNode(262); + var node = createSynthesizedNode(263); node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined; return node; } @@ -13577,7 +13586,7 @@ var ts; } ts.updateSpreadAssignment = updateSpreadAssignment; function createEnumMember(name, initializer) { - var node = createSynthesizedNode(263); + var node = createSynthesizedNode(264); node.name = asName(name); node.initializer = initializer && ts.parenthesizeExpressionForList(initializer); return node; @@ -13592,7 +13601,7 @@ var ts; ts.updateEnumMember = updateEnumMember; function updateSourceFileNode(node, statements) { if (node.statements !== statements) { - var updated = createSynthesizedNode(264); + var updated = createSynthesizedNode(265); updated.flags |= node.flags; updated.statements = createNodeArray(statements); updated.endOfFileToken = node.endOfFileToken; @@ -13661,28 +13670,28 @@ var ts; } ts.getMutableClone = getMutableClone; function createNotEmittedStatement(original) { - var node = createSynthesizedNode(294); + var node = createSynthesizedNode(295); node.original = original; setTextRange(node, original); return node; } ts.createNotEmittedStatement = createNotEmittedStatement; function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(297); + var node = createSynthesizedNode(298); node.emitNode = {}; node.original = original; return node; } ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker; function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(296); + var node = createSynthesizedNode(297); node.emitNode = {}; node.original = original; return node; } ts.createMergeDeclarationMarker = createMergeDeclarationMarker; function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(295); + var node = createSynthesizedNode(296); node.expression = expression; node.original = original; setTextRange(node, original); @@ -13697,7 +13706,7 @@ var ts; } ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function createBundle(sourceFiles) { - var node = ts.createNode(265); + var node = ts.createNode(266); node.sourceFiles = sourceFiles; return node; } @@ -13710,47 +13719,47 @@ var ts; } ts.updateBundle = updateBundle; function createComma(left, right) { - return createBinary(left, 25, right); + return createBinary(left, 26, right); } ts.createComma = createComma; function createLessThan(left, right) { - return createBinary(left, 26, right); + return createBinary(left, 27, right); } ts.createLessThan = createLessThan; function createAssignment(left, right) { - return createBinary(left, 57, right); + return createBinary(left, 58, right); } ts.createAssignment = createAssignment; function createStrictEquality(left, right) { - return createBinary(left, 33, right); + return createBinary(left, 34, right); } ts.createStrictEquality = createStrictEquality; function createStrictInequality(left, right) { - return createBinary(left, 34, right); + return createBinary(left, 35, right); } ts.createStrictInequality = createStrictInequality; function createAdd(left, right) { - return createBinary(left, 36, right); + return createBinary(left, 37, right); } ts.createAdd = createAdd; function createSubtract(left, right) { - return createBinary(left, 37, right); + return createBinary(left, 38, right); } ts.createSubtract = createSubtract; function createPostfixIncrement(operand) { - return createPostfix(operand, 42); + return createPostfix(operand, 43); } ts.createPostfixIncrement = createPostfixIncrement; function createLogicalAnd(left, right) { - return createBinary(left, 52, right); + return createBinary(left, 53, right); } ts.createLogicalAnd = createLogicalAnd; function createLogicalOr(left, right) { - return createBinary(left, 53, right); + return createBinary(left, 54, right); } ts.createLogicalOr = createLogicalOr; function createLogicalNot(operand) { - return createPrefix(50, operand); + return createPrefix(51, operand); } ts.createLogicalNot = createLogicalNot; function createVoidZero() { @@ -13792,7 +13801,7 @@ var ts; function getOrCreateEmitNode(node) { if (!node.emitNode) { if (ts.isParseTreeNode(node)) { - if (node.kind === 264) { + if (node.kind === 265) { return node.emitNode = { annotatedNodes: [node] }; } var sourceFile = ts.getSourceFileOfNode(node); @@ -14161,7 +14170,7 @@ var ts; if (!outermostLabeledStatement) { return node; } - var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 + var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 222 ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node); if (afterRestoreLabelCallback) { @@ -14173,19 +14182,19 @@ var ts; function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { var target = skipParentheses(node); switch (target.kind) { - case 70: + case 71: return cacheIdentifiers; - case 98: + case 99: case 8: case 9: return false; - case 176: + case 177: var elements = target.elements; if (elements.length === 0) { return false; } return true; - case 177: + case 178: return target.properties.length > 0; default: return true; @@ -14199,7 +14208,7 @@ var ts; thisArg = ts.createThis(); target = callee; } - else if (callee.kind === 96) { + else if (callee.kind === 97) { thisArg = ts.createThis(); target = languageVersion < 2 ? ts.setTextRange(ts.createIdentifier("_super"), callee) @@ -14211,7 +14220,7 @@ var ts; } else { switch (callee.kind) { - case 178: { + case 179: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name); @@ -14223,7 +14232,7 @@ var ts; } break; } - case 179: { + case 180: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = ts.createTempVariable(recordTempVariable); target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression); @@ -14274,14 +14283,14 @@ var ts; ts.createExpressionForPropertyName = createExpressionForPropertyName; function createExpressionForObjectLiteralElementLike(node, property, receiver) { switch (property.kind) { - case 152: case 153: + case 154: return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine); - case 260: - return createExpressionForPropertyAssignment(property, receiver); case 261: + return createExpressionForPropertyAssignment(property, receiver); + case 262: return createExpressionForShorthandPropertyAssignment(property, receiver); - case 150: + case 151: return createExpressionForMethodDeclaration(property, receiver); } } @@ -14459,7 +14468,7 @@ var ts; } ts.ensureUseStrict = ensureUseStrict; function parenthesizeConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -14470,7 +14479,7 @@ var ts; ts.parenthesizeConditionalHead = parenthesizeConditionalHead; function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { var skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 184) { + if (skipped.kind === 185) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) @@ -14479,15 +14488,15 @@ var ts; } ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand; function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator); - var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator); + var binaryOperatorPrecedence = ts.getOperatorPrecedence(194, binaryOperator); + var binaryOperatorAssociativity = ts.getOperatorAssociativity(194, binaryOperator); var emittedOperand = skipPartiallyEmittedExpressions(operand); var operandPrecedence = ts.getExpressionPrecedence(emittedOperand); switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1: if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 - && operand.kind === 196) { + && operand.kind === 197) { return false; } return true; @@ -14503,7 +14512,7 @@ var ts; if (operatorHasAssociativeProperty(binaryOperator)) { return false; } - if (binaryOperator === 36) { + if (binaryOperator === 37) { var leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0; if (ts.isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { return false; @@ -14516,17 +14525,17 @@ var ts; } } function operatorHasAssociativeProperty(binaryOperator) { - return binaryOperator === 38 + return binaryOperator === 39 + || binaryOperator === 49 || binaryOperator === 48 - || binaryOperator === 47 - || binaryOperator === 49; + || binaryOperator === 50; } function getLiteralKindOfBinaryPlusOperand(node) { node = skipPartiallyEmittedExpressions(node); if (ts.isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 193 && node.operatorToken.kind === 36) { + if (node.kind === 194 && node.operatorToken.kind === 37) { if (node.cachedLiteralKind !== undefined) { return node.cachedLiteralKind; } @@ -14541,7 +14550,7 @@ var ts; return 0; } function parenthesizeForConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194, 54); + var conditionalPrecedence = ts.getOperatorPrecedence(195, 55); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { @@ -14551,7 +14560,7 @@ var ts; } ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead; function parenthesizeSubexpressionOfConditionalExpression(e) { - return e.kind === 193 && e.operatorToken.kind === 25 + return e.kind === 194 && e.operatorToken.kind === 26 ? ts.createParen(e) : e; } @@ -14559,9 +14568,9 @@ var ts; function parenthesizeForNew(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); switch (emittedExpression.kind) { - case 180: - return ts.createParen(expression); case 181: + return ts.createParen(expression); + case 182: return emittedExpression.arguments ? expression : ts.createParen(expression); @@ -14572,7 +14581,7 @@ var ts; function parenthesizeForAccess(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); if (ts.isLeftHandSideExpression(emittedExpression) - && (emittedExpression.kind !== 181 || emittedExpression.arguments)) { + && (emittedExpression.kind !== 182 || emittedExpression.arguments)) { return expression; } return ts.setTextRange(ts.createParen(expression), expression); @@ -14610,7 +14619,7 @@ var ts; function parenthesizeExpressionForList(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression); - var commaPrecedence = ts.getOperatorPrecedence(193, 25); + var commaPrecedence = ts.getOperatorPrecedence(194, 26); return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(ts.createParen(expression), expression); @@ -14621,7 +14630,7 @@ var ts; if (ts.isCallExpression(emittedExpression)) { var callee = emittedExpression.expression; var kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 185 || kind === 186) { + if (kind === 186 || kind === 187) { var mutableCall = ts.getMutableClone(emittedExpression); mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee); return recreatePartiallyEmittedExpressions(expression, mutableCall); @@ -14629,7 +14638,7 @@ var ts; } else { var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind; - if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) { + if (leftmostExpressionKind === 178 || leftmostExpressionKind === 186) { return ts.setTextRange(ts.createParen(expression), expression); } } @@ -14647,21 +14656,21 @@ var ts; function getLeftmostExpression(node) { while (true) { switch (node.kind) { - case 192: + case 193: node = node.operand; continue; - case 193: + case 194: node = node.left; continue; - case 194: + case 195: node = node.condition; continue; + case 181: case 180: case 179: - case 178: node = node.expression; continue; - case 295: + case 296: node = node.expression; continue; } @@ -14669,7 +14678,7 @@ var ts; } } function parenthesizeConciseBody(body) { - if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) { + if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 178) { return ts.setTextRange(ts.createParen(body), body); } return body; @@ -14701,7 +14710,7 @@ var ts; } ts.skipOuterExpressions = skipOuterExpressions; function skipParentheses(node) { - while (node.kind === 184) { + while (node.kind === 185) { node = node.expression; } return node; @@ -14715,7 +14724,7 @@ var ts; } ts.skipAssertions = skipAssertions; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 295) { + while (node.kind === 296) { node = node.expression; } return node; @@ -14758,10 +14767,10 @@ var ts; var name = namespaceDeclaration.name; return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name)); } - if (node.kind === 237 && node.importClause) { + if (node.kind === 238 && node.importClause) { return ts.getGeneratedNameForNode(node); } - if (node.kind === 243 && node.moduleSpecifier) { + if (node.kind === 244 && node.moduleSpecifier) { return ts.getGeneratedNameForNode(node); } return undefined; @@ -14823,11 +14832,11 @@ var ts; } if (ts.isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 260: - return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 261: - return bindingElement.name; + return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); case 262: + return bindingElement.name; + case 263: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return undefined; @@ -14843,11 +14852,11 @@ var ts; ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement; function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 145: - case 175: + case 146: + case 176: return bindingElement.dotDotDotToken; - case 197: - case 262: + case 198: + case 263: return bindingElement; } return undefined; @@ -14855,7 +14864,7 @@ var ts; ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement; function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 175: + case 176: if (bindingElement.propertyName) { var propertyName = bindingElement.propertyName; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -14863,7 +14872,7 @@ var ts; : propertyName; } break; - case 260: + case 261: if (bindingElement.name) { var propertyName = bindingElement.name; return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression) @@ -14871,7 +14880,7 @@ var ts; : propertyName; } break; - case 262: + case 263: return bindingElement.name; } var target = getTargetOfBindingOrAssignmentElement(bindingElement); @@ -14885,11 +14894,11 @@ var ts; ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 173: case 174: - case 176: - return name.elements; + case 175: case 177: + return name.elements; + case 178: return name.properties; } } @@ -14928,11 +14937,11 @@ var ts; ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement; function convertToAssignmentPattern(node) { switch (node.kind) { - case 174: - case 176: - return convertToArrayAssignmentPattern(node); - case 173: + case 175: case 177: + return convertToArrayAssignmentPattern(node); + case 174: + case 178: return convertToObjectAssignmentPattern(node); } } @@ -14978,15 +14987,15 @@ var ts; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { - case 237: + case 238: externalImports.push(node); break; - case 236: - if (node.moduleReference.kind === 247) { + case 237: + if (node.moduleReference.kind === 248) { externalImports.push(node); } break; - case 243: + case 244: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -15013,12 +15022,12 @@ var ts; } } break; - case 242: + case 243: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 207: + case 208: if (ts.hasModifier(node, 1)) { for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) { var decl = _e[_d]; @@ -15026,7 +15035,7 @@ var ts; } } break; - case 227: + case 228: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -15044,7 +15053,7 @@ var ts; } } break; - case 228: + case 229: if (ts.hasModifier(node, 1)) { if (ts.hasModifier(node, 512)) { if (!hasExportDefault) { @@ -15102,13 +15111,13 @@ var ts; var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 264) { + if (kind === 265) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - else if (kind === 70) { + else if (kind === 71) { return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); } - else if (kind < 142) { + else if (kind < 143) { return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); } else { @@ -15144,29 +15153,29 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 142: + case 143: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 144: + case 145: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.default) || visitNode(cbNode, node.expression); - case 261: + case 262: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 262: + case 263: return visitNode(cbNode, node.expression); - case 145: + case 146: + case 149: case 148: - case 147: - case 260: - case 225: - case 175: + case 261: + case 226: + case 176: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -15175,24 +15184,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 159: case 160: - case 154: + case 161: case 155: case 156: + case 157: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: + case 228: + case 187: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -15203,326 +15212,326 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 158: + case 159: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 157: + case 158: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 161: - return visitNode(cbNode, node.exprName); case 162: - return visitNodes(cbNodes, node.members); + return visitNode(cbNode, node.exprName); case 163: - return visitNode(cbNode, node.elementType); + return visitNodes(cbNodes, node.members); case 164: - return visitNodes(cbNodes, node.elementTypes); + return visitNode(cbNode, node.elementType); case 165: + return visitNodes(cbNodes, node.elementTypes); case 166: - return visitNodes(cbNodes, node.types); case 167: - case 169: - return visitNode(cbNode, node.type); + return visitNodes(cbNodes, node.types); + case 168: case 170: + return visitNode(cbNode, node.type); + case 171: return visitNode(cbNode, node.objectType) || visitNode(cbNode, node.indexType); - case 171: + case 172: return visitNode(cbNode, node.readonlyToken) || visitNode(cbNode, node.typeParameter) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type); - case 172: - return visitNode(cbNode, node.literal); case 173: + return visitNode(cbNode, node.literal); case 174: - return visitNodes(cbNodes, node.elements); - case 176: + case 175: return visitNodes(cbNodes, node.elements); case 177: - return visitNodes(cbNodes, node.properties); + return visitNodes(cbNodes, node.elements); case 178: + return visitNodes(cbNodes, node.properties); + case 179: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.name); - case 179: + case 180: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 180: case 181: + case 182: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 182: + case 183: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 183: + case 184: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 184: - return visitNode(cbNode, node.expression); - case 187: + case 185: return visitNode(cbNode, node.expression); case 188: return visitNode(cbNode, node.expression); case 189: return visitNode(cbNode, node.expression); - case 191: - return visitNode(cbNode, node.operand); - case 196: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); case 190: return visitNode(cbNode, node.expression); case 192: return visitNode(cbNode, node.operand); + case 197: + return visitNode(cbNode, node.asteriskToken) || + visitNode(cbNode, node.expression); + case 191: + return visitNode(cbNode, node.expression); case 193: + return visitNode(cbNode, node.operand); + case 194: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 201: + case 202: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 202: - return visitNode(cbNode, node.expression); case 203: + return visitNode(cbNode, node.expression); + case 204: return visitNode(cbNode, node.name); - case 194: + case 195: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 197: + case 198: return visitNode(cbNode, node.expression); - case 206: - case 233: + case 207: + case 234: return visitNodes(cbNodes, node.statements); - case 264: + case 265: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 207: + case 208: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 226: + case 227: return visitNodes(cbNodes, node.declarations); - case 209: - return visitNode(cbNode, node.expression); case 210: + return visitNode(cbNode, node.expression); + case 211: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 211: + case 212: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 212: + case 213: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 213: + case 214: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 214: + case 215: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 215: + case 216: return visitNode(cbNode, node.awaitModifier) || visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 216: case 217: - return visitNode(cbNode, node.label); case 218: - return visitNode(cbNode, node.expression); + return visitNode(cbNode, node.label); case 219: + return visitNode(cbNode, node.expression); + case 220: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 220: + case 221: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 234: + case 235: return visitNodes(cbNodes, node.clauses); - case 256: + case 257: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 257: + case 258: return visitNodes(cbNodes, node.statements); - case 221: + case 222: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 222: - return visitNode(cbNode, node.expression); case 223: + return visitNode(cbNode, node.expression); + case 224: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 259: + case 260: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 146: + case 147: return visitNode(cbNode, node.expression); - case 228: - case 198: + case 229: + case 199: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 229: + case 230: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 230: + case 231: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 231: + case 232: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 263: + case 264: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 232: + case 233: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 236: + case 237: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 237: + case 238: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 238: + case 239: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 235: - return visitNode(cbNode, node.name); - case 239: + case 236: return visitNode(cbNode, node.name); case 240: - case 244: + return visitNode(cbNode, node.name); + case 241: + case 245: return visitNodes(cbNodes, node.elements); - case 243: + case 244: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 241: - case 245: + case 242: + case 246: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 242: + case 243: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 195: + case 196: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 204: + case 205: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 143: + case 144: return visitNode(cbNode, node.expression); - case 258: + case 259: return visitNodes(cbNodes, node.types); - case 200: + case 201: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 247: + case 248: return visitNode(cbNode, node.expression); - case 246: + case 247: return visitNodes(cbNodes, node.decorators); - case 248: + case 249: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 249: case 250: + case 251: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.attributes); - case 253: + case 254: return visitNodes(cbNodes, node.properties); - case 252: + case 253: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 254: - return visitNode(cbNode, node.expression); case 255: + return visitNode(cbNode, node.expression); + case 256: return visitNode(cbNode, node.dotDotDotToken) || visitNode(cbNode, node.expression); - case 251: + case 252: return visitNode(cbNode, node.tagName); - case 266: + case 267: return visitNode(cbNode, node.type); - case 270: - return visitNodes(cbNodes, node.types); case 271: return visitNodes(cbNodes, node.types); - case 269: + case 272: + return visitNodes(cbNodes, node.types); + case 270: return visitNode(cbNode, node.elementType); - case 273: + case 274: return visitNode(cbNode, node.type); - case 272: + case 273: return visitNode(cbNode, node.type); - case 274: + case 275: return visitNode(cbNode, node.literal); - case 276: + case 277: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 277: - return visitNode(cbNode, node.type); case 278: + return visitNode(cbNode, node.type); + case 279: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 279: - return visitNode(cbNode, node.type); case 280: return visitNode(cbNode, node.type); case 281: return visitNode(cbNode, node.type); - case 275: + case 282: + return visitNode(cbNode, node.type); + case 276: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 282: + case 283: return visitNodes(cbNodes, node.tags); - case 285: + case 286: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 286: - return visitNode(cbNode, node.typeExpression); case 287: return visitNode(cbNode, node.typeExpression); - case 284: - return visitNode(cbNode, node.typeExpression); case 288: - return visitNodes(cbNodes, node.typeParameters); + return visitNode(cbNode, node.typeExpression); + case 285: + return visitNode(cbNode, node.typeExpression); case 289: + return visitNodes(cbNodes, node.typeParameters); + case 290: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.name) || visitNode(cbNode, node.jsDocTypeLiteral); - case 291: + case 292: return visitNodes(cbNodes, node.jsDocPropertyTags); - case 290: + case 291: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name); - case 295: + case 296: return visitNode(cbNode, node.expression); - case 292: + case 293: return visitNode(cbNode, node.literal); } } @@ -15686,7 +15695,7 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion, scriptKind) { - var sourceFile = new SourceFileConstructor(264, 0, sourceText.length); + var sourceFile = new SourceFileConstructor(265, 0, sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -15842,16 +15851,16 @@ var ts; return speculationHelper(callback, false); } function isIdentifier() { - if (token() === 70) { + if (token() === 71) { return true; } - if (token() === 115 && inYieldContext()) { + if (token() === 116 && inYieldContext()) { return false; } - if (token() === 120 && inAwaitContext()) { + if (token() === 121 && inAwaitContext()) { return false; } - return token() > 106; + return token() > 107; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } @@ -15892,20 +15901,20 @@ var ts; return finishNode(node); } function canParseSemicolon() { - if (token() === 24) { + if (token() === 25) { return true; } - return token() === 17 || token() === 1 || scanner.hasPrecedingLineBreak(); + return token() === 18 || token() === 1 || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token() === 24) { + if (token() === 25) { nextToken(); } return true; } else { - return parseExpected(24); + return parseExpected(25); } } function createNode(kind, pos) { @@ -15913,8 +15922,8 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return kind >= 142 ? new NodeConstructor(kind, pos, pos) : - kind === 70 ? new IdentifierConstructor(kind, pos, pos) : + return kind >= 143 ? new NodeConstructor(kind, pos, pos) : + kind === 71 ? new IdentifierConstructor(kind, pos, pos) : new TokenConstructor(kind, pos, pos); } function createNodeArray(elements, pos) { @@ -15959,15 +15968,15 @@ var ts; function createIdentifier(isIdentifier, diagnosticMessage) { identifierCount++; if (isIdentifier) { - var node = createNode(70); - if (token() !== 70) { + var node = createNode(71); + if (token() !== 71) { node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } - return createMissingNode(70, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); + return createMissingNode(71, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); } function parseIdentifier(diagnosticMessage) { return createIdentifier(isIdentifier(), diagnosticMessage); @@ -15984,7 +15993,7 @@ var ts; if (token() === 9 || token() === 8) { return parseLiteralNode(true); } - if (allowComputedPropertyNames && token() === 20) { + if (allowComputedPropertyNames && token() === 21) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -15999,10 +16008,10 @@ var ts; return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token()); } function parseComputedPropertyName() { - var node = createNode(143); - parseExpected(20); - node.expression = allowInAnd(parseExpression); + var node = createNode(144); parseExpected(21); + node.expression = allowInAnd(parseExpression); + parseExpected(22); return finishNode(node); } function parseContextualModifier(t) { @@ -16016,20 +16025,20 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token() === 75) { - return nextToken() === 82; + if (token() === 76) { + return nextToken() === 83; } - if (token() === 83) { + if (token() === 84) { nextToken(); - if (token() === 78) { + if (token() === 79) { return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token() !== 38 && token() !== 117 && token() !== 16 && canFollowModifier(); + return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier(); } - if (token() === 78) { + if (token() === 79) { return nextTokenIsClassOrFunctionOrAsync(); } - if (token() === 114) { + if (token() === 115) { nextToken(); return canFollowModifier(); } @@ -16039,17 +16048,17 @@ var ts; return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 20 - || token() === 16 - || token() === 38 - || token() === 23 + return token() === 21 + || token() === 17 + || token() === 39 + || token() === 24 || isLiteralPropertyName(); } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token() === 74 || token() === 88 || - (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || - (token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); + return token() === 75 || token() === 89 || + (token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) || + (token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); @@ -16060,23 +16069,23 @@ var ts; case 0: case 1: case 3: - return !(token() === 24 && inErrorRecovery) && isStartOfStatement(); + return !(token() === 25 && inErrorRecovery) && isStartOfStatement(); case 2: - return token() === 72 || token() === 78; + return token() === 73 || token() === 79; case 4: return lookAhead(isTypeMemberStart); case 5: - return lookAhead(isClassMemberStart) || (token() === 24 && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 25 && !inErrorRecovery); case 6: - return token() === 20 || isLiteralPropertyName(); + return token() === 21 || isLiteralPropertyName(); case 12: - return token() === 20 || token() === 38 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 39 || token() === 24 || isLiteralPropertyName(); case 17: return isLiteralPropertyName(); case 9: - return token() === 20 || token() === 23 || isLiteralPropertyName(); + return token() === 21 || token() === 24 || isLiteralPropertyName(); case 7: - if (token() === 16) { + if (token() === 17) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -16088,23 +16097,23 @@ var ts; case 8: return isIdentifierOrPattern(); case 10: - return token() === 25 || token() === 23 || isIdentifierOrPattern(); + return token() === 26 || token() === 24 || isIdentifierOrPattern(); case 18: return isIdentifier(); case 11: case 15: - return token() === 25 || token() === 23 || isStartOfExpression(); + return token() === 26 || token() === 24 || isStartOfExpression(); case 16: return isStartOfParameter(); case 19: case 20: - return token() === 25 || isStartOfType(); + return token() === 26 || isStartOfType(); case 21: return isHeritageClause(); case 22: return ts.tokenIsIdentifierOrKeyword(token()); case 13: - return ts.tokenIsIdentifierOrKeyword(token()) || token() === 16; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 17; case 14: return true; case 23: @@ -16117,10 +16126,10 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token() === 16); - if (nextToken() === 17) { + ts.Debug.assert(token() === 17); + if (nextToken() === 18) { var next = nextToken(); - return next === 25 || next === 16 || next === 84 || next === 107; + return next === 26 || next === 17 || next === 85 || next === 108; } return true; } @@ -16133,8 +16142,8 @@ var ts; return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 107 || - token() === 84) { + if (token() === 108 || + token() === 85) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -16156,40 +16165,40 @@ var ts; case 12: case 9: case 22: - return token() === 17; + return token() === 18; case 3: - return token() === 17 || token() === 72 || token() === 78; + return token() === 18 || token() === 73 || token() === 79; case 7: - return token() === 16 || token() === 84 || token() === 107; + return token() === 17 || token() === 85 || token() === 108; case 8: return isVariableDeclaratorListTerminator(); case 18: - return token() === 28 || token() === 18 || token() === 16 || token() === 84 || token() === 107; + return token() === 29 || token() === 19 || token() === 17 || token() === 85 || token() === 108; case 11: - return token() === 19 || token() === 24; + return token() === 20 || token() === 25; case 15: case 20: case 10: - return token() === 21; + return token() === 22; case 16: case 17: - return token() === 19 || token() === 21; + return token() === 20 || token() === 22; case 19: - return token() !== 25; + return token() !== 26; case 21: - return token() === 16 || token() === 17; + return token() === 17 || token() === 18; case 13: - return token() === 28 || token() === 40; + return token() === 29 || token() === 41; case 14: - return token() === 26 && lookAhead(nextTokenIsSlash); + return token() === 27 && lookAhead(nextTokenIsSlash); case 23: - return token() === 19 || token() === 55 || token() === 17; + return token() === 20 || token() === 56 || token() === 18; case 24: - return token() === 28 || token() === 17; + return token() === 29 || token() === 18; case 26: - return token() === 21 || token() === 17; + return token() === 22 || token() === 18; case 25: - return token() === 17; + return token() === 18; } } function isVariableDeclaratorListTerminator() { @@ -16199,7 +16208,7 @@ var ts; if (isInOrOfKeyword(token())) { return true; } - if (token() === 35) { + if (token() === 36) { return true; } return false; @@ -16305,17 +16314,17 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 151: - case 156: case 152: + case 157: case 153: - case 148: - case 205: + case 154: + case 149: + case 206: return true; - case 150: + case 151: var methodDeclaration = node; - var nameIsConstructor = methodDeclaration.name.kind === 70 && - methodDeclaration.name.originalKeywordKind === 122; + var nameIsConstructor = methodDeclaration.name.kind === 71 && + methodDeclaration.name.originalKeywordKind === 123; return !nameIsConstructor; } } @@ -16324,8 +16333,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 256: case 257: + case 258: return true; } } @@ -16334,65 +16343,65 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 227: + case 228: + case 208: case 207: - case 206: + case 211: case 210: - case 209: - case 222: + case 223: + case 219: + case 221: case 218: - case 220: case 217: + case 215: case 216: case 214: - case 215: case 213: - case 212: - case 219: - case 208: - case 223: - case 221: - case 211: + case 220: + case 209: case 224: + case 222: + case 212: + case 225: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 232: - case 228: + case 233: case 229: - case 231: case 230: + case 232: + case 231: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 263; + return node.kind === 264; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 155: - case 149: case 156: - case 147: - case 154: + case 150: + case 157: + case 148: + case 155: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 225) { + if (node.kind !== 226) { return false; } var variableDeclarator = node; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 145) { + if (node.kind !== 146) { return false; } var parameter = node; @@ -16446,15 +16455,15 @@ var ts; if (isListElement(kind, false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); - if (parseOptional(25)) { + if (parseOptional(26)) { continue; } commaStart = -1; if (isListTerminator(kind)) { break; } - parseExpected(25); - if (considerSemicolonAsDelimiter && token() === 24 && !scanner.hasPrecedingLineBreak()) { + parseExpected(26); + if (considerSemicolonAsDelimiter && token() === 25 && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -16486,8 +16495,8 @@ var ts; } function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(22)) { - var node = createNode(142, entity.pos); + while (parseOptional(23)) { + var node = createNode(143, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -16498,33 +16507,33 @@ var ts; if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token())) { var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { - return createMissingNode(70, true, ts.Diagnostics.Identifier_expected); + return createMissingNode(71, true, ts.Diagnostics.Identifier_expected); } } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(195); + var template = createNode(196); template.head = parseTemplateHead(); - ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(template.head.kind === 14, "Template head has wrong token kind"); var templateSpans = createNodeArray(); do { templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 14); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 15); templateSpans.end = getNodeEnd(); template.templateSpans = templateSpans; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(204); + var span = createNode(205); span.expression = allowInAnd(parseExpression); var literal; - if (token() === 17) { + if (token() === 18) { reScanTemplateToken(); literal = parseTemplateMiddleOrTemplateTail(); } else { - literal = parseExpectedToken(15, false, ts.Diagnostics._0_expected, ts.tokenToString(17)); + literal = parseExpectedToken(16, false, ts.Diagnostics._0_expected, ts.tokenToString(18)); } span.literal = literal; return finishNode(span); @@ -16534,12 +16543,12 @@ var ts; } function parseTemplateHead() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 13, "Template head has wrong token kind"); + ts.Debug.assert(fragment.kind === 14, "Template head has wrong token kind"); return fragment; } function parseTemplateMiddleOrTemplateTail() { var fragment = parseLiteralLikeNode(token(), false); - ts.Debug.assert(fragment.kind === 14 || fragment.kind === 15, "Template fragment has wrong token kind"); + ts.Debug.assert(fragment.kind === 15 || fragment.kind === 16, "Template fragment has wrong token kind"); return fragment; } function parseLiteralLikeNode(kind, internName) { @@ -16560,35 +16569,35 @@ var ts; return node; } function parseTypeReference() { - var node = createNode(158); + var node = createNode(159); node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (!scanner.hasPrecedingLineBreak() && token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (!scanner.hasPrecedingLineBreak() && token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(157, lhs.pos); + var node = createNode(158, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(168); + var node = createNode(169); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(161); - parseExpected(102); + var node = createNode(162); + parseExpected(103); node.exprName = parseEntityName(true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - if (parseOptional(84)) { + if (parseOptional(85)) { if (isStartOfType() || !isStartOfExpression()) { node.constraint = parseType(); } @@ -16596,40 +16605,40 @@ var ts; node.expression = parseUnaryExpressionOrHigher(); } } - if (parseOptional(57)) { + if (parseOptional(58)) { node.default = parseType(); } return finishNode(node); } function parseTypeParameters() { - if (token() === 26) { - return parseBracketedList(18, parseTypeParameter, 26, 28); + if (token() === 27) { + return parseBracketedList(18, parseTypeParameter, 27, 29); } } function parseParameterType() { - if (parseOptional(55)) { + if (parseOptional(56)) { return parseType(); } return undefined; } function isStartOfParameter() { - return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98; + return token() === 24 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 57 || token() === 99; } function parseParameter() { - var node = createNode(145); - if (token() === 98) { + var node = createNode(146); + if (token() === 99) { node.name = createIdentifier(true); node.type = parseParameterType(); return finishNode(node); } node.decorators = parseDecorators(); node.modifiers = parseModifiers(); - node.dotDotDotToken = parseOptionalToken(23); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); if (ts.getFullWidth(node.name) === 0 && !ts.hasModifiers(node) && ts.isModifierKind(token())) { nextToken(); } - node.questionToken = parseOptionalToken(54); + node.questionToken = parseOptionalToken(55); node.type = parseParameterType(); node.initializer = parseBindingElementInitializer(true); return addJSDocComment(finishNode(node)); @@ -16641,7 +16650,7 @@ var ts; return parseInitializer(true); } function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 35; + var returnTokenRequired = returnToken === 36; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { @@ -16653,7 +16662,7 @@ var ts; } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { - if (parseExpected(18)) { + if (parseExpected(19)) { var savedYieldContext = inYieldContext(); var savedAwaitContext = inAwaitContext(); setYieldContext(yieldContext); @@ -16661,7 +16670,7 @@ var ts; var result = parseDelimitedList(16, parseParameter); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); - if (!parseExpected(19) && requireCompleteParameterList) { + if (!parseExpected(20) && requireCompleteParameterList) { return undefined; } return result; @@ -16669,29 +16678,29 @@ var ts; return requireCompleteParameterList ? undefined : createMissingList(); } function parseTypeMemberSemicolon() { - if (parseOptional(25)) { + if (parseOptional(26)) { return; } parseSemicolon(); } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 155) { - parseExpected(93); + if (kind === 156) { + parseExpected(94); } - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(node)); } function isIndexSignature() { - if (token() !== 20) { + if (token() !== 21) { return false; } return lookAhead(isUnambiguouslyIndexSignature); } function isUnambiguouslyIndexSignature() { nextToken(); - if (token() === 23 || token() === 21) { + if (token() === 24 || token() === 22) { return true; } if (ts.isModifierKind(token())) { @@ -16706,43 +16715,43 @@ var ts; else { nextToken(); } - if (token() === 55 || token() === 25) { + if (token() === 56 || token() === 26) { return true; } - if (token() !== 54) { + if (token() !== 55) { return false; } nextToken(); - return token() === 55 || token() === 25 || token() === 21; + return token() === 56 || token() === 26 || token() === 22; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(156, fullStart); + var node = createNode(157, fullStart); node.decorators = decorators; node.modifiers = modifiers; - node.parameters = parseBracketedList(16, parseParameter, 20, 21); + node.parameters = parseBracketedList(16, parseParameter, 21, 22); node.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); return finishNode(node); } function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (token() === 18 || token() === 26) { - var method = createNode(149, fullStart); + var questionToken = parseOptionalToken(55); + if (token() === 19 || token() === 27) { + var method = createNode(150, fullStart); method.modifiers = modifiers; method.name = name; method.questionToken = questionToken; - fillSignature(55, false, false, false, method); + fillSignature(56, false, false, false, method); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(method)); } else { - var property = createNode(147, fullStart); + var property = createNode(148, fullStart); property.modifiers = modifiers; property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token() === 57) { + if (token() === 58) { property.initializer = parseNonParameterInitializer(); } parseTypeMemberSemicolon(); @@ -16750,7 +16759,7 @@ var ts; } } function isTypeMemberStart() { - if (token() === 18 || token() === 26) { + if (token() === 19 || token() === 27) { return true; } var idToken; @@ -16758,7 +16767,7 @@ var ts; idToken = true; nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (isLiteralPropertyName()) { @@ -16766,22 +16775,22 @@ var ts; nextToken(); } if (idToken) { - return token() === 18 || - token() === 26 || - token() === 54 || + return token() === 19 || + token() === 27 || token() === 55 || - token() === 25 || + token() === 56 || + token() === 26 || canParseSemicolon(); } return false; } function parseTypeMember() { - if (token() === 18 || token() === 26) { - return parseSignatureMember(154); - } - if (token() === 93 && lookAhead(isStartOfConstructSignature)) { + if (token() === 19 || token() === 27) { return parseSignatureMember(155); } + if (token() === 94 && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(156); + } var fullStart = getNodePos(); var modifiers = parseModifiers(); if (isIndexSignature()) { @@ -16791,18 +16800,18 @@ var ts; } function isStartOfConstructSignature() { nextToken(); - return token() === 18 || token() === 26; + return token() === 19 || token() === 27; } function parseTypeLiteral() { - var node = createNode(162); + var node = createNode(163); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers() { var members; - if (parseExpected(16)) { + if (parseExpected(17)) { members = parseList(4, parseTypeMember); - parseExpected(17); + parseExpected(18); } else { members = createMissingList(); @@ -16811,57 +16820,57 @@ var ts; } function isStartOfMappedType() { nextToken(); - if (token() === 130) { + if (token() === 131) { nextToken(); } - return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91; + return token() === 21 && nextTokenIsIdentifier() && nextToken() === 92; } function parseMappedTypeParameter() { - var node = createNode(144); + var node = createNode(145); node.name = parseIdentifier(); - parseExpected(91); + parseExpected(92); node.constraint = parseType(); return finishNode(node); } function parseMappedType() { - var node = createNode(171); - parseExpected(16); - node.readonlyToken = parseOptionalToken(130); - parseExpected(20); - node.typeParameter = parseMappedTypeParameter(); + var node = createNode(172); + parseExpected(17); + node.readonlyToken = parseOptionalToken(131); parseExpected(21); - node.questionToken = parseOptionalToken(54); + node.typeParameter = parseMappedTypeParameter(); + parseExpected(22); + node.questionToken = parseOptionalToken(55); node.type = parseTypeAnnotation(); parseSemicolon(); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseTupleType() { - var node = createNode(164); - node.elementTypes = parseBracketedList(20, parseType, 20, 21); + var node = createNode(165); + node.elementTypes = parseBracketedList(20, parseType, 21, 22); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(167); - parseExpected(18); - node.type = parseType(); + var node = createNode(168); parseExpected(19); + node.type = parseType(); + parseExpected(20); return finishNode(node); } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 160) { - parseExpected(93); + if (kind === 161) { + parseExpected(94); } - fillSignature(35, false, false, false, node); + fillSignature(36, false, false, false, node); return finishNode(node); } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token() === 22 ? undefined : node; + return token() === 23 ? undefined : node; } function parseLiteralTypeNode() { - var node = createNode(172); + var node = createNode(173); node.literal = parseSimpleUnaryExpression(); finishNode(node); return node; @@ -16871,42 +16880,42 @@ var ts; } function parseNonArrayType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 138: - case 129: case 133: + case 122: + case 137: + case 139: + case 130: + case 134: var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseLiteralTypeNode(); - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); - case 104: - case 94: + case 105: + case 95: return parseTokenNode(); - case 98: { + case 99: { var thisKeyword = parseThisTypeNode(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 102: + case 103: return parseTypeQuery(); - case 16: + case 17: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 20: + case 21: return parseTupleType(); - case 18: + case 19: return parseParenthesizedType(); default: return parseTypeReference(); @@ -16914,32 +16923,32 @@ var ts; } function isStartOfType() { switch (token()) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 138: - case 94: - case 98: - case 102: - case 129: - case 16: - case 20: - case 26: + case 133: + case 122: + case 137: + case 105: + case 139: + case 95: + case 99: + case 103: + case 130: + case 17: + case 21: + case 27: + case 49: case 48: - case 47: - case 93: + case 94: case 9: case 8: - case 100: - case 85: - case 133: + case 101: + case 86: + case 134: return true; - case 37: + case 38: return lookAhead(nextTokenIsNumericLiteral); - case 18: + case 19: return lookAhead(isStartOfParenthesizedOrFunctionType); default: return isIdentifier(); @@ -16947,29 +16956,29 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token() === 19 || isStartOfParameter() || isStartOfType(); + return token() === 20 || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) { + while (!scanner.hasPrecedingLineBreak() && parseOptional(21)) { if (isStartOfType()) { - var node = createNode(170, type.pos); + var node = createNode(171, type.pos); node.objectType = type; node.indexType = parseType(); - parseExpected(21); + parseExpected(22); type = finishNode(node); } else { - var node = createNode(163, type.pos); + var node = createNode(164, type.pos); node.elementType = type; - parseExpected(21); + parseExpected(22); type = finishNode(node); } } return type; } function parseTypeOperator(operator) { - var node = createNode(169); + var node = createNode(170); parseExpected(operator); node.operator = operator; node.type = parseTypeOperatorOrHigher(); @@ -16977,8 +16986,8 @@ var ts; } function parseTypeOperatorOrHigher() { switch (token()) { - case 126: - return parseTypeOperator(126); + case 127: + return parseTypeOperator(127); } return parseArrayTypeOrHigher(); } @@ -16998,26 +17007,26 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47); + return parseUnionOrIntersectionType(167, parseTypeOperatorOrHigher, 48); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48); + return parseUnionOrIntersectionType(166, parseIntersectionTypeOrHigher, 49); } function isStartOfFunctionType() { - if (token() === 26) { + if (token() === 27) { return true; } - return token() === 18 && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 19 && lookAhead(isUnambiguouslyStartOfFunctionType); } function skipParameterStart() { if (ts.isModifierKind(token())) { parseModifiers(); } - if (isIdentifier() || token() === 98) { + if (isIdentifier() || token() === 99) { nextToken(); return true; } - if (token() === 20 || token() === 16) { + if (token() === 21 || token() === 17) { var previousErrorCount = parseDiagnostics.length; parseIdentifierOrPattern(); return previousErrorCount === parseDiagnostics.length; @@ -17026,17 +17035,17 @@ var ts; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token() === 19 || token() === 23) { + if (token() === 20 || token() === 24) { return true; } if (skipParameterStart()) { - if (token() === 55 || token() === 25 || - token() === 54 || token() === 57) { + if (token() === 56 || token() === 26 || + token() === 55 || token() === 58) { return true; } - if (token() === 19) { + if (token() === 20) { nextToken(); - if (token() === 35) { + if (token() === 36) { return true; } } @@ -17047,7 +17056,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(157, typePredicateVariable.pos); + var node = createNode(158, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -17058,7 +17067,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token() === 125 && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -17068,36 +17077,36 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(159); - } - if (token() === 93) { return parseFunctionOrConstructorType(160); } + if (token() === 94) { + return parseFunctionOrConstructorType(161); + } return parseUnionTypeOrHigher(); } function parseTypeAnnotation() { - return parseOptional(55) ? parseType() : undefined; + return parseOptional(56) ? parseType() : undefined; } function isStartOfLeftHandSideExpression() { switch (token()) { - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: case 8: case 9: - case 12: case 13: - case 18: - case 20: - case 16: - case 88: - case 74: - case 93: - case 40: - case 62: - case 70: + case 14: + case 19: + case 21: + case 17: + case 89: + case 75: + case 94: + case 41: + case 63: + case 71: return true; default: return isIdentifier(); @@ -17108,18 +17117,18 @@ var ts; return true; } switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 42: + case 80: + case 103: + case 105: case 43: - case 26: - case 120: - case 115: + case 44: + case 27: + case 121: + case 116: return true; default: if (isBinaryOperator()) { @@ -17129,10 +17138,10 @@ var ts; } } function isStartOfExpressionStatement() { - return token() !== 16 && - token() !== 88 && - token() !== 74 && - token() !== 56 && + return token() !== 17 && + token() !== 89 && + token() !== 75 && + token() !== 57 && isStartOfExpression(); } function parseExpression() { @@ -17142,7 +17151,7 @@ var ts; } var expr = parseAssignmentExpressionOrHigher(); var operatorToken; - while ((operatorToken = parseOptionalToken(25))) { + while ((operatorToken = parseOptionalToken(26))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } if (saveDecoratorContext) { @@ -17151,12 +17160,12 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token() !== 57) { - if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 16) || !isStartOfExpression()) { + if (token() !== 58) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 17) || !isStartOfExpression()) { return undefined; } } - parseExpected(57); + parseExpected(58); return parseAssignmentExpressionOrHigher(); } function parseAssignmentExpressionOrHigher() { @@ -17168,7 +17177,7 @@ var ts; return arrowExpression; } var expr = parseBinaryExpressionOrHigher(0); - if (expr.kind === 70 && token() === 35) { + if (expr.kind === 71 && token() === 36) { return parseSimpleArrowFunctionExpression(expr); } if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { @@ -17177,7 +17186,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token() === 115) { + if (token() === 116) { if (inYieldContext()) { return true; } @@ -17190,11 +17199,11 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(196); + var node = createNode(197); nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token() === 38 || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(38); + (token() === 39 || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(39); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17203,21 +17212,21 @@ var ts; } } function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { - ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + ts.Debug.assert(token() === 36, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); var node; if (asyncModifier) { - node = createNode(186, asyncModifier.pos); + node = createNode(187, asyncModifier.pos); node.modifiers = asyncModifier; } else { - node = createNode(186, identifier.pos); + node = createNode(187, identifier.pos); } - var parameter = createNode(145, identifier.pos); + var parameter = createNode(146, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = createNodeArray([parameter], parameter.pos); node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(!!asyncModifier); return addJSDocComment(finishNode(node)); } @@ -17234,78 +17243,78 @@ var ts; } var isAsync = !!(ts.getModifierFlags(arrowFunction) & 256); var lastToken = token(); - arrowFunction.equalsGreaterThanToken = parseExpectedToken(35, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 35 || lastToken === 16) + arrowFunction.equalsGreaterThanToken = parseExpectedToken(36, false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 36 || lastToken === 17) ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return addJSDocComment(finishNode(arrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 18 || token() === 26 || token() === 119) { + if (token() === 19 || token() === 27 || token() === 120) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token() === 35) { + if (token() === 36) { return 1; } return 0; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0; } - if (token() !== 18 && token() !== 26) { + if (token() !== 19 && token() !== 27) { return 0; } } var first = token(); var second = nextToken(); - if (first === 18) { - if (second === 19) { + if (first === 19) { + if (second === 20) { var third = nextToken(); switch (third) { - case 35: - case 55: - case 16: + case 36: + case 56: + case 17: return 1; default: return 0; } } - if (second === 20 || second === 16) { + if (second === 21 || second === 17) { return 2; } - if (second === 23) { + if (second === 24) { return 1; } if (!isIdentifier()) { return 0; } - if (nextToken() === 55) { + if (nextToken() === 56) { return 1; } return 2; } else { - ts.Debug.assert(first === 26); + ts.Debug.assert(first === 27); if (!isIdentifier()) { return 0; } if (sourceFile.languageVariant === 1) { var isArrowFunctionInJsx = lookAhead(function () { var third = nextToken(); - if (third === 84) { + if (third === 85) { var fourth = nextToken(); switch (fourth) { - case 57: - case 28: + case 58: + case 29: return false; default: return true; } } - else if (third === 25) { + else if (third === 26) { return true; } return false; @@ -17322,7 +17331,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(false); } function tryParseAsyncSimpleArrowFunctionExpression() { - if (token() === 119) { + if (token() === 120) { var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); if (isUnParenthesizedAsyncArrowFunction === 1) { var asyncModifier = parseModifiersForArrowFunction(); @@ -17333,38 +17342,38 @@ var ts; return undefined; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 119) { + if (token() === 120) { nextToken(); - if (scanner.hasPrecedingLineBreak() || token() === 35) { + if (scanner.hasPrecedingLineBreak() || token() === 36) { return 0; } var expr = parseBinaryExpressionOrHigher(0); - if (!scanner.hasPrecedingLineBreak() && expr.kind === 70 && token() === 35) { + if (!scanner.hasPrecedingLineBreak() && expr.kind === 71 && token() === 36) { return 1; } } return 0; } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(186); + var node = createNode(187); node.modifiers = parseModifiersForArrowFunction(); var isAsync = !!(ts.getModifierFlags(node) & 256); - fillSignature(55, false, isAsync, !allowAmbiguity, node); + fillSignature(56, false, isAsync, !allowAmbiguity, node); if (!node.parameters) { return undefined; } - if (!allowAmbiguity && token() !== 35 && token() !== 16) { + if (!allowAmbiguity && token() !== 36 && token() !== 17) { return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token() === 16) { + if (token() === 17) { return parseFunctionBlock(false, isAsync, false); } - if (token() !== 24 && - token() !== 88 && - token() !== 74 && + if (token() !== 25 && + token() !== 89 && + token() !== 75 && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(false, isAsync, true); @@ -17374,15 +17383,15 @@ var ts; : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); } function parseConditionalExpressionRest(leftOperand) { - var questionToken = parseOptionalToken(54); + var questionToken = parseOptionalToken(55); if (!questionToken) { return leftOperand; } - var node = createNode(194, leftOperand.pos); + var node = createNode(195, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(55, false, ts.Diagnostics._0_expected, ts.tokenToString(55)); + node.colonToken = parseExpectedToken(56, false, ts.Diagnostics._0_expected, ts.tokenToString(56)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17391,22 +17400,22 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 91 || t === 141; + return t === 92 || t === 142; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { reScanGreaterToken(); var newPrecedence = getBinaryOperatorPrecedence(); - var consumeCurrentOperator = token() === 39 ? + var consumeCurrentOperator = token() === 40 ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token() === 91 && inDisallowInContext()) { + if (token() === 92 && inDisallowInContext()) { break; } - if (token() === 117) { + if (token() === 118) { if (scanner.hasPrecedingLineBreak()) { break; } @@ -17422,92 +17431,92 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token() === 91) { + if (inDisallowInContext() && token() === 92) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { switch (token()) { - case 53: + case 54: return 1; - case 52: + case 53: return 2; - case 48: - return 3; case 49: + return 3; + case 50: return 4; - case 47: + case 48: return 5; - case 31: case 32: case 33: case 34: + case 35: return 6; - case 26: - case 28: + case 27: case 29: case 30: + case 31: + case 93: case 92: - case 91: - case 117: + case 118: return 7; - case 44: case 45: case 46: + case 47: return 8; - case 36: case 37: - return 9; case 38: - case 40: + return 9; + case 39: case 41: + case 42: return 10; - case 39: + case 40: return 11; } return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(193, left.pos); + var node = createNode(194, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(201, left.pos); + var node = createNode(202, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(191); + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(187); + var node = createNode(188); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(188); + var node = createNode(189); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(189); + var node = createNode(190); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token() === 120) { + if (token() === 121) { if (inAwaitContext()) { return true; } @@ -17516,7 +17525,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(190); + var node = createNode(191); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -17524,15 +17533,15 @@ var ts; function parseUnaryExpressionOrHigher() { if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token() === 39 ? + return token() === 40 ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 39) { + if (token() === 40) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 183) { + if (simpleUnaryExpression.kind === 184) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -17543,20 +17552,20 @@ var ts; } function parseSimpleUnaryExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: return parsePrefixUnaryExpression(); - case 79: + case 80: return parseDeleteExpression(); - case 102: + case 103: return parseTypeOfExpression(); - case 104: + case 105: return parseVoidExpression(); - case 26: + case 27: return parseTypeAssertion(); - case 120: + case 121: if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -17566,16 +17575,16 @@ var ts; } function isUpdateExpression() { switch (token()) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 79: - case 102: - case 104: - case 120: + case 80: + case 103: + case 105: + case 121: return false; - case 26: + case 27: if (sourceFile.languageVariant !== 1) { return false; } @@ -17584,20 +17593,20 @@ var ts; } } function parseIncrementExpression() { - if (token() === 42 || token() === 43) { - var node = createNode(191); + if (token() === 43 || token() === 44) { + var node = createNode(192); node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 && token() === 26 && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 && token() === 27 && lookAhead(nextTokenIsIdentifierOrKeyword)) { return parseJsxElementOrSelfClosingElement(true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(192, expression.pos); + if ((token() === 43 || token() === 44) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(193, expression.pos); node.operand = expression; node.operator = token(); nextToken(); @@ -17606,7 +17615,7 @@ var ts; return expression; } function parseLeftHandSideExpressionOrHigher() { - var expression = token() === 96 + var expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher(); return parseCallExpressionRest(expression); @@ -17617,12 +17626,12 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token() === 18 || token() === 22 || token() === 20) { + if (token() === 19 || token() === 23 || token() === 21) { return expression; } - var node = createNode(178, expression.pos); + var node = createNode(179, expression.pos); node.expression = expression; - parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(23, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); return finishNode(node); } @@ -17630,10 +17639,10 @@ var ts; if (lhs.kind !== rhs.kind) { return false; } - if (lhs.kind === 70) { + if (lhs.kind === 71) { return lhs.text === rhs.text; } - if (lhs.kind === 98) { + if (lhs.kind === 99) { return true; } return lhs.name.text === rhs.name.text && @@ -17642,8 +17651,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 250) { - var node = createNode(248, opening.pos); + if (opening.kind === 251) { + var node = createNode(249, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -17653,18 +17662,18 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 249); + ts.Debug.assert(opening.kind === 250); result = opening; } - if (inExpressionContext && token() === 26) { + if (inExpressionContext && token() === 27) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(193, result.pos); + var badNode = createNode(194, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(25, false, undefined); + badNode.operatorToken = createMissingNode(26, false, undefined); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } @@ -17673,16 +17682,18 @@ var ts; } function parseJsxText() { var node = createNode(10, scanner.getStartPos()); + node.containsOnlyWhiteSpaces = currentToken === 11; currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token()) { case 10: + case 11: return parseJsxText(); - case 16: + case 17: return parseJsxExpression(false); - case 26: + case 27: return parseJsxElementOrSelfClosingElement(false); } ts.Debug.fail("Unknown JSX child kind " + token()); @@ -17693,7 +17704,7 @@ var ts; parsingContext |= 1 << 14; while (true) { currentToken = scanner.reScanJsxToken(); - if (token() === 27) { + if (token() === 28) { break; } else if (token() === 1) { @@ -17703,37 +17714,40 @@ var ts; else if (token() === 7) { break; } - result.push(parseJsxChild()); + var child = parseJsxChild(); + if (child) { + result.push(child); + } } result.end = scanner.getTokenPos(); parsingContext = saveParsingContext; return result; } function parseJsxAttributes() { - var jsxAttributes = createNode(253); + var jsxAttributes = createNode(254); jsxAttributes.properties = parseList(13, parseJsxAttribute); return finishNode(jsxAttributes); } function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { var fullStart = scanner.getStartPos(); - parseExpected(26); + parseExpected(27); var tagName = parseJsxElementName(); var attributes = parseJsxAttributes(); var node; - if (token() === 28) { - node = createNode(250, fullStart); + if (token() === 29) { + node = createNode(251, fullStart); scanJsxText(); } else { - parseExpected(40); + parseExpected(41); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } - node = createNode(249, fullStart); + node = createNode(250, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -17741,10 +17755,10 @@ var ts; } function parseJsxElementName() { scanJsxIdentifier(); - var expression = token() === 98 ? + var expression = token() === 99 ? parseTokenNode() : parseIdentifierName(); - while (parseOptional(22)) { - var propertyAccess = createNode(178, expression.pos); + while (parseOptional(23)) { + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); @@ -17752,29 +17766,29 @@ var ts; return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(255); - parseExpected(16); - if (token() !== 17) { - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(256); + parseExpected(17); + if (token() !== 18) { + node.dotDotDotToken = parseOptionalToken(24); node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { - parseExpected(17); + parseExpected(18); } else { - parseExpected(17, undefined, false); + parseExpected(18, undefined, false); scanJsxText(); } return finishNode(node); } function parseJsxAttribute() { - if (token() === 16) { + if (token() === 17) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(252); + var node = createNode(253); node.name = parseIdentifierName(); - if (token() === 57) { + if (token() === 58) { switch (scanJsxAttributeValue()) { case 9: node.initializer = parseLiteralNode(); @@ -17787,69 +17801,69 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(254); - parseExpected(16); - parseExpected(23); - node.expression = parseExpression(); + var node = createNode(255); parseExpected(17); + parseExpected(24); + node.expression = parseExpression(); + parseExpected(18); return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(251); - parseExpected(27); + var node = createNode(252); + parseExpected(28); node.tagName = parseJsxElementName(); if (inExpressionContext) { - parseExpected(28); + parseExpected(29); } else { - parseExpected(28, undefined, false); + parseExpected(29, undefined, false); scanJsxText(); } return finishNode(node); } function parseTypeAssertion() { - var node = createNode(183); - parseExpected(26); + var node = createNode(184); + parseExpected(27); node.type = parseType(); - parseExpected(28); + parseExpected(29); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseMemberExpressionRest(expression) { while (true) { - var dotToken = parseOptionalToken(22); + var dotToken = parseOptionalToken(23); if (dotToken) { - var propertyAccess = createNode(178, expression.pos); + var propertyAccess = createNode(179, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(true); expression = finishNode(propertyAccess); continue; } - if (token() === 50 && !scanner.hasPrecedingLineBreak()) { + if (token() === 51 && !scanner.hasPrecedingLineBreak()) { nextToken(); - var nonNullExpression = createNode(202, expression.pos); + var nonNullExpression = createNode(203, expression.pos); nonNullExpression.expression = expression; expression = finishNode(nonNullExpression); continue; } - if (!inDecoratorContext() && parseOptional(20)) { - var indexedAccess = createNode(179, expression.pos); + if (!inDecoratorContext() && parseOptional(21)) { + var indexedAccess = createNode(180, expression.pos); indexedAccess.expression = expression; - if (token() !== 21) { + if (token() !== 22) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 || indexedAccess.argumentExpression.kind === 8) { var literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } - parseExpected(21); + parseExpected(22); expression = finishNode(indexedAccess); continue; } - if (token() === 12 || token() === 13) { - var tagExpression = createNode(182, expression.pos); + if (token() === 13 || token() === 14) { + var tagExpression = createNode(183, expression.pos); tagExpression.tag = expression; - tagExpression.template = token() === 12 + tagExpression.template = token() === 13 ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -17861,20 +17875,20 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token() === 26) { + if (token() === 27) { var typeArguments = tryParse(parseTypeArgumentsInExpression); if (!typeArguments) { return expression; } - var callExpr = createNode(180, expression.pos); + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token() === 18) { - var callExpr = createNode(180, expression.pos); + else if (token() === 19) { + var callExpr = createNode(181, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -17884,17 +17898,17 @@ var ts; } } function parseArgumentList() { - parseExpected(18); - var result = parseDelimitedList(11, parseArgumentExpression); parseExpected(19); + var result = parseDelimitedList(11, parseArgumentExpression); + parseExpected(20); return result; } function parseTypeArgumentsInExpression() { - if (!parseOptional(26)) { + if (!parseOptional(27)) { return undefined; } var typeArguments = parseDelimitedList(19, parseType); - if (!parseExpected(28)) { + if (!parseExpected(29)) { return undefined; } return typeArguments && canFollowTypeArgumentsInExpression() @@ -17903,27 +17917,27 @@ var ts; } function canFollowTypeArgumentsInExpression() { switch (token()) { - case 18: - case 22: case 19: - case 21: + case 23: + case 20: + case 22: + case 56: + case 25: case 55: - case 24: - case 54: - case 31: - case 33: case 32: case 34: - case 52: + case 33: + case 35: case 53: - case 49: - case 47: + case 54: + case 50: case 48: - case 17: + case 49: + case 18: case 1: return true; - case 25: - case 16: + case 26: + case 17: default: return false; } @@ -17932,87 +17946,87 @@ var ts; switch (token()) { case 8: case 9: - case 12: + case 13: return parseLiteralNode(); - case 98: - case 96: - case 94: - case 100: - case 85: + case 99: + case 97: + case 95: + case 101: + case 86: return parseTokenNode(); - case 18: + case 19: return parseParenthesizedExpression(); - case 20: + case 21: return parseArrayLiteralExpression(); - case 16: + case 17: return parseObjectLiteralExpression(); - case 119: + case 120: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); - case 74: + case 75: return parseClassExpression(); - case 88: + case 89: return parseFunctionExpression(); - case 93: + case 94: return parseNewExpression(); - case 40: - case 62: - if (reScanSlashToken() === 11) { + case 41: + case 63: + if (reScanSlashToken() === 12) { return parseLiteralNode(); } break; - case 13: + case 14: return parseTemplateExpression(); } return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(184); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(185); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); return finishNode(node); } function parseSpreadElement() { - var node = createNode(197); - parseExpected(23); + var node = createNode(198); + parseExpected(24); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token() === 23 ? parseSpreadElement() : - token() === 25 ? createNode(199) : + return token() === 24 ? parseSpreadElement() : + token() === 26 ? createNode(200) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(176); - parseExpected(20); + var node = createNode(177); + parseExpected(21); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.elements = parseDelimitedList(15, parseArgumentOrArrayLiteralElement); - parseExpected(21); + parseExpected(22); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(124)) { - return parseAccessorDeclaration(152, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(134)) { + if (parseContextualModifier(125)) { return parseAccessorDeclaration(153, fullStart, decorators, modifiers); } + else if (parseContextualModifier(135)) { + return parseAccessorDeclaration(154, fullStart, decorators, modifiers); + } return undefined; } function parseObjectLiteralElement() { var fullStart = scanner.getStartPos(); - var dotDotDotToken = parseOptionalToken(23); + var dotDotDotToken = parseOptionalToken(24); if (dotDotDotToken) { - var spreadElement = createNode(262, fullStart); + var spreadElement = createNode(263, fullStart); spreadElement.expression = parseAssignmentExpressionOrHigher(); return addJSDocComment(finishNode(spreadElement)); } @@ -18022,19 +18036,19 @@ var ts; if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 26 || token() === 18 || token() === 58); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(261, fullStart); + var shorthandDeclaration = createNode(262, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(57); + var equalsToken = parseOptionalToken(58); if (equalsToken) { shorthandDeclaration.equalsToken = equalsToken; shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); @@ -18042,23 +18056,23 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(260, fullStart); + var propertyAssignment = createNode(261, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; - parseExpected(55); + parseExpected(56); propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); return addJSDocComment(finishNode(propertyAssignment)); } } function parseObjectLiteralExpression() { - var node = createNode(177); - parseExpected(16); + var node = createNode(178); + parseExpected(17); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.properties = parseDelimitedList(12, parseObjectLiteralElement, true); - parseExpected(17); + parseExpected(18); return finishNode(node); } function parseFunctionExpression() { @@ -18066,10 +18080,10 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(false); } - var node = createNode(185); + var node = createNode(186); node.modifiers = parseModifiers(); - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); var isGenerator = !!node.asteriskToken; var isAsync = !!(ts.getModifierFlags(node) & 256); node.name = @@ -18077,7 +18091,7 @@ var ts; isGenerator ? doInYieldContext(parseOptionalIdentifier) : isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlock(isGenerator, isAsync, false); if (saveDecoratorContext) { setDecoratorContext(true); @@ -18089,29 +18103,29 @@ var ts; } function parseNewExpression() { var fullStart = scanner.getStartPos(); - parseExpected(93); - if (parseOptional(22)) { - var node_1 = createNode(203, fullStart); - node_1.keywordToken = 93; + parseExpected(94); + if (parseOptional(23)) { + var node_1 = createNode(204, fullStart); + node_1.keywordToken = 94; node_1.name = parseIdentifierName(); return finishNode(node_1); } - var node = createNode(181, fullStart); + var node = createNode(182, fullStart); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token() === 18) { + if (node.typeArguments || token() === 19) { node.arguments = parseArgumentList(); } return finishNode(node); } function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(206); - if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) { + var node = createNode(207); + if (parseExpected(17, diagnosticMessage) || ignoreMissingOpenBrace) { if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -18136,48 +18150,48 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(208); - parseExpected(24); + var node = createNode(209); + parseExpected(25); return finishNode(node); } function parseIfStatement() { - var node = createNode(210); - parseExpected(89); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(211); + parseExpected(90); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(81) ? parseStatement() : undefined; + node.elseStatement = parseOptional(82) ? parseStatement() : undefined; return finishNode(node); } function parseDoStatement() { - var node = createNode(211); - parseExpected(80); + var node = createNode(212); + parseExpected(81); node.statement = parseStatement(); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + parseExpected(106); parseExpected(19); - parseOptional(24); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + parseOptional(25); return finishNode(node); } function parseWhileStatement() { - var node = createNode(212); - parseExpected(105); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(213); + parseExpected(106); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseForOrForInOrForOfStatement() { var pos = getNodePos(); - parseExpected(87); - var awaitToken = parseOptionalToken(120); - parseExpected(18); + parseExpected(88); + var awaitToken = parseOptionalToken(121); + parseExpected(19); var initializer = undefined; - if (token() !== 24) { - if (token() === 103 || token() === 109 || token() === 75) { + if (token() !== 25) { + if (token() === 104 || token() === 110 || token() === 76) { initializer = parseVariableDeclarationList(true); } else { @@ -18185,33 +18199,33 @@ var ts; } } var forOrForInOrForOfStatement; - if (awaitToken ? parseExpected(141) : parseOptional(141)) { - var forOfStatement = createNode(215, pos); + if (awaitToken ? parseExpected(142) : parseOptional(142)) { + var forOfStatement = createNode(216, pos); forOfStatement.awaitModifier = awaitToken; forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forOfStatement; } - else if (parseOptional(91)) { - var forInStatement = createNode(214, pos); + else if (parseOptional(92)) { + var forInStatement = createNode(215, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forInStatement; } else { - var forStatement = createNode(213, pos); + var forStatement = createNode(214, pos); forStatement.initializer = initializer; - parseExpected(24); - if (token() !== 24 && token() !== 19) { + parseExpected(25); + if (token() !== 25 && token() !== 20) { forStatement.condition = allowInAnd(parseExpression); } - parseExpected(24); - if (token() !== 19) { + parseExpected(25); + if (token() !== 20) { forStatement.incrementor = allowInAnd(parseExpression); } - parseExpected(19); + parseExpected(20); forOrForInOrForOfStatement = forStatement; } forOrForInOrForOfStatement.statement = parseStatement(); @@ -18219,7 +18233,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 217 ? 71 : 76); + parseExpected(kind === 218 ? 72 : 77); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -18227,8 +18241,8 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(218); - parseExpected(95); + var node = createNode(219); + parseExpected(96); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); } @@ -18236,90 +18250,90 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(219); - parseExpected(106); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(220); + parseExpected(107); parseExpected(19); + node.expression = allowInAnd(parseExpression); + parseExpected(20); node.statement = parseStatement(); return finishNode(node); } function parseCaseClause() { - var node = createNode(256); - parseExpected(72); + var node = createNode(257); + parseExpected(73); node.expression = allowInAnd(parseExpression); - parseExpected(55); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseDefaultClause() { - var node = createNode(257); - parseExpected(78); - parseExpected(55); + var node = createNode(258); + parseExpected(79); + parseExpected(56); node.statements = parseList(3, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token() === 72 ? parseCaseClause() : parseDefaultClause(); + return token() === 73 ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(220); - parseExpected(97); - parseExpected(18); - node.expression = allowInAnd(parseExpression); + var node = createNode(221); + parseExpected(98); parseExpected(19); - var caseBlock = createNode(234, scanner.getStartPos()); - parseExpected(16); - caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + node.expression = allowInAnd(parseExpression); + parseExpected(20); + var caseBlock = createNode(235, scanner.getStartPos()); parseExpected(17); + caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); + parseExpected(18); node.caseBlock = finishNode(caseBlock); return finishNode(node); } function parseThrowStatement() { - var node = createNode(222); - parseExpected(99); + var node = createNode(223); + parseExpected(100); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } function parseTryStatement() { - var node = createNode(223); - parseExpected(101); + var node = createNode(224); + parseExpected(102); node.tryBlock = parseBlock(false); - node.catchClause = token() === 73 ? parseCatchClause() : undefined; - if (!node.catchClause || token() === 86) { - parseExpected(86); + node.catchClause = token() === 74 ? parseCatchClause() : undefined; + if (!node.catchClause || token() === 87) { + parseExpected(87); node.finallyBlock = parseBlock(false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(259); - parseExpected(73); - if (parseExpected(18)) { + var result = createNode(260); + parseExpected(74); + if (parseExpected(19)) { result.variableDeclaration = parseVariableDeclaration(); } - parseExpected(19); + parseExpected(20); result.block = parseBlock(false); return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(224); - parseExpected(77); + var node = createNode(225); + parseExpected(78); parseSemicolon(); return finishNode(node); } function parseExpressionOrLabeledStatement() { var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); - if (expression.kind === 70 && parseOptional(55)) { - var labeledStatement = createNode(221, fullStart); + if (expression.kind === 71 && parseOptional(56)) { + var labeledStatement = createNode(222, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(209, fullStart); + var expressionStatement = createNode(210, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -18331,11 +18345,11 @@ var ts; } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 74 && !scanner.hasPrecedingLineBreak(); + return token() === 75 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 88 && !scanner.hasPrecedingLineBreak(); + return token() === 89 && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); @@ -18344,47 +18358,47 @@ var ts; function isDeclaration() { while (true) { switch (token()) { - case 103: - case 109: + case 104: + case 110: + case 76: + case 89: case 75: - case 88: - case 74: - case 82: + case 83: return true; - case 108: - case 137: + case 109: + case 138: return nextTokenIsIdentifierOnSameLine(); - case 127: case 128: + case 129: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 116: - case 119: - case 123: - case 111: + case 117: + case 120: + case 124: case 112: case 113: - case 130: + case 114: + case 131: nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 140: + case 141: nextToken(); - return token() === 16 || token() === 70 || token() === 83; - case 90: + return token() === 17 || token() === 71 || token() === 84; + case 91: nextToken(); - return token() === 9 || token() === 38 || - token() === 16 || ts.tokenIsIdentifierOrKeyword(token()); - case 83: + return token() === 9 || token() === 39 || + token() === 17 || ts.tokenIsIdentifierOrKeyword(token()); + case 84: nextToken(); - if (token() === 57 || token() === 38 || - token() === 16 || token() === 78 || - token() === 117) { + if (token() === 58 || token() === 39 || + token() === 17 || token() === 79 || + token() === 118) { return true; } continue; - case 114: + case 115: nextToken(); continue; default: @@ -18397,46 +18411,46 @@ var ts; } function isStartOfStatement() { switch (token()) { - case 56: - case 24: - case 16: - case 103: - case 109: - case 88: - case 74: - case 82: + case 57: + case 25: + case 17: + case 104: + case 110: case 89: - case 80: - case 105: - case 87: - case 76: - case 71: - case 95: - case 106: - case 97: - case 99: - case 101: - case 77: - case 73: - case 86: - return true; case 75: case 83: case 90: + case 81: + case 106: + case 88: + case 77: + case 72: + case 96: + case 107: + case 98: + case 100: + case 102: + case 78: + case 74: + case 87: + return true; + case 76: + case 84: + case 91: return isStartOfDeclaration(); - case 119: - case 123: - case 108: - case 127: + case 120: + case 124: + case 109: case 128: - case 137: - case 140: + case 129: + case 138: + case 141: return true; - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -18444,73 +18458,73 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token() === 16 || token() === 20; + return isIdentifier() || token() === 17 || token() === 21; } function isLetDeclaration() { return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); } function parseStatement() { switch (token()) { - case 24: + case 25: return parseEmptyStatement(); - case 16: + case 17: return parseBlock(false); - case 103: + case 104: return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 109: + case 110: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), undefined, undefined); } break; - case 88: + case 89: return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 74: + case 75: return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 89: + case 90: return parseIfStatement(); - case 80: + case 81: return parseDoStatement(); - case 105: + case 106: return parseWhileStatement(); - case 87: + case 88: return parseForOrForInOrForOfStatement(); - case 76: - return parseBreakOrContinueStatement(216); - case 71: + case 77: return parseBreakOrContinueStatement(217); - case 95: + case 72: + return parseBreakOrContinueStatement(218); + case 96: return parseReturnStatement(); - case 106: + case 107: return parseWithStatement(); - case 97: + case 98: return parseSwitchStatement(); - case 99: + case 100: return parseThrowStatement(); - case 101: - case 73: - case 86: + case 102: + case 74: + case 87: return parseTryStatement(); - case 77: + case 78: return parseDebuggerStatement(); - case 56: + case 57: return parseDeclaration(); - case 119: - case 108: - case 137: - case 127: + case 120: + case 109: + case 138: case 128: - case 123: - case 75: - case 82: + case 129: + case 124: + case 76: case 83: - case 90: - case 111: + case 84: + case 91: case 112: case 113: - case 116: case 114: - case 130: - case 140: + case 117: + case 115: + case 131: + case 141: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -18523,40 +18537,40 @@ var ts; var decorators = parseDecorators(); var modifiers = parseModifiers(); switch (token()) { - case 103: - case 109: - case 75: + case 104: + case 110: + case 76: return parseVariableStatement(fullStart, decorators, modifiers); - case 88: + case 89: return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 74: + case 75: return parseClassDeclaration(fullStart, decorators, modifiers); - case 108: + case 109: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 137: + case 138: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 82: + case 83: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 140: - case 127: + case 141: case 128: + case 129: return parseModuleDeclaration(fullStart, decorators, modifiers); - case 90: + case 91: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 83: + case 84: nextToken(); switch (token()) { - case 78: - case 57: + case 79: + case 58: return parseExportAssignment(fullStart, decorators, modifiers); - case 117: + case 118: return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); default: return parseExportDeclaration(fullStart, decorators, modifiers); } default: if (decorators || modifiers) { - var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(247, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; node.modifiers = modifiers; @@ -18569,32 +18583,32 @@ var ts; return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token() !== 16 && canParseSemicolon()) { + if (token() !== 17 && canParseSemicolon()) { parseSemicolon(); return; } return parseFunctionBlock(isGenerator, isAsync, false, diagnosticMessage); } function parseArrayBindingElement() { - if (token() === 25) { - return createNode(199); + if (token() === 26) { + return createNode(200); } - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(175); - node.dotDotDotToken = parseOptionalToken(23); + var node = createNode(176); + node.dotDotDotToken = parseOptionalToken(24); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token() !== 55) { + if (tokenIsIdentifier && token() !== 56) { node.name = propertyName; } else { - parseExpected(55); + parseExpected(56); node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } @@ -18602,33 +18616,33 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(173); - parseExpected(16); - node.elements = parseDelimitedList(9, parseObjectBindingElement); + var node = createNode(174); parseExpected(17); + node.elements = parseDelimitedList(9, parseObjectBindingElement); + parseExpected(18); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(174); - parseExpected(20); - node.elements = parseDelimitedList(10, parseArrayBindingElement); + var node = createNode(175); parseExpected(21); + node.elements = parseDelimitedList(10, parseArrayBindingElement); + parseExpected(22); return finishNode(node); } function isIdentifierOrPattern() { - return token() === 16 || token() === 20 || isIdentifier(); + return token() === 17 || token() === 21 || isIdentifier(); } function parseIdentifierOrPattern() { - if (token() === 20) { + if (token() === 21) { return parseArrayBindingPattern(); } - if (token() === 16) { + if (token() === 17) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(225); + var node = createNode(226); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token())) { @@ -18637,21 +18651,21 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(226); + var node = createNode(227); switch (token()) { - case 103: + case 104: break; - case 109: + case 110: node.flags |= 1; break; - case 75: + case 76: node.flags |= 2; break; default: ts.Debug.fail(); } nextToken(); - if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 142 && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -18663,10 +18677,10 @@ var ts; return finishNode(node); } function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 19; + return nextTokenIsIdentifier() && nextToken() === 20; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(207, fullStart); + var node = createNode(208, fullStart); node.decorators = decorators; node.modifiers = modifiers; node.declarationList = parseVariableDeclarationList(false); @@ -18674,29 +18688,29 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(227, fullStart); + var node = createNode(228, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(88); - node.asteriskToken = parseOptionalToken(38); + parseExpected(89); + node.asteriskToken = parseOptionalToken(39); node.name = ts.hasModifier(node, 512) ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = ts.hasModifier(node, 256); - fillSignature(55, isGenerator, isAsync, false, node); + fillSignature(56, isGenerator, isAsync, false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(151, pos); + var node = createNode(152, pos); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(122); - fillSignature(55, false, false, false, node); + parseExpected(123); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(150, fullStart); + var method = createNode(151, fullStart); method.decorators = decorators; method.modifiers = modifiers; method.asteriskToken = asteriskToken; @@ -18704,12 +18718,12 @@ var ts; method.questionToken = questionToken; var isGenerator = !!asteriskToken; var isAsync = ts.hasModifier(method, 256); - fillSignature(55, isGenerator, isAsync, false, method); + fillSignature(56, isGenerator, isAsync, false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(148, fullStart); + var property = createNode(149, fullStart); property.decorators = decorators; property.modifiers = modifiers; property.name = name; @@ -18722,10 +18736,10 @@ var ts; return addJSDocComment(finishNode(property)); } function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(38); + var asteriskToken = parseOptionalToken(39); var name = parsePropertyName(); - var questionToken = parseOptionalToken(54); - if (asteriskToken || token() === 18 || token() === 26) { + var questionToken = parseOptionalToken(55); + if (asteriskToken || token() === 19 || token() === 27) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -18740,17 +18754,17 @@ var ts; node.decorators = decorators; node.modifiers = modifiers; node.name = parsePropertyName(); - fillSignature(55, false, false, false, node); + fillSignature(56, false, false, false, node); node.body = parseFunctionBlockOrSemicolon(false, false); return addJSDocComment(finishNode(node)); } function isClassMemberModifier(idToken) { switch (idToken) { - case 113: - case 111: - case 112: case 114: - case 130: + case 112: + case 113: + case 115: + case 131: return true; default: return false; @@ -18758,7 +18772,7 @@ var ts; } function isClassMemberStart() { var idToken; - if (token() === 56) { + if (token() === 57) { return true; } while (ts.isModifierKind(token())) { @@ -18768,26 +18782,26 @@ var ts; } nextToken(); } - if (token() === 38) { + if (token() === 39) { return true; } if (isLiteralPropertyName()) { idToken = token(); nextToken(); } - if (token() === 20) { + if (token() === 21) { return true; } if (idToken !== undefined) { - if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) { + if (!ts.isKeyword(idToken) || idToken === 135 || idToken === 125) { return true; } switch (token()) { - case 18: - case 26: + case 19: + case 27: + case 56: + case 58: case 55: - case 57: - case 54: return true; default: return canParseSemicolon(); @@ -18799,10 +18813,10 @@ var ts; var decorators; while (true) { var decoratorStart = getNodePos(); - if (!parseOptional(56)) { + if (!parseOptional(57)) { break; } - var decorator = createNode(146, decoratorStart); + var decorator = createNode(147, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); finishNode(decorator); if (!decorators) { @@ -18822,7 +18836,7 @@ var ts; while (true) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); - if (token() === 75 && permitInvalidConstAsModifier) { + if (token() === 76 && permitInvalidConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { break; } @@ -18847,7 +18861,7 @@ var ts; } function parseModifiersForArrowFunction() { var modifiers; - if (token() === 119) { + if (token() === 120) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); nextToken(); @@ -18858,8 +18872,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token() === 24) { - var result = createNode(205); + if (token() === 25) { + var result = createNode(206); nextToken(); return finishNode(result); } @@ -18870,7 +18884,7 @@ var ts; if (accessor) { return accessor; } - if (token() === 122) { + if (token() === 123) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -18879,33 +18893,33 @@ var ts; if (ts.tokenIsIdentifierOrKeyword(token()) || token() === 9 || token() === 8 || - token() === 38 || - token() === 20) { + token() === 39 || + token() === 21) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { - var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected); + var name = createMissingNode(71, true, ts.Diagnostics.Declaration_expected); return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined); } ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198); + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 199); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 229); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(74); + parseExpected(75); node.name = parseNameOfClassDeclarationOrExpression(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseClassMembers(); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -18918,7 +18932,7 @@ var ts; : undefined; } function isImplementsClause() { - return token() === 107 && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 108 && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause()) { @@ -18928,8 +18942,8 @@ var ts; } function parseHeritageClause() { var tok = token(); - if (tok === 84 || tok === 107) { - var node = createNode(258); + if (tok === 85 || tok === 108) { + var node = createNode(259); node.token = tok; nextToken(); node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); @@ -18938,24 +18952,24 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(200); + var node = createNode(201); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token() === 26) { - node.typeArguments = parseBracketedList(19, parseType, 26, 28); + if (token() === 27) { + node.typeArguments = parseBracketedList(19, parseType, 27, 29); } return finishNode(node); } function isHeritageClause() { - return token() === 84 || token() === 107; + return token() === 85 || token() === 108; } function parseClassMembers() { return parseList(5, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(229, fullStart); + var node = createNode(230, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(108); + parseExpected(109); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); @@ -18963,32 +18977,32 @@ var ts; return addJSDocComment(finishNode(node)); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230, fullStart); + var node = createNode(231, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(137); + parseExpected(138); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); - parseExpected(57); + parseExpected(58); node.type = parseType(); parseSemicolon(); return addJSDocComment(finishNode(node)); } function parseEnumMember() { - var node = createNode(263, scanner.getStartPos()); + var node = createNode(264, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return addJSDocComment(finishNode(node)); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231, fullStart); + var node = createNode(232, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(82); + parseExpected(83); node.name = parseIdentifier(); - if (parseExpected(16)) { + if (parseExpected(17)) { node.members = parseDelimitedList(6, parseEnumMember); - parseExpected(17); + parseExpected(18); } else { node.members = createMissingList(); @@ -18996,10 +19010,10 @@ var ts; return addJSDocComment(finishNode(node)); } function parseModuleBlock() { - var node = createNode(233, scanner.getStartPos()); - if (parseExpected(16)) { + var node = createNode(234, scanner.getStartPos()); + if (parseExpected(17)) { node.statements = parseList(1, parseStatement); - parseExpected(17); + parseExpected(18); } else { node.statements = createMissingList(); @@ -19007,29 +19021,29 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); var namespaceFlag = flags & 16; node.decorators = decorators; node.modifiers = modifiers; node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(22) + node.body = parseOptional(23) ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 4 | namespaceFlag) : parseModuleBlock(); return addJSDocComment(finishNode(node)); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(232, fullStart); + var node = createNode(233, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (token() === 140) { + if (token() === 141) { node.name = parseIdentifier(); node.flags |= 512; } else { node.name = parseLiteralNode(true); } - if (token() === 16) { + if (token() === 17) { node.body = parseModuleBlock(); } else { @@ -19039,14 +19053,14 @@ var ts; } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = 0; - if (token() === 140) { + if (token() === 141) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } - else if (parseOptional(128)) { + else if (parseOptional(129)) { flags |= 16; } else { - parseExpected(127); + parseExpected(128); if (token() === 9) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } @@ -19054,66 +19068,66 @@ var ts; return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token() === 131 && + return token() === 132 && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { - return nextToken() === 18; + return nextToken() === 19; } function nextTokenIsSlash() { - return nextToken() === 40; + return nextToken() === 41; } function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { - var exportDeclaration = createNode(235, fullStart); + var exportDeclaration = createNode(236, fullStart); exportDeclaration.decorators = decorators; exportDeclaration.modifiers = modifiers; - parseExpected(117); - parseExpected(128); + parseExpected(118); + parseExpected(129); exportDeclaration.name = parseIdentifier(); parseSemicolon(); return finishNode(exportDeclaration); } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(90); + parseExpected(91); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token() !== 25 && token() !== 139) { + if (token() !== 26 && token() !== 140) { return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier); } } - var importDeclaration = createNode(237, fullStart); + var importDeclaration = createNode(238, fullStart); importDeclaration.decorators = decorators; importDeclaration.modifiers = modifiers; if (identifier || - token() === 38 || - token() === 16) { + token() === 39 || + token() === 17) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(139); + parseExpected(140); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) { - var importEqualsDeclaration = createNode(236, fullStart); + var importEqualsDeclaration = createNode(237, fullStart); importEqualsDeclaration.decorators = decorators; importEqualsDeclaration.modifiers = modifiers; importEqualsDeclaration.name = identifier; - parseExpected(57); + parseExpected(58); importEqualsDeclaration.moduleReference = parseModuleReference(); parseSemicolon(); return addJSDocComment(finishNode(importEqualsDeclaration)); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(238, fullStart); + var importClause = createNode(239, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || - parseOptional(25)) { - importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240); + parseOptional(26)) { + importClause.namedBindings = token() === 39 ? parseNamespaceImport() : parseNamedImportsOrExports(241); } return finishNode(importClause); } @@ -19123,11 +19137,11 @@ var ts; : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(247); - parseExpected(131); - parseExpected(18); - node.expression = parseModuleSpecifier(); + var node = createNode(248); + parseExpected(132); parseExpected(19); + node.expression = parseModuleSpecifier(); + parseExpected(20); return finishNode(node); } function parseModuleSpecifier() { @@ -19141,22 +19155,22 @@ var ts; } } function parseNamespaceImport() { - var namespaceImport = createNode(239); - parseExpected(38); - parseExpected(117); + var namespaceImport = createNode(240); + parseExpected(39); + parseExpected(118); namespaceImport.name = parseIdentifier(); return finishNode(namespaceImport); } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17); + node.elements = parseBracketedList(22, kind === 241 ? parseImportSpecifier : parseExportSpecifier, 17, 18); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(245); + return parseImportOrExportSpecifier(246); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(241); + return parseImportOrExportSpecifier(242); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -19164,9 +19178,9 @@ var ts; var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token() === 117) { + if (token() === 118) { node.propertyName = identifierName; - parseExpected(117); + parseExpected(118); checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); @@ -19175,23 +19189,23 @@ var ts; else { node.name = identifierName; } - if (kind === 241 && checkIdentifierIsKeyword) { + if (kind === 242 && checkIdentifierIsKeyword) { parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(243, fullStart); + var node = createNode(244, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(38)) { - parseExpected(139); + if (parseOptional(39)) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(244); - if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { - parseExpected(139); + node.exportClause = parseNamedImportsOrExports(245); + if (token() === 140 || (token() === 9 && !scanner.hasPrecedingLineBreak())) { + parseExpected(140); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -19199,14 +19213,14 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(242, fullStart); + var node = createNode(243, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(57)) { + if (parseOptional(58)) { node.isExportEquals = true; } else { - parseExpected(78); + parseExpected(79); } node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); @@ -19293,10 +19307,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return ts.hasModifier(node, 1) - || node.kind === 236 && node.moduleReference.kind === 247 - || node.kind === 237 - || node.kind === 242 + || node.kind === 237 && node.moduleReference.kind === 248 + || node.kind === 238 || node.kind === 243 + || node.kind === 244 ? node : undefined; }); @@ -19342,16 +19356,16 @@ var ts; (function (JSDocParser) { function isJSDocType() { switch (token()) { - case 38: - case 54: - case 18: - case 20: - case 50: - case 16: - case 88: - case 23: - case 93: - case 98: + case 39: + case 55: + case 19: + case 21: + case 51: + case 17: + case 89: + case 24: + case 94: + case 99: return true; } return ts.tokenIsIdentifierOrKeyword(token()); @@ -19369,23 +19383,23 @@ var ts; } JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; function parseJSDocTypeExpression() { - var result = createNode(266, scanner.getTokenPos()); - parseExpected(16); - result.type = parseJSDocTopLevelType(); + var result = createNode(267, scanner.getTokenPos()); parseExpected(17); + result.type = parseJSDocTopLevelType(); + parseExpected(18); fixupParentReferences(result); return finishNode(result); } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token() === 48) { - var unionType = createNode(270, type.pos); + if (token() === 49) { + var unionType = createNode(271, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token() === 57) { - var optionalType = createNode(277, type.pos); + if (token() === 58) { + var optionalType = createNode(278, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -19395,21 +19409,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token() === 20) { - var arrayType = createNode(269, type.pos); + if (token() === 21) { + var arrayType = createNode(270, type.pos); arrayType.elementType = type; nextToken(); - parseExpected(21); + parseExpected(22); type = finishNode(arrayType); } - else if (token() === 54) { - var nullableType = createNode(272, type.pos); + else if (token() === 55) { + var nullableType = createNode(273, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token() === 50) { - var nonNullableType = createNode(273, type.pos); + else if (token() === 51) { + var nonNullableType = createNode(274, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -19422,95 +19436,95 @@ var ts; } function parseBasicTypeExpression() { switch (token()) { - case 38: + case 39: return parseJSDocAllType(); - case 54: + case 55: return parseJSDocUnknownOrNullableType(); - case 18: + case 19: return parseJSDocUnionType(); - case 20: + case 21: return parseJSDocTupleType(); - case 50: + case 51: return parseJSDocNonNullableType(); - case 16: + case 17: return parseJSDocRecordType(); - case 88: + case 89: return parseJSDocFunctionType(); - case 23: + case 24: return parseJSDocVariadicType(); - case 93: + case 94: return parseJSDocConstructorType(); - case 98: + case 99: return parseJSDocThisType(); - case 118: - case 135: - case 132: - case 121: + case 119: case 136: - case 104: - case 94: - case 138: - case 129: case 133: + case 122: + case 137: + case 105: + case 95: + case 139: + case 130: + case 134: return parseTokenNode(); case 9: case 8: - case 100: - case 85: + case 101: + case 86: return parseJSDocLiteralType(); } return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(281); + var result = createNode(282); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(280); + var result = createNode(281); nextToken(); - parseExpected(55); + parseExpected(56); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(279); + var result = createNode(280); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(278); + var result = createNode(279); nextToken(); - parseExpected(18); + parseExpected(19); result.parameters = parseDelimitedList(23, parseJSDocParameter); checkForTrailingComma(result.parameters); - parseExpected(19); - if (token() === 55) { + parseExpected(20); + if (token() === 56) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(145); + var parameter = createNode(146); parameter.type = parseJSDocType(); - if (parseOptional(57)) { - parameter.questionToken = createNode(57); + if (parseOptional(58)) { + parameter.questionToken = createNode(58); } return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(276); + var result = createNode(277); result.name = parseSimplePropertyName(); - if (token() === 26) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); } else { - while (parseOptional(22)) { - if (token() === 26) { + while (parseOptional(23)) { + if (token() === 27) { result.typeArguments = parseTypeArguments(); break; } @@ -19526,7 +19540,7 @@ var ts; var typeArguments = parseDelimitedList(24, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); - parseExpected(28); + parseExpected(29); return typeArguments; } function checkForEmptyTypeArgumentList(typeArguments) { @@ -19537,28 +19551,28 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(142, left.pos); + var result = createNode(143, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(274); + var result = createNode(275); result.literal = parseTypeLiteral(); return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(273); + var result = createNode(274); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(271); + var result = createNode(272); nextToken(); result.types = parseDelimitedList(26, parseJSDocType); checkForTrailingComma(result.types); - parseExpected(21); + parseExpected(22); return finishNode(result); } function checkForTrailingComma(list) { @@ -19568,45 +19582,45 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(270); + var result = createNode(271); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(19); + parseExpected(20); return finishNode(result); } function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = createNodeArray([firstType], firstType.pos); - while (parseOptional(48)) { + while (parseOptional(49)) { types.push(parseJSDocType()); } types.end = scanner.getStartPos(); return types; } function parseJSDocAllType() { - var result = createNode(267); + var result = createNode(268); nextToken(); return finishNode(result); } function parseJSDocLiteralType() { - var result = createNode(292); + var result = createNode(293); result.literal = parseLiteralTypeNode(); return finishNode(result); } function parseJSDocUnknownOrNullableType() { var pos = scanner.getStartPos(); nextToken(); - if (token() === 25 || - token() === 17 || - token() === 19 || - token() === 28 || - token() === 57 || - token() === 48) { - var result = createNode(268, pos); + if (token() === 26 || + token() === 18 || + token() === 20 || + token() === 29 || + token() === 58 || + token() === 49) { + var result = createNode(269, pos); return finishNode(result); } else { - var result = createNode(272, pos); + var result = createNode(273, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -19677,7 +19691,7 @@ var ts; } while (token() !== 1) { switch (token()) { - case 56: + case 57: if (state === 0 || state === 1) { removeTrailingNewlines(comments); parseTag(indent); @@ -19695,7 +19709,7 @@ var ts; state = 0; indent = 0; break; - case 38: + case 39: var asterisk = scanner.getTokenText(); if (state === 1 || state === 2) { state = 2; @@ -19706,7 +19720,7 @@ var ts; indent += asterisk.length; } break; - case 70: + case 71: pushComment(scanner.getTokenText()); state = 2; break; @@ -19756,7 +19770,7 @@ var ts; content.charCodeAt(start + 3) !== 42; } function createJSDocComment() { - var result = createNode(282, start); + var result = createNode(283, start); result.tags = tags; result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -19767,8 +19781,8 @@ var ts; } } function parseTag(indent) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getTokenPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -19822,7 +19836,7 @@ var ts; comments.push(text); indent += text.length; } - while (token() !== 56 && token() !== 1) { + while (token() !== 57 && token() !== 1) { switch (token()) { case 4: if (state >= 1) { @@ -19831,7 +19845,7 @@ var ts; } indent = 0; break; - case 56: + case 57: break; case 5: if (state === 2) { @@ -19845,7 +19859,7 @@ var ts; indent += whitespace.length; } break; - case 38: + case 39: if (state === 0) { state = 1; indent += scanner.getTokenText().length; @@ -19856,7 +19870,7 @@ var ts; pushComment(scanner.getTokenText()); break; } - if (token() === 56) { + if (token() === 57) { break; } nextJSDocToken(); @@ -19866,7 +19880,7 @@ var ts; return comments; } function parseUnknownTag(atToken, tagName) { - var result = createNode(283, atToken.pos); + var result = createNode(284, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -19884,7 +19898,7 @@ var ts; function tryParseTypeExpression() { return tryParse(function () { skipWhitespace(); - if (token() !== 16) { + if (token() !== 17) { return undefined; } return parseJSDocTypeExpression(); @@ -19895,14 +19909,14 @@ var ts; skipWhitespace(); var name; var isBracketed; - if (parseOptionalToken(20)) { + if (parseOptionalToken(21)) { name = parseJSDocIdentifierName(); skipWhitespace(); isBracketed = true; - if (parseOptionalToken(57)) { + if (parseOptionalToken(58)) { parseExpression(); } - parseExpected(21); + parseExpected(22); } else if (ts.tokenIsIdentifierOrKeyword(token())) { name = parseJSDocIdentifierName(); @@ -19921,7 +19935,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(285, atToken.pos); + var result = createNode(286, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -19932,20 +19946,20 @@ var ts; return finishNode(result); } function parseReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 286; })) { + if (ts.forEach(tags, function (t) { return t.kind === 287; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(286, atToken.pos); + var result = createNode(287, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function parseTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 287; })) { + if (ts.forEach(tags, function (t) { return t.kind === 288; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(287, atToken.pos); + var result = createNode(288, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); @@ -19960,7 +19974,7 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var result = createNode(290, atToken.pos); + var result = createNode(291, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.name = name; @@ -19969,7 +19983,7 @@ var ts; } function parseAugmentsTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); - var result = createNode(284, atToken.pos); + var result = createNode(285, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = typeExpression; @@ -19978,15 +19992,15 @@ var ts; function parseTypedefTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); - var typedefTag = createNode(289, atToken.pos); + var typedefTag = createNode(290, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(0); if (typedefTag.fullName) { var rightNode = typedefTag.fullName; while (true) { - if (rightNode.kind === 70 || !rightNode.body) { - typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name; + if (rightNode.kind === 71 || !rightNode.body) { + typedefTag.name = rightNode.kind === 71 ? rightNode : rightNode.name; break; } rightNode = rightNode.body; @@ -19995,9 +20009,9 @@ var ts; typedefTag.typeExpression = typeExpression; skipWhitespace(); if (typeExpression) { - if (typeExpression.type.kind === 276) { + if (typeExpression.type.kind === 277) { var jsDocTypeReference = typeExpression.type; - if (jsDocTypeReference.name.kind === 70) { + if (jsDocTypeReference.name.kind === 71) { var name = jsDocTypeReference.name; if (name.text === "Object") { typedefTag.jsDocTypeLiteral = scanChildTags(); @@ -20013,7 +20027,7 @@ var ts; } return finishNode(typedefTag); function scanChildTags() { - var jsDocTypeLiteral = createNode(291, scanner.getStartPos()); + var jsDocTypeLiteral = createNode(292, scanner.getStartPos()); var resumePos = scanner.getStartPos(); var canParseTag = true; var seenAsterisk = false; @@ -20021,7 +20035,7 @@ var ts; while (token() !== 1 && !parentTagTerminated) { nextJSDocToken(); switch (token()) { - case 56: + case 57: if (canParseTag) { parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); if (!parentTagTerminated) { @@ -20035,13 +20049,13 @@ var ts; canParseTag = true; seenAsterisk = false; break; - case 38: + case 39: if (seenAsterisk) { canParseTag = false; } seenAsterisk = true; break; - case 70: + case 71: canParseTag = false; break; case 1: @@ -20054,8 +20068,8 @@ var ts; function parseJSDocTypeNameWithNamespace(flags) { var pos = scanner.getTokenPos(); var typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (typeNameOrNamespaceName && parseOptional(22)) { - var jsDocNamespaceNode = createNode(232, pos); + if (typeNameOrNamespaceName && parseOptional(23)) { + var jsDocNamespaceNode = createNode(233, pos); jsDocNamespaceNode.flags |= flags; jsDocNamespaceNode.name = typeNameOrNamespaceName; jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4); @@ -20068,8 +20082,8 @@ var ts; } } function tryParseChildTag(parentTag) { - ts.Debug.assert(token() === 56); - var atToken = createNode(56, scanner.getStartPos()); + ts.Debug.assert(token() === 57); + var atToken = createNode(57, scanner.getStartPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -20099,7 +20113,7 @@ var ts; return false; } function parseTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 288; })) { + if (ts.forEach(tags, function (t) { return t.kind === 289; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } var typeParameters = createNodeArray(); @@ -20110,11 +20124,11 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(144, name.pos); + var typeParameter = createNode(145, name.pos); typeParameter.name = name; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token() === 25) { + if (token() === 26) { nextJSDocToken(); skipWhitespace(); } @@ -20122,7 +20136,7 @@ var ts; break; } } - var result = createNode(288, atToken.pos); + var result = createNode(289, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -20143,7 +20157,7 @@ var ts; } var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); - var result = createNode(70, pos); + var result = createNode(71, pos); result.text = content.substring(pos, end); finishNode(result, end); nextJSDocToken(); @@ -20224,7 +20238,7 @@ var ts; switch (node.kind) { case 9: case 8: - case 70: + case 71: return true; } return false; @@ -20451,16 +20465,16 @@ var ts; ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; })(ModuleInstanceState = ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); function getModuleInstanceState(node) { - if (node.kind === 229 || node.kind === 230) { + if (node.kind === 230 || node.kind === 231) { return 0; } else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) { + else if ((node.kind === 238 || node.kind === 237) && !(ts.hasModifier(node, 1))) { return 0; } - else if (node.kind === 233) { + else if (node.kind === 234) { var state_1 = 0; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -20476,11 +20490,11 @@ var ts; }); return state_1; } - else if (node.kind === 232) { + else if (node.kind === 233) { var body = node.body; return body ? getModuleInstanceState(body) : 1; } - else if (node.kind === 70 && node.isInJSDocNamespace) { + else if (node.kind === 71 && node.isInJSDocNamespace) { return 0; } else { @@ -20597,7 +20611,7 @@ var ts; if (symbolFlags & 107455) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 233)) { symbol.valueDeclaration = node; } } @@ -20607,7 +20621,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 143) { + if (node.name.kind === 144) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression)) { return nameExpression.text; @@ -20618,21 +20632,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 151: + case 152: return "__constructor"; - case 159: - case 154: - return "__call"; case 160: case 155: - return "__new"; + return "__call"; + case 161: case 156: + return "__new"; + case 157: return "__index"; - case 243: + case 244: return "__export"; - case 242: + case 243: return node.isExportEquals ? "export=" : "default"; - case 193: + case 194: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2: return "export="; @@ -20645,23 +20659,23 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 227: case 228: + case 229: return ts.hasModifier(node, 512) ? "default" : undefined; - case 278: + case 279: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 145: - ts.Debug.assert(node.parent.kind === 278); + case 146: + ts.Debug.assert(node.parent.kind === 279); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "arg" + index; - case 289: + case 290: var parentNode = node.parent && node.parent.parent; var nameFromParentNode = void 0; - if (parentNode && parentNode.kind === 207) { + if (parentNode && parentNode.kind === 208) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70) { + if (nameIdentifier.kind === 71) { nameFromParentNode = nameIdentifier.text; } } @@ -20705,7 +20719,7 @@ var ts; } else { if (symbol.declarations && symbol.declarations.length && - (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) { + (isDefaultExport || (node.kind === 243 && !node.isExportEquals))) { message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; } } @@ -20725,7 +20739,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedModifierFlags(node) & 1; if (symbolFlags & 8388608) { - if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) { + if (node.kind === 246 || (node.kind === 237 && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -20733,9 +20747,9 @@ var ts; } } else { - var isJSDocTypedefInJSDocNamespace = node.kind === 289 && + var isJSDocTypedefInJSDocNamespace = node.kind === 290 && node.name && - node.name.kind === 70 && + node.name.kind === 71 && node.name.isInJSDocNamespace; if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32)) || isJSDocTypedefInJSDocNamespace) { var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | @@ -20794,7 +20808,7 @@ var ts; if (hasExplicitReturn) node.flags |= 256; } - if (node.kind === 264) { + if (node.kind === 265) { node.flags |= emitFlags; } if (isIIFE) { @@ -20870,70 +20884,70 @@ var ts; return; } switch (node.kind) { - case 212: + case 213: bindWhileStatement(node); break; - case 211: + case 212: bindDoStatement(node); break; - case 213: + case 214: bindForStatement(node); break; - case 214: case 215: + case 216: bindForInOrForOfStatement(node); break; - case 210: + case 211: bindIfStatement(node); break; - case 218: - case 222: + case 219: + case 223: bindReturnOrThrow(node); break; + case 218: case 217: - case 216: bindBreakOrContinueStatement(node); break; - case 223: + case 224: bindTryStatement(node); break; - case 220: + case 221: bindSwitchStatement(node); break; - case 234: + case 235: bindCaseBlock(node); break; - case 256: + case 257: bindCaseClause(node); break; - case 221: + case 222: bindLabeledStatement(node); break; - case 191: + case 192: bindPrefixUnaryExpressionFlow(node); break; - case 192: + case 193: bindPostfixUnaryExpressionFlow(node); break; - case 193: + case 194: bindBinaryExpressionFlow(node); break; - case 187: + case 188: bindDeleteExpressionFlow(node); break; - case 194: + case 195: bindConditionalExpressionFlow(node); break; - case 225: + case 226: bindVariableDeclarationFlow(node); break; - case 180: + case 181: bindCallExpressionFlow(node); break; - case 282: + case 283: bindJSDocComment(node); break; - case 289: + case 290: bindJSDocTypedefTag(node); break; default: @@ -20943,26 +20957,26 @@ var ts; } function isNarrowingExpression(expr) { switch (expr.kind) { - case 70: - case 98: - case 178: + case 71: + case 99: + case 179: return isNarrowableReference(expr); - case 180: + case 181: return hasNarrowableArgument(expr); - case 184: + case 185: return isNarrowingExpression(expr.expression); - case 193: + case 194: return isNarrowingBinaryExpression(expr); - case 191: - return expr.operator === 50 && isNarrowingExpression(expr.operand); + case 192: + return expr.operator === 51 && isNarrowingExpression(expr.operand); } return false; } function isNarrowableReference(expr) { - return expr.kind === 70 || - expr.kind === 98 || - expr.kind === 96 || - expr.kind === 178 && isNarrowableReference(expr.expression); + return expr.kind === 71 || + expr.kind === 99 || + expr.kind === 97 || + expr.kind === 179 && isNarrowableReference(expr.expression); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -20973,41 +20987,41 @@ var ts; } } } - if (expr.expression.kind === 178 && + if (expr.expression.kind === 179 && isNarrowableReference(expr.expression.expression)) { return true; } return false; } function isNarrowingTypeofOperands(expr1, expr2) { - return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; + return expr1.kind === 189 && isNarrowableOperand(expr1.expression) && expr2.kind === 9; } function isNarrowingBinaryExpression(expr) { switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableReference(expr.left); - case 31: case 32: case 33: case 34: + case 35: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 92: + case 93: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowingExpression(expr.right); } return false; } function isNarrowableOperand(expr) { switch (expr.kind) { - case 184: + case 185: return isNarrowableOperand(expr.expression); - case 193: + case 194: switch (expr.operatorToken.kind) { - case 57: + case 58: return isNarrowableOperand(expr.left); - case 25: + case 26: return isNarrowableOperand(expr.right); } } @@ -21041,8 +21055,8 @@ var ts; if (!expression) { return flags & 32 ? antecedent : unreachableFlow; } - if (expression.kind === 100 && flags & 64 || - expression.kind === 85 && flags & 32) { + if (expression.kind === 101 && flags & 64 || + expression.kind === 86 && flags & 32) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -21097,34 +21111,34 @@ var ts; function isStatementCondition(node) { var parent = node.parent; switch (parent.kind) { - case 210: - case 212: case 211: - return parent.expression === node; case 213: - case 194: + case 212: + return parent.expression === node; + case 214: + case 195: return parent.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 184) { + if (node.kind === 185) { node = node.expression; } - else if (node.kind === 191 && node.operator === 50) { + else if (node.kind === 192 && node.operator === 51) { node = node.operand; } else { - return node.kind === 193 && (node.operatorToken.kind === 52 || - node.operatorToken.kind === 53); + return node.kind === 194 && (node.operatorToken.kind === 53 || + node.operatorToken.kind === 54); } } } function isTopLevelLogicalExpression(node) { - while (node.parent.kind === 184 || - node.parent.kind === 191 && - node.parent.operator === 50) { + while (node.parent.kind === 185 || + node.parent.kind === 192 && + node.parent.operator === 51) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent); @@ -21165,7 +21179,7 @@ var ts; } function bindDoStatement(node) { var preDoLabel = createLoopLabel(); - var enclosingLabeledStatement = node.parent.kind === 221 + var enclosingLabeledStatement = node.parent.kind === 222 ? ts.lastOrUndefined(activeLabels) : undefined; var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel(); @@ -21197,13 +21211,13 @@ var ts; var postLoopLabel = createBranchLabel(); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 215) { + if (node.kind === 216) { bind(node.awaitModifier); } bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 226) { + if (node.initializer.kind !== 227) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -21225,7 +21239,7 @@ var ts; } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 218) { + if (node.kind === 219) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -21245,7 +21259,7 @@ var ts; return undefined; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - var flowLabel = node.kind === 217 ? breakTarget : continueTarget; + var flowLabel = node.kind === 218 ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -21308,7 +21322,7 @@ var ts; preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; }); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 258; }); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -21373,13 +21387,13 @@ var ts; if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); } - if (!node.statement || node.statement.kind !== 211) { + if (!node.statement || node.statement.kind !== 212) { addAntecedent(postStatementLabel, currentFlow); currentFlow = finishFlowLabel(postStatementLabel); } } function bindDestructuringTargetFlow(node) { - if (node.kind === 193 && node.operatorToken.kind === 57) { + if (node.kind === 194 && node.operatorToken.kind === 58) { bindAssignmentTargetFlow(node.left); } else { @@ -21390,10 +21404,10 @@ var ts; if (isNarrowableReference(node)) { currentFlow = createFlowAssignment(currentFlow, node); } - else if (node.kind === 176) { + else if (node.kind === 177) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { var e = _a[_i]; - if (e.kind === 197) { + if (e.kind === 198) { bindAssignmentTargetFlow(e.expression); } else { @@ -21401,16 +21415,16 @@ var ts; } } } - else if (node.kind === 177) { + else if (node.kind === 178) { for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { var p = _c[_b]; - if (p.kind === 260) { + if (p.kind === 261) { bindDestructuringTargetFlow(p.initializer); } - else if (p.kind === 261) { + else if (p.kind === 262) { bindAssignmentTargetFlow(p.name); } - else if (p.kind === 262) { + else if (p.kind === 263) { bindAssignmentTargetFlow(p.expression); } } @@ -21418,7 +21432,7 @@ var ts; } function bindLogicalExpression(node, trueTarget, falseTarget) { var preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { bindCondition(node.left, preRightLabel, falseTarget); } else { @@ -21429,7 +21443,7 @@ var ts; bindCondition(node.right, trueTarget, falseTarget); } function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 50) { + if (node.operator === 51) { var saveTrueTarget = currentTrueTarget; currentTrueTarget = currentFalseTarget; currentFalseTarget = saveTrueTarget; @@ -21439,20 +21453,20 @@ var ts; } else { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } } function bindPostfixUnaryExpressionFlow(node) { bindEachChild(node); - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { bindAssignmentTargetFlow(node.operand); } } function bindBinaryExpressionFlow(node) { var operator = node.operatorToken.kind; - if (operator === 52 || operator === 53) { + if (operator === 53 || operator === 54) { if (isTopLevelLogicalExpression(node)) { var postExpressionLabel = createBranchLabel(); bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); @@ -21466,7 +21480,7 @@ var ts; bindEachChild(node); if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 57 && node.left.kind === 179) { + if (operator === 58 && node.left.kind === 180) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -21477,7 +21491,7 @@ var ts; } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { bindAssignmentTargetFlow(node.expression); } } @@ -21510,20 +21524,20 @@ var ts; } function bindVariableDeclarationFlow(node) { bindEachChild(node); - if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) { + if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) { bindInitializedVariableFlow(node); } } function bindJSDocComment(node) { ts.forEachChild(node, function (n) { - if (n.kind !== 289) { + if (n.kind !== 290) { bind(n); } }); } function bindJSDocTypedefTag(node) { ts.forEachChild(node, function (n) { - if (node.fullName && n === node.name && node.fullName.kind !== 70) { + if (node.fullName && n === node.name && node.fullName.kind !== 71) { return; } bind(n); @@ -21531,10 +21545,10 @@ var ts; } function bindCallExpressionFlow(node) { var expr = node.expression; - while (expr.kind === 184) { + while (expr.kind === 185) { expr = expr.expression; } - if (expr.kind === 185 || expr.kind === 186) { + if (expr.kind === 186 || expr.kind === 187) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -21542,7 +21556,7 @@ var ts; else { bindEachChild(node); } - if (node.expression.kind === 178) { + if (node.expression.kind === 179) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -21551,53 +21565,53 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 198: - case 228: - case 231: - case 177: - case 162: - case 291: - case 274: - case 253: - return 1; + case 199: case 229: - return 1 | 64; - case 278: case 232: + case 178: + case 163: + case 292: + case 275: + case 254: + return 1; case 230: - case 171: + return 1 | 64; + case 279: + case 233: + case 231: + case 172: return 1 | 32; - case 264: + case 265: return 1 | 4 | 32; - case 150: + case 151: if (ts.isObjectLiteralOrClassExpressionMethod(node)) { return 1 | 4 | 32 | 8 | 128; } - case 151: - case 227: - case 149: case 152: + case 228: + case 150: case 153: case 154: case 155: case 156: - case 159: + case 157: case 160: + case 161: return 1 | 4 | 32 | 8; - case 185: case 186: + case 187: return 1 | 4 | 32 | 8 | 16; - case 233: + case 234: return 4; - case 148: + case 149: return node.initializer ? 4 : 0; - case 259: - case 213: + case 260: case 214: case 215: - case 234: + case 216: + case 235: return 2; - case 206: + case 207: return ts.isFunctionLike(node.parent) ? 0 : 2; } return 0; @@ -21613,38 +21627,38 @@ var ts; } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 232: + case 233: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 264: + case 265: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 198: - case 228: + case 199: + case 229: return declareClassMember(node, symbolFlags, symbolExcludes); - case 231: + case 232: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 162: - case 177: - case 229: - case 274: - case 291: - case 253: + case 163: + case 178: + case 230: + case 275: + case 292: + case 254: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 159: case 160: - case 154: + case 161: case 155: case 156: - case 150: - case 149: + case 157: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: case 186: - case 278: - case 230: - case 171: + case 187: + case 279: + case 231: + case 172: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } } @@ -21659,11 +21673,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 264 ? node : node.body; - if (body && (body.kind === 264 || body.kind === 233)) { + var body = node.kind === 265 ? node : node.body; + if (body && (body.kind === 265 || body.kind === 234)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 243 || stat.kind === 242) { + if (stat.kind === 244 || stat.kind === 243) { return true; } } @@ -21746,11 +21760,11 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 || prop.name.kind !== 70) { + if (prop.kind === 263 || prop.name.kind !== 71) { continue; } var identifier = prop.name; - var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150 + var currentKind = prop.kind === 261 || prop.kind === 262 || prop.kind === 151 ? 1 : 2; var existingKind = seen.get(identifier.text); @@ -21778,10 +21792,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 232: + case 233: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 264: + case 265: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -21799,8 +21813,8 @@ var ts; } function checkStrictModeIdentifier(node) { if (inStrictMode && - node.originalKeywordKind >= 107 && - node.originalKeywordKind <= 115 && + node.originalKeywordKind >= 108 && + node.originalKeywordKind <= 116 && !ts.isIdentifierName(node) && !ts.isInAmbientContext(node)) { if (!file.parseDiagnostics.length) { @@ -21828,17 +21842,17 @@ var ts; } } function checkStrictModeDeleteExpression(node) { - if (inStrictMode && node.expression.kind === 70) { + if (inStrictMode && node.expression.kind === 71) { var span_2 = ts.getErrorSpanForNode(file, node.expression); file.bindDiagnostics.push(ts.createFileDiagnostic(file, span_2.start, span_2.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); } } function isEvalOrArgumentsIdentifier(node) { - return node.kind === 70 && + return node.kind === 71 && (node.text === "eval" || node.text === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 70) { + if (name && name.kind === 71) { var identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { var span_3 = ts.getErrorSpanForNode(file, name); @@ -21871,8 +21885,8 @@ var ts; } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2) { - if (blockScopeContainer.kind !== 264 && - blockScopeContainer.kind !== 232 && + if (blockScopeContainer.kind !== 265 && + blockScopeContainer.kind !== 233 && !ts.isFunctionLike(blockScopeContainer)) { var errorSpan = ts.getErrorSpanForNode(file, node); file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); @@ -21891,7 +21905,7 @@ var ts; } function checkStrictModePrefixUnaryExpression(node) { if (inStrictMode) { - if (node.operator === 42 || node.operator === 43) { + if (node.operator === 43 || node.operator === 44) { checkStrictModeEvalOrArguments(node, node.operand); } } @@ -21918,7 +21932,7 @@ var ts; bindJSDocTypedefTagIfAny(node); } bindWorker(node); - if (node.kind > 141) { + if (node.kind > 142) { var saveParent = parent; parent = node; var containerFlags = getContainerFlags(node); @@ -21946,7 +21960,7 @@ var ts; } for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) { var tag = _c[_b]; - if (tag.kind === 289) { + if (tag.kind === 290) { var savedParent = parent; parent = jsDoc; bind(tag); @@ -21975,26 +21989,26 @@ var ts; } function bindWorker(node) { switch (node.kind) { - case 70: + case 71: if (node.isInJSDocNamespace) { var parentNode = node.parent; - while (parentNode && parentNode.kind !== 289) { + while (parentNode && parentNode.kind !== 290) { parentNode = parentNode.parent; } bindBlockScopedDeclaration(parentNode, 524288, 793064); break; } - case 98: - if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) { + case 99: + if (currentFlow && (ts.isExpression(node) || parent.kind === 262)) { node.flowNode = currentFlow; } return checkStrictModeIdentifier(node); - case 178: + case 179: if (currentFlow && isNarrowableReference(node)) { node.flowNode = currentFlow; } break; - case 193: + case 194: var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { case 1: @@ -22018,49 +22032,49 @@ var ts; ts.Debug.fail("Unknown special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 259: + case 260: return checkStrictModeCatchClause(node); - case 187: + case 188: return checkStrictModeDeleteExpression(node); case 8: return checkStrictModeNumericLiteral(node); - case 192: + case 193: return checkStrictModePostfixUnaryExpression(node); - case 191: + case 192: return checkStrictModePrefixUnaryExpression(node); - case 219: + case 220: return checkStrictModeWithStatement(node); - case 168: + case 169: seenThisKeyword = true; return; - case 157: + case 158: return checkTypePredicate(node); - case 144: - return declareSymbolAndAddToSymbolTable(node, 262144, 530920); case 145: + return declareSymbolAndAddToSymbolTable(node, 262144, 530920); + case 146: return bindParameter(node); - case 225: - case 175: + case 226: + case 176: return bindVariableDeclarationOrBindingElement(node); + case 149: case 148: - case 147: - case 275: + case 276: return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0); - case 290: + case 291: return bindJSDocProperty(node); - case 260: case 261: + case 262: return bindPropertyOrMethodOrAccessor(node, 4, 0); - case 263: + case 264: return bindPropertyOrMethodOrAccessor(node, 8, 900095); - case 262: - case 254: + case 263: + case 255: var root = container; var hasRest = false; while (root.parent) { - if (root.kind === 177 && - root.parent.kind === 193 && - root.parent.operatorToken.kind === 57 && + if (root.kind === 178 && + root.parent.kind === 194 && + root.parent.operatorToken.kind === 58 && root.parent.left === root) { hasRest = true; break; @@ -22068,91 +22082,91 @@ var ts; root = root.parent; } return; - case 154: case 155: case 156: + case 157: return declareSymbolAndAddToSymbolTable(node, 131072, 0); + case 151: case 150: - case 149: return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263); - case 227: + case 228: return bindFunctionDeclaration(node); - case 151: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 152: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 153: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 154: return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 159: case 160: - case 278: + case 161: + case 279: return bindFunctionOrConstructorType(node); - case 162: - case 171: - case 291: - case 274: + case 163: + case 172: + case 292: + case 275: return bindAnonymousDeclaration(node, 2048, "__type"); - case 177: + case 178: return bindObjectLiteralExpression(node); - case 185: case 186: + case 187: return bindFunctionExpression(node); - case 180: + case 181: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; - case 198: - case 228: + case 199: + case 229: inStrictMode = true; return bindClassLikeDeclaration(node); - case 229: + case 230: return bindBlockScopedDeclaration(node, 64, 792968); - case 289: - if (!node.fullName || node.fullName.kind === 70) { + case 290: + if (!node.fullName || node.fullName.kind === 71) { return bindBlockScopedDeclaration(node, 524288, 793064); } break; - case 230: - return bindBlockScopedDeclaration(node, 524288, 793064); case 231: - return bindEnumDeclaration(node); + return bindBlockScopedDeclaration(node, 524288, 793064); case 232: + return bindEnumDeclaration(node); + case 233: return bindModuleDeclaration(node); - case 253: + case 254: return bindJsxAttributes(node); - case 252: + case 253: return bindJsxAttribute(node, 4, 0); - case 236: - case 239: - case 241: - case 245: + case 237: + case 240: + case 242: + case 246: return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 235: + case 236: return bindNamespaceExportDeclaration(node); - case 238: + case 239: return bindImportClause(node); - case 243: + case 244: return bindExportDeclaration(node); - case 242: + case 243: return bindExportAssignment(node); - case 264: + case 265: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 206: + case 207: if (!ts.isFunctionLike(node.parent)) { return; } - case 233: + case 234: return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { var parameterName = node.parameterName, type = node.type; - if (parameterName && parameterName.kind === 70) { + if (parameterName && parameterName.kind === 71) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 168) { + if (parameterName && parameterName.kind === 169) { seenThisKeyword = true; } bind(type); @@ -22171,7 +22185,7 @@ var ts; bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } else { - var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node) + var flags = node.kind === 243 && ts.exportAssignmentIsAlias(node) ? 8388608 : 4; declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16); @@ -22181,7 +22195,7 @@ var ts; if (node.modifiers && node.modifiers.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); } - if (node.parent.kind !== 264) { + if (node.parent.kind !== 265) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); return; } @@ -22230,9 +22244,9 @@ var ts; isNameOfExportsOrModuleExportsAliasDeclaration(node); } function isNameOfExportsOrModuleExportsAliasDeclaration(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = lookupSymbolForName(node.text); - if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) { + if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 226) { var declaration = symbol.valueDeclaration; if (declaration.initializer) { return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer); @@ -22258,16 +22272,16 @@ var ts; ts.Debug.assert(ts.isInJavaScriptFile(node)); var container = ts.getThisContainer(node, false); switch (container.kind) { - case 227: - case 185: + case 228: + case 186: container.symbol.members = container.symbol.members || ts.createMap(); declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4); break; - case 151: - case 148: - case 150: case 152: + case 149: + case 151: case 153: + case 154: var containingClass = container.parent; var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0); if (symbol) { @@ -22319,7 +22333,7 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 228) { + if (node.kind === 229) { bindBlockScopedDeclaration(node, 32, 899519); } else { @@ -22430,15 +22444,15 @@ var ts; return false; } if (currentFlow === unreachableFlow) { - var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) || - node.kind === 228 || - (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 209) || + node.kind === 229 || + (node.kind === 233 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 232 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentFlow = reportedUnreachableFlow; var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 207 || + (node.kind !== 208 || ts.getCombinedNodeFlags(node.declarationList) & 3 || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -22452,56 +22466,56 @@ var ts; function computeTransformFlagsForNode(node, subtreeFlags) { var kind = node.kind; switch (kind) { - case 180: - return computeCallExpression(node, subtreeFlags); case 181: + return computeCallExpression(node, subtreeFlags); + case 182: return computeNewExpression(node, subtreeFlags); - case 232: + case 233: return computeModuleDeclaration(node, subtreeFlags); - case 184: + case 185: return computeParenthesizedExpression(node, subtreeFlags); - case 193: + case 194: return computeBinaryExpression(node, subtreeFlags); - case 209: + case 210: return computeExpressionStatement(node, subtreeFlags); - case 145: + case 146: return computeParameter(node, subtreeFlags); - case 186: + case 187: return computeArrowFunction(node, subtreeFlags); - case 185: + case 186: return computeFunctionExpression(node, subtreeFlags); - case 227: + case 228: return computeFunctionDeclaration(node, subtreeFlags); - case 225: - return computeVariableDeclaration(node, subtreeFlags); case 226: + return computeVariableDeclaration(node, subtreeFlags); + case 227: return computeVariableDeclarationList(node, subtreeFlags); - case 207: + case 208: return computeVariableStatement(node, subtreeFlags); - case 221: + case 222: return computeLabeledStatement(node, subtreeFlags); - case 228: + case 229: return computeClassDeclaration(node, subtreeFlags); - case 198: + case 199: return computeClassExpression(node, subtreeFlags); - case 258: - return computeHeritageClause(node, subtreeFlags); case 259: + return computeHeritageClause(node, subtreeFlags); + case 260: return computeCatchClause(node, subtreeFlags); - case 200: + case 201: return computeExpressionWithTypeArguments(node, subtreeFlags); - case 151: + case 152: return computeConstructor(node, subtreeFlags); - case 148: + case 149: return computePropertyDeclaration(node, subtreeFlags); - case 150: + case 151: return computeMethod(node, subtreeFlags); - case 152: case 153: + case 154: return computeAccessor(node, subtreeFlags); - case 236: + case 237: return computeImportEquals(node, subtreeFlags); - case 178: + case 179: return computePropertyAccess(node, subtreeFlags); default: return computeOther(node, kind, subtreeFlags); @@ -22524,13 +22538,13 @@ var ts; } function isSuperOrSuperProperty(node, kind) { switch (kind) { - case 96: + case 97: return true; - case 178: case 179: + case 180: var expression = node.expression; var expressionKind = expression.kind; - return expressionKind === 96; + return expressionKind === 97; } return false; } @@ -22549,14 +22563,14 @@ var ts; var transformFlags = subtreeFlags; var operatorTokenKind = node.operatorToken.kind; var leftKind = node.left.kind; - if (operatorTokenKind === 57 && leftKind === 177) { + if (operatorTokenKind === 58 && leftKind === 178) { transformFlags |= 8 | 192 | 3072; } - else if (operatorTokenKind === 57 && leftKind === 176) { + else if (operatorTokenKind === 58 && leftKind === 177) { transformFlags |= 192 | 3072; } - else if (operatorTokenKind === 39 - || operatorTokenKind === 61) { + else if (operatorTokenKind === 40 + || operatorTokenKind === 62) { transformFlags |= 32; } node.transformFlags = transformFlags | 536870912; @@ -22591,8 +22605,8 @@ var ts; var expression = node.expression; var expressionKind = expression.kind; var expressionTransformFlags = expression.transformFlags; - if (expressionKind === 201 - || expressionKind === 183) { + if (expressionKind === 202 + || expressionKind === 184) { transformFlags |= 3; } if (expressionTransformFlags & 1024) { @@ -22635,10 +22649,10 @@ var ts; function computeHeritageClause(node, subtreeFlags) { var transformFlags = subtreeFlags; switch (node.token) { - case 84: + case 85: transformFlags |= 192; break; - case 107: + case 108: transformFlags |= 3; break; default: @@ -22794,7 +22808,7 @@ var ts; var transformFlags = subtreeFlags; var expression = node.expression; var expressionKind = expression.kind; - if (expressionKind === 96) { + if (expressionKind === 97) { transformFlags |= 16384; } node.transformFlags = transformFlags | 536870912; @@ -22877,44 +22891,44 @@ var ts; var transformFlags = subtreeFlags; var excludeFlags = 536872257; switch (kind) { - case 119: - case 190: + case 120: + case 191: transformFlags |= 8 | 16; break; - case 113: - case 111: + case 114: case 112: - case 116: - case 123: - case 75: - case 231: - case 263: - case 183: - case 201: + case 113: + case 117: + case 124: + case 76: + case 232: + case 264: + case 184: case 202: - case 130: + case 203: + case 131: transformFlags |= 3; break; - case 248: case 249: case 250: - case 10: case 251: + case 10: case 252: case 253: case 254: case 255: + case 256: transformFlags |= 4; break; - case 12: case 13: case 14: case 15: - case 195: - case 182: - case 261: - case 114: - case 203: + case 16: + case 196: + case 183: + case 262: + case 115: + case 204: transformFlags |= 192; break; case 9: @@ -22927,27 +22941,26 @@ var ts; transformFlags |= 192; } break; - case 215: + case 216: if (node.awaitModifier) { transformFlags |= 8; } transformFlags |= 192; break; - case 196: + case 197: transformFlags |= 8 | 192 | 16777216; break; - case 118: - case 132: - case 129: + case 119: case 133: - case 135: - case 121: + case 130: + case 134: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: case 157: @@ -22961,55 +22974,56 @@ var ts; case 165: case 166: case 167: - case 229: - case 230: case 168: + case 230: + case 231: case 169: case 170: case 171: case 172: + case 173: transformFlags = 3; excludeFlags = -3; break; - case 143: + case 144: transformFlags |= 2097152; if (subtreeFlags & 16384) { transformFlags |= 65536; } break; - case 197: + case 198: transformFlags |= 192 | 524288; break; - case 262: + case 263: transformFlags |= 8 | 1048576; break; - case 96: + case 97: transformFlags |= 192; break; - case 98: + case 99: transformFlags |= 16384; break; - case 173: + case 174: transformFlags |= 192 | 8388608; if (subtreeFlags & 524288) { transformFlags |= 8 | 1048576; } excludeFlags = 537396545; break; - case 174: + case 175: transformFlags |= 192 | 8388608; excludeFlags = 537396545; break; - case 175: + case 176: transformFlags |= 192; if (node.dotDotDotToken) { transformFlags |= 524288; } break; - case 146: + case 147: transformFlags |= 3 | 4096; break; - case 177: + case 178: excludeFlags = 540087617; if (subtreeFlags & 2097152) { transformFlags |= 192; @@ -23021,29 +23035,29 @@ var ts; transformFlags |= 8; } break; - case 176: - case 181: + case 177: + case 182: excludeFlags = 537396545; if (subtreeFlags & 524288) { transformFlags |= 192; } break; - case 211: case 212: case 213: case 214: + case 215: if (subtreeFlags & 4194304) { transformFlags |= 192; } break; - case 264: + case 265: if (subtreeFlags & 32768) { transformFlags |= 192; } break; - case 218: - case 216: + case 219: case 217: + case 218: transformFlags |= 33554432; break; } @@ -23051,57 +23065,57 @@ var ts; return transformFlags & ~excludeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 157 && kind <= 172) { + if (kind >= 158 && kind <= 173) { return -3; } switch (kind) { - case 180: case 181: - case 176: + case 182: + case 177: return 537396545; - case 232: + case 233: return 574674241; - case 145: + case 146: return 536872257; - case 186: + case 187: return 601249089; - case 185: - case 227: + case 186: + case 228: return 601281857; - case 226: + case 227: return 546309441; - case 228: - case 198: + case 229: + case 199: return 539358529; - case 151: - return 601015617; - case 150: case 152: + return 601015617; + case 151: case 153: + case 154: return 601015617; - case 118: - case 132: - case 129: - case 135: + case 119: case 133: - case 121: + case 130: case 136: - case 104: - case 144: - case 147: - case 149: - case 154: + case 134: + case 122: + case 137: + case 105: + case 145: + case 148: + case 150: case 155: case 156: - case 229: + case 157: case 230: + case 231: return -3; - case 177: + case 178: return 540087617; - case 259: + case 260: return 537920833; - case 173: case 174: + case 175: return 537396545; default: return 536872257; @@ -23470,12 +23484,17 @@ var ts; var typeofType = createTypeofType(); var _jsxNamespace; var _jsxFactoryEntity; + var _jsxElementPropertiesName; + var _hasComputedJsxElementPropertiesName = false; + var _jsxElementChildrenPropertyName; + var _hasComputedJsxElementChildrenPropertyName = false; var jsxTypes = ts.createMap(); var JsxNames = { JSX: "JSX", IntrinsicElements: "IntrinsicElements", ElementClass: "ElementClass", ElementAttributesPropertyNameContainer: "ElementAttributesProperty", + ElementChildrenAttributeNameContainer: "ElementChildrenAttribute", Element: "Element", IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" @@ -23504,7 +23523,7 @@ var ts; initializeTypeChecker(); return checker; function getJsxNamespace() { - if (_jsxNamespace === undefined) { + if (!_jsxNamespace) { _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); @@ -23603,7 +23622,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) { + (target.valueDeclaration.kind === 233 && source.valueDeclaration.kind !== 233))) { target.valueDeclaration = source.valueDeclaration; } ts.addRange(target.declarations, source.declarations); @@ -23706,7 +23725,7 @@ var ts; return symbol.flags & 134217728 ? symbol.checkFlags : 0; } function isGlobalSourceFile(node) { - return node.kind === 264 && !ts.isExternalOrCommonJsModule(node); + return node.kind === 265 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -23750,20 +23769,20 @@ var ts; return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile); } if (declaration.pos <= usage.pos) { - if (declaration.kind === 175) { - var errorBindingElement = ts.getAncestor(usage, 175); + if (declaration.kind === 176) { + var errorBindingElement = ts.getAncestor(usage, 176); if (errorBindingElement) { return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage); + return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 226), usage); } - else if (declaration.kind === 225) { + else if (declaration.kind === 226) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } return true; } - if (usage.parent.kind === 245) { + if (usage.parent.kind === 246) { return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); @@ -23771,17 +23790,17 @@ var ts; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { - case 207: - case 213: - case 215: + case 208: + case 214: + case 216: if (isSameScopeDescendentOf(usage, declaration, container)) { return true; } break; } switch (declaration.parent.parent.kind) { - case 214: case 215: + case 216: if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { return true; } @@ -23797,16 +23816,16 @@ var ts; return true; } var initializerOfProperty = current.parent && - current.parent.kind === 148 && + current.parent.kind === 149 && current.parent.initializer === current; if (initializerOfProperty) { if (ts.getModifierFlags(current.parent) & 32) { - if (declaration.kind === 150) { + if (declaration.kind === 151) { return true; } } else { - var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32); + var isDeclarationInstanceProperty = declaration.kind === 149 && !(ts.getModifierFlags(declaration) & 32); if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) { return true; } @@ -23827,18 +23846,18 @@ var ts; if (result = getSymbol(location.locals, name, meaning)) { var useResult = true; if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 793064 && lastLocation.kind !== 282) { + if (meaning & result.flags & 793064 && lastLocation.kind !== 283) { useResult = result.flags & 262144 ? lastLocation === location.type || - lastLocation.kind === 145 || - lastLocation.kind === 144 + lastLocation.kind === 146 || + lastLocation.kind === 145 : false; } if (meaning & 107455 && result.flags & 1) { useResult = - lastLocation.kind === 145 || + lastLocation.kind === 146 || (lastLocation === location.type && - result.valueDeclaration.kind === 145); + result.valueDeclaration.kind === 146); } } if (useResult) { @@ -23850,13 +23869,13 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 232: + case 233: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 264 || ts.isAmbientModule(location)) { + if (location.kind === 265 || ts.isAmbientModule(location)) { if (result = moduleExports.get("default")) { var localSymbol = ts.getLocalSymbolForExportDefault(result); if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { @@ -23867,7 +23886,7 @@ var ts; var moduleExport = moduleExports.get(name); if (moduleExport && moduleExport.flags === 8388608 && - ts.getDeclarationOfKind(moduleExport, 245)) { + ts.getDeclarationOfKind(moduleExport, 246)) { break; } } @@ -23875,13 +23894,13 @@ var ts; break loop; } break; - case 231: + case 232: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) { break loop; } break; + case 149: case 148: - case 147: if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -23891,9 +23910,9 @@ var ts; } } break; - case 228: - case 198: case 229: + case 199: + case 230: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = undefined; @@ -23905,7 +23924,7 @@ var ts; } break loop; } - if (location.kind === 198 && meaning & 32) { + if (location.kind === 199 && meaning & 32) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -23913,28 +23932,28 @@ var ts; } } break; - case 143: + case 144: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 229) { + if (ts.isClassLike(grandparent) || grandparent.kind === 230) { if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 227: - case 186: + case 154: + case 228: + case 187: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 185: + case 186: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; @@ -23947,8 +23966,8 @@ var ts; } } break; - case 146: - if (location.parent && location.parent.kind === 145) { + case 147: + if (location.parent && location.parent.kind === 146) { location = location.parent; } if (location.parent && ts.isClassElement(location.parent)) { @@ -23993,7 +24012,7 @@ var ts; } if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; - if (decls && decls.length === 1 && decls[0].kind === 235) { + if (decls && decls.length === 1 && decls[0].kind === 236) { error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name); } } @@ -24003,14 +24022,14 @@ var ts; function isTypeParameterSymbolDeclaredInContainer(symbol, container) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - if (decl.kind === 144 && decl.parent === container) { + if (decl.kind === 145 && decl.parent === container) { return true; } } return false; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 71 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, true); @@ -24048,10 +24067,10 @@ var ts; } function getEntityNameForExtendingInterface(node) { switch (node.kind) { - case 70: - case 178: + case 71: + case 179: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; - case 200: + case 201: ts.Debug.assert(ts.isEntityNameExpression(node.expression)); return node.expression; default: @@ -24097,7 +24116,7 @@ var ts; } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384)); - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; }); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 232) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined"); if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { if (result.flags & 2) { @@ -24116,17 +24135,17 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 236) { + if (node.kind === 237) { return node; } - return ts.findAncestor(node, function (n) { return n.kind === 237; }); + return ts.findAncestor(node, function (n) { return n.kind === 238; }); } } function getDeclarationOfAliasSymbol(symbol) { return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - if (node.moduleReference.kind === 247) { + if (node.moduleReference.kind === 248) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); @@ -24232,19 +24251,19 @@ var ts; } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) { switch (node.kind) { - case 236: + case 237: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 238: - return getTargetOfImportClause(node, dontRecursivelyResolve); case 239: + return getTargetOfImportClause(node, dontRecursivelyResolve); + case 240: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 241: + case 242: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 245: + case 246: return getTargetOfExportSpecifier(node, dontRecursivelyResolve); - case 242: + case 243: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 235: + case 236: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); } } @@ -24289,10 +24308,10 @@ var ts; links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); ts.Debug.assert(!!node); - if (node.kind === 242) { + if (node.kind === 243) { checkExpressionCached(node.expression); } - else if (node.kind === 245) { + else if (node.kind === 246) { checkExpressionCached(node.propertyName || node.name); } else if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -24301,14 +24320,14 @@ var ts; } } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { - if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { + if (entityName.kind === 71 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 70 || entityName.parent.kind === 142) { + if (entityName.kind === 71 || entityName.parent.kind === 143) { return resolveEntityName(entityName, 1920, false, dontResolveAlias); } else { - ts.Debug.assert(entityName.parent.kind === 236); + ts.Debug.assert(entityName.parent.kind === 237); return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias); } } @@ -24320,26 +24339,26 @@ var ts; return undefined; } var symbol; - if (name.kind === 70) { + if (name.kind === 71) { var message = meaning === 1920 ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(location || name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 142 || name.kind === 178) { + else if (name.kind === 143 || name.kind === 179) { var left = void 0; - if (name.kind === 142) { + if (name.kind === 143) { left = name.left; } - else if (name.kind === 178 && - (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) { + else if (name.kind === 179 && + (name.expression.kind === 185 || ts.isEntityNameExpression(name.expression))) { left = name.expression; } else { return undefined; } - var right = name.kind === 142 ? name.right : name.name; + var right = name.kind === 143 ? name.right : name.name; var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location); if (!namespace || ts.nodeIsMissing(right)) { return undefined; @@ -24355,7 +24374,7 @@ var ts; return undefined; } } - else if (name.kind === 184) { + else if (name.kind === 185) { return ts.isEntityNameExpression(name.expression) ? resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) : undefined; @@ -24371,7 +24390,7 @@ var ts; } function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) { if (isForAugmentation === void 0) { isForAugmentation = false; } - if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) { + if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 13) { return; } var moduleReferenceLiteral = moduleReferenceExpression; @@ -24552,7 +24571,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 151 && ts.nodeIsPresent(member.body)) { + if (member.kind === 152 && ts.nodeIsPresent(member.body)) { return member; } } @@ -24625,11 +24644,11 @@ var ts; } } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: if (result = callback(getSymbolOfNode(location).exports)) { return result; } @@ -24673,7 +24692,7 @@ var ts; return ts.forEachEntry(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); @@ -24705,7 +24724,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -24719,10 +24738,10 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; switch (declaration.kind) { - case 148: - case 150: - case 152: + case 149: + case 151: case 153: + case 154: continue; default: return false; @@ -24775,7 +24794,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 265 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; @@ -24809,11 +24828,11 @@ var ts; } function isEntityNameVisible(entityName, enclosingDeclaration) { var meaning; - if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { + if (entityName.parent.kind === 162 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning = 107455 | 1048576; } - else if (entityName.kind === 142 || entityName.kind === 178 || - entityName.parent.kind === 236) { + else if (entityName.kind === 143 || entityName.kind === 179 || + entityName.parent.kind === 237) { meaning = 1920; } else { @@ -24899,16 +24918,16 @@ var ts; return undefined; } if (type.flags & 1) { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } if (type.flags & 2) { - return ts.createKeywordTypeNode(135); + return ts.createKeywordTypeNode(136); } if (type.flags & 4) { - return ts.createKeywordTypeNode(132); + return ts.createKeywordTypeNode(133); } if (type.flags & 8) { - return ts.createKeywordTypeNode(121); + return ts.createKeywordTypeNode(122); } if (type.flags & 16) { var name = symbolToName(type.symbol, false); @@ -24928,22 +24947,22 @@ var ts; return ts.createTypeReferenceNode(name, undefined); } if (type.flags & 1024) { - return ts.createKeywordTypeNode(104); + return ts.createKeywordTypeNode(105); } if (type.flags & 2048) { - return ts.createKeywordTypeNode(138); + return ts.createKeywordTypeNode(139); } if (type.flags & 4096) { - return ts.createKeywordTypeNode(94); + return ts.createKeywordTypeNode(95); } if (type.flags & 8192) { - return ts.createKeywordTypeNode(129); + return ts.createKeywordTypeNode(130); } if (type.flags & 512) { - return ts.createKeywordTypeNode(136); + return ts.createKeywordTypeNode(137); } if (type.flags & 16777216) { - return ts.createKeywordTypeNode(133); + return ts.createKeywordTypeNode(134); } if (type.flags & 16384 && type.isThisType) { if (context.inObjectTypeLiteral) { @@ -24977,7 +24996,7 @@ var ts; var formattedUnionTypes = formatUnionTypes(type.types); var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes); if (unionTypeNodes && unionTypeNodes.length > 0) { - return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes); + return ts.createUnionOrIntersectionTypeNode(166, unionTypeNodes); } else { if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) { @@ -24987,7 +25006,7 @@ var ts; } } if (type.flags & 131072) { - return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types)); + return ts.createUnionOrIntersectionTypeNode(167, mapToTypeNodeArray(type.types)); } if (objectFlags & (16 | 32)) { ts.Debug.assert(!!(type.flags & 32768)); @@ -25021,8 +25040,8 @@ var ts; var typeParameterNode = typeParameterToDeclaration(typeParameter); var templateType = getTemplateTypeFromMappedType(type); var templateTypeNode = typeToTypeNodeHelper(templateType); - var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined; - var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined; + var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(131) : undefined; + var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined; return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); } function createAnonymousTypeNode(type) { @@ -25040,7 +25059,7 @@ var ts; return ts.createTypeReferenceNode(entityName, undefined); } else { - return ts.createKeywordTypeNode(118); + return ts.createKeywordTypeNode(119); } } else { @@ -25062,7 +25081,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return ts.contains(context.symbolStack, symbol); @@ -25082,11 +25101,11 @@ var ts; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var signature = resolved.callSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 159); + return signatureToSignatureDeclarationHelper(signature, 160); } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { var signature = resolved.constructSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 160); + return signatureToSignatureDeclarationHelper(signature, 161); } } var saveInObjectTypeLiteral = context.inObjectTypeLiteral; @@ -25161,11 +25180,11 @@ var ts; var typeElements = []; for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 154)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); } for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 155)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 156)); } if (resolvedType.stringIndexInfo) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0)); @@ -25185,19 +25204,19 @@ var ts; return; } var propertyName = oldDeclaration.name; - var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined; + var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : undefined; if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) { var signatures = getSignaturesOfType(propertyType, 0); for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) { var signature = signatures_1[_e]; - var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149); + var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150); methodDeclaration.name = propertyName; methodDeclaration.questionToken = optionalToken; typeElements.push(methodDeclaration); } } else { - var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118); + var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119); typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined)); } } @@ -25205,11 +25224,11 @@ var ts; } } function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) { - var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132); + var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133); var name = ts.getNameFromIndexInfo(indexInfo); var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined); var typeNode = typeToTypeNodeHelper(indexInfo.type); - return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode); + return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : undefined, [indexingParameter], typeNode); } function signatureToSignatureDeclarationHelper(signature, kind) { var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); }); @@ -25225,7 +25244,7 @@ var ts; var returnType = getReturnTypeOfSignature(signature); returnTypeNode = returnType && typeToTypeNodeHelper(returnType); } - var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined; + var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined; return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny); } function typeParameterToDeclaration(type) { @@ -25237,10 +25256,10 @@ var ts; return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode); } function symbolToParameterDeclaration(parameterSymbol) { - var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145); + var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146); var parameterType = getTypeOfSymbol(parameterSymbol); var parameterTypeNode = typeToTypeNodeHelper(parameterType); - var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer); + var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer); return parameterNode; } function symbolToName(symbol, expectsIdentifier) { @@ -25320,17 +25339,17 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) { context.encounteredError = true; } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -25381,8 +25400,8 @@ var ts; } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048) { - var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; }); - if (node.kind === 230) { + var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 168; }); + if (node.kind === 231) { return getSymbolOfNode(node); } } @@ -25390,7 +25409,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 233 && + node.parent.kind === 234 && ts.isExternalModuleAugmentation(node.parent.parent); } function literalTypeToString(type) { @@ -25402,14 +25421,14 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225) { + if (declaration.parent && declaration.parent.kind === 226) { return ts.declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 198: + case 199: return "(Anonymous class)"; - case 185: case 186: + case 187: return "(Anonymous function)"; } } @@ -25424,17 +25443,17 @@ var ts; var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { - writePunctuation(writer, 20); + writePunctuation(writer, 21); if (ts.isSingleOrDoubleQuote(firstChar)) { writer.writeStringLiteral(symbolName); } else { writer.writeSymbol(symbolName, symbol); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 22); + writePunctuation(writer, 23); writer.writeSymbol(symbolName, symbol); } } @@ -25510,7 +25529,7 @@ var ts; } else if (type.flags & 256) { buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); appendSymbolNameOnly(type.symbol, writer); } else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) { @@ -25537,28 +25556,28 @@ var ts; } else if (type.flags & 524288) { writeType(type.objectType, 64); - writePunctuation(writer, 20); - writeType(type.indexType, 0); writePunctuation(writer, 21); + writeType(type.indexType, 0); + writePunctuation(writer, 22); } else { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writeSpace(writer); - writePunctuation(writer, 23); + writePunctuation(writer, 24); writeSpace(writer); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function writeTypeList(types, delimiter) { for (var i = 0; i < types.length; i++) { if (i > 0) { - if (delimiter !== 25) { + if (delimiter !== 26) { writeSpace(writer); } writePunctuation(writer, delimiter); writeSpace(writer); } - writeType(types[i], delimiter === 25 ? 0 : 64); + writeType(types[i], delimiter === 26 ? 0 : 64); } } function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { @@ -25566,29 +25585,29 @@ var ts; buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064, 0, flags); } if (pos < end) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); writeType(typeArguments[pos], 256); pos++; while (pos < end) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); writeType(typeArguments[pos], 0); pos++; } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function writeTypeReference(type, flags) { var typeArguments = type.typeArguments || emptyArray; if (type.target === globalArrayType && !(flags & 1)) { writeType(typeArguments[0], 64); - writePunctuation(writer, 20); writePunctuation(writer, 21); + writePunctuation(writer, 22); } else if (type.target.objectFlags & 8) { - writePunctuation(writer, 20); - writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 25); writePunctuation(writer, 21); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26); + writePunctuation(writer, 22); } else { var outerTypeParameters = type.target.outerTypeParameters; @@ -25603,7 +25622,7 @@ var ts; } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent); if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { writeSymbolTypeReference(parent, typeArguments, start, i, flags); - writePunctuation(writer, 22); + writePunctuation(writer, 23); } } } @@ -25613,16 +25632,16 @@ var ts; } function writeUnionOrIntersectionType(type, flags) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } if (type.flags & 65536) { - writeTypeList(formatUnionTypes(type.types), 48); + writeTypeList(formatUnionTypes(type.types), 49); } else { - writeTypeList(type.types, 47); + writeTypeList(type.types, 48); } if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } } function writeAnonymousType(type, flags) { @@ -25641,7 +25660,7 @@ var ts; buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793064, 0, flags); } else { - writeKeyword(writer, 118); + writeKeyword(writer, 119); } } else { @@ -25662,7 +25681,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 || declaration.parent.kind === 233; + return declaration.parent.kind === 265 || declaration.parent.kind === 234; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -25671,18 +25690,18 @@ var ts; } } function writeTypeOfSymbol(type, typeFormatFlags) { - writeKeyword(writer, 102); + writeKeyword(writer, 103); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags); } function writePropertyWithModifiers(prop) { if (isReadonlySymbol(prop)) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } buildSymbolDisplay(prop, writer); if (prop.flags & 67108864) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } } function shouldAddParenthesisAroundFunctionType(callSignature, flags) { @@ -25706,55 +25725,55 @@ var ts; var resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 16); writePunctuation(writer, 17); + writePunctuation(writer, 18); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); if (parenthesizeSignature) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (parenthesizeSignature) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { if (flags & 64) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); } - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack); if (flags & 64) { - writePunctuation(writer, 19); + writePunctuation(writer, 20); } return; } } var saveInObjectTypeLiteral = inObjectTypeLiteral; inObjectTypeLiteral = true; - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); writeObjectLiteralType(resolved); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); inObjectTypeLiteral = saveInObjectTypeLiteral; } function writeObjectLiteralType(resolved) { for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, 1, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack); @@ -25768,45 +25787,45 @@ var ts; var signature = signatures_2[_f]; writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } else { writePropertyWithModifiers(p); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(t, 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } } function writeMappedType(type) { - writePunctuation(writer, 16); + writePunctuation(writer, 17); writer.writeLine(); writer.increaseIndent(); if (type.declaration.readonlyToken) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); appendSymbolNameOnly(getTypeParameterFromMappedType(type).symbol, writer); writeSpace(writer); - writeKeyword(writer, 91); + writeKeyword(writer, 92); writeSpace(writer); writeType(getConstraintTypeFromMappedType(type), 0); - writePunctuation(writer, 21); + writePunctuation(writer, 22); if (type.declaration.questionToken) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); writeType(getTemplateTypeFromMappedType(type), 0); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); writer.decreaseIndent(); - writePunctuation(writer, 17); + writePunctuation(writer, 18); } } function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration, flags) { @@ -25820,14 +25839,14 @@ var ts; var constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); - writeKeyword(writer, 84); + writeKeyword(writer, 85); writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } var defaultType = getDefaultFromTypeParameter(tp); if (defaultType) { writeSpace(writer); - writePunctuation(writer, 57); + writePunctuation(writer, 58); writeSpace(writer); buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); } @@ -25835,7 +25854,7 @@ var ts; function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { var parameterNode = p.valueDeclaration; if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } if (parameterNode && ts.isBindingPattern(parameterNode.name)) { buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); @@ -25844,9 +25863,9 @@ var ts; appendSymbolNameOnly(p, writer); } if (parameterNode && isOptionalParameter(parameterNode)) { - writePunctuation(writer, 54); + writePunctuation(writer, 55); } - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); var type = getTypeOfSymbol(p); if (parameterNode && isRequiredInitializedParameter(parameterNode)) { @@ -25855,29 +25874,29 @@ var ts; buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack); } function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { - if (bindingPattern.kind === 173) { - writePunctuation(writer, 16); - buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + if (bindingPattern.kind === 174) { writePunctuation(writer, 17); + buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + writePunctuation(writer, 18); } - else if (bindingPattern.kind === 174) { - writePunctuation(writer, 20); + else if (bindingPattern.kind === 175) { + writePunctuation(writer, 21); var elements = bindingPattern.elements; buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); if (elements && elements.hasTrailingComma) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); } - writePunctuation(writer, 21); + writePunctuation(writer, 22); } } function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isOmittedExpression(bindingElement)) { return; } - ts.Debug.assert(bindingElement.kind === 175); + ts.Debug.assert(bindingElement.kind === 176); if (bindingElement.propertyName) { writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName)); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); } if (ts.isBindingPattern(bindingElement.name)) { @@ -25885,22 +25904,22 @@ var ts; } else { if (bindingElement.dotDotDotToken) { - writePunctuation(writer, 23); + writePunctuation(writer, 24); } appendSymbolNameOnly(bindingElement.symbol, writer); } } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForCommaSeparatedList(list, writer, action) { for (var i = 0; i < list.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } action(list[i]); @@ -25908,42 +25927,42 @@ var ts; } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26); + writePunctuation(writer, 27); var flags = 256; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); flags = 0; } buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags); } - writePunctuation(writer, 28); + writePunctuation(writer, 29); } } function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 18); + writePunctuation(writer, 19); if (thisParameter) { buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); } for (var i = 0; i < parameters.length; i++) { if (i > 0 || thisParameter) { - writePunctuation(writer, 25); + writePunctuation(writer, 26); writeSpace(writer); } buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); } - writePunctuation(writer, 19); + writePunctuation(writer, 20); } function buildTypePredicateDisplay(predicate, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isIdentifierTypePredicate(predicate)) { writer.writeParameter(predicate.parameterName); } else { - writeKeyword(writer, 98); + writeKeyword(writer, 99); } writeSpace(writer); - writeKeyword(writer, 125); + writeKeyword(writer, 126); writeSpace(writer); buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack); } @@ -25954,10 +25973,10 @@ var ts; } if (flags & 8) { writeSpace(writer); - writePunctuation(writer, 35); + writePunctuation(writer, 36); } else { - writePunctuation(writer, 55); + writePunctuation(writer, 56); } writeSpace(writer); if (signature.typePredicate) { @@ -25969,7 +25988,7 @@ var ts; } function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, kind, symbolStack) { if (kind === 1) { - writeKeyword(writer, 93); + writeKeyword(writer, 94); writeSpace(writer); } if (signature.target && (flags & 32)) { @@ -25984,26 +26003,26 @@ var ts; function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) { if (info) { if (info.isReadonly) { - writeKeyword(writer, 130); + writeKeyword(writer, 131); writeSpace(writer); } - writePunctuation(writer, 20); + writePunctuation(writer, 21); writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); - writePunctuation(writer, 55); + writePunctuation(writer, 56); writeSpace(writer); switch (kind) { case 1: - writeKeyword(writer, 132); + writeKeyword(writer, 133); break; case 0: - writeKeyword(writer, 135); + writeKeyword(writer, 136); break; } - writePunctuation(writer, 21); - writePunctuation(writer, 55); + writePunctuation(writer, 22); + writePunctuation(writer, 56); writeSpace(writer); buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack); - writePunctuation(writer, 24); + writePunctuation(writer, 25); writer.writeLine(); } } @@ -26032,63 +26051,63 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 175: + case 176: return isDeclarationVisible(node.parent.parent); - case 225: + case 226: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 232: - case 228: + case 233: case 229: case 230: - case 227: case 231: - case 236: + case 228: + case 232: + case 237: if (ts.isExternalModuleAugmentation(node)) { return true; } var parent = getDeclarationContainer(node); if (!(ts.getCombinedModifierFlags(node) & 1) && - !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) { + !(node.kind !== 237 && parent.kind !== 265 && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); + case 149: case 148: - case 147: - case 152: case 153: + case 154: + case 151: case 150: - case 149: if (ts.getModifierFlags(node) & (8 | 16)) { return false; } - case 151: - case 155: - case 154: + case 152: case 156: - case 145: - case 233: - case 159: + case 155: + case 157: + case 146: + case 234: case 160: - case 162: - case 158: + case 161: case 163: + case 159: case 164: case 165: case 166: case 167: + case 168: return isDeclarationVisible(node.parent); - case 238: case 239: - case 241: + case 240: + case 242: return false; - case 144: - case 264: - case 235: + case 145: + case 265: + case 236: return true; - case 242: + case 243: return false; default: return false; @@ -26097,10 +26116,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 242) { + if (node.parent && node.parent.kind === 243) { exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 245) { + else if (node.parent.kind === 246) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -26177,12 +26196,12 @@ var ts; function getDeclarationContainer(node) { node = ts.findAncestor(ts.getRootDeclaration(node), function (node) { switch (node.kind) { - case 225: case 226: + case 227: + case 242: case 241: case 240: case 239: - case 238: return false; default: return true; @@ -26206,7 +26225,7 @@ var ts; return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false); } function isComputedNonLiteralName(name) { - return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression); + return name.kind === 144 && !ts.isStringOrNumericLiteral(name.expression); } function getRestType(source, properties, symbol) { source = filterType(source, function (t) { return !(t.flags & 6144); }); @@ -26248,7 +26267,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 173) { + if (pattern.kind === 174) { if (declaration.dotDotDotToken) { if (!isValidSpreadType(parentType)) { error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types); @@ -26318,11 +26337,11 @@ var ts; } function isNullOrUndefined(node) { var expr = ts.skipParentheses(node); - return expr.kind === 94 || expr.kind === 70 && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 95 || expr.kind === 71 && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral(node) { var expr = ts.skipParentheses(node); - return expr.kind === 176 && expr.elements.length === 0; + return expr.kind === 177 && expr.elements.length === 0; } function addOptionality(type, optional) { return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type; @@ -26334,11 +26353,11 @@ var ts; return type; } } - if (declaration.parent.parent.kind === 214) { + if (declaration.parent.parent.kind === 215) { var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression)); return indexType.flags & (16384 | 262144) ? indexType : stringType; } - if (declaration.parent.parent.kind === 215) { + if (declaration.parent.parent.kind === 216) { var forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType; } @@ -26350,7 +26369,7 @@ var ts; return addOptionality(declaredType, declaration.questionToken && includeOptionality); } if ((noImplicitAny || declaration.flags & 65536) && - declaration.kind === 225 && !ts.isBindingPattern(declaration.name) && + declaration.kind === 226 && !ts.isBindingPattern(declaration.name) && !(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) { if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) { return autoType; @@ -26359,10 +26378,10 @@ var ts; return autoArrayType; } } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var func = declaration.parent; - if (func.kind === 153 && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152); + if (func.kind === 154 && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 153); if (getter) { var getterSignature = getSignatureFromDeclaration(getter); var thisParameter = getAccessorThisParameter(func); @@ -26391,7 +26410,7 @@ var ts; if (ts.isJsxAttribute(declaration)) { return trueType; } - if (declaration.kind === 261) { + if (declaration.kind === 262) { return checkIdentifier(declaration.name); } if (ts.isBindingPattern(declaration.name)) { @@ -26405,14 +26424,14 @@ var ts; var definedInMethod = false; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - var expression = declaration.kind === 193 ? declaration : - declaration.kind === 178 ? ts.getAncestor(declaration, 193) : + var expression = declaration.kind === 194 ? declaration : + declaration.kind === 179 ? ts.getAncestor(declaration, 194) : undefined; if (!expression) { return unknownType; } - if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) { - if (ts.getThisContainer(expression, false).kind === 151) { + if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 99) { + if (ts.getThisContainer(expression, false).kind === 152) { definedInConstructor = true; } else { @@ -26487,7 +26506,7 @@ var ts; return result; } function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { - return pattern.kind === 173 + return pattern.kind === 174 ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } @@ -26497,7 +26516,7 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - if (declaration.kind === 260) { + if (declaration.kind === 261) { return type; } return getWidenedType(type); @@ -26512,7 +26531,7 @@ var ts; } function declarationBelongsToPrivateAmbientMember(declaration) { var root = ts.getRootDeclaration(declaration); - var memberDeclaration = root.kind === 145 ? root.parent : root; + var memberDeclaration = root.kind === 146 ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -26525,18 +26544,18 @@ var ts; if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) { return links.type = anyType; } - if (declaration.kind === 242) { + if (declaration.kind === 243) { return links.type = checkExpression(declaration.expression); } - if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) { + if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) { return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } if (!pushTypeResolution(symbol, 0)) { return unknownType; } var type = void 0; - if (declaration.kind === 193 || - declaration.kind === 178 && declaration.parent.kind === 193) { + if (declaration.kind === 194 || + declaration.kind === 179 && declaration.parent.kind === 194) { type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol); } else { @@ -26551,7 +26570,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 152) { + if (accessor.kind === 153) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -26571,8 +26590,8 @@ var ts; function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - var getter = ts.getDeclarationOfKind(symbol, 152); - var setter = ts.getDeclarationOfKind(symbol, 153); + var getter = ts.getDeclarationOfKind(symbol, 153); + var setter = ts.getDeclarationOfKind(symbol, 154); if (getter && getter.flags & 65536) { var jsDocType = getTypeForDeclarationFromJSDocComment(getter); if (jsDocType) { @@ -26613,7 +26632,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 152); + var getter_1 = ts.getDeclarationOfKind(symbol, 153); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -26754,9 +26773,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 228 || node.kind === 198 || - node.kind === 227 || node.kind === 185 || - node.kind === 150 || node.kind === 186) { + if (node.kind === 229 || node.kind === 199 || + node.kind === 228 || node.kind === 186 || + node.kind === 151 || node.kind === 187) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -26765,15 +26784,15 @@ var ts; } } function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229); + var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 230); return appendOuterTypeParameters(undefined, declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 229 || node.kind === 228 || - node.kind === 198 || node.kind === 230) { + if (node.kind === 230 || node.kind === 229 || + node.kind === 199 || node.kind === 231) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -26929,7 +26948,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 230 && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -26958,7 +26977,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229) { + if (declaration.kind === 230) { if (declaration.flags & 64) { return false; } @@ -27008,7 +27027,7 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 289); + var declaration = ts.getDeclarationOfKind(symbol, 290); var type = void 0; if (declaration) { if (declaration.jsDocTypeLiteral) { @@ -27019,7 +27038,7 @@ var ts; } } else { - declaration = ts.getDeclarationOfKind(symbol, 230); + declaration = ts.getDeclarationOfKind(symbol, 231); type = getTypeFromTypeNode(declaration.type); } if (popTypeResolution()) { @@ -27044,14 +27063,14 @@ var ts; return !ts.isInAmbientContext(member); } return expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8 || - expr.kind === 70 && !!symbol.exports.get(expr.text); + expr.kind === 71 && !!symbol.exports.get(expr.text); } function enumHasLiteralMembers(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; if (!isLiteralEnumMember(symbol, member)) { @@ -27079,7 +27098,7 @@ var ts; var memberTypes = []; for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231) { + if (declaration.kind === 232) { computeEnumMemberValues(declaration); for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; @@ -27162,21 +27181,21 @@ var ts; } function isIndependentType(node) { switch (node.kind) { - case 118: - case 135: - case 132: - case 121: + case 119: case 136: case 133: - case 104: - case 138: - case 94: - case 129: - case 172: + case 122: + case 137: + case 134: + case 105: + case 139: + case 95: + case 130: + case 173: return true; - case 163: + case 164: return isIndependentType(node.elementType); - case 158: + case 159: return isIndependentTypeReference(node); } return false; @@ -27185,7 +27204,7 @@ var ts; return node.type && isIndependentType(node.type) || !node.type && !node.initializer; } function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -27201,12 +27220,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { + case 149: case 148: - case 147: return isIndependentVariableLikeDeclaration(declaration); - case 150: - case 149: case 151: + case 150: + case 152: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -27542,7 +27561,7 @@ var ts; var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); var templateReadonly = !!type.declaration.readonlyToken; var templateOptional = !!type.declaration.questionToken; - if (type.declaration.typeParameter.constraint.kind === 169) { + if (type.declaration.typeParameter.constraint.kind === 170) { for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) { var propertySymbol = _a[_i]; addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol); @@ -27595,7 +27614,7 @@ var ts; function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { var constraintDeclaration = type.declaration.typeParameter.constraint; - if (constraintDeclaration.kind === 169) { + if (constraintDeclaration.kind === 170) { type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper); } else { @@ -27960,7 +27979,7 @@ var ts; } function isJSDocOptionalParameter(node) { if (node.flags & 65536) { - if (node.type && node.type.kind === 277) { + if (node.type && node.type.kind === 278) { return true; } var paramTags = ts.getJSDocParameterTags(node); @@ -27971,7 +27990,7 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 277; + return paramTag.typeExpression.type.kind === 278; } } } @@ -28004,7 +28023,7 @@ var ts; return false; } function createTypePredicateFromTypePredicateNode(node) { - if (node.parameterName.kind === 70) { + if (node.parameterName.kind === 71) { var parameterName = node.parameterName; return { kind: 1, @@ -28077,7 +28096,7 @@ var ts; else { parameters.push(paramSymbol); } - if (param.type && param.type.kind === 172) { + if (param.type && param.type.kind === 173) { hasLiteralTypes = true; } var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken || @@ -28088,23 +28107,23 @@ var ts; minArgumentCount = parameters.length; } } - if ((declaration.kind === 152 || declaration.kind === 153) && + if ((declaration.kind === 153 || declaration.kind === 154) && !ts.hasDynamicName(declaration) && (!hasThisParameter || !thisParameter)) { - var otherKind = declaration.kind === 152 ? 153 : 152; + var otherKind = declaration.kind === 153 ? 154 : 153; var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - var classType = declaration.kind === 151 ? + var classType = declaration.kind === 152 ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : getTypeParametersFromJSDocTemplate(declaration); var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType); - var typePredicate = declaration.type && declaration.type.kind === 157 ? + var typePredicate = declaration.type && declaration.type.kind === 158 ? createTypePredicateFromTypePredicateNode(declaration.type) : undefined; links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); @@ -28127,8 +28146,8 @@ var ts; return type; } } - if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 153); + if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 154); return getAnnotatedAccessorType(setter); } if (ts.nodeIsMissing(declaration.body)) { @@ -28150,13 +28169,13 @@ var ts; if (!node) return false; switch (node.kind) { - case 70: + case 71: return node.text === "arguments" && ts.isPartOfExpression(node); - case 148: - case 150: - case 152: + case 149: + case 151: case 153: - return node.name.kind === 143 + case 154: + return node.name.kind === 144 && traverse(node.name); default: return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse); @@ -28170,20 +28189,20 @@ var ts; for (var i = 0; i < symbol.declarations.length; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 278: + case 187: + case 279: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -28273,7 +28292,7 @@ var ts; } function getOrCreateTypeFromSignature(signature) { if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155; + var isConstructor = signature.declaration.kind === 152 || signature.declaration.kind === 156; var type = createObjectType(16); type.members = emptySymbols; type.properties = emptyArray; @@ -28287,7 +28306,7 @@ var ts; return symbol.members.get("__index"); } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 ? 132 : 135; + var syntaxKind = kind === 1 ? 133 : 136; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -28314,7 +28333,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 144).constraint; + return ts.getDeclarationOfKind(type.symbol, 145).constraint; } function getConstraintFromTypeParameter(typeParameter) { if (!typeParameter.constraint) { @@ -28330,7 +28349,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 145).parent); } function getTypeListId(types) { var result = ""; @@ -28450,11 +28469,11 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 158: + case 159: return node.typeName; - case 276: + case 277: return node.name; - case 200: + case 201: var expr = node.expression; if (ts.isEntityNameExpression(expr)) { return expr; @@ -28478,7 +28497,7 @@ var ts; if (symbol.flags & 524288) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 && node.kind === 276) { + if (symbol.flags & 107455 && node.kind === 277) { return getTypeOfSymbol(symbol); } return getTypeFromNonGenericTypeReference(node, symbol); @@ -28520,7 +28539,7 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 276) { + if (node.kind === 277) { type = getPrimitiveTypeFromJSDocTypeReference(node); if (!type) { var typeReferenceName = getTypeReferenceName(node); @@ -28529,7 +28548,7 @@ var ts; } } else { - var typeNameOrExpression = node.kind === 158 + var typeNameOrExpression = node.kind === 159 ? node.typeName : ts.isEntityNameExpression(node.expression) ? node.expression @@ -28558,9 +28577,9 @@ var ts; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var declaration = declarations_4[_i]; switch (declaration.kind) { - case 228: case 229: - case 231: + case 230: + case 232: return declaration; } } @@ -28986,7 +29005,7 @@ var ts; return type; } function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; var propName = indexType.flags & (32 | 64 | 256) ? indexType.text : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ? @@ -29034,7 +29053,7 @@ var ts; } } if (accessNode) { - var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType; + var indexNode = accessNode.kind === 180 ? accessNode.argumentExpression : accessNode.indexType; if (indexType.flags & (32 | 64)) { error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType)); } @@ -29049,7 +29068,7 @@ var ts; return anyType; } function getIndexedAccessForMappedType(type, indexType, accessNode) { - var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined; if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) { error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type)); return unknownType; @@ -29060,7 +29079,7 @@ var ts; } function getIndexedAccessType(objectType, indexType, accessNode) { if (maybeTypeOfKind(indexType, 540672 | 262144) || - maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) || + maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 180) || isGenericMappedType(objectType)) { if (objectType.flags & 1) { return objectType; @@ -29126,7 +29145,7 @@ var ts; return links.resolvedType; } function getAliasSymbolForTypeNode(node) { - return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined; + return node.parent.kind === 231 ? getSymbolOfNode(node.parent) : undefined; } function getAliasTypeArgumentsForTypeNode(node) { var symbol = getAliasSymbolForTypeNode(node); @@ -29269,9 +29288,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 229)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 230)) { if (!(ts.getModifierFlags(container) & 32) && - (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) { + (container.kind !== 152 || ts.isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -29287,83 +29306,83 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 118: - case 267: + case 119: case 268: + case 269: return anyType; - case 135: + case 136: return stringType; - case 132: + case 133: return numberType; - case 121: + case 122: return booleanType; - case 136: + case 137: return esSymbolType; - case 104: + case 105: return voidType; - case 138: + case 139: return undefinedType; - case 94: + case 95: return nullType; - case 129: + case 130: return neverType; - case 133: + case 134: return nonPrimitiveType; - case 168: - case 98: + case 169: + case 99: return getTypeFromThisTypeNode(node); - case 172: + case 173: return getTypeFromLiteralTypeNode(node); - case 292: + case 293: return getTypeFromLiteralTypeNode(node.literal); - case 158: - case 276: + case 159: + case 277: return getTypeFromTypeReference(node); - case 157: + case 158: return booleanType; - case 200: + case 201: return getTypeFromTypeReference(node); - case 161: + case 162: return getTypeFromTypeQueryNode(node); - case 163: - case 269: - return getTypeFromArrayTypeNode(node); case 164: - return getTypeFromTupleTypeNode(node); - case 165: case 270: - return getTypeFromUnionTypeNode(node); + return getTypeFromArrayTypeNode(node); + case 165: + return getTypeFromTupleTypeNode(node); case 166: - return getTypeFromIntersectionTypeNode(node); - case 272: - return getTypeFromJSDocNullableTypeNode(node); + case 271: + return getTypeFromUnionTypeNode(node); case 167: + return getTypeFromIntersectionTypeNode(node); case 273: - case 280: + return getTypeFromJSDocNullableTypeNode(node); + case 168: + case 274: case 281: - case 277: + case 282: + case 278: return getTypeFromTypeNode(node.type); - case 274: + case 275: return getTypeFromTypeNode(node.literal); - case 159: case 160: - case 162: - case 291: - case 278: + case 161: + case 163: + case 292: + case 279: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 169: - return getTypeFromTypeOperatorNode(node); case 170: - return getTypeFromIndexedAccessTypeNode(node); + return getTypeFromTypeOperatorNode(node); case 171: + return getTypeFromIndexedAccessTypeNode(node); + case 172: return getTypeFromMappedTypeNode(node); - case 70: - case 142: + case 71: + case 143: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 271: + case 272: return getTypeFromJSDocTupleType(node); - case 279: + case 280: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -29553,27 +29572,27 @@ var ts; } var mappedTypes = mapper.mappedTypes; return !!ts.findAncestor(symbol.declarations[0], function (node) { - if (node.kind === 232 || node.kind === 264) { + if (node.kind === 233 || node.kind === 265) { return "quit"; } switch (node.kind) { - case 159: case 160: - case 227: - case 150: - case 149: + case 161: + case 228: case 151: - case 154: + case 150: + case 152: case 155: case 156: - case 152: + case 157: case 153: - case 185: + case 154: case 186: - case 228: - case 198: + case 187: case 229: + case 199: case 230: + case 231: var declaration = node; if (declaration.typeParameters) { for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { @@ -29583,19 +29602,19 @@ var ts; } } } - if (ts.isClassLike(node) || node.kind === 229) { + if (ts.isClassLike(node) || node.kind === 230) { var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; if (thisType && ts.contains(mappedTypes, thisType)) { return true; } } break; - case 171: + case 172: if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) { return true; } break; - case 278: + case 279: var func = node; for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) { var p = _c[_b]; @@ -29610,7 +29629,7 @@ var ts; function isTopLevelTypeAlias(symbol) { if (symbol.declarations && symbol.declarations.length) { var parentKind = symbol.declarations[0].parent.kind; - return parentKind === 264 || parentKind === 233; + return parentKind === 265 || parentKind === 234; } return false; } @@ -29662,33 +29681,33 @@ var ts; return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 185: case 186: + case 187: return isContextSensitiveFunctionLikeDeclaration(node); - case 177: + case 178: return ts.forEach(node.properties, isContextSensitive); - case 176: + case 177: return ts.forEach(node.elements, isContextSensitive); - case 194: + case 195: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 193: - return node.operatorToken.kind === 53 && + case 194: + return node.operatorToken.kind === 54 && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 260: + case 261: return isContextSensitive(node.initializer); + case 151: case 150: - case 149: return isContextSensitiveFunctionLikeDeclaration(node); - case 184: + case 185: return isContextSensitive(node.expression); - case 253: + case 254: return ts.forEach(node.properties, isContextSensitive); - case 252: + case 253: return node.initializer && isContextSensitive(node.initializer); - case 255: + case 256: return node.expression && isContextSensitive(node.expression); } return false; @@ -29700,7 +29719,7 @@ var ts; if (ts.forEach(node.parameters, function (p) { return !p.type; })) { return true; } - if (node.kind === 186) { + if (node.kind === 187) { return false; } var parameter = ts.firstOrUndefined(node.parameters); @@ -30187,7 +30206,7 @@ var ts; if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) { if (reportErrors) { ts.Debug.assert(!!errorNode); - if (ts.isJsxAttributes(errorNode)) { + if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode)) { reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); } else { @@ -31149,25 +31168,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { + case 149: case 148: - case 147: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 145: + case 146: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 175: + case 176: diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; break; - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: - case 185: + case 154: case 186: + case 187: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -31584,17 +31603,17 @@ var ts; return links.resolvedSymbol; } function isInTypeQuery(node) { - return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; }); + return !!ts.findAncestor(node, function (n) { return n.kind === 162 ? true : n.kind === 71 || n.kind === 143 ? false : "quit"; }); } function getFlowCacheKey(node) { - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; } - if (node.kind === 98) { + if (node.kind === 99) { return "0"; } - if (node.kind === 178) { + if (node.kind === 179) { var key = getFlowCacheKey(node.expression); return key && key + "." + node.name.text; } @@ -31602,33 +31621,33 @@ var ts; } function getLeftmostIdentifierOrThis(node) { switch (node.kind) { - case 70: - case 98: + case 71: + case 99: return node; - case 178: + case 179: return getLeftmostIdentifierOrThis(node.expression); } return undefined; } function isMatchingReference(source, target) { switch (source.kind) { - case 70: - return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) || - (target.kind === 225 || target.kind === 175) && + case 71: + return target.kind === 71 && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 226 || target.kind === 176) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); - case 98: - return target.kind === 98; - case 96: - return target.kind === 96; - case 178: - return target.kind === 178 && + case 99: + return target.kind === 99; + case 97: + return target.kind === 97; + case 179: + return target.kind === 179 && source.name.text === target.name.text && isMatchingReference(source.expression, target.expression); } return false; } function containsMatchingReference(source, target) { - while (source.kind === 178) { + while (source.kind === 179) { source = source.expression; if (isMatchingReference(source, target)) { return true; @@ -31637,15 +31656,15 @@ var ts; return false; } function containsMatchingReferenceDiscriminant(source, target) { - return target.kind === 178 && + return target.kind === 179 && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); } function getDeclaredTypeOfReference(expr) { - if (expr.kind === 70) { + if (expr.kind === 71) { return getTypeOfSymbol(getResolvedSymbol(expr)); } - if (expr.kind === 178) { + if (expr.kind === 179) { var type = getDeclaredTypeOfReference(expr.expression); return type && getTypeOfPropertyOfType(type, expr.name.text); } @@ -31675,7 +31694,7 @@ var ts; } } } - if (callExpression.expression.kind === 178 && + if (callExpression.expression.kind === 179 && isOrContainsMatchingReference(reference, callExpression.expression.expression)) { return true; } @@ -31803,15 +31822,15 @@ var ts; return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType); } function getAssignedTypeOfBinaryExpression(node) { - var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) || - node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent); + var isDestructuringDefaultAssignment = node.parent.kind === 177 && isDestructuringAssignmentTarget(node.parent) || + node.parent.kind === 261 && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 193 && parent.parent.left === parent || - parent.parent.kind === 215 && parent.parent.initializer === parent; + return parent.parent.kind === 194 && parent.parent.left === parent || + parent.parent.kind === 216 && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); @@ -31828,21 +31847,21 @@ var ts; function getAssignedType(node) { var parent = node.parent; switch (parent.kind) { - case 214: - return stringType; case 215: + return stringType; + case 216: return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType; - case 193: + case 194: return getAssignedTypeOfBinaryExpression(parent); - case 187: + case 188: return undefinedType; - case 176: + case 177: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 197: + case 198: return getAssignedTypeOfSpreadExpression(parent); - case 260: - return getAssignedTypeOfPropertyAssignment(parent); case 261: + return getAssignedTypeOfPropertyAssignment(parent); + case 262: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return unknownType; @@ -31850,7 +31869,7 @@ var ts; function getInitialTypeOfBindingElement(node) { var pattern = node.parent; var parentType = getInitialType(pattern.parent); - var type = pattern.kind === 173 ? + var type = pattern.kind === 174 ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : @@ -31865,39 +31884,39 @@ var ts; if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 214) { + if (node.parent.parent.kind === 215) { return stringType; } - if (node.parent.parent.kind === 215) { + if (node.parent.parent.kind === 216) { return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType; } return unknownType; } function getInitialType(node) { - return node.kind === 225 ? + return node.kind === 226 ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function getInitialOrAssignedType(node) { - return node.kind === 225 || node.kind === 175 ? + return node.kind === 226 || node.kind === 176 ? getInitialType(node) : getAssignedType(node); } function isEmptyArrayAssignment(node) { - return node.kind === 225 && node.initializer && + return node.kind === 226 && node.initializer && isEmptyArrayLiteral(node.initializer) || - node.kind !== 175 && node.parent.kind === 193 && + node.kind !== 176 && node.parent.kind === 194 && isEmptyArrayLiteral(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 184: + case 185: return getReferenceCandidate(node.expression); - case 193: + case 194: switch (node.operatorToken.kind) { - case 57: + case 58: return getReferenceCandidate(node.left); - case 25: + case 26: return getReferenceCandidate(node.right); } } @@ -31905,13 +31924,13 @@ var ts; } function getReferenceRoot(node) { var parent = node.parent; - return parent.kind === 184 || - parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node || - parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ? + return parent.kind === 185 || + parent.kind === 194 && parent.operatorToken.kind === 58 && parent.left === node || + parent.kind === 194 && parent.operatorToken.kind === 26 && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 256) { + if (clause.kind === 257) { var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); return isUnitType(caseType) ? caseType : undefined; } @@ -32053,12 +32072,12 @@ var ts; function isEvolvingArrayOperationTarget(node) { var root = getReferenceRoot(node); var parent = root.parent; - var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" || - parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name)); - var isElementAssignment = parent.kind === 179 && + var isLengthPushOrUnshift = parent.kind === 179 && (parent.name.text === "length" || + parent.parent.kind === 181 && ts.isPushOrUnshiftIdentifier(parent.name)); + var isElementAssignment = parent.kind === 180 && parent.expression === root && - parent.parent.kind === 193 && - parent.parent.operatorToken.kind === 57 && + parent.parent.kind === 194 && + parent.parent.operatorToken.kind === 58 && parent.parent.left === parent && !ts.isAssignmentTarget(parent.parent) && isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048); @@ -32072,7 +32091,7 @@ var ts; return links.maybeTypePredicate; } function getMaybeTypePredicate(node) { - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { var funcType = checkNonNullExpression(node.expression); if (funcType !== silentNeverType) { var apparentType = getApparentType(funcType); @@ -32094,7 +32113,7 @@ var ts; var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode)); visitedFlowCount = visitedFlowStart; var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType); - if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) { + if (reference.parent.kind === 203 && getTypeWithFacts(resultType, 524288).flags & 8192) { return declaredType; } return resultType; @@ -32148,7 +32167,7 @@ var ts; } else if (flow.flags & 2) { var container = flow.container; - if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) { + if (container && container !== flowContainer && reference.kind !== 179 && reference.kind !== 99) { flow = container.flowNode; continue; } @@ -32191,7 +32210,7 @@ var ts; } function getTypeAtFlowArrayMutation(flow) { var node = flow.node; - var expr = node.kind === 180 ? + var expr = node.kind === 181 ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { @@ -32199,7 +32218,7 @@ var ts; var type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256) { var evolvedType_1 = type; - if (node.kind === 180) { + if (node.kind === 181) { for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) { var arg = _a[_i]; evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg); @@ -32323,7 +32342,7 @@ var ts; return result; } function isMatchingReferenceDiscriminant(expr) { - return expr.kind === 178 && + return expr.kind === 179 && declaredType.flags & 65536 && isMatchingReference(reference, expr.expression) && isDiscriminantProperty(declaredType, expr.name.text); @@ -32348,19 +32367,19 @@ var ts; } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { - case 57: + case 58: return narrowTypeByTruthiness(type, expr.left, assumeTrue); - case 31: case 32: case 33: case 34: + case 35: var operator_1 = expr.operatorToken.kind; var left_1 = getReferenceCandidate(expr.left); var right_1 = getReferenceCandidate(expr.right); - if (left_1.kind === 188 && right_1.kind === 9) { + if (left_1.kind === 189 && right_1.kind === 9) { return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); } - if (right_1.kind === 188 && left_1.kind === 9) { + if (right_1.kind === 189 && left_1.kind === 9) { return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); } if (isMatchingReference(reference, left_1)) { @@ -32379,9 +32398,9 @@ var ts; return declaredType; } break; - case 92: + case 93: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 25: + case 26: return narrowType(type, expr.right, assumeTrue); } return type; @@ -32390,7 +32409,7 @@ var ts; if (type.flags & 1) { return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } var valueType = getTypeOfExpression(value); @@ -32398,10 +32417,10 @@ var ts; if (!strictNullChecks) { return type; } - var doubleEquals = operator === 31 || operator === 32; + var doubleEquals = operator === 32 || operator === 33; var facts = doubleEquals ? assumeTrue ? 65536 : 524288 : - value.kind === 94 ? + value.kind === 95 ? assumeTrue ? 32768 : 262144 : assumeTrue ? 16384 : 131072; return getTypeWithFacts(type, facts); @@ -32427,7 +32446,7 @@ var ts; } return type; } - if (operator === 32 || operator === 34) { + if (operator === 33 || operator === 35) { assumeTrue = !assumeTrue; } if (assumeTrue && !(type.flags & 65536)) { @@ -32533,7 +32552,7 @@ var ts; return type; } if (ts.isIdentifierTypePredicate(predicate)) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + var predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)]; if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); @@ -32545,7 +32564,7 @@ var ts; } else { var invokedExpression = ts.skipParentheses(callExpression.expression); - if (invokedExpression.kind === 179 || invokedExpression.kind === 178) { + if (invokedExpression.kind === 180 || invokedExpression.kind === 179) { var accessExpression = invokedExpression; var possibleReference = ts.skipParentheses(accessExpression.expression); if (isMatchingReference(reference, possibleReference)) { @@ -32560,19 +32579,19 @@ var ts; } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 70: - case 98: - case 96: - case 178: + case 71: + case 99: + case 97: + case 179: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 180: + case 181: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 184: + case 185: return narrowType(type, expr.expression, assumeTrue); - case 193: + case 194: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 191: - if (expr.operator === 50) { + case 192: + if (expr.operator === 51) { return narrowType(type, expr.operand, !assumeTrue); } break; @@ -32581,7 +32600,7 @@ var ts; } } function getTypeOfSymbolAtLocation(symbol, location) { - if (location.kind === 70) { + if (location.kind === 71) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { location = location.parent; } @@ -32597,9 +32616,9 @@ var ts; function getControlFlowContainer(node) { return ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || - node.kind === 233 || - node.kind === 264 || - node.kind === 148; + node.kind === 234 || + node.kind === 265 || + node.kind === 149; }); } function isParameterAssigned(symbol) { @@ -32617,10 +32636,10 @@ var ts; return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); }); } function markParameterAssignments(node) { - if (node.kind === 70) { + if (node.kind === 71) { if (ts.isAssignmentTarget(node)) { var symbol = getResolvedSymbol(node); - if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) { + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 146) { symbol.isAssigned = true; } } @@ -32634,7 +32653,7 @@ var ts; } function removeOptionalityFromDeclaredType(declaredType, declaration) { var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 145 && + declaration.kind === 146 && declaration.initializer && getFalsyFlags(declaredType) & 2048 && !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048); @@ -32648,7 +32667,7 @@ var ts; if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); if (languageVersion < 2) { - if (container.kind === 186) { + if (container.kind === 187) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (ts.hasModifier(container, 256)) { @@ -32664,7 +32683,7 @@ var ts; var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); if (localOrExportSymbol.flags & 32) { var declaration_1 = localOrExportSymbol.valueDeclaration; - if (declaration_1.kind === 228 + if (declaration_1.kind === 229 && ts.nodeIsDecorated(declaration_1)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -32676,11 +32695,11 @@ var ts; container = ts.getContainingClass(container); } } - else if (declaration_1.kind === 198) { + else if (declaration_1.kind === 199) { var container = ts.getThisContainer(node, false); while (container !== undefined) { if (container.parent === declaration_1) { - if (container.kind === 148 && ts.hasModifier(container, 32)) { + if (container.kind === 149 && ts.hasModifier(container, 32)) { getNodeLinks(declaration_1).flags |= 8388608; getNodeLinks(node).flags |= 16777216; } @@ -32710,17 +32729,17 @@ var ts; if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) { return type; } - var isParameter = ts.getRootDeclaration(declaration).kind === 145; + var isParameter = ts.getRootDeclaration(declaration).kind === 146; var declarationContainer = getControlFlowContainer(declaration); var flowContainer = getControlFlowContainer(node); var isOuterVariable = flowContainer !== declarationContainer; - while (flowContainer !== declarationContainer && (flowContainer.kind === 185 || - flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && + while (flowContainer !== declarationContainer && (flowContainer.kind === 186 || + flowContainer.kind === 187 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } var assumeInitialized = isParameter || isOuterVariable || - type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) || + type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) || ts.isInAmbientContext(declaration); var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) : type === autoType || type === autoArrayType ? undefinedType : @@ -32747,7 +32766,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 || (symbol.flags & (2 | 32)) === 0 || - symbol.valueDeclaration.parent.kind === 259) { + symbol.valueDeclaration.parent.kind === 260) { return; } var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -32765,8 +32784,8 @@ var ts; if (usedInFunction) { getNodeLinks(current).flags |= 65536; } - if (container.kind === 213 && - ts.getAncestor(symbol.valueDeclaration, 226).parent === container && + if (container.kind === 214 && + ts.getAncestor(symbol.valueDeclaration, 227).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152; } @@ -32778,16 +32797,16 @@ var ts; } function isAssignedInBodyOfForStatement(node, container) { var current = node; - while (current.parent.kind === 184) { + while (current.parent.kind === 185) { current = current.parent; } var isAssigned = false; if (ts.isAssignmentTarget(current)) { isAssigned = true; } - else if ((current.parent.kind === 191 || current.parent.kind === 192)) { + else if ((current.parent.kind === 192 || current.parent.kind === 193)) { var expr = current.parent; - isAssigned = expr.operator === 42 || expr.operator === 43; + isAssigned = expr.operator === 43 || expr.operator === 44; } if (!isAssigned) { return false; @@ -32796,7 +32815,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2; - if (container.kind === 148 || container.kind === 151) { + if (container.kind === 149 || container.kind === 152) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4; } @@ -32840,32 +32859,32 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 151) { + if (container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 186) { + if (container.kind === 187) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = (languageVersion < 2); } switch (container.kind) { - case 232: + case 233: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 231: + case 232: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 151: + case 152: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; + case 149: case 148: - case 147: if (ts.getModifierFlags(container) & 32) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 143: + case 144: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -32874,8 +32893,8 @@ var ts; } if (ts.isFunctionLike(container) && (!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) { - if (container.kind === 185 && - container.parent.kind === 193 && + if (container.kind === 186 && + container.parent.kind === 194 && ts.getSpecialPropertyAssignmentKind(container.parent) === 3) { var className = container.parent .left @@ -32909,22 +32928,22 @@ var ts; } function getTypeForThisExpressionFromJSDoc(node) { var jsdocType = ts.getJSDocType(node); - if (jsdocType && jsdocType.kind === 278) { + if (jsdocType && jsdocType.kind === 279) { var jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 282) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; }); + return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 146; }); } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 180 && node.parent.expression === node; + var isCallExpression = node.parent.kind === 181 && node.parent.expression === node; var container = ts.getSuperContainer(node, true); var needToCaptureLexicalThis = false; if (!isCallExpression) { - while (container && container.kind === 186) { + while (container && container.kind === 187) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = languageVersion < 2; } @@ -32932,14 +32951,14 @@ var ts; var canUseSuperExpression = isLegalUsageOfSuperExpression(container); var nodeCheckFlag = 0; if (!canUseSuperExpression) { - var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; }); - if (current && current.kind === 143) { + var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 144; }); + if (current && current.kind === 144) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 178)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -32947,7 +32966,7 @@ var ts; } return unknownType; } - if (!isCallExpression && container.kind === 151) { + if (!isCallExpression && container.kind === 152) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if ((ts.getModifierFlags(container) & 32) || isCallExpression) { @@ -32957,7 +32976,7 @@ var ts; nodeCheckFlag = 256; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 150 && ts.getModifierFlags(container) & 256) { + if (container.kind === 151 && ts.getModifierFlags(container) & 256) { if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096; } @@ -32968,7 +32987,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 177) { + if (container.parent.kind === 178) { if (languageVersion < 2) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -32986,7 +33005,7 @@ var ts; } return unknownType; } - if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 152 && isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } @@ -32998,24 +33017,24 @@ var ts; return false; } if (isCallExpression) { - return container.kind === 151; + return container.kind === 152; } else { - if (ts.isClassLike(container.parent) || container.parent.kind === 177) { + if (ts.isClassLike(container.parent) || container.parent.kind === 178) { if (ts.getModifierFlags(container) & 32) { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || - container.kind === 153; + return container.kind === 151 || + container.kind === 150 || + container.kind === 153 || + container.kind === 154; } else { - return container.kind === 150 || - container.kind === 149 || - container.kind === 152 || + return container.kind === 151 || + container.kind === 150 || container.kind === 153 || + container.kind === 154 || + container.kind === 149 || container.kind === 148 || - container.kind === 147 || - container.kind === 151; + container.kind === 152; } } } @@ -33023,10 +33042,10 @@ var ts; } } function getContainingObjectLiteral(func) { - return (func.kind === 150 || - func.kind === 152 || - func.kind === 153) && func.parent.kind === 177 ? func.parent : - func.kind === 185 && func.parent.kind === 260 ? func.parent.parent : + return (func.kind === 151 || + func.kind === 153 || + func.kind === 154) && func.parent.kind === 178 ? func.parent : + func.kind === 186 && func.parent.kind === 261 ? func.parent.parent : undefined; } function getThisTypeArgument(type) { @@ -33038,7 +33057,7 @@ var ts; }); } function getContextualThisParameterType(func) { - if (func.kind === 186) { + if (func.kind === 187) { return undefined; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -33061,7 +33080,7 @@ var ts; if (thisType) { return instantiateType(thisType, getContextualMapper(containingLiteral)); } - if (literal.parent.kind !== 260) { + if (literal.parent.kind !== 261) { break; } literal = literal.parent.parent; @@ -33069,9 +33088,9 @@ var ts; } return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral); } - if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) { + if (func.parent.kind === 194 && func.parent.operatorToken.kind === 58) { var target = func.parent.left; - if (target.kind === 178 || target.kind === 179) { + if (target.kind === 179 || target.kind === 180) { return checkExpressionCached(target.expression); } } @@ -33123,7 +33142,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 145) { + if (declaration.kind === 146) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -33135,7 +33154,7 @@ var ts; if (ts.isBindingPattern(declaration.parent)) { var parentDeclaration = declaration.parent.parent; var name = declaration.propertyName || declaration.name; - if (parentDeclaration.kind !== 175 && + if (parentDeclaration.kind !== 176 && parentDeclaration.type && !ts.isBindingPattern(name)) { var text = ts.getTextOfPropertyName(name); @@ -33176,7 +33195,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 145 && node.parent.initializer === node) { + if (node.parent.kind === 146 && node.parent.initializer === node) { return true; } node = node.parent; @@ -33185,8 +33204,8 @@ var ts; } function getContextualReturnType(functionDecl) { if (functionDecl.type || - functionDecl.kind === 151 || - functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) { + functionDecl.kind === 152 || + functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); @@ -33205,7 +33224,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 182) { + if (template.parent.kind === 183) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -33213,7 +33232,7 @@ var ts; function getContextualTypeForBinaryOperand(node) { var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; - if (operator >= 57 && operator <= 69) { + if (operator >= 58 && operator <= 70) { if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) { return undefined; } @@ -33221,14 +33240,14 @@ var ts; return getTypeOfExpression(binaryExpression.left); } } - else if (operator === 53) { + else if (operator === 54) { var type = getContextualType(binaryExpression); if (!type && node === binaryExpression.right) { type = getTypeOfExpression(binaryExpression.left); } return type; } - else if (operator === 52 || operator === 25) { + else if (operator === 53 || operator === 26) { if (node === binaryExpression.right) { return getContextualType(binaryExpression); } @@ -33285,6 +33304,25 @@ var ts; var conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } + function getContextualTypeForJsxExpression(node) { + var jsxAttributes = ts.isJsxAttributeLike(node.parent) ? + node.parent.parent : + node.parent.openingElement.attributes; + var attributesType = getContextualType(jsxAttributes); + if (!attributesType || isTypeAny(attributesType)) { + return undefined; + } + if (ts.isJsxAttribute(node.parent)) { + return getTypeOfPropertyOfType(attributesType, node.parent.name.text); + } + else if (node.parent.kind === 249) { + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + return jsxChildrenPropertyName && jsxChildrenPropertyName !== "" ? getTypeOfPropertyOfType(attributesType, jsxChildrenPropertyName) : anyType; + } + else { + return attributesType; + } + } function getContextualTypeForJsxAttribute(attribute) { var attributesType = getContextualType(attribute.parent); if (ts.isJsxAttribute(attribute)) { @@ -33310,44 +33348,44 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 225: - case 145: + case 226: + case 146: + case 149: case 148: - case 147: - case 175: + case 176: return getContextualTypeForInitializerExpression(node); - case 186: - case 218: + case 187: + case 219: return getContextualTypeForReturnExpression(node); - case 196: + case 197: return getContextualTypeForYieldOperand(parent); - case 180: case 181: + case 182: return getContextualTypeForArgument(parent, node); - case 183: - case 201: + case 184: + case 202: return getTypeFromTypeNode(parent.type); - case 193: + case 194: return getContextualTypeForBinaryOperand(node); - case 260: case 261: + case 262: return getContextualTypeForObjectLiteralElement(parent); - case 176: + case 177: return getContextualTypeForElementExpression(node); - case 194: + case 195: return getContextualTypeForConditionalOperand(node); - case 204: - ts.Debug.assert(parent.parent.kind === 195); + case 205: + ts.Debug.assert(parent.parent.kind === 196); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 184: + case 185: return getContextualType(parent); + case 256: + return getContextualTypeForJsxExpression(parent); + case 253: case 255: - return getContextualType(parent); - case 252: - case 254: return getContextualTypeForJsxAttribute(parent); + case 251: case 250: - case 249: return getAttributesTypeFromJsxOpeningLikeElement(parent); } return undefined; @@ -33380,7 +33418,7 @@ var ts; return sourceLength < targetParameterCount; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 185 || node.kind === 186; + return node.kind === 186 || node.kind === 187; } function getContextualSignatureForFunctionLikeDeclaration(node) { return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) @@ -33393,7 +33431,7 @@ var ts; getApparentTypeOfContextualType(node); } function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; @@ -33434,8 +33472,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false); } function hasDefaultValue(node) { - return (node.kind === 175 && !!node.initializer) || - (node.kind === 193 && node.operatorToken.kind === 57); + return (node.kind === 176 && !!node.initializer) || + (node.kind === 194 && node.operatorToken.kind === 58); } function checkArrayLiteral(node, checkMode) { var elements = node.elements; @@ -33444,7 +33482,7 @@ var ts; var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 197) { + if (inDestructuringPattern && e.kind === 198) { var restArrayType = checkExpression(e.expression, checkMode); var restElementType = getIndexTypeOfType(restArrayType, 1) || getIteratedTypeOrElementType(restArrayType, undefined, false, false, false); @@ -33456,7 +33494,7 @@ var ts; var type = checkExpressionForMutableLocation(e, checkMode); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 197; + hasSpreadElement = hasSpreadElement || e.kind === 198; } if (!hasSpreadElement) { if (inDestructuringPattern && elementTypes.length) { @@ -33467,7 +33505,7 @@ var ts; var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; - if (pattern && (pattern.kind === 174 || pattern.kind === 176)) { + if (pattern && (pattern.kind === 175 || pattern.kind === 177)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -33475,7 +33513,7 @@ var ts; elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 199) { + if (patternElement.kind !== 200) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -33492,7 +33530,7 @@ var ts; strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340); @@ -33538,7 +33576,7 @@ var ts; var propagatedFlags = 0; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177); + (contextualType.pattern.kind === 174 || contextualType.pattern.kind === 178); var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node); var typeFlags = 0; var patternWithComputedProperties = false; @@ -33548,25 +33586,25 @@ var ts; for (var i = 0; i < node.properties.length; i++) { var memberDecl = node.properties[i]; var member = memberDecl.symbol; - if (memberDecl.kind === 260 || - memberDecl.kind === 261 || + if (memberDecl.kind === 261 || + memberDecl.kind === 262 || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 260) { + if (memberDecl.kind === 261) { type = checkPropertyAssignment(memberDecl, checkMode); } - else if (memberDecl.kind === 150) { + else if (memberDecl.kind === 151) { type = checkObjectLiteralMethod(memberDecl, checkMode); } else { - ts.Debug.assert(memberDecl.kind === 261); + ts.Debug.assert(memberDecl.kind === 262); type = checkExpressionForMutableLocation(memberDecl.name, checkMode); } typeFlags |= type.flags; var prop = createSymbol(4 | member.flags, member.name); if (inDestructuringPattern) { - var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 261 && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 262 && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 67108864; } @@ -33592,7 +33630,7 @@ var ts; prop.target = member; member = prop; } - else if (memberDecl.kind === 262) { + else if (memberDecl.kind === 263) { if (languageVersion < 2) { checkExternalEmitHelpers(memberDecl, 2); } @@ -33614,7 +33652,7 @@ var ts; continue; } else { - ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153); + ts.Debug.assert(memberDecl.kind === 153 || memberDecl.kind === 154); checkNodeDeferred(memberDecl); } if (ts.hasDynamicName(memberDecl)) { @@ -33689,27 +33727,13 @@ var ts; else { checkExpression(node.closingElement.tagName); } - for (var _i = 0, _a = node.children; _i < _a.length; _i++) { - var child = _a[_i]; - switch (child.kind) { - case 255: - checkJsxExpression(child); - break; - case 248: - checkJsxElement(child); - break; - case 249: - checkJsxSelfClosingElement(child); - break; - } - } return getJsxGlobalElementType() || anyType; } function isUnhyphenatedJsxName(name) { return name.indexOf("-") < 0; } function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 178 || tagName.kind === 98) { + if (tagName.kind === 179 || tagName.kind === 99) { return false; } else { @@ -33740,7 +33764,7 @@ var ts; attributesArray.push(attributeSymbol); } else { - ts.Debug.assert(attributeDecl.kind === 254); + ts.Debug.assert(attributeDecl.kind === 255); if (attributesArray.length > 0) { spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); attributesArray = []; @@ -33773,6 +33797,32 @@ var ts; } }); } + var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined; + if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + var childrenTypes = []; + for (var _b = 0, _c = parent.children; _b < _c.length; _b++) { + var child = _c[_b]; + if (child.kind === 10) { + if (!child.containsOnlyWhiteSpaces) { + childrenTypes.push(stringType); + } + } + else { + childrenTypes.push(checkExpression(child, checkMode)); + } + } + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { + if (attributesTable.has(jsxChildrenPropertyName)) { + error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName); + } + var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName); + childrenPropSymbol.type = childrenTypes.length === 1 ? + childrenTypes[0] : + createArrayType(getUnionType(childrenTypes, false)); + attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol); + } + } return createJsxAttributesType(attributes.symbol, attributesTable); function createJsxAttributesType(symbol, attributesTable) { var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined); @@ -33834,26 +33884,37 @@ var ts; } return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true); } - function getJsxElementPropertiesName() { + function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) { var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined); - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064); - var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - var attribProperties = attribPropType && getPropertiesOfType(attribPropType); - if (attribProperties) { - if (attribProperties.length === 0) { + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 793064); + var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); + var propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); + if (propertiesOfJsxElementAttribPropInterface) { + if (propertiesOfJsxElementAttribPropInterface.length === 0) { return ""; } - else if (attribProperties.length === 1) { - return attribProperties[0].name; + else if (propertiesOfJsxElementAttribPropInterface.length === 1) { + return propertiesOfJsxElementAttribPropInterface[0].name; } - else { - error(attribsPropTypeSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, JsxNames.ElementAttributesPropertyNameContainer); - return undefined; + else if (propertiesOfJsxElementAttribPropInterface.length > 1) { + error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, nameOfAttribPropContainer); } } - else { - return undefined; + return undefined; + } + function getJsxElementPropertiesName() { + if (!_hasComputedJsxElementPropertiesName) { + _hasComputedJsxElementPropertiesName = true; + _jsxElementPropertiesName = getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer); + } + return _jsxElementPropertiesName; + } + function getJsxElementChildrenPropertyname() { + if (!_hasComputedJsxElementChildrenPropertyName) { + _hasComputedJsxElementChildrenPropertyName = true; + _jsxElementChildrenPropertyName = getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer); } + return _jsxElementChildrenPropertyName; } function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) { ts.Debug.assert(!(elementType.flags & 65536)); @@ -34119,7 +34180,7 @@ var ts; } } function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 148; + return s.valueDeclaration ? s.valueDeclaration.kind : 149; } function getDeclarationModifierFlagsFromSymbol(s) { if (s.valueDeclaration) { @@ -34147,18 +34208,18 @@ var ts; } function checkPropertyAccessibility(node, left, type, prop) { var flags = getDeclarationModifierFlagsFromSymbol(prop); - var errorNode = node.kind === 178 || node.kind === 225 ? + var errorNode = node.kind === 179 || node.kind === 226 ? node.name : node.right; if (getCheckFlags(prop) & 256) { error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type)); return false; } - if (left.kind === 96) { + if (left.kind === 97) { if (languageVersion < 2) { var hasNonMethodDeclaration = forEachProperty(prop, function (p) { var propKind = getDeclarationKindFromSymbol(p); - return propKind !== 150 && propKind !== 149; + return propKind !== 151 && propKind !== 150; }); if (hasNonMethodDeclaration) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -34181,7 +34242,7 @@ var ts; } return true; } - if (left.kind === 96) { + if (left.kind === 97) { return true; } var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) { @@ -34254,7 +34315,7 @@ var ts; } function isInPropertyInitializer(node) { while (node) { - if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) { + if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) { return true; } node = node.parent; @@ -34286,8 +34347,8 @@ var ts; !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text); } - if (prop.valueDeclaration.kind === 228 && - node.parent && node.parent.kind !== 158 && + if (prop.valueDeclaration.kind === 229 && + node.parent && node.parent.kind !== 159 && !ts.isInAmbientContext(prop.valueDeclaration) && !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text); @@ -34304,7 +34365,7 @@ var ts; return unknownType; } } - if (node.kind !== 178 || assignmentKind === 1 || + if (node.kind !== 179 || assignmentKind === 1 || !(prop.flags & (3 | 4 | 98304)) && !(prop.flags & 8192 && propType.flags & 65536)) { return propType; @@ -34313,7 +34374,7 @@ var ts; return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 178 + var left = node.kind === 179 ? node.expression : node.left; var type = checkExpression(left); @@ -34327,13 +34388,13 @@ var ts; } function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 226) { + if (initializer.kind === 227) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); } } - else if (initializer.kind === 70) { + else if (initializer.kind === 71) { return getResolvedSymbol(initializer); } return undefined; @@ -34343,13 +34404,13 @@ var ts; } function isForInVariableForNumericPropertyNames(expr) { var e = ts.skipParentheses(expr); - if (e.kind === 70) { + if (e.kind === 71) { var symbol = getResolvedSymbol(e); if (symbol.flags & 3) { var child = expr; var node = expr.parent; while (node) { - if (node.kind === 214 && + if (node.kind === 215 && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { @@ -34367,7 +34428,7 @@ var ts; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 181 && node.parent.expression === node) { + if (node.parent.kind === 182 && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -34420,10 +34481,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 182) { + if (node.kind === 183) { checkExpression(node.template); } - else if (node.kind !== 146) { + else if (node.kind !== 147) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -34474,7 +34535,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 197) { + if (arg && arg.kind === 198) { return i; } } @@ -34490,11 +34551,11 @@ var ts; if (ts.isJsxOpeningLikeElement(node)) { return true; } - if (node.kind === 182) { + if (node.kind === 183) { var tagExpression = node; argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 195) { + if (tagExpression.template.kind === 196) { var templateExpression = tagExpression.template; var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); ts.Debug.assert(lastSpan !== undefined); @@ -34502,11 +34563,11 @@ var ts; } else { var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 12); + ts.Debug.assert(templateLiteral.kind === 13); callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 146) { + else if (node.kind === 147) { isDecorator = true; typeArguments = undefined; argCount = getEffectiveArgumentCount(node, undefined, signature); @@ -34514,7 +34575,7 @@ var ts; else { var callExpression = node; if (!callExpression.arguments) { - ts.Debug.assert(callExpression.kind === 181); + ts.Debug.assert(callExpression.kind === 182); return signature.minArgumentCount === 0; } argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -34575,7 +34636,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -34642,7 +34703,7 @@ var ts; return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation); } var thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 181) { + if (thisType && thisType !== voidType && node.kind !== 182) { var thisArgumentNode = getThisArgumentOfCall(node); var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; @@ -34655,7 +34716,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 199) { + if (arg === undefined || arg.kind !== 200) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); if (argType === undefined) { @@ -34670,28 +34731,28 @@ var ts; return true; } function getThisArgumentOfCall(node) { - if (node.kind === 180) { + if (node.kind === 181) { var callee = node.expression; - if (callee.kind === 178) { + if (callee.kind === 179) { return callee.expression; } - else if (callee.kind === 179) { + else if (callee.kind === 180) { return callee.expression; } } } function getEffectiveCallArguments(node) { var args; - if (node.kind === 182) { + if (node.kind === 183) { var template = node.template; args = [undefined]; - if (template.kind === 195) { + if (template.kind === 196) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 146) { + else if (node.kind === 147) { return undefined; } else if (ts.isJsxOpeningLikeElement(node)) { @@ -34703,21 +34764,21 @@ var ts; return args; } function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 146) { + if (node.kind === 147) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return 1; - case 148: + case 149: return 2; - case 150: - case 152: + case 151: case 153: + case 154: if (languageVersion === 0) { return 2; } return signature.parameters.length >= 3 ? 3 : 2; - case 145: + case 146: return 3; } } @@ -34726,48 +34787,48 @@ var ts; } } function getEffectiveDecoratorFirstArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { return getParentTypeOfClassElement(node); } ts.Debug.fail("Unsupported decorator target."); return unknownType; } function getEffectiveDecoratorSecondArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { node = node.parent; - if (node.kind === 151) { + if (node.kind === 152) { return anyType; } } - if (node.kind === 148 || - node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 149 || + node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var element = node; switch (element.name.kind) { - case 70: + case 71: case 8: case 9: return getLiteralTypeForText(32, element.name.text); - case 143: + case 144: var nameType = checkComputedPropertyName(element.name); if (isTypeOfKind(nameType, 512)) { return nameType; @@ -34784,20 +34845,20 @@ var ts; return unknownType; } function getEffectiveDecoratorThirdArgumentType(node) { - if (node.kind === 228) { + if (node.kind === 229) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 145) { + if (node.kind === 146) { return numberType; } - if (node.kind === 148) { + if (node.kind === 149) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 150 || - node.kind === 152 || - node.kind === 153) { + if (node.kind === 151 || + node.kind === 153 || + node.kind === 154) { var propertyType = getTypeOfNode(node); return createTypedPropertyDescriptorType(propertyType); } @@ -34818,26 +34879,26 @@ var ts; return unknownType; } function getEffectiveArgumentType(node, argIndex) { - if (node.kind === 146) { + if (node.kind === 147) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return getGlobalTemplateStringsArrayType(); } return undefined; } function getEffectiveArgument(node, args, argIndex) { - if (node.kind === 146 || - (argIndex === 0 && node.kind === 182)) { + if (node.kind === 147 || + (argIndex === 0 && node.kind === 183)) { return undefined; } return args[argIndex]; } function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 146) { + if (node.kind === 147) { return node.expression; } - else if (argIndex === 0 && node.kind === 182) { + else if (argIndex === 0 && node.kind === 183) { return node.template; } else { @@ -34845,13 +34906,13 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 182; - var isDecorator = node.kind === 146; + var isTaggedTemplate = node.kind === 183; + var isDecorator = node.kind === 147; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); var typeArguments; if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) { typeArguments = node.typeArguments; - if (node.expression.kind !== 96) { + if (node.expression.kind !== 97) { ts.forEach(typeArguments, checkSourceElement); } } @@ -34891,7 +34952,7 @@ var ts; var candidateForTypeArgumentError; var resultOfFailedInference; var result; - var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma; + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma); } @@ -35009,7 +35070,7 @@ var ts; } } function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var superType = checkSuperExpression(node.expression); if (superType !== unknownType) { var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node)); @@ -35163,16 +35224,16 @@ var ts; } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 228: - case 198: + case 229: + case 199: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 145: + case 146: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 148: + case 149: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 150: - case 152: + case 151: case 153: + case 154: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -35222,16 +35283,16 @@ var ts; } function resolveSignature(node, candidatesOutArray) { switch (node.kind) { - case 180: - return resolveCallExpression(node, candidatesOutArray); case 181: - return resolveNewExpression(node, candidatesOutArray); + return resolveCallExpression(node, candidatesOutArray); case 182: + return resolveNewExpression(node, candidatesOutArray); + case 183: return resolveTaggedTemplateExpression(node, candidatesOutArray); - case 146: + case 147: return resolveDecorator(node, candidatesOutArray); + case 251: case 250: - case 249: return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray); } ts.Debug.fail("Branch in 'resolveSignature' should be unreachable."); @@ -35260,17 +35321,17 @@ var ts; function checkCallExpression(node) { checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return voidType; } - if (node.kind === 181) { + if (node.kind === 182) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 151 && - declaration.kind !== 155 && - declaration.kind !== 160 && + declaration.kind !== 152 && + declaration.kind !== 156 && + declaration.kind !== 161 && !ts.isJSDocConstructSignature(declaration)) { - var funcSymbol = node.expression.kind === 70 ? + var funcSymbol = node.expression.kind === 71 ? getResolvedSymbol(node.expression) : checkExpression(node.expression).symbol; if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) { @@ -35302,9 +35363,9 @@ var ts; return false; } var targetDeclarationKind = resolvedRequire.flags & 16 - ? 227 + ? 228 : resolvedRequire.flags & 3 - ? 225 + ? 226 : 0; if (targetDeclarationKind !== 0) { var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind); @@ -35337,7 +35398,7 @@ var ts; error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return unknownType; } - else if (container.kind === 151) { + else if (container.kind === 152) { var symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } @@ -35403,7 +35464,7 @@ var ts; for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; if (!ts.isOmittedExpression(element)) { - if (element.name.kind === 70) { + if (element.name.kind === 71) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } assignBindingElementTypes(element); @@ -35416,8 +35477,8 @@ var ts; if (!links.type) { links.type = instantiateType(contextualType, mapper); if (links.type === emptyObjectType && - (parameter.valueDeclaration.name.kind === 173 || - parameter.valueDeclaration.name.kind === 174)) { + (parameter.valueDeclaration.name.kind === 174 || + parameter.valueDeclaration.name.kind === 175)) { links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); } assignBindingElementTypes(parameter.valueDeclaration); @@ -35459,7 +35520,7 @@ var ts; } var functionFlags = ts.getFunctionFlags(func); var type; - if (func.body.kind !== 206) { + if (func.body.kind !== 207) { type = checkExpressionCached(func.body, checkMode); if (functionFlags & 2) { type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -35553,7 +35614,7 @@ var ts; return false; } var lastStatement = ts.lastOrUndefined(func.body.statements); - if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) { + if (lastStatement && lastStatement.kind === 221 && isExhaustiveSwitchStatement(lastStatement)) { return false; } return true; @@ -35582,7 +35643,7 @@ var ts; } }); if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || - func.kind === 185 || func.kind === 186)) { + func.kind === 186 || func.kind === 187)) { return undefined; } if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { @@ -35599,7 +35660,7 @@ var ts; if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) { return; } - if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 207 || !functionHasImplicitReturn(func)) { return; } var hasExplicitReturn = func.flags & 256; @@ -35626,9 +35687,9 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 185) { + if (!hasGrammarError && node.kind === 186) { checkGrammarForGenerator(node); } if (checkMode === 1 && isContextSensitive(node)) { @@ -35662,7 +35723,7 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 150) { + if (produceDiagnostics && node.kind !== 151) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithCapturedNewTargetVariable(node, node.name); @@ -35670,7 +35731,7 @@ var ts; return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); var returnOrPromisedType = node.type && ((functionFlags & 3) === 2 ? @@ -35683,7 +35744,7 @@ var ts; if (!node.type) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 206) { + if (node.body.kind === 207) { checkSourceElement(node.body); } else { @@ -35718,10 +35779,10 @@ var ts; function isReferenceToReadonlyEntity(expr, symbol) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 && - (expr.kind === 178 || expr.kind === 179) && - expr.expression.kind === 98) { + (expr.kind === 179 || expr.kind === 180) && + expr.expression.kind === 99) { var func = ts.getContainingFunction(expr); - if (!(func && func.kind === 151)) + if (!(func && func.kind === 152)) return true; return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent); } @@ -35730,13 +35791,13 @@ var ts; return false; } function isReferenceThroughNamespaceImport(expr) { - if (expr.kind === 178 || expr.kind === 179) { + if (expr.kind === 179 || expr.kind === 180) { var node = ts.skipParentheses(expr.expression); - if (node.kind === 70) { + if (node.kind === 71) { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol.flags & 8388608) { var declaration = getDeclarationOfAliasSymbol(symbol); - return declaration && declaration.kind === 239; + return declaration && declaration.kind === 240; } } } @@ -35744,7 +35805,7 @@ var ts; } function checkReferenceExpression(expr, invalidReferenceMessage) { var node = ts.skipParentheses(expr); - if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) { + if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) { error(expr, invalidReferenceMessage); return false; } @@ -35753,7 +35814,7 @@ var ts; function checkDeleteExpression(node) { checkExpression(node.expression); var expr = ts.skipParentheses(node.expression); - if (expr.kind !== 178 && expr.kind !== 179) { + if (expr.kind !== 179 && expr.kind !== 180) { error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } @@ -35789,25 +35850,25 @@ var ts; if (operandType === silentNeverType) { return silentNeverType; } - if (node.operator === 37 && node.operand.kind === 8) { + if (node.operator === 38 && node.operand.kind === 8) { return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text)); } switch (node.operator) { - case 36: case 37: - case 51: + case 38: + case 52: checkNonNullType(operandType, node.operand); if (maybeTypeOfKind(operandType, 512)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; - case 50: + case 51: var facts = getTypeFacts(operandType) & (1048576 | 2097152); return facts === 1048576 ? falseType : facts === 2097152 ? trueType : booleanType; - case 42: case 43: + case 44: var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access); @@ -35911,9 +35972,9 @@ var ts; return sourceType; } function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) { - if (property.kind === 260 || property.kind === 261) { + if (property.kind === 261 || property.kind === 262) { var name = property.name; - if (name.kind === 143) { + if (name.kind === 144) { checkComputedPropertyName(name); } if (isComputedNonLiteralName(name)) { @@ -35926,7 +35987,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) || getIndexTypeOfType(objectLiteralType, 0); if (type) { - if (property.kind === 261) { + if (property.kind === 262) { return checkDestructuringAssignment(property, type); } else { @@ -35937,7 +35998,7 @@ var ts; error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name)); } } - else if (property.kind === 262) { + else if (property.kind === 263) { if (languageVersion < 5) { checkExternalEmitHelpers(property, 4); } @@ -35968,8 +36029,8 @@ var ts; function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { var elements = node.elements; var element = elements[elementIndex]; - if (element.kind !== 199) { - if (element.kind !== 197) { + if (element.kind !== 200) { + if (element.kind !== 198) { var propName = "" + elementIndex; var type = isTypeAny(sourceType) ? sourceType @@ -35995,7 +36056,7 @@ var ts; } else { var restExpression = element.expression; - if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) { + if (restExpression.kind === 194 && restExpression.operatorToken.kind === 58) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -36008,7 +36069,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) { var target; - if (exprOrAssignment.kind === 261) { + if (exprOrAssignment.kind === 262) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && @@ -36022,21 +36083,21 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 193 && target.operatorToken.kind === 57) { + if (target.kind === 194 && target.operatorToken.kind === 58) { checkBinaryExpression(target, checkMode); target = target.left; } - if (target.kind === 177) { + if (target.kind === 178) { return checkObjectLiteralAssignment(target, sourceType); } - if (target.kind === 176) { + if (target.kind === 177) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { var targetType = checkExpression(target, checkMode); - var error = target.parent.kind === 262 ? + var error = target.parent.kind === 263 ? ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; if (checkReferenceExpression(target, error)) { @@ -36047,49 +36108,49 @@ var ts; function isSideEffectFree(node) { node = ts.skipParentheses(node); switch (node.kind) { - case 70: + case 71: case 9: - case 11: - case 182: - case 195: case 12: + case 183: + case 196: + case 13: case 8: - case 100: - case 85: - case 94: - case 138: - case 185: - case 198: + case 101: + case 86: + case 95: + case 139: case 186: - case 176: + case 199: + case 187: case 177: - case 188: - case 202: + case 178: + case 189: + case 203: + case 250: case 249: - case 248: return true; - case 194: + case 195: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 193: + case 194: if (ts.isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 191: case 192: + case 193: switch (node.operator) { - case 50: - case 36: - case 37: case 51: + case 37: + case 38: + case 52: return true; } return false; - case 189: - case 183: - case 201: + case 190: + case 184: + case 202: default: return false; } @@ -36109,34 +36170,34 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; - if (operator === 57 && (left.kind === 177 || left.kind === 176)) { + if (operator === 58 && (left.kind === 178 || left.kind === 177)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode); } var leftType = checkExpression(left, checkMode); var rightType = checkExpression(right, checkMode); switch (operator) { - case 38: case 39: - case 60: - case 61: case 40: + case 61: case 62: case 41: case 63: - case 37: - case 59: - case 44: + case 42: case 64: + case 38: + case 60: case 45: case 65: case 46: case 66: - case 48: - case 68: - case 49: - case 69: case 47: case 67: + case 49: + case 69: + case 50: + case 70: + case 48: + case 68: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -36156,8 +36217,8 @@ var ts; } } return numberType; - case 36: - case 58: + case 37: + case 59: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -36184,14 +36245,14 @@ var ts; reportOperatorError(); return anyType; } - if (operator === 58) { + if (operator === 59) { checkAssignmentOperator(resultType); } return resultType; - case 26: - case 28: + case 27: case 29: case 30: + case 31: if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); @@ -36200,10 +36261,10 @@ var ts; } } return booleanType; - case 31: case 32: case 33: case 34: + case 35: var leftIsLiteral = isLiteralType(leftType); var rightIsLiteral = isLiteralType(rightType); if (!leftIsLiteral || !rightIsLiteral) { @@ -36214,29 +36275,29 @@ var ts; reportOperatorError(); } return booleanType; - case 92: + case 93: return checkInstanceOfExpression(left, right, leftType, rightType); - case 91: + case 92: return checkInExpression(left, right, leftType, rightType); - case 52: + case 53: return getTypeFacts(leftType) & 1048576 ? includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) : leftType; - case 53: + case 54: return getTypeFacts(leftType) & 2097152 ? getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : leftType; - case 57: + case 58: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); - case 25: + case 26: if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } function isEvalNode(node) { - return node.kind === 70 && node.text === "eval"; + return node.kind === 71 && node.text === "eval"; } function checkForDisallowedESSymbolOperand(operator) { var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left : @@ -36250,21 +36311,21 @@ var ts; } function getSuggestedBooleanOperator(operator) { switch (operator) { + case 49: + case 69: + return 54; + case 50: + case 70: + return 35; case 48: case 68: return 53; - case 49: - case 69: - return 34; - case 47: - case 67: - return 52; default: return undefined; } } function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 57 && operator <= 69) { + if (produceDiagnostics && operator >= 58 && operator <= 70) { if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) { checkTypeAssignableTo(valueType, leftType, left, undefined); } @@ -36350,9 +36411,9 @@ var ts; return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text)); case 8: return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text)); - case 100: + case 101: return trueType; - case 85: + case 86: return falseType; } } @@ -36386,7 +36447,7 @@ var ts; } function isTypeAssertion(node) { node = ts.skipParentheses(node); - return node.kind === 183 || node.kind === 201; + return node.kind === 184 || node.kind === 202; } function checkDeclarationInitializer(declaration) { var type = getTypeOfExpression(declaration.initializer, true); @@ -36412,14 +36473,14 @@ var ts; return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -36441,7 +36502,7 @@ var ts; return type; } function getTypeOfExpression(node, cache) { - if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) { + if (node.kind === 181 && node.expression.kind !== 97 && !ts.isRequireCall(node, true)) { var funcType = checkNonNullExpression(node.expression); var signature = getSingleCallSignature(funcType); if (signature && !signature.typeParameters) { @@ -36459,7 +36520,7 @@ var ts; } function checkExpression(node, checkMode) { var type; - if (node.kind === 142) { + if (node.kind === 143) { type = checkQualifiedName(node); } else { @@ -36467,9 +36528,9 @@ var ts; type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 178 && node.parent.expression === node) || - (node.parent.kind === 179 && node.parent.expression === node) || - ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 179 && node.parent.expression === node) || + (node.parent.kind === 180 && node.parent.expression === node) || + ((node.kind === 71 || node.kind === 143) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -36478,83 +36539,83 @@ var ts; } function checkExpressionWorker(node, checkMode) { switch (node.kind) { - case 70: + case 71: return checkIdentifier(node); - case 98: + case 99: return checkThisExpression(node); - case 96: + case 97: return checkSuperExpression(node); - case 94: + case 95: return nullWideningType; case 9: case 8: - case 100: - case 85: + case 101: + case 86: return checkLiteralExpression(node); - case 195: + case 196: return checkTemplateExpression(node); - case 12: + case 13: return stringType; - case 11: + case 12: return globalRegExpType; - case 176: - return checkArrayLiteral(node, checkMode); case 177: - return checkObjectLiteral(node, checkMode); + return checkArrayLiteral(node, checkMode); case 178: - return checkPropertyAccessExpression(node); + return checkObjectLiteral(node, checkMode); case 179: - return checkIndexedAccess(node); + return checkPropertyAccessExpression(node); case 180: + return checkIndexedAccess(node); case 181: - return checkCallExpression(node); case 182: + return checkCallExpression(node); + case 183: return checkTaggedTemplateExpression(node); - case 184: + case 185: return checkExpression(node.expression, checkMode); - case 198: + case 199: return checkClassExpression(node); - case 185: case 186: + case 187: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 188: + case 189: return checkTypeOfExpression(node); - case 183: - case 201: - return checkAssertion(node); + case 184: case 202: - return checkNonNullAssertion(node); + return checkAssertion(node); case 203: + return checkNonNullAssertion(node); + case 204: return checkMetaProperty(node); - case 187: + case 188: return checkDeleteExpression(node); - case 189: - return checkVoidExpression(node); case 190: - return checkAwaitExpression(node); + return checkVoidExpression(node); case 191: - return checkPrefixUnaryExpression(node); + return checkAwaitExpression(node); case 192: - return checkPostfixUnaryExpression(node); + return checkPrefixUnaryExpression(node); case 193: - return checkBinaryExpression(node, checkMode); + return checkPostfixUnaryExpression(node); case 194: + return checkBinaryExpression(node, checkMode); + case 195: return checkConditionalExpression(node, checkMode); - case 197: + case 198: return checkSpreadExpression(node, checkMode); - case 199: + case 200: return undefinedWideningType; - case 196: + case 197: return checkYieldExpression(node); - case 255: + case 256: return checkJsxExpression(node, checkMode); - case 248: - return checkJsxElement(node); case 249: + return checkJsxElement(node); + case 250: return checkJsxSelfClosingElement(node); - case 253: + case 254: return checkJsxAttributes(node, checkMode); - case 250: + case 251: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -36584,7 +36645,7 @@ var ts; var func = ts.getContainingFunction(node); if (ts.getModifierFlags(node) & 92) { func = ts.getContainingFunction(node); - if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 152 && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -36595,7 +36656,7 @@ var ts; if (ts.indexOf(func.parameters, node) !== 0) { error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); } - if (func.kind === 151 || func.kind === 155 || func.kind === 160) { + if (func.kind === 152 || func.kind === 156 || func.kind === 161) { error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); } } @@ -36607,7 +36668,7 @@ var ts; if (parameterList) { for (var i = 0; i < parameterList.length; i++) { var param = parameterList[i]; - if (param.name.kind === 70 && + if (param.name.kind === 71 && param.name.text === parameter.text) { return i; } @@ -36657,13 +36718,13 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { + case 187: + case 155: + case 228: case 186: - case 154: - case 227: - case 185: - case 159: + case 160: + case 151: case 150: - case 149: var parent = node.parent; if (node === parent.type) { return parent; @@ -36677,13 +36738,13 @@ var ts; continue; } var name = element.name; - if (name.kind === 70 && + if (name.kind === 71 && name.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name.kind === 174 || - name.kind === 173) { + else if (name.kind === 175 || + name.kind === 174) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) { return true; } @@ -36691,12 +36752,12 @@ var ts; } } function checkSignatureDeclaration(node) { - if (node.kind === 156) { + if (node.kind === 157) { checkGrammarIndexSignature(node); } - else if (node.kind === 159 || node.kind === 227 || node.kind === 160 || - node.kind === 154 || node.kind === 151 || - node.kind === 155) { + else if (node.kind === 160 || node.kind === 228 || node.kind === 161 || + node.kind === 155 || node.kind === 152 || + node.kind === 156) { checkGrammarFunctionLikeDeclaration(node); } var functionFlags = ts.getFunctionFlags(node); @@ -36723,10 +36784,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (noImplicitAny && !node.type) { switch (node.kind) { - case 155: + case 156: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 154: + case 155: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -36767,7 +36828,7 @@ var ts; var staticNames = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151) { + if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; if (ts.isParameterPropertyDeclaration(param)) { @@ -36781,16 +36842,16 @@ var ts; var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); if (memberName) { switch (member.kind) { - case 152: + case 153: addName(names, member.name, memberName, 1); break; - case 153: + case 154: addName(names, member.name, memberName, 2); break; - case 148: + case 149: addName(names, member.name, memberName, 3); break; - case 150: + case 151: addName(names, member.name, memberName, 4); break; } @@ -36842,12 +36903,12 @@ var ts; var names = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 147) { + if (member.kind === 148) { var memberName = void 0; switch (member.name.kind) { case 9: case 8: - case 70: + case 71: memberName = member.name.text; break; default: @@ -36864,7 +36925,7 @@ var ts; } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 229) { + if (node.kind === 230) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -36879,7 +36940,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 135: + case 136: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -36887,7 +36948,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 132: + case 133: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -36943,15 +37004,15 @@ var ts; return ts.forEachChild(n, containsSuperCall); } function markThisReferencesAsErrors(n) { - if (n.kind === 98) { + if (n.kind === 99) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 185 && n.kind !== 227) { + else if (n.kind !== 186 && n.kind !== 228) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 148 && + return n.kind === 149 && !(ts.getModifierFlags(n) & 32) && !!n.initializer; } @@ -36971,7 +37032,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) { var statement = statements_3[_i]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { superCallStatement = statement; break; } @@ -36994,18 +37055,18 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 152) { + if (node.kind === 153) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) { if (!(node.flags & 256)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { - var otherKind = node.kind === 152 ? 153 : 152; + var otherKind = node.kind === 153 ? 154 : 153; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) { @@ -37019,7 +37080,7 @@ var ts; } } var returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 152) { + if (node.kind === 153) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -37129,9 +37190,9 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); - if (n.parent.kind !== 229 && - n.parent.kind !== 228 && - n.parent.kind !== 198 && + if (n.parent.kind !== 230 && + n.parent.kind !== 229 && + n.parent.kind !== 199 && ts.isInAmbientContext(n)) { if (!(flags & 2)) { flags |= 1; @@ -37208,7 +37269,7 @@ var ts; if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 150 || node.kind === 149) && + var reportError = (node.kind === 151 || node.kind === 150) && (ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32); if (reportError) { var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; @@ -37241,11 +37302,11 @@ var ts; var current = declarations_5[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 230 || node.parent.kind === 163 || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) { + if (node.kind === 228 || node.kind === 151 || node.kind === 150 || node.kind === 152) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -37356,16 +37417,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 229: + case 230: return 2097152; - case 232: + case 233: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; - case 228: - case 231: + case 229: + case 232: return 2097152 | 1048576; - case 236: + case 237: var result_3 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); }); @@ -37487,7 +37548,7 @@ var ts; var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; if (promiseConstructorType === unknownType) { - if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { + if (promiseConstructorName.kind === 71 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) { error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { @@ -37522,22 +37583,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 228: + case 229: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 145: + case 146: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 148: + case 149: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 150: - case 152: + case 151: case 153: + case 154: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -37548,7 +37609,7 @@ var ts; function markTypeNodeAsReferenced(node) { var typeName = node && ts.getEntityNameFromTypeNode(node); var rootName = typeName && getFirstIdentifier(typeName); - var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 70 ? 793064 : 1920) | 8388608, undefined, undefined); + var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined); if (rootSymbol && rootSymbol.flags & 8388608 && symbolIsValue(rootSymbol) @@ -37571,13 +37632,13 @@ var ts; } var firstDecorator = node.decorators[0]; checkExternalEmitHelpers(firstDecorator, 8); - if (node.kind === 145) { + if (node.kind === 146) { checkExternalEmitHelpers(firstDecorator, 32); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16); switch (node.kind) { - case 228: + case 229: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) { @@ -37586,19 +37647,19 @@ var ts; } } break; - case 150: - case 152: + case 151: case 153: + case 154: for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markTypeNodeAsReferenced(node.type); break; - case 148: + case 149: markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); break; - case 145: + case 146: markTypeNodeAsReferenced(node.type); break; } @@ -37619,7 +37680,7 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var functionFlags = ts.getFunctionFlags(node); - if (node.name && node.name.kind === 143) { + if (node.name && node.name.kind === 144) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { @@ -37663,43 +37724,43 @@ var ts; for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { var node = deferredUnusedIdentifierNodes_1[_i]; switch (node.kind) { - case 264: - case 232: + case 265: + case 233: checkUnusedModuleMembers(node); break; - case 228: - case 198: + case 229: + case 199: checkUnusedClassMembers(node); checkUnusedTypeParameters(node); break; - case 229: + case 230: checkUnusedTypeParameters(node); break; - case 206: - case 234: - case 213: + case 207: + case 235: case 214: case 215: + case 216: checkUnusedLocalsAndParameters(node); break; - case 151: - case 185: - case 227: - case 186: - case 150: case 152: + case 186: + case 228: + case 187: + case 151: case 153: + case 154: if (node.body) { checkUnusedLocalsAndParameters(node); } checkUnusedTypeParameters(node); break; - case 149: - case 154: + case 150: case 155: case 156: - case 159: + case 157: case 160: + case 161: checkUnusedTypeParameters(node); break; } @@ -37707,10 +37768,10 @@ var ts; } } function checkUnusedLocalsAndParameters(node) { - if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + if (node.parent.kind !== 230 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { node.locals.forEach(function (local) { if (!local.isReferenced) { - if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) { + if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) { var parameter = ts.getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !ts.isParameterPropertyDeclaration(parameter) && @@ -37736,13 +37797,13 @@ var ts; function errorUnusedLocal(node, name) { if (isIdentifierThatStartsWithUnderScore(node)) { var declaration = ts.getRootDeclaration(node.parent); - if (declaration.kind === 225 && - (declaration.parent.parent.kind === 214 || - declaration.parent.parent.kind === 215)) { + if (declaration.kind === 226 && + (declaration.parent.parent.kind === 215 || + declaration.parent.parent.kind === 216)) { return; } } - if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) { + if (!isRemovedPropertyFromObjectSpread(node.kind === 71 ? node.parent : node)) { error(node, ts.Diagnostics._0_is_declared_but_never_used, name); } } @@ -37750,19 +37811,19 @@ var ts; return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node) { - return node.kind === 70 && node.text.charCodeAt(0) === 95; + return node.kind === 71 && node.text.charCodeAt(0) === 95; } function checkUnusedClassMembers(node) { if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { if (node.members) { for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 150 || member.kind === 148) { + if (member.kind === 151 || member.kind === 149) { if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) { error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); } } - else if (member.kind === 151) { + else if (member.kind === 152) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) { @@ -37806,7 +37867,7 @@ var ts; } } function checkBlock(node) { - if (node.kind === 206) { + if (node.kind === 207) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -37828,19 +37889,19 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 148 || - node.kind === 147 || + if (node.kind === 149 || + node.kind === 148 || + node.kind === 151 || node.kind === 150 || - node.kind === 149 || - node.kind === 152 || - node.kind === 153) { + node.kind === 153 || + node.kind === 154) { return false; } if (ts.isInAmbientContext(node)) { return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 146 && ts.nodeIsMissing(root.parent.body)) { return false; } return true; @@ -37858,7 +37919,7 @@ var ts; function checkIfThisIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 4) { - var isDeclaration_1 = node.kind !== 70; + var isDeclaration_1 = node.kind !== 71; if (isDeclaration_1) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -37872,7 +37933,7 @@ var ts; function checkIfNewTargetIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 8) { - var isDeclaration_2 = node.kind !== 70; + var isDeclaration_2 = node.kind !== 71; if (isDeclaration_2) { error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } @@ -37892,7 +37953,7 @@ var ts; return; } if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_3 = node.kind !== 70; + var isDeclaration_3 = node.kind !== 71; if (isDeclaration_3) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -37908,11 +37969,11 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -37920,11 +37981,11 @@ var ts; if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) { return; } - if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 233 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { + if (parent.kind === 265 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -37932,7 +37993,7 @@ var ts; if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) { return; } - if (node.kind === 225 && !node.initializer) { + if (node.kind === 226 && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -37942,15 +38003,15 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226); - var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 227); + var container = varDeclList.parent.kind === 208 && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; var namesShareScope = container && - (container.kind === 206 && ts.isFunctionLike(container.parent) || + (container.kind === 207 && ts.isFunctionLike(container.parent) || + container.kind === 234 || container.kind === 233 || - container.kind === 232 || - container.kind === 264); + container.kind === 265); if (!namesShareScope) { var name = symbolToString(localDeclarationSymbol); error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -37960,7 +38021,7 @@ var ts; } } function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 145) { + if (ts.getRootDeclaration(node).kind !== 146) { return; } var func = ts.getContainingFunction(node); @@ -37969,10 +38030,10 @@ var ts; if (ts.isTypeNode(n) || ts.isDeclarationName(n)) { return; } - if (n.kind === 178) { + if (n.kind === 179) { return visit(n.expression); } - else if (n.kind === 70) { + else if (n.kind === 71) { var symbol = resolveName(n, n.text, 107455 | 8388608, undefined, undefined); if (!symbol || symbol === unknownSymbol || !symbol.valueDeclaration) { return; @@ -37983,8 +38044,8 @@ var ts; } var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (enclosingContainer === func) { - if (symbol.valueDeclaration.kind === 145 || - symbol.valueDeclaration.kind === 175) { + if (symbol.valueDeclaration.kind === 146 || + symbol.valueDeclaration.kind === 176) { if (symbol.valueDeclaration.pos < node.pos) { return; } @@ -37993,7 +38054,7 @@ var ts; return "quit"; } return ts.isFunctionLike(current.parent) || - (current.parent.kind === 148 && + (current.parent.kind === 149 && !(ts.hasModifier(current.parent, 32)) && ts.isClassLike(current.parent.parent)); })) { @@ -38014,17 +38075,17 @@ var ts; function checkVariableLikeDeclaration(node) { checkDecorators(node); checkSourceElement(node.type); - if (node.name.kind === 143) { + if (node.name.kind === 144) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 175) { - if (node.parent.kind === 173 && languageVersion < 5) { + if (node.kind === 176) { + if (node.parent.kind === 174 && languageVersion < 5) { checkExternalEmitHelpers(node, 4); } - if (node.propertyName && node.propertyName.kind === 143) { + if (node.propertyName && node.propertyName.kind === 144) { checkComputedPropertyName(node.propertyName); } var parent = node.parent.parent; @@ -38037,17 +38098,17 @@ var ts; } } if (ts.isBindingPattern(node.name)) { - if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) { + if (node.name.kind === 175 && languageVersion < 2 && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512); } ts.forEach(node.name.elements, checkSourceElement); } - if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 146 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (ts.isBindingPattern(node.name)) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); checkParameterInitializer(node); } @@ -38056,7 +38117,7 @@ var ts; var symbol = getSymbolOfNode(node); var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol)); if (node === symbol.valueDeclaration) { - if (node.initializer && node.parent.parent.kind !== 214) { + if (node.initializer && node.parent.parent.kind !== 215) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); checkParameterInitializer(node); } @@ -38074,9 +38135,9 @@ var ts; error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); } } - if (node.kind !== 148 && node.kind !== 147) { + if (node.kind !== 149 && node.kind !== 148) { checkExportsOnMergedDeclarations(node); - if (node.kind === 225 || node.kind === 175) { + if (node.kind === 226 || node.kind === 176) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -38087,8 +38148,8 @@ var ts; } } function areDeclarationFlagsIdentical(left, right) { - if ((left.kind === 145 && right.kind === 225) || - (left.kind === 225 && right.kind === 145)) { + if ((left.kind === 146 && right.kind === 226) || + (left.kind === 226 && right.kind === 146)) { return true; } if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) { @@ -38115,7 +38176,7 @@ var ts; ts.forEach(node.declarationList.declarations, checkSourceElement); } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { - if (node.modifiers && node.parent.kind === 177) { + if (node.modifiers && node.parent.kind === 178) { if (ts.getFunctionFlags(node) & 2) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -38134,7 +38195,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 208) { + if (node.thenStatement.kind === 209) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -38151,12 +38212,12 @@ var ts; } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 226) { + if (node.initializer && node.initializer.kind === 227) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -38174,7 +38235,7 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.kind === 215) { + if (node.kind === 216) { if (node.awaitModifier) { if (languageVersion < 4) { checkExternalEmitHelpers(node, 8192); @@ -38184,13 +38245,13 @@ var ts; checkExternalEmitHelpers(node, 256); } } - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { @@ -38209,7 +38270,7 @@ var ts; function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); var rightType = checkNonNullExpression(node.expression); - if (node.initializer.kind === 226) { + if (node.initializer.kind === 227) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -38219,7 +38280,7 @@ var ts; else { var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 176 || varExpr.kind === 177) { + if (varExpr.kind === 177 || varExpr.kind === 178) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { @@ -38431,7 +38492,7 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } function isGetAccessorWithAnnotatedSetAccessor(node) { - return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153))); + return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154))); } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2 @@ -38456,12 +38517,12 @@ var ts; if (functionFlags & 1) { return; } - if (func.kind === 153) { + if (func.kind === 154) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } } - else if (func.kind === 151) { + else if (func.kind === 152) { if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) { error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -38479,7 +38540,7 @@ var ts; } } } - else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + else if (func.kind !== 152 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } } @@ -38505,7 +38566,7 @@ var ts; var expressionType = checkExpression(node.expression); var expressionIsLiteral = isLiteralType(expressionType); ts.forEach(node.caseBlock.clauses, function (clause) { - if (clause.kind === 257 && !hasDuplicateDefaultClause) { + if (clause.kind === 258 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -38517,7 +38578,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 256) { + if (produceDiagnostics && clause.kind === 257) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); var caseIsLiteral = isLiteralType(caseType); @@ -38542,7 +38603,7 @@ var ts; if (ts.isFunctionLike(current)) { return "quit"; } - if (current.kind === 221 && current.label.text === node.label.text) { + if (current.kind === 222 && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); return true; @@ -38634,7 +38695,7 @@ var ts; return; } var errorNode; - if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) { + if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) { errorNode = propDeclaration; } else if (indexDeclaration) { @@ -38856,7 +38917,7 @@ var ts; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { return ts.filter(symbol.declarations, function (d) { - return d.kind === 228 || d.kind === 229; + return d.kind === 229 || d.kind === 230; }); } function checkKindsOfPropertyMemberOverrides(type, baseType) { @@ -38874,7 +38935,7 @@ var ts; if (derived === base) { var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) { - if (derivedClassDecl.kind === 198) { + if (derivedClassDecl.kind === 199) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -38914,7 +38975,7 @@ var ts; } } function isAccessor(kind) { - return kind === 152 || kind === 153; + return kind === 153 || kind === 154; } function checkInheritedPropertiesAreIdentical(type, typeNode) { var baseTypes = getBaseTypes(type); @@ -38956,7 +39017,7 @@ var ts; checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 230); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -39052,18 +39113,18 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 191: + case 192: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; } switch (e.operator) { - case 36: return value_1; - case 37: return -value_1; - case 51: return ~value_1; + case 37: return value_1; + case 38: return -value_1; + case 52: return ~value_1; } return undefined; - case 193: + case 194: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -39073,38 +39134,38 @@ var ts; return undefined; } switch (e.operatorToken.kind) { - case 48: return left | right; - case 47: return left & right; - case 45: return left >> right; - case 46: return left >>> right; - case 44: return left << right; - case 49: return left ^ right; - case 38: return left * right; - case 40: return left / right; - case 36: return left + right; - case 37: return left - right; - case 41: return left % right; + case 49: return left | right; + case 48: return left & right; + case 46: return left >> right; + case 47: return left >>> right; + case 45: return left << right; + case 50: return left ^ right; + case 39: return left * right; + case 41: return left / right; + case 37: return left + right; + case 38: return left - right; + case 42: return left % right; } return undefined; case 8: checkGrammarNumericLiteral(e); return +e.text; - case 184: + case 185: return evalConstant(e.expression); - case 70: + case 71: + case 180: case 179: - case 178: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; var propertyName = void 0; - if (e.kind === 70) { + if (e.kind === 71) { enumType_1 = currentType; propertyName = e.text; } else { var expression = void 0; - if (e.kind === 179) { + if (e.kind === 180) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9) { return undefined; @@ -39118,10 +39179,10 @@ var ts; } var current = expression; while (current) { - if (current.kind === 70) { + if (current.kind === 71) { break; } - else if (current.kind === 178) { + else if (current.kind === 179) { current = current.expression; } else { @@ -39182,7 +39243,7 @@ var ts; } var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 231) { + if (declaration.kind !== 232) { return false; } var enumDeclaration = declaration; @@ -39205,8 +39266,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { var declaration = declarations_8[_i]; - if ((declaration.kind === 228 || - (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 229 || + (declaration.kind === 228 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -39265,7 +39326,7 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - var mergedClass = ts.getDeclarationOfKind(symbol, 228); + var mergedClass = ts.getDeclarationOfKind(symbol, 229); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768; @@ -39308,22 +39369,22 @@ var ts; } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 207: + case 208: for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 242: case 243: + case 244: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 236: case 237: + case 238: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 175: - case 225: + case 176: + case 226: var name = node.name; if (ts.isBindingPattern(name)) { for (var _b = 0, _c = name.elements; _b < _c.length; _b++) { @@ -39332,12 +39393,12 @@ var ts; } break; } - case 228: - case 231: - case 227: case 229: case 232: + case 228: case 230: + case 233: + case 231: if (isGlobalAugmentation) { return; } @@ -39353,17 +39414,17 @@ var ts; } function getFirstIdentifier(node) { switch (node.kind) { - case 70: + case 71: return node; - case 142: + case 143: do { node = node.left; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; - case 178: + case 179: do { node = node.expression; - } while (node.kind !== 70); + } while (node.kind !== 71); return node; } } @@ -39373,9 +39434,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 264 && !inAmbientExternalModule) { - error(moduleName, node.kind === 243 ? + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 265 && !inAmbientExternalModule) { + error(moduleName, node.kind === 244 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -39396,7 +39457,7 @@ var ts; (symbol.flags & 793064 ? 793064 : 0) | (symbol.flags & 1920 ? 1920 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 245 ? + var message = node.kind === 246 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -39423,7 +39484,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239) { + if (importClause.namedBindings.kind === 240) { checkImportBinding(importClause.namedBindings); } else { @@ -39474,10 +39535,10 @@ var ts; if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent); - var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 && + var inAmbientExternalModule = node.parent.kind === 234 && ts.isAmbientModule(node.parent.parent); + var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 234 && !node.moduleSpecifier && ts.isInAmbientContext(node); - if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + if (node.parent.kind !== 265 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -39490,7 +39551,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232; + var isInAppropriateContext = node.parent.kind === 265 || node.parent.kind === 234 || node.parent.kind === 233; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -39513,8 +39574,8 @@ var ts; if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { return; } - var container = node.parent.kind === 264 ? node.parent : node.parent.parent; - if (container.kind === 232 && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 265 ? node.parent : node.parent.parent; + if (container.kind === 233 && !ts.isAmbientModule(container)) { if (node.isExportEquals) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } @@ -39526,7 +39587,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { markExportAsReferenced(node); } else { @@ -39581,7 +39642,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return (declaration.kind !== 227 && declaration.kind !== 150) || + return (declaration.kind !== 228 && declaration.kind !== 151) || !!declaration.body; } } @@ -39592,123 +39653,123 @@ var ts; var kind = node.kind; if (cancellationToken) { switch (kind) { - case 232: - case 228: + case 233: case 229: - case 227: + case 230: + case 228: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 144: - return checkTypeParameter(node); case 145: + return checkTypeParameter(node); + case 146: return checkParameter(node); + case 149: case 148: - case 147: return checkPropertyDeclaration(node); - case 159: case 160: - case 154: + case 161: case 155: - return checkSignatureDeclaration(node); case 156: return checkSignatureDeclaration(node); + case 157: + return checkSignatureDeclaration(node); + case 151: case 150: - case 149: return checkMethodDeclaration(node); - case 151: - return checkConstructorDeclaration(node); case 152: + return checkConstructorDeclaration(node); case 153: + case 154: return checkAccessorDeclaration(node); - case 158: + case 159: return checkTypeReferenceNode(node); - case 157: + case 158: return checkTypePredicate(node); - case 161: - return checkTypeQuery(node); case 162: - return checkTypeLiteral(node); + return checkTypeQuery(node); case 163: - return checkArrayType(node); + return checkTypeLiteral(node); case 164: - return checkTupleType(node); + return checkArrayType(node); case 165: + return checkTupleType(node); case 166: - return checkUnionOrIntersectionType(node); case 167: - case 169: - return checkSourceElement(node.type); + return checkUnionOrIntersectionType(node); + case 168: case 170: - return checkIndexedAccessType(node); + return checkSourceElement(node.type); case 171: + return checkIndexedAccessType(node); + case 172: return checkMappedType(node); - case 227: + case 228: return checkFunctionDeclaration(node); - case 206: - case 233: - return checkBlock(node); case 207: + case 234: + return checkBlock(node); + case 208: return checkVariableStatement(node); - case 209: - return checkExpressionStatement(node); case 210: - return checkIfStatement(node); + return checkExpressionStatement(node); case 211: - return checkDoStatement(node); + return checkIfStatement(node); case 212: - return checkWhileStatement(node); + return checkDoStatement(node); case 213: - return checkForStatement(node); + return checkWhileStatement(node); case 214: - return checkForInStatement(node); + return checkForStatement(node); case 215: - return checkForOfStatement(node); + return checkForInStatement(node); case 216: + return checkForOfStatement(node); case 217: - return checkBreakOrContinueStatement(node); case 218: - return checkReturnStatement(node); + return checkBreakOrContinueStatement(node); case 219: - return checkWithStatement(node); + return checkReturnStatement(node); case 220: - return checkSwitchStatement(node); + return checkWithStatement(node); case 221: - return checkLabeledStatement(node); + return checkSwitchStatement(node); case 222: - return checkThrowStatement(node); + return checkLabeledStatement(node); case 223: + return checkThrowStatement(node); + case 224: return checkTryStatement(node); - case 225: + case 226: return checkVariableDeclaration(node); - case 175: + case 176: return checkBindingElement(node); - case 228: - return checkClassDeclaration(node); case 229: - return checkInterfaceDeclaration(node); + return checkClassDeclaration(node); case 230: - return checkTypeAliasDeclaration(node); + return checkInterfaceDeclaration(node); case 231: - return checkEnumDeclaration(node); + return checkTypeAliasDeclaration(node); case 232: + return checkEnumDeclaration(node); + case 233: return checkModuleDeclaration(node); - case 237: + case 238: return checkImportDeclaration(node); - case 236: + case 237: return checkImportEqualsDeclaration(node); - case 243: + case 244: return checkExportDeclaration(node); - case 242: + case 243: return checkExportAssignment(node); - case 208: + case 209: checkGrammarStatementInAmbientContext(node); return; - case 224: + case 225: checkGrammarStatementInAmbientContext(node); return; - case 246: + case 247: return checkMissingDeclaration(node); } } @@ -39721,17 +39782,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 185: case 186: + case 187: + case 151: case 150: - case 149: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 152: case 153: + case 154: checkAccessorDeclaration(node); break; - case 198: + case 199: checkClassExpressionDeferred(node); break; } @@ -39819,7 +39880,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 219 && node.parent.statement === node) { + if (node.parent.kind === 220 && node.parent.statement === node) { return true; } node = node.parent; @@ -39841,28 +39902,28 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 264: + case 265: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 232: + case 233: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931); break; - case 231: + case 232: copySymbols(getSymbolOfNode(location).exports, meaning & 8); break; - case 198: + case 199: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 228: case 229: + case 230: if (!(memberFlags & 32)) { copySymbols(getSymbolOfNode(location).members, meaning & 793064); } break; - case 185: + case 186: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -39894,33 +39955,33 @@ var ts; } } function isTypeDeclarationName(name) { - return name.kind === 70 && + return name.kind === 71 && isTypeDeclaration(name.parent) && name.parent.name === name; } function isTypeDeclaration(node) { switch (node.kind) { - case 144: - case 228: + case 145: case 229: case 230: case 231: + case 232: return true; } } function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 142) { + while (node.parent && node.parent.kind === 143) { node = node.parent; } - return node.parent && (node.parent.kind === 158 || node.parent.kind === 276); + return node.parent && (node.parent.kind === 159 || node.parent.kind === 277); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 178) { + while (node.parent && node.parent.kind === 179) { node = node.parent; } - return node.parent && node.parent.kind === 200; + return node.parent && node.parent.kind === 201; } function forEachEnclosingClass(node, callback) { var result; @@ -39937,13 +39998,13 @@ var ts; return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 142) { + while (nodeOnRightSide.parent.kind === 143) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 236) { + if (nodeOnRightSide.parent.kind === 237) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 242) { + if (nodeOnRightSide.parent.kind === 243) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -39968,18 +40029,18 @@ var ts; return getSymbolOfNode(entityName.parent); } if (ts.isInJavaScriptFile(entityName) && - entityName.parent.kind === 178 && + entityName.parent.kind === 179 && entityName.parent === entityName.parent.parent.left) { var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); if (specialPropertyAssignmentSymbol) { return specialPropertyAssignmentSymbol; } } - if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) { + if (entityName.parent.kind === 243 && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608); } - if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) { - var importEqualsDeclaration = ts.getAncestor(entityName, 236); + if (entityName.kind !== 179 && isInRightSideOfImportOrExportAssignment(entityName)) { + var importEqualsDeclaration = ts.getAncestor(entityName, 237); ts.Debug.assert(importEqualsDeclaration !== undefined); return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true); } @@ -39988,7 +40049,7 @@ var ts; } if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0; - if (entityName.parent.kind === 200) { + if (entityName.parent.kind === 201) { meaning = 793064; if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455; @@ -40007,20 +40068,20 @@ var ts; if (ts.nodeIsMissing(entityName)) { return undefined; } - if (entityName.kind === 70) { + if (entityName.kind === 71) { if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { return getIntrinsicTagSymbol(entityName.parent); } return resolveEntityName(entityName, 107455, false, true); } - else if (entityName.kind === 178) { + else if (entityName.kind === 179) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 142) { + else if (entityName.kind === 143) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -40029,19 +40090,19 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920; + var meaning = (entityName.parent.kind === 159 || entityName.parent.kind === 277) ? 793064 : 1920; return resolveEntityName(entityName, meaning, false, true); } - else if (entityName.parent.kind === 252) { + else if (entityName.parent.kind === 253) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 157) { + if (entityName.parent.kind === 158) { return resolveEntityName(entityName, 1); } return undefined; } function getSymbolAtLocation(node) { - if (node.kind === 264) { + if (node.kind === 265) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } if (isInsideWithStatementBody(node)) { @@ -40053,12 +40114,12 @@ var ts; else if (ts.isLiteralComputedPropertyDeclarationName(node)) { return getSymbolOfNode(node.parent.parent); } - if (node.kind === 70) { + if (node.kind === 71) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 175 && - node.parent.parent.kind === 173 && + else if (node.parent.kind === 176 && + node.parent.parent.kind === 174 && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -40068,11 +40129,11 @@ var ts; } } switch (node.kind) { - case 70: - case 178: - case 142: + case 71: + case 179: + case 143: return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 98: + case 99: var container = ts.getThisContainer(node, false); if (ts.isFunctionLike(container)) { var sig = getSignatureFromDeclaration(container); @@ -40080,21 +40141,21 @@ var ts; return sig.thisParameter; } } - case 96: + case 97: var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 168: + case 169: return getTypeFromTypeNode(node).symbol; - case 122: + case 123: var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 151) { + if (constructorDeclaration && constructorDeclaration.kind === 152) { return constructorDeclaration.parent.symbol; } return undefined; case 9: if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 237 || node.parent.kind === 243) && + ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } @@ -40102,7 +40163,7 @@ var ts; return resolveExternalModuleName(node, node); } case 8: - if (node.parent.kind === 179 && node.parent.argumentExpression === node) { + if (node.parent.kind === 180 && node.parent.argumentExpression === node) { var objectType = getTypeOfExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -40116,7 +40177,7 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 261) { + if (location && location.kind === 262) { return resolveEntityName(location.name, 107455 | 8388608); } return undefined; @@ -40175,20 +40236,20 @@ var ts; return unknownType; } function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { - ts.Debug.assert(expr.kind === 177 || expr.kind === 176); - if (expr.parent.kind === 215) { + ts.Debug.assert(expr.kind === 178 || expr.kind === 177); + if (expr.parent.kind === 216) { var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 193) { + if (expr.parent.kind === 194) { var iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || unknownType); } - if (expr.parent.kind === 260) { + if (expr.parent.kind === 261) { var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); } - ts.Debug.assert(expr.parent.kind === 176); + ts.Debug.assert(expr.parent.kind === 177); var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType; return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType); @@ -40256,7 +40317,7 @@ var ts; if (!ts.isGeneratedIdentifier(node)) { node = ts.getParseTreeNode(node, ts.isIdentifier); if (node) { - var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node; + var isPropertyName_1 = node.parent.kind === 179 && node.parent.name === node; return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol; } } @@ -40299,7 +40360,7 @@ var ts; } var parentSymbol_1 = getParentOfSymbol(symbol); if (parentSymbol_1) { - if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) { + if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 265) { var symbolFile = parentSymbol_1.valueDeclaration; var referenceFile = ts.getSourceFileOfNode(node); var symbolIsUmdExport = symbolFile !== referenceFile; @@ -40333,7 +40394,7 @@ var ts; else if (nodeLinks_1.flags & 131072) { var isDeclaredInLoop = nodeLinks_1.flags & 262144; var inLoopInitializer = ts.isIterationStatement(container, false); - var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false); + var inLoopBodyBlock = container.kind === 207 && ts.isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { @@ -40369,18 +40430,18 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 236: - case 238: + case 237: case 239: - case 241: - case 245: + case 240: + case 242: + case 246: return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); - case 243: + case 244: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 242: + case 243: return node.expression - && node.expression.kind === 70 + && node.expression.kind === 71 ? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) : true; } @@ -40388,7 +40449,7 @@ var ts; } function isTopLevelValueImportEqualsWithEntityName(node) { node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration); - if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node === undefined || node.parent.kind !== 265 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -40441,15 +40502,15 @@ var ts; } function canHaveConstantValue(node) { switch (node.kind) { - case 263: - case 178: + case 264: case 179: + case 180: return true; } return false; } function getConstantValue(node) { - if (node.kind === 263) { + if (node.kind === 264) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -40643,7 +40704,7 @@ var ts; if (!fileToDirective) { return undefined; } - var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node)) + var meaning = (node.kind === 179) || (node.kind === 71 && isInTypeQuery(node)) ? 107455 | 1048576 : 793064 | 1920; var symbol = resolveEntityName(node, meaning, true); @@ -40686,7 +40747,7 @@ var ts; break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) { + if (current.valueDeclaration && current.valueDeclaration.kind === 265 && current.flags & 512) { return false; } for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { @@ -40705,7 +40766,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 264); + return ts.getDeclarationOfKind(moduleSymbol, 265); } function initializeTypeChecker() { for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) { @@ -40810,14 +40871,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 150 && !ts.nodeIsPresent(node.body)) { + if (node.kind === 151 && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 152 || node.kind === 153) { + else if (node.kind === 153 || node.kind === 154) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -40834,28 +40895,28 @@ var ts; var flags = 0; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 130) { - if (node.kind === 147 || node.kind === 149) { + if (modifier.kind !== 131) { + if (node.kind === 148 || node.kind === 150) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); } - if (node.kind === 156) { + if (node.kind === 157) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 75: - if (node.kind !== 231 && node.parent.kind === 228) { - return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75)); + case 76: + if (node.kind !== 232 && node.parent.kind === 229) { + return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(76)); } break; + case 114: case 113: case 112: - case 111: var text = visibilityToString(ts.modifierToFlag(modifier.kind)); - if (modifier.kind === 112) { + if (modifier.kind === 113) { lastProtected = modifier; } - else if (modifier.kind === 111) { + else if (modifier.kind === 112) { lastPrivate = modifier; } if (flags & 28) { @@ -40870,11 +40931,11 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128) { - if (modifier.kind === 111) { + if (modifier.kind === 112) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -40883,7 +40944,7 @@ var ts; } flags |= ts.modifierToFlag(modifier.kind); break; - case 114: + case 115: if (flags & 32) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } @@ -40893,10 +40954,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 233 || node.parent.kind === 264) { + else if (node.parent.kind === 234 || node.parent.kind === 265) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128) { @@ -40905,17 +40966,17 @@ var ts; flags |= 32; lastStatic = modifier; break; - case 130: + case 131: if (flags & 64) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); } - else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) { + else if (node.kind !== 149 && node.kind !== 148 && node.kind !== 157 && node.kind !== 146) { return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64; lastReadonly = modifier; break; - case 83: + case 84: if (flags & 1) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } @@ -40928,45 +40989,45 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1; break; - case 123: + case 124: if (flags & 2) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 234) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 2; lastDeclare = modifier; break; - case 116: + case 117: if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 228) { - if (node.kind !== 150 && - node.kind !== 148 && - node.kind !== 152 && - node.kind !== 153) { + if (node.kind !== 229) { + if (node.kind !== 151 && + node.kind !== 149 && + node.kind !== 153 && + node.kind !== 154) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) { + if (!(node.parent.kind === 229 && ts.getModifierFlags(node.parent) & 128)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32) { @@ -40978,14 +41039,14 @@ var ts; } flags |= 128; break; - case 119: + case 120: if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 145) { + else if (node.kind === 146) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256; @@ -40993,7 +41054,7 @@ var ts; break; } } - if (node.kind === 151) { + if (node.kind === 152) { if (flags & 32) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -41008,13 +41069,13 @@ var ts; } return; } - else if ((node.kind === 237 || node.kind === 236) && flags & 2) { + else if ((node.kind === 238 || node.kind === 237) && flags & 2) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) { + else if (node.kind === 146 && (flags & 92) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); } - else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) { + else if (node.kind === 146 && (flags & 92) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256) { @@ -41030,38 +41091,38 @@ var ts; } function shouldReportBadModifier(node) { switch (node.kind) { - case 152: case 153: - case 151: + case 154: + case 152: + case 149: case 148: - case 147: + case 151: case 150: - case 149: - case 156: - case 232: + case 157: + case 233: + case 238: case 237: - case 236: + case 244: case 243: - case 242: - case 185: case 186: - case 145: + case 187: + case 146: return false; default: - if (node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 234 || node.parent.kind === 265) { return false; } switch (node.kind) { - case 227: - return nodeHasAnyModifiersExcept(node, 119); case 228: - return nodeHasAnyModifiersExcept(node, 116); + return nodeHasAnyModifiersExcept(node, 120); case 229: - case 207: + return nodeHasAnyModifiersExcept(node, 117); case 230: - return true; + case 208: case 231: - return nodeHasAnyModifiersExcept(node, 75); + return true; + case 232: + return nodeHasAnyModifiersExcept(node, 76); default: ts.Debug.fail(); return false; @@ -41073,10 +41134,10 @@ var ts; } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 150: - case 227: - case 185: + case 151: + case 228: case 186: + case 187: return false; } return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -41139,7 +41200,7 @@ var ts; return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 186) { + if (node.kind === 187) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -41174,7 +41235,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 135 && parameter.type.kind !== 132) { + if (parameter.type.kind !== 136 && parameter.type.kind !== 133) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -41201,7 +41262,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_4 = args; _i < args_4.length; _i++) { var arg = args_4[_i]; - if (arg.kind === 199) { + if (arg.kind === 200) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -41227,7 +41288,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } @@ -41240,7 +41301,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -41255,14 +41316,14 @@ var ts; if (node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84) { + if (heritageClause.token === 85) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107); + ts.Debug.assert(heritageClause.token === 108); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -41271,19 +41332,19 @@ var ts; return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 143) { + if (node.kind !== 144) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) { + if (computedPropertyName.expression.kind === 194 && computedPropertyName.expression.operatorToken.kind === 26) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 227 || - node.kind === 185 || - node.kind === 150); + ts.Debug.assert(node.kind === 228 || + node.kind === 186 || + node.kind === 151); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -41305,39 +41366,39 @@ var ts; var GetOrSetAccessor = GetAccessor | SetAccessor; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262) { + if (prop.kind === 263) { continue; } var name = prop.name; - if (name.kind === 143) { + if (name.kind === 144) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 262 && !inDestructuring && prop.objectAssignmentInitializer) { return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); } if (prop.modifiers) { for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { var mod = _c[_b]; - if (mod.kind !== 119 || prop.kind !== 150) { + if (mod.kind !== 120 || prop.kind !== 151) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } } } var currentKind = void 0; - if (prop.kind === 260 || prop.kind === 261) { + if (prop.kind === 261 || prop.kind === 262) { checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8) { checkGrammarNumericLiteral(name); } currentKind = Property; } - else if (prop.kind === 150) { + else if (prop.kind === 151) { currentKind = Property; } - else if (prop.kind === 152) { + else if (prop.kind === 153) { currentKind = GetAccessor; } - else if (prop.kind === 153) { + else if (prop.kind === 154) { currentKind = SetAccessor; } else { @@ -41373,7 +41434,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 254) { + if (attr.kind === 255) { continue; } var jsxAttr = attr; @@ -41385,7 +41446,7 @@ var ts; return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 255 && !initializer.expression) { + if (initializer && initializer.kind === 256 && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -41394,12 +41455,12 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 216 && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & 16384) === 0) { return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); } } - if (forInOrOfStatement.initializer.kind === 226) { + if (forInOrOfStatement.initializer.kind === 227) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -41407,20 +41468,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 214 + var diagnostic = forInOrOfStatement.kind === 215 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -41447,11 +41508,11 @@ var ts; return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 152 ? + return grammarErrorOnNode(accessor.name, kind === 153 ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 153) { + else if (kind === 154) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -41470,10 +41531,10 @@ var ts; } } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 153 ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 153 ? 1 : 2)) { return ts.getThisParameter(accessor); } } @@ -41488,7 +41549,7 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 177) { + if (node.parent.kind === 178) { if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } @@ -41504,10 +41565,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -41518,9 +41579,9 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 221: + case 222: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 216 + var isMisplacedContinueLabel = node.kind === 217 && !ts.isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -41528,8 +41589,8 @@ var ts; return false; } break; - case 220: - if (node.kind === 217 && !node.label) { + case 221: + if (node.kind === 218 && !node.label) { return false; } break; @@ -41542,13 +41603,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 217 + var message = node.kind === 218 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -41560,7 +41621,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } - if (node.name.kind === 174 || node.name.kind === 173) { + if (node.name.kind === 175 || node.name.kind === 174) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -41570,11 +41631,11 @@ var ts; } function isStringOrNumberLiteralExpression(expr) { return expr.kind === 9 || expr.kind === 8 || - expr.kind === 191 && expr.operator === 37 && + expr.kind === 192 && expr.operator === 38 && expr.operand.kind === 8; } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) { + if (node.parent.parent.kind !== 215 && node.parent.parent.kind !== 216) { if (ts.isInAmbientContext(node)) { if (node.initializer) { if (ts.isConst(node) && !node.type) { @@ -41609,7 +41670,7 @@ var ts; return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { - if (name.kind === 70) { + if (name.kind === 71) { if (ts.unescapeIdentifier(name.text) === "__esModule") { return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); } @@ -41625,8 +41686,8 @@ var ts; } } function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 70) { - if (name.originalKeywordKind === 109) { + if (name.kind === 71) { + if (name.originalKeywordKind === 110) { return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); } } @@ -41651,15 +41712,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 210: case 211: case 212: - case 219: case 213: + case 220: case 214: case 215: + case 216: return false; - case 221: + case 222: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -41675,7 +41736,7 @@ var ts; } } function checkGrammarMetaProperty(node) { - if (node.keywordToken === 93) { + if (node.keywordToken === 94) { if (node.name.text !== "target") { return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target"); } @@ -41721,7 +41782,7 @@ var ts; return true; } } - else if (node.parent.kind === 229) { + else if (node.parent.kind === 230) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -41729,7 +41790,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 162) { + else if (node.parent.kind === 163) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -41742,13 +41803,13 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 229 || - node.kind === 230 || + if (node.kind === 230 || + node.kind === 231 || + node.kind === 238 || node.kind === 237 || - node.kind === 236 || + node.kind === 244 || node.kind === 243 || - node.kind === 242 || - node.kind === 235 || + node.kind === 236 || ts.getModifierFlags(node) & (2 | 1 | 512)) { return false; } @@ -41757,7 +41818,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 207) { + if (ts.isDeclaration(decl) || decl.kind === 208) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -41776,7 +41837,7 @@ var ts; if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) { + if (node.parent.kind === 207 || node.parent.kind === 234 || node.parent.kind === 265) { var links_1 = getNodeLinks(node.parent); if (!links_1.hasReportedStatementInAmbientContext) { return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -41792,14 +41853,14 @@ var ts; if (languageVersion >= 1) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 172)) { + else if (ts.isChildOfNodeWithKind(node, 173)) { diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 263)) { + else if (ts.isChildOfNodeWithKind(node, 264)) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { - var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37; + var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 38; var literal = (withMinus ? "-" : "") + "0o" + node.text; return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal); } @@ -41931,243 +41992,243 @@ var ts; return undefined; } var kind = node.kind; - if ((kind > 0 && kind <= 141) || kind === 168) { + if ((kind > 0 && kind <= 142) || kind === 169) { return node; } switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 297: - case 246: + case 206: + case 209: + case 200: + case 225: + case 298: + case 247: return node; - case 142: - return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); case 143: + return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); + case 144: return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression)); - case 159: - return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 160: + return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 161: return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 154: - return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); case 155: + return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); + case 156: return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 149: + case 150: return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken)); - case 156: + case 157: return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 145: - return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 146: + return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 147: return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression)); - case 158: + case 159: return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode)); - case 157: + case 158: return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 161: - return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 162: - return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); + return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); case 163: - return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); + return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); case 164: - return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); + return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); case 165: + return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); case 166: - return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); case 167: + return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); + case 168: throw ts.Debug.fail("not implemented."); - case 169: - return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 170: - return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); + return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); case 171: - return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); case 172: + return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); + case 173: return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression)); - case 144: + case 145: return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode)); - case 147: - return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 148: + return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); + case 149: return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 150: - return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 151: - return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); + return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 152: - return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); case 153: + return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 154: return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); - case 173: - return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 174: - return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); + return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); case 175: - return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); case 176: - return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); + return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); case 177: - return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); + return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); case 178: - return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); case 179: - return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); + return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); case 180: - return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); case 181: - return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); + return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 182: - return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); + return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); case 183: - return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); case 184: - return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 185: - return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); case 186: - return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 187: - return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); case 188: - return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); case 189: - return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); case 190: + return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); + case 191: return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression)); - case 193: + case 194: return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression)); - case 191: - return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); case 192: + return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); + case 193: return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 194: - return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 195: - return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); + return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); case 196: - return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); case 197: - return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); case 198: + return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); + case 199: return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 200: - return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 201: - return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); case 202: + return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); + case 203: return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 204: + case 205: return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail)); - case 206: - return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 207: + return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 208: return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList)); - case 209: - return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 210: - return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); case 211: - return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); case 212: - return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); case 213: - return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 214: - return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 215: - return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 216: - return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 217: - return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); + return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); case 218: - return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); case 219: - return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); case 220: - return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); + return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 221: - return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); case 222: - return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); case 223: + return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); + case 224: return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock)); - case 225: - return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 226: - return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); + return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); case 227: - return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); case 228: + return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); + case 229: return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 231: - return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 232: - return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); + return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); case 233: - return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); case 234: + return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + case 235: return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause)); - case 236: - return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 237: - return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); case 238: - return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); + return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 239: - return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); case 240: - return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); + return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); case 241: - return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); + return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); case 242: - return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); case 243: - return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); + return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); case 244: - return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); case 245: + return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); + case 246: return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); - case 247: - return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); case 248: + return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); + case 249: return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement)); - case 253: + case 254: return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike)); - case 249: - return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 250: - return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); + return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 251: - return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); case 252: + return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); + case 253: return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression)); - case 254: - return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 255: - return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); case 256: - return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); case 257: - return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); + return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); case 258: - return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); + return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); case 259: - return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); + return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); case 260: - return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); case 261: - return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); + return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); case 262: - return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); + return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); case 263: - return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); case 264: + return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); + case 265: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); - case 295: + case 296: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); default: return node; @@ -42193,45 +42254,45 @@ var ts; var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft; var cbNodes = cbNodeArray || cbNode; var kind = node.kind; - if ((kind > 0 && kind <= 141)) { + if ((kind > 0 && kind <= 142)) { return initial; } - if ((kind >= 157 && kind <= 172)) { + if ((kind >= 158 && kind <= 173)) { return initial; } var result = initial; switch (node.kind) { - case 205: - case 208: - case 199: - case 224: - case 294: + case 206: + case 209: + case 200: + case 225: + case 295: break; - case 142: + case 143: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 143: + case 144: result = reduceNode(node.expression, cbNode, result); break; - case 145: + case 146: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 146: + case 147: result = reduceNode(node.expression, cbNode, result); break; - case 148: + case 149: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 150: + case 151: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -42240,12 +42301,12 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 151: + case 152: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 152: + case 153: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -42253,55 +42314,55 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 153: + case 154: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 173: case 174: + case 175: result = reduceNodes(node.elements, cbNodes, result); break; - case 175: + case 176: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 176: + case 177: result = reduceNodes(node.elements, cbNodes, result); break; - case 177: + case 178: result = reduceNodes(node.properties, cbNodes, result); break; - case 178: + case 179: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 179: + case 180: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.argumentExpression, cbNode, result); break; - case 180: + case 181: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 181: + case 182: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 182: + case 183: result = reduceNode(node.tag, cbNode, result); result = reduceNode(node.template, cbNode, result); break; - case 183: + case 184: result = reduceNode(node.type, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 185: + case 186: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); @@ -42309,124 +42370,124 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 186: + case 187: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 184: - case 187: + case 185: case 188: case 189: case 190: - case 196: + case 191: case 197: - case 202: + case 198: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 191: case 192: + case 193: result = reduceNode(node.operand, cbNode, result); break; - case 193: + case 194: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 194: + case 195: result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.whenTrue, cbNode, result); result = reduceNode(node.whenFalse, cbNode, result); break; - case 195: + case 196: result = reduceNode(node.head, cbNode, result); result = reduceNodes(node.templateSpans, cbNodes, result); break; - case 198: + case 199: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 200: + case 201: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); break; - case 201: + case 202: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.type, cbNode, result); break; - case 202: + case 203: result = reduceNode(node.expression, cbNode, result); break; - case 204: + case 205: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.literal, cbNode, result); break; - case 206: + case 207: result = reduceNodes(node.statements, cbNodes, result); break; - case 207: + case 208: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.declarationList, cbNode, result); break; - case 209: + case 210: result = reduceNode(node.expression, cbNode, result); break; - case 210: + case 211: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.thenStatement, cbNode, result); result = reduceNode(node.elseStatement, cbNode, result); break; - case 211: + case 212: result = reduceNode(node.statement, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 212: - case 219: + case 213: + case 220: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 213: + case 214: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.incrementor, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 214: case 215: + case 216: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 218: - case 222: + case 219: + case 223: result = reduceNode(node.expression, cbNode, result); break; - case 220: + case 221: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.caseBlock, cbNode, result); break; - case 221: + case 222: result = reduceNode(node.label, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 223: + case 224: result = reduceNode(node.tryBlock, cbNode, result); result = reduceNode(node.catchClause, cbNode, result); result = reduceNode(node.finallyBlock, cbNode, result); break; - case 225: + case 226: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 226: + case 227: result = reduceNodes(node.declarations, cbNodes, result); break; - case 227: + case 228: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -42435,7 +42496,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 228: + case 229: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -42443,123 +42504,123 @@ var ts; result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 231: + case 232: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.members, cbNodes, result); break; - case 232: + case 233: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 233: + case 234: result = reduceNodes(node.statements, cbNodes, result); break; - case 234: + case 235: result = reduceNodes(node.clauses, cbNodes, result); break; - case 236: + case 237: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.moduleReference, cbNode, result); break; - case 237: + case 238: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.importClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 238: - result = reduceNode(node.name, cbNode, result); - result = reduceNode(node.namedBindings, cbNode, result); - break; case 239: result = reduceNode(node.name, cbNode, result); + result = reduceNode(node.namedBindings, cbNode, result); break; case 240: - case 244: - result = reduceNodes(node.elements, cbNodes, result); + result = reduceNode(node.name, cbNode, result); break; case 241: case 245: + result = reduceNodes(node.elements, cbNodes, result); + break; + case 242: + case 246: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 242: + case 243: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 243: + case 244: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.exportClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 247: + case 248: result = reduceNode(node.expression, cbNode, result); break; - case 248: + case 249: result = reduceNode(node.openingElement, cbNode, result); result = ts.reduceLeft(node.children, cbNode, result); result = reduceNode(node.closingElement, cbNode, result); break; - case 249: case 250: + case 251: result = reduceNode(node.tagName, cbNode, result); result = reduceNode(node.attributes, cbNode, result); break; - case 253: + case 254: result = reduceNodes(node.properties, cbNodes, result); break; - case 251: + case 252: result = reduceNode(node.tagName, cbNode, result); break; - case 252: + case 253: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 254: - result = reduceNode(node.expression, cbNode, result); - break; case 255: result = reduceNode(node.expression, cbNode, result); break; case 256: result = reduceNode(node.expression, cbNode, result); + break; case 257: + result = reduceNode(node.expression, cbNode, result); + case 258: result = reduceNodes(node.statements, cbNodes, result); break; - case 258: + case 259: result = reduceNodes(node.types, cbNodes, result); break; - case 259: + case 260: result = reduceNode(node.variableDeclaration, cbNode, result); result = reduceNode(node.block, cbNode, result); break; - case 260: + case 261: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 261: + case 262: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.objectAssignmentInitializer, cbNode, result); break; - case 262: + case 263: result = reduceNode(node.expression, cbNode, result); break; - case 263: + case 264: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 264: + case 265: result = reduceNodes(node.statements, cbNodes, result); break; - case 295: + case 296: result = reduceNode(node.expression, cbNode, result); break; default: @@ -42612,7 +42673,7 @@ var ts; return subtreeFlags; } function aggregateTransformFlagsForSubtree(node) { - if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) { + if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 201)) { return 0; } return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes); @@ -43000,8 +43061,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); context.enableSubstitution(179); + context.enableSubstitution(180); var currentSourceFile; var currentNamespace; var currentNamespaceContainerName; @@ -43034,15 +43095,15 @@ var ts; } function onBeforeVisitNode(node) { switch (node.kind) { - case 264: + case 265: + case 235: case 234: - case 233: - case 206: + case 207: currentScope = node; currentScopeFirstDeclarationsOfName = undefined; break; + case 229: case 228: - case 227: if (ts.hasModifier(node, 2)) { break; } @@ -43067,13 +43128,13 @@ var ts; } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 242: - return visitExportAssignment(node); case 243: + return visitExportAssignment(node); + case 244: return visitExportDeclaration(node); default: return visitorWorker(node); @@ -43083,11 +43144,11 @@ var ts; return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 243 || - node.kind === 237 || + if (node.kind === 244 || node.kind === 238 || - (node.kind === 236 && - node.moduleReference.kind === 247)) { + node.kind === 239 || + (node.kind === 237 && + node.moduleReference.kind === 248)) { return undefined; } else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) { @@ -43103,15 +43164,15 @@ var ts; } function classElementVisitorWorker(node) { switch (node.kind) { - case 151: - return undefined; - case 148: - case 156: case 152: + return undefined; + case 149: + case 157: case 153: - case 150: + case 154: + case 151: return visitorWorker(node); - case 205: + case 206: return node; default: ts.Debug.failBadSyntaxKind(node); @@ -43122,7 +43183,7 @@ var ts; if (ts.modifierToFlag(node.kind) & 2270) { return undefined; } - else if (currentNamespace && node.kind === 83) { + else if (currentNamespace && node.kind === 84) { return undefined; } return node; @@ -43132,33 +43193,32 @@ var ts; return ts.createNotEmittedStatement(node); } switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return currentNamespace ? undefined : node; - case 113: - case 111: + case 114: case 112: - case 116: - case 75: - case 123: - case 130: - case 163: + case 113: + case 117: + case 76: + case 124: + case 131: case 164: - case 162: - case 157: - case 144: - case 118: - case 121: - case 135: - case 132: - case 129: - case 104: + case 165: + case 163: + case 158: + case 145: + case 119: + case 122: case 136: + case 133: + case 130: + case 105: + case 137: + case 161: case 160: + case 162: case 159: - case 161: - case 158: - case 165: case 166: case 167: case 168: @@ -43166,57 +43226,58 @@ var ts; case 170: case 171: case 172: - case 156: - case 146: - case 230: - case 148: + case 173: + case 157: + case 147: + case 231: + case 149: return undefined; - case 151: + case 152: return visitConstructor(node); - case 229: + case 230: return ts.createNotEmittedStatement(node); - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 258: + case 259: return visitHeritageClause(node); - case 200: + case 201: return visitExpressionWithTypeArguments(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessor(node); case 153: + return visitGetAccessor(node); + case 154: return visitSetAccessor(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 184: + case 185: return visitParenthesizedExpression(node); - case 183: - case 201: + case 184: + case 202: return visitAssertionExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 202: + case 203: return visitNonNullExpression(node); - case 231: + case 232: return visitEnumDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 232: + case 233: return visitModuleDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); default: ts.Debug.failBadSyntaxKind(node); @@ -43307,7 +43368,7 @@ var ts; function visitClassExpression(node) { var staticProperties = getInitializedProperties(node, true); var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; })); + var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 85; })); var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members); ts.setOriginalNode(classExpression, node); ts.setTextRange(classExpression, node); @@ -43378,7 +43439,7 @@ var ts; return index; } var statement = statements[index]; - if (statement.kind === 209 && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 && ts.isSuperCall(statement.expression)) { result.push(ts.visitNode(statement, visitor, ts.isStatement)); return index + 1; } @@ -43412,7 +43473,7 @@ var ts; return isInitializedProperty(member, false); } function isInitializedProperty(member, isStatic) { - return member.kind === 148 + return member.kind === 149 && isStatic === ts.hasModifier(member, 32) && member.initializer !== undefined; } @@ -43485,12 +43546,12 @@ var ts; } function getAllDecoratorsOfClassElement(node, member) { switch (member.kind) { - case 152: case 153: + case 154: return getAllDecoratorsOfAccessors(node, member); - case 150: + case 151: return getAllDecoratorsOfMethod(member); - case 148: + case 149: return getAllDecoratorsOfProperty(member); default: return undefined; @@ -43569,7 +43630,7 @@ var ts; var prefix = getClassMemberPrefix(node, member); var memberName = getExpressionForPropertyName(member, true); var descriptor = languageVersion > 0 - ? member.kind === 148 + ? member.kind === 149 ? ts.createVoidZero() : ts.createNull() : undefined; @@ -43638,13 +43699,13 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { var properties = void 0; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeParameterTypesOfNode(node, container)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(36), serializeReturnTypeOfNode(node)))); } if (properties) { decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true))); @@ -43653,37 +43714,37 @@ var ts; } function shouldAddTypeMetadata(node) { var kind = node.kind; - return kind === 150 - || kind === 152 + return kind === 151 || kind === 153 - || kind === 148; + || kind === 154 + || kind === 149; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 150; + return node.kind === 151; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 228: - case 198: + case 229: + case 199: return ts.getFirstConstructorWithBody(node) !== undefined; - case 150: - case 152: + case 151: case 153: + case 154: return true; } return false; } function serializeTypeOfNode(node) { switch (node.kind) { - case 148: - case 145: - case 152: - return serializeTypeNode(node.type); + case 149: + case 146: case 153: + return serializeTypeNode(node.type); + case 154: return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); - case 228: - case 198: - case 150: + case 229: + case 199: + case 151: return ts.createIdentifier("Function"); default: return ts.createVoidZero(); @@ -43715,7 +43776,7 @@ var ts; return ts.createArrayLiteral(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 152) { + if (container && node.kind === 153) { var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor; if (setAccessor) { return setAccessor.parameters; @@ -43737,58 +43798,58 @@ var ts; return ts.createIdentifier("Object"); } switch (node.kind) { - case 104: - case 138: - case 94: - case 129: + case 105: + case 139: + case 95: + case 130: return ts.createVoidZero(); - case 167: + case 168: return serializeTypeNode(node.type); - case 159: case 160: + case 161: return ts.createIdentifier("Function"); - case 163: case 164: + case 165: return ts.createIdentifier("Array"); - case 157: - case 121: + case 158: + case 122: return ts.createIdentifier("Boolean"); - case 135: + case 136: return ts.createIdentifier("String"); - case 133: + case 134: return ts.createIdentifier("Object"); - case 172: + case 173: switch (node.literal.kind) { case 9: return ts.createIdentifier("String"); case 8: return ts.createIdentifier("Number"); - case 100: - case 85: + case 101: + case 86: return ts.createIdentifier("Boolean"); default: ts.Debug.failBadSyntaxKind(node.literal); break; } break; - case 132: + case 133: return ts.createIdentifier("Number"); - case 136: + case 137: return languageVersion < 2 ? getGlobalSymbolNameWithFallback() : ts.createIdentifier("Symbol"); - case 158: + case 159: return serializeTypeReferenceNode(node); + case 167: case 166: - case 165: return serializeUnionOrIntersectionType(node); - case 161: - case 169: + case 162: case 170: case 171: - case 162: - case 118: - case 168: + case 172: + case 163: + case 119: + case 169: break; default: ts.Debug.failBadSyntaxKind(node); @@ -43855,7 +43916,7 @@ var ts; } function serializeEntityNameAsExpression(node, useFallback) { switch (node.kind) { - case 70: + case 71: var name = ts.getMutableClone(node); name.flags &= ~8; name.original = undefined; @@ -43864,13 +43925,13 @@ var ts; return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name); } return name; - case 142: + case 143: return serializeQualifiedNameAsExpression(node, useFallback); } } function serializeQualifiedNameAsExpression(node, useFallback) { var left; - if (node.left.kind === 70) { + if (node.left.kind === 71) { left = serializeEntityNameAsExpression(node.left, useFallback); } else if (useFallback) { @@ -43915,9 +43976,9 @@ var ts; } } function visitHeritageClause(node) { - if (node.token === 84) { + if (node.token === 85) { var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1); - return ts.setTextRange(ts.createHeritageClause(84, types), node); + return ts.setTextRange(ts.createHeritageClause(85, types), node); } return undefined; } @@ -44149,7 +44210,7 @@ var ts; ts.setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 231) { + if (node.kind === 232) { ts.setSourceMapRange(statement.declarationList, node); } else { @@ -44210,7 +44271,7 @@ var ts; var statementsLocation; var blockLocation; var body = node.body; - if (body.kind === 233) { + if (body.kind === 234) { saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); }); statementsLocation = body.statements; blockLocation = body; @@ -44234,13 +44295,13 @@ var ts; currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true); ts.setTextRange(block, blockLocation); - if (body.kind !== 233) { + if (body.kind !== 234) { ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 232) { + if (moduleDeclaration.body.kind === 233) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -44260,7 +44321,7 @@ var ts; return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined; } function visitNamedImportBindings(node) { - if (node.kind === 239) { + if (node.kind === 240) { return resolver.isReferencedAliasDeclaration(node) ? node : undefined; } else { @@ -44381,29 +44442,29 @@ var ts; function enableSubstitutionForNonQualifiedEnumMembers() { if ((enabledSubstitutions & 8) === 0) { enabledSubstitutions |= 8; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionForClassAliases() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(70); + context.enableSubstitution(71); classAliases = []; } } function enableSubstitutionForNamespaceExports() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); - context.enableSubstitution(261); - context.enableEmitNotification(232); + context.enableSubstitution(71); + context.enableSubstitution(262); + context.enableEmitNotification(233); } } function isTransformedModuleDeclaration(node) { - return ts.getOriginalNode(node).kind === 232; + return ts.getOriginalNode(node).kind === 233; } function isTransformedEnumDeclaration(node) { - return ts.getOriginalNode(node).kind === 231; + return ts.getOriginalNode(node).kind === 232; } function onEmitNode(hint, node, emitCallback) { var savedApplicableSubstitutions = applicableSubstitutions; @@ -44447,11 +44508,11 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 178: - return substitutePropertyAccessExpression(node); case 179: + return substitutePropertyAccessExpression(node); + case 180: return substituteElementAccessExpression(node); } return node; @@ -44481,9 +44542,9 @@ var ts; function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 264) { - var substitute = (applicableSubstitutions & 2 && container.kind === 232) || - (applicableSubstitutions & 8 && container.kind === 231); + if (container && container.kind !== 265) { + var substitute = (applicableSubstitutions & 2 && container.kind === 233) || + (applicableSubstitutions & 8 && container.kind === 232); if (substitute) { return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node); } @@ -44602,17 +44663,17 @@ var ts; return node; } switch (node.kind) { - case 119: + case 120: return undefined; - case 190: + case 191: return visitAwaitExpression(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); default: return ts.visitEachChild(node, visitor, context); @@ -44646,7 +44707,7 @@ var ts; var original = ts.getOriginalNode(node, ts.isFunctionLike); var nodeType = original.type; var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined; - var isArrowFunction = node.kind === 186; + var isArrowFunction = node.kind === 187; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0; if (!isArrowFunction) { var statements = []; @@ -44702,14 +44763,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -44734,23 +44795,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -44769,11 +44830,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -44793,7 +44854,7 @@ var ts; }; function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(awaiterHelper); - var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body); + var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body); (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072; return ts.createCall(ts.getHelperName("__awaiter"), undefined, [ ts.createThis(), @@ -44847,7 +44908,7 @@ var ts; return visitorWorker(node, true); } function visitorNoAsyncModifier(node) { - if (node.kind === 119) { + if (node.kind === 120) { return undefined; } return node; @@ -44857,43 +44918,43 @@ var ts; return node; } switch (node.kind) { - case 190: + case 191: return visitAwaitExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 221: + case 222: return visitLabeledStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 193: + case 194: return visitBinaryExpression(node, noDestructuringValue); - case 225: + case 226: return visitVariableDeclaration(node); - case 215: + case 216: return visitForOfStatement(node, undefined); - case 213: + case 214: return visitForStatement(node); - case 189: + case 190: return visitVoidExpression(node); - case 151: + case 152: return visitConstructorDeclaration(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: - return visitGetAccessorDeclaration(node); case 153: + return visitGetAccessorDeclaration(node); + case 154: return visitSetAccessorDeclaration(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: - return visitFunctionExpression(node); case 186: + return visitFunctionExpression(node); + case 187: return visitArrowFunction(node); - case 145: + case 146: return visitParameter(node); - case 209: + case 210: return visitExpressionStatement(node); - case 184: + case 185: return visitParenthesizedExpression(node, noDestructuringValue); default: return ts.visitEachChild(node, visitor, context); @@ -44920,7 +44981,7 @@ var ts; function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) { var statement = ts.unwrapInnermostStatementOfLabel(node); - if (statement.kind === 215 && statement.awaitModifier) { + if (statement.kind === 216 && statement.awaitModifier) { return visitForOfStatement(statement, node); } return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node); @@ -44932,7 +44993,7 @@ var ts; var objects = []; for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) { var e = elements_4[_i]; - if (e.kind === 262) { + if (e.kind === 263) { if (chunkObject) { objects.push(ts.createObjectLiteral(chunkObject)); chunkObject = undefined; @@ -44944,7 +45005,7 @@ var ts; if (!chunkObject) { chunkObject = []; } - if (e.kind === 260) { + if (e.kind === 261) { var p = e; chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression))); } @@ -44961,7 +45022,7 @@ var ts; function visitObjectLiteralExpression(node) { if (node.transformFlags & 1048576) { var objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 177) { + if (objects.length && objects[0].kind !== 178) { objects.unshift(ts.createObjectLiteral()); } return createAssignHelper(context, objects); @@ -44978,7 +45039,7 @@ var ts; if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 1048576) { return ts.flattenDestructuringAssignment(node, visitor, context, 1, !noDestructuringValue); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return ts.updateBinary(node, ts.visitNode(node.left, visitorNoDestructuringValue, ts.isExpression), ts.visitNode(node.right, noDestructuringValue ? visitorNoDestructuringValue : visitor, ts.isExpression)); } return ts.visitEachChild(node, visitor, context); @@ -45157,7 +45218,7 @@ var ts; var statements = []; var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor); appendObjectRestAssignmentsIfNeeded(statements, node); - statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); + statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(39), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); ts.addRange(statements, endLexicalEnvironment()); var block = ts.updateBlock(node.body, statements); if (languageVersion >= 2) { @@ -45208,14 +45269,14 @@ var ts; function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(180); - context.enableSubstitution(178); + context.enableSubstitution(181); context.enableSubstitution(179); - context.enableEmitNotification(228); - context.enableEmitNotification(150); - context.enableEmitNotification(152); - context.enableEmitNotification(153); + context.enableSubstitution(180); + context.enableEmitNotification(229); context.enableEmitNotification(151); + context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(152); } } function onEmitNode(hint, node, emitCallback) { @@ -45240,23 +45301,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178: - return substitutePropertyAccessExpression(node); case 179: - return substituteElementAccessExpression(node); + return substitutePropertyAccessExpression(node); case 180: + return substituteElementAccessExpression(node); + case 181: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -45275,11 +45336,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 - || kind === 151 - || kind === 150 + return kind === 229 || kind === 152 - || kind === 153; + || kind === 151 + || kind === 153 + || kind === 154; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096) { @@ -45362,11 +45423,11 @@ var ts; } function visitorWorker(node) { switch (node.kind) { - case 248: - return visitJsxElement(node, false); case 249: + return visitJsxElement(node, false); + case 250: return visitJsxSelfClosingElement(node, false); - case 255: + case 256: return visitJsxExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -45376,11 +45437,11 @@ var ts; switch (node.kind) { case 10: return visitJsxText(node); - case 255: + case 256: return visitJsxExpression(node); - case 248: - return visitJsxElement(node, true); case 249: + return visitJsxElement(node, true); + case 250: return visitJsxSelfClosingElement(node, true); default: ts.Debug.failBadSyntaxKind(node); @@ -45434,7 +45495,7 @@ var ts; var decoded = tryDecodeEntities(node.text); return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node; } - else if (node.kind === 255) { + else if (node.kind === 256) { if (node.expression === undefined) { return ts.createTrue(); } @@ -45494,7 +45555,7 @@ var ts; return decoded === text ? undefined : decoded; } function getTagName(node) { - if (node.kind === 248) { + if (node.kind === 249) { return getTagName(node.openingElement); } else { @@ -45793,7 +45854,7 @@ var ts; return node; } switch (node.kind) { - case 193: + case 194: return visitBinaryExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -45801,9 +45862,9 @@ var ts; } function visitBinaryExpression(node) { switch (node.operatorToken.kind) { - case 61: + case 62: return visitExponentiationAssignmentExpression(node); - case 39: + case 40: return visitExponentiationExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -45947,7 +46008,7 @@ var ts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { return hierarchyFacts & 4096 - && node.kind === 218 + && node.kind === 219 && !node.expression; } function shouldVisitNode(node) { @@ -45971,104 +46032,104 @@ var ts; return node; } function callExpressionVisitor(node) { - if (node.kind === 96) { + if (node.kind === 97) { return visitSuperKeyword(true); } return visitor(node); } function visitJavaScript(node) { switch (node.kind) { - case 114: + case 115: return undefined; - case 228: + case 229: return visitClassDeclaration(node); - case 198: + case 199: return visitClassExpression(node); - case 145: + case 146: return visitParameter(node); - case 227: + case 228: return visitFunctionDeclaration(node); - case 186: + case 187: return visitArrowFunction(node); - case 185: + case 186: return visitFunctionExpression(node); - case 225: + case 226: return visitVariableDeclaration(node); - case 70: + case 71: return visitIdentifier(node); - case 226: + case 227: return visitVariableDeclarationList(node); - case 220: + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 206: + case 207: return visitBlock(node, false); + case 218: case 217: - case 216: return visitBreakOrContinueStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 211: case 212: - return visitDoOrWhileStatement(node, undefined); case 213: - return visitForStatement(node, undefined); + return visitDoOrWhileStatement(node, undefined); case 214: - return visitForInStatement(node, undefined); + return visitForStatement(node, undefined); case 215: + return visitForInStatement(node, undefined); + case 216: return visitForOfStatement(node, undefined); - case 209: + case 210: return visitExpressionStatement(node); - case 177: + case 178: return visitObjectLiteralExpression(node); - case 259: + case 260: return visitCatchClause(node); - case 261: + case 262: return visitShorthandPropertyAssignment(node); - case 143: + case 144: return visitComputedPropertyName(node); - case 176: + case 177: return visitArrayLiteralExpression(node); - case 180: - return visitCallExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); - case 184: + case 185: return visitParenthesizedExpression(node, true); - case 193: + case 194: return visitBinaryExpression(node, true); - case 12: case 13: case 14: case 15: + case 16: return visitTemplateLiteral(node); case 9: return visitStringLiteral(node); case 8: return visitNumericLiteral(node); - case 182: + case 183: return visitTaggedTemplateExpression(node); - case 195: - return visitTemplateExpression(node); case 196: - return visitYieldExpression(node); + return visitTemplateExpression(node); case 197: + return visitYieldExpression(node); + case 198: return visitSpreadElement(node); - case 96: + case 97: return visitSuperKeyword(false); - case 98: + case 99: return visitThisKeyword(node); - case 203: + case 204: return visitMetaProperty(node); - case 150: + case 151: return visitMethodDeclaration(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: return ts.visitEachChild(node, visitor, context); @@ -46146,13 +46207,13 @@ var ts; } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - var jump = node.kind === 217 ? 2 : 4; + var jump = node.kind === 218 ? 2 : 4; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { var labelMarker = void 0; if (!node.label) { - if (node.kind === 217) { + if (node.kind === 218) { convertedLoopState.nonLocalJumps |= 2; labelMarker = "break"; } @@ -46162,7 +46223,7 @@ var ts; } } else { - if (node.kind === 217) { + if (node.kind === 218) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, true, node.label.text, labelMarker); } @@ -46181,10 +46242,10 @@ var ts; expr = copyExpr; } else { - expr = ts.createBinary(expr, 25, copyExpr); + expr = ts.createBinary(expr, 26, copyExpr); } } - returnExpression = ts.createBinary(expr, 25, returnExpression); + returnExpression = ts.createBinary(expr, 26, returnExpression); } return ts.createReturn(returnExpression); } @@ -46242,7 +46303,7 @@ var ts; addExtendsHelperIfNeeded(statements, node, extendsClauseElement); addConstructor(statements, node, extendsClauseElement); addClassMembers(statements, node); - var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 17); + var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18); var localName = ts.getLocalName(node); var outer = ts.createPartiallyEmittedExpression(localName); outer.end = closingBraceLocation.end; @@ -46298,7 +46359,7 @@ var ts; } ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!"); } - var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94; + var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 95; var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); if (superCaptureStatus === 1 || superCaptureStatus === 2) { statementOffset++; @@ -46326,17 +46387,17 @@ var ts; return block; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 218) { + if (statement.kind === 219) { return true; } - else if (statement.kind === 210) { + else if (statement.kind === 211) { var ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } } - else if (statement.kind === 206) { + else if (statement.kind === 207) { var lastStatement = ts.lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -46365,7 +46426,7 @@ var ts; var ctorStatements = ctor.body.statements; if (statementOffset < ctorStatements.length) { firstStatement = ctorStatements[statementOffset]; - if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) { + if (firstStatement.kind === 210 && ts.isSuperCall(firstStatement.expression)) { superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -46373,8 +46434,8 @@ var ts; && statementOffset === ctorStatements.length - 1 && !(ctor.transformFlags & (16384 | 32768))) { var returnStatement = ts.createReturn(superCallExpression); - if (superCallExpression.kind !== 193 - || superCallExpression.left.kind !== 180) { + if (superCallExpression.kind !== 194 + || superCallExpression.left.kind !== 181) { ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'."); } ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536))); @@ -46448,7 +46509,7 @@ var ts; statements.push(statement); } function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return node && node.dotDotDotToken && node.name.kind === 70 && !inConstructorWithSynthesizedSuper; + return node && node.dotDotDotToken && node.name.kind === 71 && !inConstructorWithSynthesizedSuper; } function addRestParameterIfNeeded(statements, node, inConstructorWithSynthesizedSuper) { var parameter = ts.lastOrUndefined(node.parameters); @@ -46475,7 +46536,7 @@ var ts; statements.push(forStatement); } function addCaptureThisForNodeIfNeeded(statements, node) { - if (node.transformFlags & 32768 && node.kind !== 186) { + if (node.transformFlags & 32768 && node.kind !== 187) { captureThisForNode(statements, node, ts.createThis()); } } @@ -46493,19 +46554,19 @@ var ts; if (hierarchyFacts & 16384) { var newTarget = void 0; switch (node.kind) { - case 186: + case 187: return statements; - case 150: - case 152: + case 151: case 153: + case 154: newTarget = ts.createVoidZero(); break; - case 151: + case 152: newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"); break; - case 227: - case 185: - newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); + case 228: + case 186: + newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 93, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero()); break; default: ts.Debug.failBadSyntaxKind(node); @@ -46525,20 +46586,20 @@ var ts; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; switch (member.kind) { - case 205: + case 206: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 150: + case 151: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 151: + case 152: break; default: ts.Debug.failBadSyntaxKind(node); @@ -46663,7 +46724,7 @@ var ts; : enterSubtree(16286, 65); var parameters = ts.visitParameterList(node.parameters, visitor, context); var body = transformFunctionBody(node); - if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) { + if (hierarchyFacts & 16384 && !name && (node.kind === 228 || node.kind === 186)) { name = ts.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 49152, 0); @@ -46697,7 +46758,7 @@ var ts; } } else { - ts.Debug.assert(node.kind === 186); + ts.Debug.assert(node.kind === 187); statementsLocation = ts.moveRangeEnd(body, -1); var equalsGreaterThanToken = node.equalsGreaterThanToken; if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) { @@ -46727,7 +46788,7 @@ var ts; ts.setEmitFlags(block, 1); } if (closeBraceLocation) { - ts.setTokenSourceMapRange(block, 17, closeBraceLocation); + ts.setTokenSourceMapRange(block, 18, closeBraceLocation); } ts.setOriginalNode(block, node.body); return block; @@ -46749,9 +46810,9 @@ var ts; } function visitExpressionStatement(node) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateStatement(node, visitBinaryExpression(node.expression, false)); } return ts.visitEachChild(node, visitor, context); @@ -46759,9 +46820,9 @@ var ts; function visitParenthesizedExpression(node, needsDestructuringValue) { if (!needsDestructuringValue) { switch (node.expression.kind) { - case 184: + case 185: return ts.updateParen(node, visitParenthesizedExpression(node.expression, false)); - case 193: + case 194: return ts.updateParen(node, visitBinaryExpression(node.expression, false)); } } @@ -46787,13 +46848,13 @@ var ts; assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0); } else { - assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression)); + assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression)); } assignments = ts.append(assignments, assignment); } } if (assignments) { - updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node); + updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node); } else { updated = undefined; @@ -46885,14 +46946,14 @@ var ts; } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 211: case 212: - return visitDoOrWhileStatement(node, outermostLabeledStatement); case 213: - return visitForStatement(node, outermostLabeledStatement); + return visitDoOrWhileStatement(node, outermostLabeledStatement); case 214: - return visitForInStatement(node, outermostLabeledStatement); + return visitForStatement(node, outermostLabeledStatement); case 215: + return visitForInStatement(node, outermostLabeledStatement); + case 216: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -47018,7 +47079,7 @@ var ts; && i < numInitialPropertiesWithoutYield) { numInitialPropertiesWithoutYield = i; } - if (property.name.kind === 143) { + if (property.name.kind === 144) { numInitialProperties = i; break; } @@ -47049,7 +47110,7 @@ var ts; } visit(node.name); function visit(node) { - if (node.kind === 70) { + if (node.kind === 71) { state.hoistedLocalVariables.push(node); } else { @@ -47080,11 +47141,11 @@ var ts; var functionName = ts.createUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 213: case 214: case 215: + case 216: var initializer = node.initializer; - if (initializer && initializer.kind === 226) { + if (initializer && initializer.kind === 227) { loopInitializer = initializer; } break; @@ -47139,7 +47200,7 @@ var ts; loopBodyFlags |= 131072; } var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([ - ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(38) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) + ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags)) ]), 1048576)); var statements = [convertedLoopVariable]; var extraVariableDeclarations; @@ -47205,7 +47266,7 @@ var ts; function copyOutParameter(outParam, copyDirection) { var source = copyDirection === 0 ? outParam.outParamName : outParam.originalName; var target = copyDirection === 0 ? outParam.originalName : outParam.outParamName; - return ts.createBinary(target, 57, source); + return ts.createBinary(target, 58, source); } function copyOutParameters(outParams, copyDirection, statements) { for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) { @@ -47221,7 +47282,7 @@ var ts; !state.labeledNonLocalContinues; var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; })); var callResult = isAsyncBlockContainingAwait - ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304)) + ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304)) : call; if (isSimpleLoop) { statements.push(ts.createStatement(callResult)); @@ -47241,10 +47302,10 @@ var ts; else { returnStatement = ts.createReturn(ts.createPropertyAccess(loopResultName, "value")); } - statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 33, ts.createLiteral("object")), returnStatement)); + statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 34, ts.createLiteral("object")), returnStatement)); } if (state.nonLocalJumps & 2) { - statements.push(ts.createIf(ts.createBinary(loopResultName, 33, ts.createLiteral("break")), ts.createBreak())); + statements.push(ts.createIf(ts.createBinary(loopResultName, 34, ts.createLiteral("break")), ts.createBreak())); } if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { var caseClauses = []; @@ -47310,20 +47371,20 @@ var ts; for (var i = start; i < numProperties; i++) { var property = properties[i]; switch (property.kind) { - case 152: case 153: + case 154: var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine)); } break; - case 150: + case 151: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 260: + case 261: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 261: + case 262: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -47426,7 +47487,7 @@ var ts; } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { var _a = ts.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { ts.setEmitFlags(thisArg, 4); } var resultingCall; @@ -47436,7 +47497,7 @@ var ts; else { resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node); } - if (node.expression.kind === 96) { + if (node.expression.kind === 97) { var actualThis = ts.createThis(); ts.setEmitFlags(actualThis, 4); var initializer = ts.createLogicalOr(resultingCall, actualThis); @@ -47473,7 +47534,7 @@ var ts; else { if (segments.length === 1) { var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 + return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 ? ts.createArraySlice(segments[0]) : segments[0]; } @@ -47541,7 +47602,7 @@ var ts; } function getRawLiteral(node) { var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - var isLast = node.kind === 12 || node.kind === 15; + var isLast = node.kind === 13 || node.kind === 16; text = text.substring(1, text.length - (isLast ? 1 : 2)); text = text.replace(/\r\n?/g, "\n"); return ts.setTextRange(ts.createLiteral(text), node); @@ -47583,7 +47644,7 @@ var ts; : ts.createIdentifier("_super"); } function visitMetaProperty(node) { - if (node.keywordToken === 93 && node.name.text === "target") { + if (node.keywordToken === 94 && node.name.text === "target") { if (hierarchyFacts & 8192) { hierarchyFacts |= 32768; } @@ -47608,20 +47669,20 @@ var ts; function enableSubstitutionsForBlockScopedBindings() { if ((enabledSubstitutions & 2) === 0) { enabledSubstitutions |= 2; - context.enableSubstitution(70); + context.enableSubstitution(71); } } function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1) === 0) { enabledSubstitutions |= 1; - context.enableSubstitution(98); - context.enableEmitNotification(151); - context.enableEmitNotification(150); + context.enableSubstitution(99); context.enableEmitNotification(152); + context.enableEmitNotification(151); context.enableEmitNotification(153); + context.enableEmitNotification(154); + context.enableEmitNotification(187); context.enableEmitNotification(186); - context.enableEmitNotification(185); - context.enableEmitNotification(227); + context.enableEmitNotification(228); } } function onSubstituteNode(hint, node) { @@ -47646,10 +47707,10 @@ var ts; function isNameOfDeclarationWithCollidingName(node) { var parent = node.parent; switch (parent.kind) { - case 175: - case 228: - case 231: - case 225: + case 176: + case 229: + case 232: + case 226: return parent.name === node && resolver.isDeclarationWithCollidingName(parent); } @@ -47657,9 +47718,9 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 98: + case 99: return substituteThisKeyword(node); } return node; @@ -47692,19 +47753,19 @@ var ts; return false; } var statement = ts.firstOrUndefined(constructor.body.statements); - if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) { + if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 210) { return false; } var statementExpression = statement.expression; - if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) { + if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 181) { return false; } var callTarget = statementExpression.expression; - if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 96) { + if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 97) { return false; } var callArgument = ts.singleOrUndefined(statementExpression.arguments); - if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) { + if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 198) { return false; } var expression = callArgument.expression; @@ -47847,13 +47908,13 @@ var ts; } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 220: - return visitSwitchStatement(node); case 221: + return visitSwitchStatement(node); + case 222: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -47861,24 +47922,24 @@ var ts; } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); - case 152: case 153: + case 154: return visitAccessorDeclaration(node); - case 207: + case 208: return visitVariableStatement(node); - case 213: - return visitForStatement(node); case 214: + return visitForStatement(node); + case 215: return visitForInStatement(node); - case 217: + case 218: return visitBreakStatement(node); - case 216: + case 217: return visitContinueStatement(node); - case 218: + case 219: return visitReturnStatement(node); default: if (node.transformFlags & 16777216) { @@ -47894,21 +47955,21 @@ var ts; } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 193: - return visitBinaryExpression(node); case 194: + return visitBinaryExpression(node); + case 195: return visitConditionalExpression(node); - case 196: + case 197: return visitYieldExpression(node); - case 176: - return visitArrayLiteralExpression(node); case 177: + return visitArrayLiteralExpression(node); + case 178: return visitObjectLiteralExpression(node); - case 179: - return visitElementAccessExpression(node); case 180: - return visitCallExpression(node); + return visitElementAccessExpression(node); case 181: + return visitCallExpression(node); + case 182: return visitNewExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -47916,9 +47977,9 @@ var ts; } function visitGenerator(node) { switch (node.kind) { - case 227: + case 228: return visitFunctionDeclaration(node); - case 185: + case 186: return visitFunctionExpression(node); default: ts.Debug.failBadSyntaxKind(node); @@ -48051,23 +48112,23 @@ var ts; } } function isCompoundAssignment(kind) { - return kind >= 58 - && kind <= 69; + return kind >= 59 + && kind <= 70; } function getOperatorForCompoundAssignment(kind) { switch (kind) { - case 58: return 36; case 59: return 37; case 60: return 38; case 61: return 39; case 62: return 40; case 63: return 41; - case 64: return 44; + case 64: return 42; case 65: return 45; case 66: return 46; case 67: return 47; case 68: return 48; case 69: return 49; + case 70: return 50; } } function visitRightAssociativeBinaryExpression(node) { @@ -48075,10 +48136,10 @@ var ts; if (containsYield(right)) { var target = void 0; switch (left.kind) { - case 178: + case 179: target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name); break; - case 179: + case 180: target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression))); break; default: @@ -48100,7 +48161,7 @@ var ts; if (ts.isLogicalOperator(node.operatorToken.kind)) { return visitLogicalBinaryExpression(node); } - else if (node.operatorToken.kind === 25) { + else if (node.operatorToken.kind === 26) { return visitCommaExpression(node); } var clone_5 = ts.getMutableClone(node); @@ -48114,7 +48175,7 @@ var ts; var resultLabel = defineLabel(); var resultLocal = declareLocal(); emitAssignment(resultLocal, ts.visitNode(node.left, visitor, ts.isExpression), node.left); - if (node.operatorToken.kind === 52) { + if (node.operatorToken.kind === 53) { emitBreakWhenFalse(resultLabel, resultLocal, node.left); } else { @@ -48130,7 +48191,7 @@ var ts; visit(node.right); return ts.inlineExpressions(pendingExpressions); function visit(node) { - if (ts.isBinaryExpression(node) && node.operatorToken.kind === 25) { + if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) { visit(node.left); visit(node.right); } @@ -48279,35 +48340,35 @@ var ts; } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 206: + case 207: return transformAndEmitBlock(node); - case 209: - return transformAndEmitExpressionStatement(node); case 210: - return transformAndEmitIfStatement(node); + return transformAndEmitExpressionStatement(node); case 211: - return transformAndEmitDoStatement(node); + return transformAndEmitIfStatement(node); case 212: - return transformAndEmitWhileStatement(node); + return transformAndEmitDoStatement(node); case 213: - return transformAndEmitForStatement(node); + return transformAndEmitWhileStatement(node); case 214: + return transformAndEmitForStatement(node); + case 215: return transformAndEmitForInStatement(node); - case 216: - return transformAndEmitContinueStatement(node); case 217: - return transformAndEmitBreakStatement(node); + return transformAndEmitContinueStatement(node); case 218: - return transformAndEmitReturnStatement(node); + return transformAndEmitBreakStatement(node); case 219: - return transformAndEmitWithStatement(node); + return transformAndEmitReturnStatement(node); case 220: - return transformAndEmitSwitchStatement(node); + return transformAndEmitWithStatement(node); case 221: - return transformAndEmitLabeledStatement(node); + return transformAndEmitSwitchStatement(node); case 222: - return transformAndEmitThrowStatement(node); + return transformAndEmitLabeledStatement(node); case 223: + return transformAndEmitThrowStatement(node); + case 224: return transformAndEmitTryStatement(node); default: return emitStatement(ts.visitNode(node, visitor, ts.isStatement)); @@ -48593,7 +48654,7 @@ var ts; for (var i = 0; i < numClauses; i++) { var clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 257 && defaultClauseIndex === -1) { + if (clause.kind === 258 && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -48603,7 +48664,7 @@ var ts; var defaultClausesSkipped = 0; for (var i = clausesWritten; i < numClauses; i++) { var clause = caseBlock.clauses[i]; - if (clause.kind === 256) { + if (clause.kind === 257) { var caseClause = clause; if (containsYield(caseClause.expression) && pendingClauses.length > 0) { break; @@ -48841,7 +48902,7 @@ var ts; if (!renamedCatchVariables) { renamedCatchVariables = ts.createMap(); renamedCatchVariableDeclarations = []; - context.enableSubstitution(70); + context.enableSubstitution(71); } renamedCatchVariables.set(text, true); renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name; @@ -49410,24 +49471,24 @@ var ts; if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(250); context.enableEmitNotification(251); - context.enableEmitNotification(249); + context.enableEmitNotification(252); + context.enableEmitNotification(250); noSubstitution = []; } var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178); - context.enableSubstitution(260); + context.enableSubstitution(179); + context.enableSubstitution(261); return transformSourceFile; function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 250: case 251: - case 249: + case 252: + case 250: var tagName = node.tagName; noSubstitution[ts.getOriginalNodeId(tagName)] = true; break; @@ -49463,7 +49524,7 @@ var ts; } function trySubstituteReservedName(name) { var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined); - if (token >= 71 && token <= 106) { + if (token >= 72 && token <= 107) { return ts.setTextRange(ts.createLiteral(name), name); } return undefined; @@ -49491,12 +49552,12 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableSubstitution(261); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableSubstitution(262); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var currentSourceFile; @@ -49653,23 +49714,23 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return visitExportDeclaration(node); - case 242: + case 243: return visitExportAssignment(node); - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return node; @@ -49867,7 +49928,7 @@ var ts; } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -49899,10 +49960,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -50003,14 +50064,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)]; noSubstitution = []; @@ -50050,12 +50111,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); + case 193: case 192: - case 191: return substituteUnaryExpression(node); } return node; @@ -50070,7 +50131,7 @@ var ts; } if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node)); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node); } var importDeclaration = resolver.getReferencedImportDeclaration(node); @@ -50106,15 +50167,15 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 - ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node) + var expression = node.kind === 193 + ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 43 ? 59 : 60), ts.createLiteral(1)), node) : node; for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) { var exportName = exportedNames_2[_i]; @@ -50155,11 +50216,11 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70); - context.enableSubstitution(193); - context.enableSubstitution(191); + context.enableSubstitution(71); + context.enableSubstitution(194); context.enableSubstitution(192); - context.enableEmitNotification(264); + context.enableSubstitution(193); + context.enableEmitNotification(265); var moduleInfoMap = []; var deferredExports = []; var exportFunctionsMap = []; @@ -50265,7 +50326,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) { var externalImport = _a[_i]; - if (externalImport.kind === 243 && externalImport.exportClause) { + if (externalImport.kind === 244 && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -50288,7 +50349,7 @@ var ts; } for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) { var externalImport = _e[_d]; - if (externalImport.kind !== 243) { + if (externalImport.kind !== 244) { continue; } var exportDecl = externalImport; @@ -50340,15 +50401,15 @@ var ts; var entry = _b[_a]; var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile); switch (entry.kind) { - case 237: + case 238: if (!entry.importClause) { break; } - case 236: + case 237: ts.Debug.assert(importVariableName !== undefined); statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName))); break; - case 243: + case 244: ts.Debug.assert(importVariableName !== undefined); if (entry.exportClause) { var properties = []; @@ -50370,13 +50431,13 @@ var ts; } function sourceElementVisitor(node) { switch (node.kind) { - case 237: + case 238: return visitImportDeclaration(node); - case 236: + case 237: return visitImportEqualsDeclaration(node); - case 243: + case 244: return undefined; - case 242: + case 243: return visitExportAssignment(node); default: return nestedElementVisitor(node); @@ -50497,7 +50558,7 @@ var ts; } function shouldHoistVariableDeclarationList(node) { return (ts.getEmitFlags(node) & 1048576) === 0 - && (enclosingBlockScopedContainer.kind === 264 + && (enclosingBlockScopedContainer.kind === 265 || (ts.getOriginalNode(node).flags & 3) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { @@ -50519,7 +50580,7 @@ var ts; : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208) { var id = ts.getOriginalNodeId(node); var isExportedDeclaration = ts.hasModifier(node.original, 1); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -50552,10 +50613,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239: + case 240: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240: + case 241: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -50654,43 +50715,43 @@ var ts; } function nestedElementVisitor(node) { switch (node.kind) { - case 207: + case 208: return visitVariableStatement(node); - case 227: - return visitFunctionDeclaration(node); case 228: + return visitFunctionDeclaration(node); + case 229: return visitClassDeclaration(node); - case 213: - return visitForStatement(node); case 214: - return visitForInStatement(node); + return visitForStatement(node); case 215: + return visitForInStatement(node); + case 216: return visitForOfStatement(node); - case 211: - return visitDoStatement(node); case 212: + return visitDoStatement(node); + case 213: return visitWhileStatement(node); - case 221: + case 222: return visitLabeledStatement(node); - case 219: - return visitWithStatement(node); case 220: + return visitWithStatement(node); + case 221: return visitSwitchStatement(node); - case 234: + case 235: return visitCaseBlock(node); - case 256: - return visitCaseClause(node); case 257: + return visitCaseClause(node); + case 258: return visitDefaultClause(node); - case 223: + case 224: return visitTryStatement(node); - case 259: + case 260: return visitCatchClause(node); - case 206: + case 207: return visitBlock(node); - case 296: - return visitMergeDeclarationMarker(node); case 297: + return visitMergeDeclarationMarker(node); + case 298: return visitEndOfDeclarationMarker(node); default: return destructuringVisitor(node); @@ -50784,7 +50845,7 @@ var ts; } function destructuringVisitor(node) { if (node.transformFlags & 1024 - && node.kind === 193) { + && node.kind === 194) { return visitDestructuringAssignment(node); } else if (node.transformFlags & 2048) { @@ -50821,7 +50882,7 @@ var ts; } else if (ts.isIdentifier(node)) { var container = resolver.getReferencedExportContainer(node); - return container !== undefined && container.kind === 264; + return container !== undefined && container.kind === 265; } else { return false; @@ -50829,14 +50890,14 @@ var ts; } function modifierVisitor(node) { switch (node.kind) { - case 83: - case 78: + case 84: + case 79: return undefined; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264) { + if (node.kind === 265) { var id = ts.getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -50867,12 +50928,12 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70: + case 71: return substituteExpressionIdentifier(node); - case 193: + case 194: return substituteBinaryExpression(node); - case 191: case 192: + case 193: return substituteUnaryExpression(node); } return node; @@ -50917,22 +50978,22 @@ var ts; return node; } function substituteUnaryExpression(node) { - if ((node.operator === 42 || node.operator === 43) + if ((node.operator === 43 || node.operator === 44) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 + var expression = node.kind === 193 ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node) : node; for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) { var exportName = exportedNames_4[_i]; expression = createExportExpression(exportName, preventSubstitution(expression)); } - if (node.kind === 192) { - expression = node.operator === 42 + if (node.kind === 193) { + expression = node.operator === 43 ? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1)) : ts.createAdd(preventSubstitution(expression), ts.createLiteral(1)); } @@ -50948,7 +51009,7 @@ var ts; || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { var exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 264) { + if (exportContainer && exportContainer.kind === 265) { exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration)); } exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]); @@ -50976,8 +51037,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(264); - context.enableSubstitution(70); + context.enableEmitNotification(265); + context.enableSubstitution(71); var currentSourceFile; return transformSourceFile; function transformSourceFile(node) { @@ -51001,9 +51062,9 @@ var ts; } function visitor(node) { switch (node.kind) { - case 236: + case 237: return undefined; - case 242: + case 243: return visitExportAssignment(node); } return node; @@ -51096,7 +51157,7 @@ var ts; } ts.getTransformers = getTransformers; function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(298); + var enabledSyntaxKindFeatures = new Array(299); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -51303,8 +51364,8 @@ var ts; } ts.getDeclarationDiagnostics = getDeclarationDiagnostics; function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; - var isBundledEmit = sourceFileOrBundle.kind === 265; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var isBundledEmit = sourceFileOrBundle.kind === 266; var newLine = host.getNewLine(); var compilerOptions = host.getCompilerOptions(); var write; @@ -51366,7 +51427,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 237); + ts.Debug.assert(aliasEmitInfo.node.kind === 238); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -51439,10 +51500,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 225) { + if (declaration.kind === 226) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) { + else if (declaration.kind === 241 || declaration.kind === 242 || declaration.kind === 239) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -51453,7 +51514,7 @@ var ts; moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); } if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 237) { + if (moduleElementEmitInfo.node.kind === 238) { moduleElementEmitInfo.isVisible = true; } else { @@ -51461,12 +51522,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 232) { + if (nodeToCheck.kind === 233) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -51528,7 +51589,7 @@ var ts; function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) { writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; write(": "); - var shouldUseResolverType = declaration.kind === 145 && + var shouldUseResolverType = declaration.kind === 146 && resolver.isRequiredInitializedParameter(declaration); if (type && !shouldUseResolverType) { emitType(type); @@ -51588,74 +51649,74 @@ var ts; } function emitType(type) { switch (type.kind) { - case 118: - case 135: - case 132: - case 121: - case 133: + case 119: case 136: - case 104: - case 138: - case 94: - case 129: - case 168: - case 172: + case 133: + case 122: + case 134: + case 137: + case 105: + case 139: + case 95: + case 130: + case 169: + case 173: return writeTextOfNode(currentText, type); - case 200: + case 201: return emitExpressionWithTypeArguments(type); - case 158: + case 159: return emitTypeReference(type); - case 161: + case 162: return emitTypeQuery(type); - case 163: - return emitArrayType(type); case 164: - return emitTupleType(type); + return emitArrayType(type); case 165: - return emitUnionType(type); + return emitTupleType(type); case 166: - return emitIntersectionType(type); + return emitUnionType(type); case 167: + return emitIntersectionType(type); + case 168: return emitParenType(type); - case 169: - return emitTypeOperator(type); case 170: - return emitIndexedAccessType(type); + return emitTypeOperator(type); case 171: + return emitIndexedAccessType(type); + case 172: return emitMappedType(type); - case 159: case 160: + case 161: return emitSignatureDeclarationWithJsDocComments(type); - case 162: + case 163: return emitTypeLiteral(type); - case 70: + case 71: return emitEntityName(type); - case 142: + case 143: return emitEntityName(type); - case 157: + case 158: return emitTypePredicate(type); } function writeEntityName(entityName) { - if (entityName.kind === 70) { + if (entityName.kind === 71) { writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 142 ? entityName.left : entityName.expression; - var right = entityName.kind === 142 ? entityName.right : entityName.name; + var left = entityName.kind === 143 ? entityName.left : entityName.expression; + var right = entityName.kind === 143 ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 237 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isEntityNameExpression(node.expression)) { - ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178); + ts.Debug.assert(node.expression.kind === 71 || node.expression.kind === 179); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -51772,7 +51833,7 @@ var ts; } } function emitExportAssignment(node) { - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { write(node.isExportEquals ? "export = " : "export default "); writeTextOfNode(currentText, node.expression); } @@ -51793,7 +51854,7 @@ var ts; } write(";"); writeLine(); - if (node.expression.kind === 70) { + if (node.expression.kind === 71) { var nodes = resolver.collectLinkedAliases(node.expression); writeAsynchronousModuleElements(nodes); } @@ -51811,10 +51872,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 236 || - (node.parent.kind === 264 && isCurrentFileExternalModule)) { + else if (node.kind === 237 || + (node.parent.kind === 265 && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 265) { asynchronousSubModuleDeclarationEmitInfo.push({ node: node, outputPos: writer.getTextPos(), @@ -51823,7 +51884,7 @@ var ts; }); } else { - if (node.kind === 237) { + if (node.kind === 238) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -51841,30 +51902,30 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 227: + case 228: return writeFunctionDeclaration(node); - case 207: + case 208: return writeVariableStatement(node); - case 229: + case 230: return writeInterfaceDeclaration(node); - case 228: + case 229: return writeClassDeclaration(node); - case 230: - return writeTypeAliasDeclaration(node); case 231: - return writeEnumDeclaration(node); + return writeTypeAliasDeclaration(node); case 232: + return writeEnumDeclaration(node); + case 233: return writeModuleDeclaration(node); - case 236: - return writeImportEqualsDeclaration(node); case 237: + return writeImportEqualsDeclaration(node); + case 238: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); } } function emitModuleElementDeclarationFlags(node) { - if (node.parent.kind === 264) { + if (node.parent.kind === 265) { var modifiers = ts.getModifierFlags(node); if (modifiers & 1) { write("export "); @@ -51872,7 +51933,7 @@ var ts; if (modifiers & 512) { write("default "); } - else if (node.kind !== 229 && !noDeclare) { + else if (node.kind !== 230 && !noDeclare) { write("declare "); } } @@ -51922,7 +51983,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 239) { + if (namedBindings.kind === 240) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -51945,7 +52006,7 @@ var ts; if (currentWriterPos !== writer.getTextPos()) { write(", "); } - if (node.importClause.namedBindings.kind === 239) { + if (node.importClause.namedBindings.kind === 240) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -51962,13 +52023,13 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 233; var moduleSpecifier; - if (parent.kind === 236) { + if (parent.kind === 237) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 232) { + else if (parent.kind === 233) { moduleSpecifier = parent.name; } else { @@ -52036,7 +52097,7 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body && node.body.kind !== 233) { + while (node.body && node.body.kind !== 234) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -52106,7 +52167,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 150 && ts.hasModifier(node.parent, 8); + return node.parent.kind === 151 && ts.hasModifier(node.parent, 8); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -52116,15 +52177,15 @@ var ts; writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.constraint); } else { @@ -52133,15 +52194,15 @@ var ts; } if (node.default && !isPrivateMethodTypeParameter(node)) { write(" = "); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - (node.parent.parent && node.parent.parent.kind === 162)) { - ts.Debug.assert(node.parent.kind === 150 || - node.parent.kind === 149 || - node.parent.kind === 159 || + if (node.parent.kind === 160 || + node.parent.kind === 161 || + (node.parent.parent && node.parent.parent.kind === 163)) { + ts.Debug.assert(node.parent.kind === 151 || + node.parent.kind === 150 || node.parent.kind === 160 || - node.parent.kind === 154 || - node.parent.kind === 155); + node.parent.kind === 161 || + node.parent.kind === 155 || + node.parent.kind === 156); emitType(node.default); } else { @@ -52151,34 +52212,34 @@ var ts; function getTypeParameterConstraintVisibilityError() { var diagnosticMessage; switch (node.parent.kind) { - case 228: + case 229: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 229: + case 230: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 155: + case 156: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 154: + case 155: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 227: + case 228: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 230: + case 231: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -52206,7 +52267,7 @@ var ts; if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } - else if (!isImplementsList && node.expression.kind === 94) { + else if (!isImplementsList && node.expression.kind === 95) { write("null"); } else { @@ -52217,7 +52278,7 @@ var ts; } function getHeritageClauseVisibilityError() { var diagnosticMessage; - if (node.parent.parent.kind === 228) { + if (node.parent.parent.kind === 229) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1; @@ -52301,17 +52362,17 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 225 || resolver.isDeclarationVisible(node)) { + if (node.kind !== 226 || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } else { writeTextOfNode(currentText, node.name); - if ((node.kind === 148 || node.kind === 147 || - (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { + if ((node.kind === 149 || node.kind === 148 || + (node.kind === 146 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) { + if ((node.kind === 149 || node.kind === 148) && node.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (resolver.isLiteralConstDeclaration(node)) { @@ -52324,14 +52385,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 225) { + if (node.kind === 226) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 148 || node.kind === 147) { + else if (node.kind === 149 || node.kind === 148) { if (ts.hasModifier(node, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -52339,7 +52400,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -52365,7 +52426,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 199) { + if (element.kind !== 200) { elements.push(element); } } @@ -52431,7 +52492,7 @@ var ts; accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { - var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 153 ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -52444,7 +52505,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 152 + return accessor.kind === 153 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type @@ -52453,7 +52514,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 153) { + if (accessorWithTypeAnnotation.kind === 154) { if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : @@ -52499,17 +52560,17 @@ var ts; } if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 227) { + if (node.kind === 228) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 150 || node.kind === 151) { + else if (node.kind === 151 || node.kind === 152) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); } - if (node.kind === 227) { + if (node.kind === 228) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 151) { + else if (node.kind === 152) { write("constructor"); } else { @@ -52529,15 +52590,15 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; var closeParenthesizedFunctionType = false; - if (node.kind === 156) { + if (node.kind === 157) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); write("["); } else { - if (node.kind === 155 || node.kind === 160) { + if (node.kind === 156 || node.kind === 161) { write("new "); } - else if (node.kind === 159) { + else if (node.kind === 160) { var currentOutput = writer.getText(); if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") { closeParenthesizedFunctionType = true; @@ -52548,20 +52609,20 @@ var ts; write("("); } emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 156) { + if (node.kind === 157) { write("]"); } else { write(")"); } - var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160; - if (isFunctionTypeOrConstructorType || node.parent.kind === 162) { + var isFunctionTypeOrConstructorType = node.kind === 160 || node.kind === 161; + if (isFunctionTypeOrConstructorType || node.parent.kind === 163) { if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 151 && !ts.hasModifier(node, 8)) { + else if (node.kind !== 152 && !ts.hasModifier(node, 8)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -52575,23 +52636,23 @@ var ts; function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 155: + case 156: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 154: + case 155: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 156: + case 157: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; + case 151: case 150: - case 149: if (ts.hasModifier(node, 32)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -52599,7 +52660,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 228) { + else if (node.parent.kind === 229) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -52612,7 +52673,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 227: + case 228: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -52644,9 +52705,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 159 || - node.parent.kind === 160 || - node.parent.parent.kind === 162) { + if (node.parent.kind === 160 || + node.parent.kind === 161 || + node.parent.parent.kind === 163) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!ts.hasModifier(node.parent, 8)) { @@ -52662,26 +52723,26 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 151: + case 152: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 155: + case 156: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 154: + case 155: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 156: + case 157: return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; + case 151: case 150: - case 149: if (ts.hasModifier(node.parent, 32)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? @@ -52689,7 +52750,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228) { + else if (node.parent.parent.kind === 229) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -52701,7 +52762,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 227: + case 228: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -52712,12 +52773,12 @@ var ts; } } function emitBindingPattern(bindingPattern) { - if (bindingPattern.kind === 173) { + if (bindingPattern.kind === 174) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 174) { + else if (bindingPattern.kind === 175) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -52728,10 +52789,10 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 199) { + if (bindingElement.kind === 200) { write(" "); } - else if (bindingElement.kind === 175) { + else if (bindingElement.kind === 176) { if (bindingElement.propertyName) { writeTextOfNode(currentText, bindingElement.propertyName); write(": "); @@ -52741,7 +52802,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - ts.Debug.assert(bindingElement.name.kind === 70); + ts.Debug.assert(bindingElement.name.kind === 71); if (bindingElement.dotDotDotToken) { write("..."); } @@ -52753,39 +52814,39 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 227: - case 232: - case 236: - case 229: case 228: + case 233: + case 237: case 230: + case 229: case 231: + case 232: return emitModuleElement(node, isModuleElementVisible(node)); - case 207: + case 208: return emitModuleElement(node, isVariableStatementVisible(node)); - case 237: + case 238: return emitModuleElement(node, !node.importClause); - case 243: + case 244: return emitExportDeclaration(node); + case 152: case 151: case 150: - case 149: return writeFunctionDeclaration(node); - case 155: - case 154: case 156: + case 155: + case 157: return emitSignatureDeclarationWithJsDocComments(node); - case 152: case 153: + case 154: return emitAccessorDeclaration(node); + case 149: case 148: - case 147: return emitPropertyDeclaration(node); - case 263: + case 264: return emitEnumMemberDeclaration(node); - case 242: + case 243: return emitExportAssignment(node); - case 264: + case 265: return emitSourceFile(node); } } @@ -52804,7 +52865,7 @@ var ts; } return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFileOrBundle) { - var isBundledEmit = sourceFileOrBundle.kind === 265; + var isBundledEmit = sourceFileOrBundle.kind === 266; if (isBundledEmit && !addBundledFileReference) { return; } @@ -52818,7 +52879,7 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var sourceFiles = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); @@ -52903,7 +52964,7 @@ var ts; } if (compilerOptions.mapRoot) { sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (sourceFileOrBundle.kind === 264) { + if (sourceFileOrBundle.kind === 265) { sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir)); } if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { @@ -53003,7 +53064,7 @@ var ts; var emitNode = node.emitNode; var emitFlags = emitNode && emitNode.flags; var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end; - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 16) === 0 && pos >= 0) { emitPos(ts.skipTrivia(currentSourceText, pos)); @@ -53016,7 +53077,7 @@ var ts; else { emitCallback(hint, node); } - if (node.kind !== 294 + if (node.kind !== 295 && (emitFlags & 32) === 0 && end >= 0) { emitPos(end); @@ -53156,7 +53217,7 @@ var ts; if (extendedDiagnostics) { ts.performance.mark("preEmitNodeWithComment"); } - var isEmittedNode = node.kind !== 294; + var isEmittedNode = node.kind !== 295; var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0; var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0; if (!skipLeadingComments) { @@ -53170,7 +53231,7 @@ var ts; } if (!skipTrailingComments) { containerEnd = end; - if (node.kind === 226) { + if (node.kind === 227) { declarationListContainerEnd = end; } } @@ -53510,8 +53571,8 @@ var ts; } } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) { - var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; - var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined; + var bundle = sourceFileOrBundle.kind === 266 ? sourceFileOrBundle : undefined; + var sourceFile = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined; var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle); if (bundle) { @@ -53547,7 +53608,7 @@ var ts; } function emitHelpers(node, writeLines) { var helpersEmitted = false; - var bundle = node.kind === 265 ? node : undefined; + var bundle = node.kind === 266 ? node : undefined; if (bundle && moduleKind === ts.ModuleKind.None) { return; } @@ -53620,8 +53681,8 @@ var ts; break; } switch (node.kind) { - case 264: return printFile(node); - case 265: return printBundle(node); + case 265: return printFile(node); + case 266: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); return endPrint(); @@ -53752,196 +53813,196 @@ var ts; return; } switch (kind) { - case 13: case 14: case 15: + case 16: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 142: - return emitQualifiedName(node); case 143: - return emitComputedPropertyName(node); + return emitQualifiedName(node); case 144: - return emitTypeParameter(node); + return emitComputedPropertyName(node); case 145: - return emitParameter(node); + return emitTypeParameter(node); case 146: - return emitDecorator(node); + return emitParameter(node); case 147: - return emitPropertySignature(node); + return emitDecorator(node); case 148: - return emitPropertyDeclaration(node); + return emitPropertySignature(node); case 149: - return emitMethodSignature(node); + return emitPropertyDeclaration(node); case 150: - return emitMethodDeclaration(node); + return emitMethodSignature(node); case 151: - return emitConstructor(node); + return emitMethodDeclaration(node); case 152: + return emitConstructor(node); case 153: - return emitAccessorDeclaration(node); case 154: - return emitCallSignature(node); + return emitAccessorDeclaration(node); case 155: - return emitConstructSignature(node); + return emitCallSignature(node); case 156: - return emitIndexSignature(node); + return emitConstructSignature(node); case 157: - return emitTypePredicate(node); + return emitIndexSignature(node); case 158: - return emitTypeReference(node); + return emitTypePredicate(node); case 159: - return emitFunctionType(node); + return emitTypeReference(node); case 160: - return emitConstructorType(node); + return emitFunctionType(node); case 161: - return emitTypeQuery(node); + return emitConstructorType(node); case 162: - return emitTypeLiteral(node); + return emitTypeQuery(node); case 163: - return emitArrayType(node); + return emitTypeLiteral(node); case 164: - return emitTupleType(node); + return emitArrayType(node); case 165: - return emitUnionType(node); + return emitTupleType(node); case 166: - return emitIntersectionType(node); + return emitUnionType(node); case 167: + return emitIntersectionType(node); + case 168: return emitParenthesizedType(node); - case 200: + case 201: return emitExpressionWithTypeArguments(node); - case 168: - return emitThisType(); case 169: - return emitTypeOperator(node); + return emitThisType(); case 170: - return emitIndexedAccessType(node); + return emitTypeOperator(node); case 171: - return emitMappedType(node); + return emitIndexedAccessType(node); case 172: - return emitLiteralType(node); + return emitMappedType(node); case 173: - return emitObjectBindingPattern(node); + return emitLiteralType(node); case 174: - return emitArrayBindingPattern(node); + return emitObjectBindingPattern(node); case 175: + return emitArrayBindingPattern(node); + case 176: return emitBindingElement(node); - case 204: - return emitTemplateSpan(node); case 205: - return emitSemicolonClassElement(); + return emitTemplateSpan(node); case 206: - return emitBlock(node); + return emitSemicolonClassElement(); case 207: - return emitVariableStatement(node); + return emitBlock(node); case 208: - return emitEmptyStatement(); + return emitVariableStatement(node); case 209: - return emitExpressionStatement(node); + return emitEmptyStatement(); case 210: - return emitIfStatement(node); + return emitExpressionStatement(node); case 211: - return emitDoStatement(node); + return emitIfStatement(node); case 212: - return emitWhileStatement(node); + return emitDoStatement(node); case 213: - return emitForStatement(node); + return emitWhileStatement(node); case 214: - return emitForInStatement(node); + return emitForStatement(node); case 215: - return emitForOfStatement(node); + return emitForInStatement(node); case 216: - return emitContinueStatement(node); + return emitForOfStatement(node); case 217: - return emitBreakStatement(node); + return emitContinueStatement(node); case 218: - return emitReturnStatement(node); + return emitBreakStatement(node); case 219: - return emitWithStatement(node); + return emitReturnStatement(node); case 220: - return emitSwitchStatement(node); + return emitWithStatement(node); case 221: - return emitLabeledStatement(node); + return emitSwitchStatement(node); case 222: - return emitThrowStatement(node); + return emitLabeledStatement(node); case 223: - return emitTryStatement(node); + return emitThrowStatement(node); case 224: - return emitDebuggerStatement(node); + return emitTryStatement(node); case 225: - return emitVariableDeclaration(node); + return emitDebuggerStatement(node); case 226: - return emitVariableDeclarationList(node); + return emitVariableDeclaration(node); case 227: - return emitFunctionDeclaration(node); + return emitVariableDeclarationList(node); case 228: - return emitClassDeclaration(node); + return emitFunctionDeclaration(node); case 229: - return emitInterfaceDeclaration(node); + return emitClassDeclaration(node); case 230: - return emitTypeAliasDeclaration(node); + return emitInterfaceDeclaration(node); case 231: - return emitEnumDeclaration(node); + return emitTypeAliasDeclaration(node); case 232: - return emitModuleDeclaration(node); + return emitEnumDeclaration(node); case 233: - return emitModuleBlock(node); + return emitModuleDeclaration(node); case 234: + return emitModuleBlock(node); + case 235: return emitCaseBlock(node); - case 236: - return emitImportEqualsDeclaration(node); case 237: - return emitImportDeclaration(node); + return emitImportEqualsDeclaration(node); case 238: - return emitImportClause(node); + return emitImportDeclaration(node); case 239: - return emitNamespaceImport(node); + return emitImportClause(node); case 240: - return emitNamedImports(node); + return emitNamespaceImport(node); case 241: - return emitImportSpecifier(node); + return emitNamedImports(node); case 242: - return emitExportAssignment(node); + return emitImportSpecifier(node); case 243: - return emitExportDeclaration(node); + return emitExportAssignment(node); case 244: - return emitNamedExports(node); + return emitExportDeclaration(node); case 245: - return emitExportSpecifier(node); + return emitNamedExports(node); case 246: - return; + return emitExportSpecifier(node); case 247: + return; + case 248: return emitExternalModuleReference(node); case 10: return emitJsxText(node); - case 250: - return emitJsxOpeningElement(node); case 251: - return emitJsxClosingElement(node); + return emitJsxOpeningElement(node); case 252: - return emitJsxAttribute(node); + return emitJsxClosingElement(node); case 253: - return emitJsxAttributes(node); + return emitJsxAttribute(node); case 254: - return emitJsxSpreadAttribute(node); + return emitJsxAttributes(node); case 255: - return emitJsxExpression(node); + return emitJsxSpreadAttribute(node); case 256: - return emitCaseClause(node); + return emitJsxExpression(node); case 257: - return emitDefaultClause(node); + return emitCaseClause(node); case 258: - return emitHeritageClause(node); + return emitDefaultClause(node); case 259: - return emitCatchClause(node); + return emitHeritageClause(node); case 260: - return emitPropertyAssignment(node); + return emitCatchClause(node); case 261: - return emitShorthandPropertyAssignment(node); + return emitPropertyAssignment(node); case 262: - return emitSpreadAssignment(node); + return emitShorthandPropertyAssignment(node); case 263: + return emitSpreadAssignment(node); + case 264: return emitEnumMember(node); } if (ts.isExpression(node)) { @@ -53958,77 +54019,77 @@ var ts; case 8: return emitNumericLiteral(node); case 9: - case 11: case 12: + case 13: return emitLiteral(node); - case 70: + case 71: return emitIdentifier(node); - case 85: - case 94: - case 96: - case 100: - case 98: + case 86: + case 95: + case 97: + case 101: + case 99: writeTokenText(kind); return; - case 176: - return emitArrayLiteralExpression(node); case 177: - return emitObjectLiteralExpression(node); + return emitArrayLiteralExpression(node); case 178: - return emitPropertyAccessExpression(node); + return emitObjectLiteralExpression(node); case 179: - return emitElementAccessExpression(node); + return emitPropertyAccessExpression(node); case 180: - return emitCallExpression(node); + return emitElementAccessExpression(node); case 181: - return emitNewExpression(node); + return emitCallExpression(node); case 182: - return emitTaggedTemplateExpression(node); + return emitNewExpression(node); case 183: - return emitTypeAssertionExpression(node); + return emitTaggedTemplateExpression(node); case 184: - return emitParenthesizedExpression(node); + return emitTypeAssertionExpression(node); case 185: - return emitFunctionExpression(node); + return emitParenthesizedExpression(node); case 186: - return emitArrowFunction(node); + return emitFunctionExpression(node); case 187: - return emitDeleteExpression(node); + return emitArrowFunction(node); case 188: - return emitTypeOfExpression(node); + return emitDeleteExpression(node); case 189: - return emitVoidExpression(node); + return emitTypeOfExpression(node); case 190: - return emitAwaitExpression(node); + return emitVoidExpression(node); case 191: - return emitPrefixUnaryExpression(node); + return emitAwaitExpression(node); case 192: - return emitPostfixUnaryExpression(node); + return emitPrefixUnaryExpression(node); case 193: - return emitBinaryExpression(node); + return emitPostfixUnaryExpression(node); case 194: - return emitConditionalExpression(node); + return emitBinaryExpression(node); case 195: - return emitTemplateExpression(node); + return emitConditionalExpression(node); case 196: - return emitYieldExpression(node); + return emitTemplateExpression(node); case 197: - return emitSpreadExpression(node); + return emitYieldExpression(node); case 198: - return emitClassExpression(node); + return emitSpreadExpression(node); case 199: + return emitClassExpression(node); + case 200: return; - case 201: - return emitAsExpression(node); case 202: - return emitNonNullExpression(node); + return emitAsExpression(node); case 203: + return emitNonNullExpression(node); + case 204: return emitMetaProperty(node); - case 248: - return emitJsxElement(node); case 249: + return emitJsxElement(node); + case 250: return emitJsxSelfClosingElement(node); - case 295: + case 296: return emitPartiallyEmittedExpression(node); } } @@ -54062,7 +54123,7 @@ var ts; emit(node.right); } function emitEntityName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -54132,7 +54193,7 @@ var ts; function emitAccessorDeclaration(node) { emitDecorators(node, node.decorators); emitModifiers(node, node.modifiers); - write(node.kind === 152 ? "get " : "set "); + write(node.kind === 153 ? "get " : "set "); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); } @@ -54311,7 +54372,7 @@ var ts; if (!(ts.getEmitFlags(node) & 65536)) { var dotRangeStart = node.expression.end; var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1; - var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd }; + var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd }; indentBeforeDot = needsIndentation(node, node.expression, dotToken); indentAfterDot = needsIndentation(node, dotToken, node.name); } @@ -54328,7 +54389,7 @@ var ts; if (ts.isNumericLiteral(expression)) { var text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(ts.tokenToString(22)) < 0; + && text.indexOf(ts.tokenToString(23)) < 0; } else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) { var constantValue = ts.getConstantValue(expression); @@ -54409,16 +54470,16 @@ var ts; } function shouldEmitWhitespaceBeforeOperand(node) { var operand = node.operand; - return operand.kind === 191 - && ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42)) - || (node.operator === 37 && (operand.operator === 37 || operand.operator === 43))); + return operand.kind === 192 + && ((node.operator === 37 && (operand.operator === 37 || operand.operator === 43)) + || (node.operator === 38 && (operand.operator === 38 || operand.operator === 44))); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand); writeTokenText(node.operator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 25; + var isCommaOperator = node.operatorToken.kind !== 26; var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); emitExpression(node.left); @@ -54486,17 +54547,17 @@ var ts; } function emitBlock(node) { if (isSingleLineEmptyBlock(node)) { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); write(" "); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } else { - writeToken(16, node.pos, node); + writeToken(17, node.pos, node); emitBlockStatements(node); increaseIndent(); emitLeadingCommentsOfPosition(node.statements.end); decreaseIndent(); - writeToken(17, node.statements.end, node); + writeToken(18, node.statements.end, node); } } function emitBlockStatements(node) { @@ -54520,16 +54581,16 @@ var ts; write(";"); } function emitIfStatement(node) { - var openParenPos = writeToken(89, node.pos, node); + var openParenPos = writeToken(90, node.pos, node); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitExpression(node.expression); - writeToken(19, node.expression.end, node); + writeToken(20, node.expression.end, node); emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node); - writeToken(81, node.thenStatement.end, node); - if (node.elseStatement.kind === 210) { + writeToken(82, node.thenStatement.end, node); + if (node.elseStatement.kind === 211) { write(" "); emit(node.elseStatement); } @@ -54558,9 +54619,9 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos, node); + writeToken(19, openParenPos, node); emitForBinding(node.initializer); write(";"); emitExpressionWithPrefix(" ", node.condition); @@ -54570,29 +54631,29 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" in "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - var openParenPos = writeToken(87, node.pos); + var openParenPos = writeToken(88, node.pos); write(" "); emitWithSuffix(node.awaitModifier, " "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitForBinding(node.initializer); write(" of "); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForBinding(node) { if (node !== undefined) { - if (node.kind === 226) { + if (node.kind === 227) { emit(node); } else { @@ -54601,17 +54662,17 @@ var ts; } } function emitContinueStatement(node) { - writeToken(76, node.pos); + writeToken(77, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitBreakStatement(node) { - writeToken(71, node.pos); + writeToken(72, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitReturnStatement(node) { - writeToken(95, node.pos, node); + writeToken(96, node.pos, node); emitExpressionWithPrefix(" ", node.expression); write(";"); } @@ -54622,11 +54683,11 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - var openParenPos = writeToken(97, node.pos); + var openParenPos = writeToken(98, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emitExpression(node.expression); - writeToken(19, node.expression.end); + writeToken(20, node.expression.end); write(" "); emit(node.caseBlock); } @@ -54654,7 +54715,7 @@ var ts; } } function emitDebuggerStatement(node) { - writeToken(77, node.pos); + writeToken(78, node.pos); write(";"); } function emitVariableDeclaration(node) { @@ -54764,7 +54825,7 @@ var ts; emitBlockFunctionBody(body); } decreaseIndent(); - writeToken(17, body.statements.end, body); + writeToken(18, body.statements.end, body); } function emitBlockFunctionBodyOnSingleLine(body) { emitBlockFunctionBodyWorker(body, true); @@ -54841,7 +54902,7 @@ var ts; write(node.flags & 16 ? "namespace " : "module "); emit(node.name); var body = node.body; - while (body.kind === 232) { + while (body.kind === 233) { write("."); emit(body.name); body = body.body; @@ -54862,9 +54923,9 @@ var ts; } } function emitCaseBlock(node) { - writeToken(16, node.pos); + writeToken(17, node.pos); emitList(node, node.clauses, 65); - writeToken(17, node.clauses.end); + writeToken(18, node.clauses.end); } function emitImportEqualsDeclaration(node) { emitModifiers(node, node.modifiers); @@ -54875,7 +54936,7 @@ var ts; write(";"); } function emitModuleReference(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -55005,7 +55066,7 @@ var ts; } } function emitJsxTagName(node) { - if (node.kind === 70) { + if (node.kind === 71) { emitExpression(node); } else { @@ -55042,11 +55103,11 @@ var ts; emitList(node, node.types, 272); } function emitCatchClause(node) { - var openParenPos = writeToken(73, node.pos); + var openParenPos = writeToken(74, node.pos); write(" "); - writeToken(18, openParenPos); + writeToken(19, openParenPos); emit(node.variableDeclaration); - writeToken(19, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); + writeToken(20, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); write(" "); emit(node.block); } @@ -55380,7 +55441,7 @@ var ts; for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) { var line = lines_1[_a]; for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { - if (!ts.isWhiteSpace(line.charCodeAt(i))) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { if (indentation === undefined || i < indentation) { indentation = i; break; @@ -55503,7 +55564,7 @@ var ts; && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile); } function skipSynthesizedParentheses(node) { - while (node.kind === 184 && ts.nodeIsSynthesized(node)) { + while (node.kind === 185 && ts.nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -55631,23 +55692,23 @@ var ts; } function generateNameForNode(node) { switch (node.kind) { - case 70: + case 71: return makeUniqueName(getTextOfNode(node)); + case 233: case 232: - case 231: return generateNameForModuleOrEnum(node); - case 237: - case 243: + case 238: + case 244: return generateNameForImportOrExportDeclaration(node); - case 227: case 228: - case 242: + case 229: + case 243: return generateNameForExportDefault(); - case 198: + case 199: return generateNameForClassExpression(); - case 150: - case 152: + case 151: case 153: + case 154: return generateNameForMethodOrAccessor(node); default: return makeTempVariableName(0); @@ -56459,57 +56520,57 @@ var ts; return diagnostics; function walk(node) { switch (parent.kind) { - case 145: - case 148: + case 146: + case 149: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); return; } - case 150: - case 149: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: - case 225: + case 228: + case 187: + case 228: + case 226: if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); return; } } switch (node.kind) { - case 236: + case 237: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return; - case 242: + case 243: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return; } break; - case 258: + case 259: var heritageClause = node; - if (heritageClause.token === 107) { + if (heritageClause.token === 108) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return; } break; - case 229: + case 230: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return; - case 232: + case 233: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return; - case 230: + case 231: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return; - case 231: + case 232: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return; - case 183: + case 184: var typeAssertionExpression = node; diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return; @@ -56524,45 +56585,45 @@ var ts; diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } switch (parent.kind) { - case 228: - case 150: - case 149: + case 229: case 151: + case 150: case 152: case 153: - case 185: - case 227: + case 154: case 186: - case 227: + case 228: + case 187: + case 228: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return; } - case 207: + case 208: if (nodes === parent.modifiers) { - return checkModifiers(nodes, parent.kind === 207); + return checkModifiers(nodes, parent.kind === 208); } break; - case 148: + case 149: if (nodes === parent.modifiers) { for (var _i = 0, _a = nodes; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 114) { + if (modifier.kind !== 115) { diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); } } return; } break; - case 145: + case 146: if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return; } break; - case 180: case 181: - case 200: + case 182: + case 201: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); return; @@ -56578,21 +56639,21 @@ var ts; for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { var modifier = modifiers_1[_i]; switch (modifier.kind) { - case 75: + case 76: if (isConstValid) { continue; } - case 113: - case 111: + case 114: case 112: - case 130: - case 123: - case 116: + case 113: + case 131: + case 124: + case 117: diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); break; - case 114: - case 83: - case 78: + case 115: + case 84: + case 79: } } } @@ -56691,9 +56752,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { + case 238: case 237: - case 236: - case 243: + case 244: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9) { break; @@ -56705,7 +56766,7 @@ var ts; (imports || (imports = [])).push(moduleNameExpr); } break; - case 232: + case 233: if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) { var moduleName = node.name; if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { @@ -57383,34 +57444,34 @@ var ts; })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {})); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 145: - case 225: - case 175: + case 146: + case 226: + case 176: + case 149: case 148: - case 147: - case 260: case 261: - case 263: - case 150: - case 149: + case 262: + case 264: case 151: + case 150: case 152: case 153: - case 227: - case 185: + case 154: + case 228: case 186: - case 259: - case 252: + case 187: + case 260: + case 253: return 1; - case 144: - case 229: + case 145: case 230: - case 162: - return 2; - case 228: case 231: - return 1 | 2; + case 163: + return 2; + case 229: case 232: + return 1 | 2; + case 233: if (ts.isAmbientModule(node)) { return 4 | 1; } @@ -57420,24 +57481,24 @@ var ts; else { return 4; } - case 240: case 241: - case 236: - case 237: case 242: + case 237: + case 238: case 243: + case 244: return 1 | 2 | 4; - case 264: + case 265: return 4 | 1; } return 1 | 2 | 4; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { - if (node.kind === 264) { + if (node.kind === 265) { return 1; } - else if (node.parent.kind === 242) { + else if (node.parent.kind === 243) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { @@ -57458,16 +57519,16 @@ var ts; } ts.getMeaningFromLocation = getMeaningFromLocation; function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 70); - if (node.parent.kind === 142 && + ts.Debug.assert(node.kind === 71); + if (node.parent.kind === 143 && node.parent.right === node && - node.parent.parent.kind === 236) { + node.parent.parent.kind === 237) { return 1 | 2 | 4; } return 4; } function isInRightSideOfImport(node) { - while (node.parent.kind === 142) { + while (node.parent.kind === 143) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -57478,27 +57539,27 @@ var ts; function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 142) { - while (root.parent && root.parent.kind === 142) { + if (root.parent.kind === 143) { + while (root.parent && root.parent.kind === 143) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 158 && !isLastClause; + return root.parent.kind === 159 && !isLastClause; } function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 178) { - while (root.parent && root.parent.kind === 178) { + if (root.parent.kind === 179) { + while (root.parent && root.parent.kind === 179) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 200 && root.parent.parent.kind === 258) { + if (!isLastClause && root.parent.kind === 201 && root.parent.parent.kind === 259) { var decl = root.parent.parent.parent; - return (decl.kind === 228 && root.parent.parent.token === 107) || - (decl.kind === 229 && root.parent.parent.token === 84); + return (decl.kind === 229 && root.parent.parent.token === 108) || + (decl.kind === 230 && root.parent.parent.token === 85); } return false; } @@ -57506,17 +57567,17 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 158 || - (node.parent.kind === 200 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || - (node.kind === 98 && !ts.isPartOfExpression(node)) || - node.kind === 168; + return node.parent.kind === 159 || + (node.parent.kind === 201 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + (node.kind === 99 && !ts.isPartOfExpression(node)) || + node.kind === 169; } function isCallExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 180); + return isCallOrNewExpressionTarget(node, 181); } ts.isCallExpressionTarget = isCallExpressionTarget; function isNewExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 181); + return isCallOrNewExpressionTarget(node, 182); } ts.isNewExpressionTarget = isNewExpressionTarget; function isCallOrNewExpressionTarget(node, kind) { @@ -57529,7 +57590,7 @@ var ts; ts.climbPastPropertyAccess = climbPastPropertyAccess; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 221 && referenceNode.label.text === labelName) { + if (referenceNode.kind === 222 && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -57538,14 +57599,14 @@ var ts; } ts.getTargetLabel = getTargetLabel; function isJumpStatementTarget(node) { - return node.kind === 70 && - (node.parent.kind === 217 || node.parent.kind === 216) && + return node.kind === 71 && + (node.parent.kind === 218 || node.parent.kind === 217) && node.parent.label === node; } ts.isJumpStatementTarget = isJumpStatementTarget; function isLabelOfLabeledStatement(node) { - return node.kind === 70 && - node.parent.kind === 221 && + return node.kind === 71 && + node.parent.kind === 222 && node.parent.label === node; } function isLabelName(node) { @@ -57553,38 +57614,38 @@ var ts; } ts.isLabelName = isLabelName; function isRightSideOfQualifiedName(node) { - return node.parent.kind === 142 && node.parent.right === node; + return node.parent.kind === 143 && node.parent.right === node; } ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName; function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 178 && node.parent.name === node; + return node && node.parent && node.parent.kind === 179 && node.parent.name === node; } ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess; function isNameOfModuleDeclaration(node) { - return node.parent.kind === 232 && node.parent.name === node; + return node.parent.kind === 233 && node.parent.name === node; } ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration; function isNameOfFunctionDeclaration(node) { - return node.kind === 70 && + return node.kind === 71 && ts.isFunctionLike(node.parent) && node.parent.name === node; } ts.isNameOfFunctionDeclaration = isNameOfFunctionDeclaration; function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 || node.kind === 8) { switch (node.parent.kind) { + case 149: case 148: - case 147: - case 260: - case 263: + case 261: + case 264: + case 151: case 150: - case 149: - case 152: case 153: - case 232: + case 154: + case 233: return node.parent.name === node; - case 179: + case 180: return node.parent.argumentExpression === node; - case 143: + case 144: return true; } } @@ -57628,17 +57689,17 @@ var ts; return undefined; } switch (node.kind) { - case 264: + case 265: + case 151: case 150: - case 149: - case 227: - case 185: - case 152: - case 153: case 228: + case 186: + case 153: + case 154: case 229: - case 231: + case 230: case 232: + case 233: return node; } } @@ -57646,46 +57707,46 @@ var ts; ts.getContainerNode = getContainerNode; function getNodeKind(node) { switch (node.kind) { - case 264: + case 265: return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement; - case 232: + case 233: return ts.ScriptElementKind.moduleElement; - case 228: - case 198: + case 229: + case 199: return ts.ScriptElementKind.classElement; - case 229: return ts.ScriptElementKind.interfaceElement; - case 230: return ts.ScriptElementKind.typeElement; - case 231: return ts.ScriptElementKind.enumElement; - case 225: + case 230: return ts.ScriptElementKind.interfaceElement; + case 231: return ts.ScriptElementKind.typeElement; + case 232: return ts.ScriptElementKind.enumElement; + case 226: return getKindOfVariableDeclaration(node); - case 175: + case 176: return getKindOfVariableDeclaration(ts.getRootDeclaration(node)); + case 187: + case 228: case 186: - case 227: - case 185: return ts.ScriptElementKind.functionElement; - case 152: return ts.ScriptElementKind.memberGetAccessorElement; - case 153: return ts.ScriptElementKind.memberSetAccessorElement; + case 153: return ts.ScriptElementKind.memberGetAccessorElement; + case 154: return ts.ScriptElementKind.memberSetAccessorElement; + case 151: case 150: - case 149: return ts.ScriptElementKind.memberFunctionElement; + case 149: case 148: - case 147: return ts.ScriptElementKind.memberVariableElement; - case 156: return ts.ScriptElementKind.indexSignatureElement; - case 155: return ts.ScriptElementKind.constructSignatureElement; - case 154: return ts.ScriptElementKind.callSignatureElement; - case 151: return ts.ScriptElementKind.constructorImplementationElement; - case 144: return ts.ScriptElementKind.typeParameterElement; - case 263: return ts.ScriptElementKind.enumMemberElement; - case 145: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; - case 236: - case 241: - case 238: - case 245: + case 157: return ts.ScriptElementKind.indexSignatureElement; + case 156: return ts.ScriptElementKind.constructSignatureElement; + case 155: return ts.ScriptElementKind.callSignatureElement; + case 152: return ts.ScriptElementKind.constructorImplementationElement; + case 145: return ts.ScriptElementKind.typeParameterElement; + case 264: return ts.ScriptElementKind.enumMemberElement; + case 146: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; + case 237: + case 242: case 239: + case 246: + case 240: return ts.ScriptElementKind.alias; - case 289: + case 290: return ts.ScriptElementKind.typeElement; default: return ts.ScriptElementKind.unknown; @@ -57701,10 +57762,10 @@ var ts; ts.getNodeKind = getNodeKind; function isThis(node) { switch (node.kind) { - case 98: + case 99: return true; - case 70: - return ts.identifierIsThisKeyword(node) && node.parent.kind === 145; + case 71: + return ts.identifierIsThisKeyword(node) && node.parent.kind === 146; default: return false; } @@ -57748,107 +57809,107 @@ var ts; return false; } switch (n.kind) { - case 228: case 229: - case 231: - case 177: - case 173: - case 162: - case 206: - case 233: + case 230: + case 232: + case 178: + case 174: + case 163: + case 207: case 234: - case 240: - case 244: - return nodeEndsWith(n, 17, sourceFile); - case 259: + case 235: + case 241: + case 245: + return nodeEndsWith(n, 18, sourceFile); + case 260: return isCompletedNode(n.block, sourceFile); - case 181: + case 182: if (!n.arguments) { return true; } - case 180: - case 184: - case 167: - return nodeEndsWith(n, 19, sourceFile); - case 159: + case 181: + case 185: + case 168: + return nodeEndsWith(n, 20, sourceFile); case 160: + case 161: return isCompletedNode(n.type, sourceFile); - case 151: case 152: case 153: - case 227: - case 185: - case 150: - case 149: - case 155: case 154: + case 228: case 186: + case 151: + case 150: + case 156: + case 155: + case 187: if (n.body) { return isCompletedNode(n.body, sourceFile); } if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 19, sourceFile); - case 232: + return hasChildOfKind(n, 20, sourceFile); + case 233: return n.body && isCompletedNode(n.body, sourceFile); - case 210: + case 211: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 209: + case 210: return isCompletedNode(n.expression, sourceFile) || - hasChildOfKind(n, 24); - case 176: - case 174: - case 179: - case 143: - case 164: - return nodeEndsWith(n, 21, sourceFile); - case 156: + hasChildOfKind(n, 25); + case 177: + case 175: + case 180: + case 144: + case 165: + return nodeEndsWith(n, 22, sourceFile); + case 157: if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 21, sourceFile); - case 256: + return hasChildOfKind(n, 22, sourceFile); case 257: + case 258: return false; - case 213: case 214: case 215: - case 212: + case 216: + case 213: return isCompletedNode(n.statement, sourceFile); - case 211: - var hasWhileKeyword = findChildOfKind(n, 105, sourceFile); + case 212: + var hasWhileKeyword = findChildOfKind(n, 106, sourceFile); if (hasWhileKeyword) { - return nodeEndsWith(n, 19, sourceFile); + return nodeEndsWith(n, 20, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 161: + case 162: return isCompletedNode(n.exprName, sourceFile); - case 188: - case 187: case 189: - case 196: + case 188: + case 190: case 197: + case 198: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 182: + case 183: return isCompletedNode(n.template, sourceFile); - case 195: + case 196: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 204: + case 205: return ts.nodeIsPresent(n.literal); - case 243: - case 237: + case 244: + case 238: return ts.nodeIsPresent(n.moduleSpecifier); - case 191: + case 192: return isCompletedNode(n.operand, sourceFile); - case 193: - return isCompletedNode(n.right, sourceFile); case 194: + return isCompletedNode(n.right, sourceFile); + case 195: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -57862,7 +57923,7 @@ var ts; if (last.kind === expectedLastToken) { return true; } - else if (last.kind === 24 && children.length !== 1) { + else if (last.kind === 25 && children.length !== 1) { return children[children.length - 2].kind === expectedLastToken; } } @@ -57891,7 +57952,7 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 293 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 294 && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -58026,7 +58087,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 264); + ts.Debug.assert(startNode !== undefined || n.kind === 265); if (children.length) { var candidate = findRightmostChildNodeWithTokens(children, children.length); return candidate && findRightmostToken(candidate); @@ -58068,16 +58129,16 @@ var ts; if (token.kind === 10) { return true; } - if (token.kind === 26 && token.parent.kind === 10) { + if (token.kind === 27 && token.parent.kind === 10) { return true; } - if (token.kind === 26 && token.parent.kind === 255) { + if (token.kind === 27 && token.parent.kind === 256) { return true; } - if (token && token.kind === 17 && token.parent.kind === 255) { + if (token && token.kind === 18 && token.parent.kind === 256) { return true; } - if (token.kind === 26 && token.parent.kind === 251) { + if (token.kind === 27 && token.parent.kind === 252) { return true; } return false; @@ -58116,9 +58177,9 @@ var ts; var node = ts.getTokenAtPosition(sourceFile, position); if (ts.isToken(node)) { switch (node.kind) { - case 103: - case 109: - case 75: + case 104: + case 110: + case 76: node = node.parent === undefined ? undefined : node.parent.parent; break; default: @@ -58168,17 +58229,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 158 || node.kind === 180) { + if (node.kind === 159 || node.kind === 181) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 228 || node.kind === 229) { + if (ts.isFunctionLike(node) || node.kind === 229 || node.kind === 230) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isWord(kind) { - return kind === 70 || ts.isKeyword(kind); + return kind === 71 || ts.isKeyword(kind); } ts.isWord = isWord; function isPropertyName(kind) { @@ -58190,7 +58251,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 - || kind === 11 + || kind === 12 || ts.isTemplateLiteralKind(kind)) { return true; } @@ -58198,7 +58259,7 @@ var ts; } ts.isStringOrRegularExpressionOrTemplateLiteral = isStringOrRegularExpressionOrTemplateLiteral; function isPunctuation(kind) { - return 16 <= kind && kind <= 69; + return 17 <= kind && kind <= 70; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { @@ -58208,9 +58269,9 @@ var ts; ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function isAccessibilityModifier(kind) { switch (kind) { - case 113: - case 111: + case 114: case 112: + case 113: return true; } return false; @@ -58233,18 +58294,18 @@ var ts; } ts.compareDataObjects = compareDataObjects; function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 176 || - node.kind === 177) { - if (node.parent.kind === 193 && + if (node.kind === 177 || + node.kind === 178) { + if (node.parent.kind === 194 && node.parent.left === node && - node.parent.operatorToken.kind === 57) { + node.parent.operatorToken.kind === 58) { return true; } - if (node.parent.kind === 215 && + if (node.parent.kind === 216 && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 261 ? node.parent.parent : node.parent)) { return true; } } @@ -58278,14 +58339,14 @@ var ts; ts.createTextSpanFromNode = createTextSpanFromNode; function isTypeKeyword(kind) { switch (kind) { - case 118: - case 121: - case 129: - case 132: + case 119: + case 122: + case 130: case 133: - case 135: + case 134: case 136: - case 104: + case 137: + case 105: return true; default: return false; @@ -58308,7 +58369,7 @@ var ts; })(ts || (ts = {})); (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 146; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -58481,7 +58542,7 @@ var ts; } ts.signatureToDisplayParts = signatureToDisplayParts; function getDeclaredName(typeChecker, symbol, location) { - if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143) { + if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 144) { return location.text; } var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol); @@ -58490,7 +58551,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 241 || location.parent.kind === 245) && + (location.parent.kind === 242 || location.parent.kind === 246) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -58547,7 +58608,7 @@ var ts; } ts.sanitizeConfigFile = sanitizeConfigFile; function getFirstNonSpaceCharacterPosition(text, position) { - while (ts.isWhiteSpace(text.charCodeAt(position))) { + while (ts.isWhiteSpaceLike(text.charCodeAt(position))) { position += 1; } return position; @@ -58609,176 +58670,176 @@ var ts; function spanInNode(node) { if (node) { switch (node.kind) { - case 207: + case 208: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 225: + case 226: + case 149: case 148: - case 147: return spanInVariableDeclaration(node); - case 145: + case 146: return spanInParameterDeclaration(node); - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: - case 151: - case 185: + case 154: + case 152: case 186: + case 187: return spanInFunctionDeclaration(node); - case 206: + case 207: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 233: + case 234: return spanInBlock(node); - case 259: + case 260: return spanInBlock(node.block); - case 209: + case 210: return textSpan(node.expression); - case 218: + case 219: return textSpan(node.getChildAt(0), node.expression); - case 212: + case 213: return textSpanEndingAtNextToken(node, node.expression); - case 211: + case 212: return spanInNode(node.statement); - case 224: + case 225: return textSpan(node.getChildAt(0)); - case 210: + case 211: return textSpanEndingAtNextToken(node, node.expression); - case 221: + case 222: return spanInNode(node.statement); + case 218: case 217: - case 216: return textSpan(node.getChildAt(0), node.label); - case 213: - return spanInForStatement(node); case 214: - return textSpanEndingAtNextToken(node, node.expression); + return spanInForStatement(node); case 215: + return textSpanEndingAtNextToken(node, node.expression); + case 216: return spanInInitializerOfForLike(node); - case 220: + case 221: return textSpanEndingAtNextToken(node, node.expression); - case 256: case 257: + case 258: return spanInNode(node.statements[0]); - case 223: + case 224: return spanInBlock(node.tryBlock); - case 222: + case 223: return textSpan(node, node.expression); - case 242: + case 243: return textSpan(node, node.expression); - case 236: - return textSpan(node, node.moduleReference); case 237: + return textSpan(node, node.moduleReference); + case 238: return textSpan(node, node.moduleSpecifier); - case 243: + case 244: return textSpan(node, node.moduleSpecifier); - case 232: + case 233: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } - case 228: - case 231: - case 263: - case 175: + case 229: + case 232: + case 264: + case 176: return textSpan(node); - case 219: + case 220: return spanInNode(node.statement); - case 146: + case 147: return spanInNodeArray(node.parent.decorators); - case 173: case 174: + case 175: return spanInBindingPattern(node); - case 229: case 230: + case 231: return undefined; - case 24: + case 25: case 1: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 25: + case 26: return spanInPreviousNode(node); - case 16: - return spanInOpenBraceToken(node); case 17: + return spanInOpenBraceToken(node); + case 18: return spanInCloseBraceToken(node); - case 21: + case 22: return spanInCloseBracketToken(node); - case 18: - return spanInOpenParenToken(node); case 19: + return spanInOpenParenToken(node); + case 20: return spanInCloseParenToken(node); - case 55: + case 56: return spanInColonToken(node); - case 28: - case 26: + case 29: + case 27: return spanInGreaterThanOrLessThanToken(node); - case 105: + case 106: return spanInWhileKeyword(node); - case 81: - case 73: - case 86: + case 82: + case 74: + case 87: return spanInNextNode(node); - case 141: + case 142: return spanInOfKeyword(node); default: if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 70 || - node.kind === 197 || - node.kind === 260 || - node.kind === 261) && + if ((node.kind === 71 || + node.kind === 198 || + node.kind === 261 || + node.kind === 262) && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } - if (node.kind === 193) { + if (node.kind === 194) { var binaryExpression = node; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); } - if (binaryExpression.operatorToken.kind === 57 && + if (binaryExpression.operatorToken.kind === 58 && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { return textSpan(node); } - if (binaryExpression.operatorToken.kind === 25) { + if (binaryExpression.operatorToken.kind === 26) { return spanInNode(binaryExpression.left); } } if (ts.isPartOfExpression(node)) { switch (node.parent.kind) { - case 211: + case 212: return spanInPreviousNode(node); - case 146: + case 147: return spanInNode(node.parent); - case 213: - case 215: + case 214: + case 216: return textSpan(node); - case 193: - if (node.parent.operatorToken.kind === 25) { + case 194: + if (node.parent.operatorToken.kind === 26) { return textSpan(node); } break; - case 186: + case 187: if (node.parent.body === node) { return textSpan(node); } break; } } - if (node.parent.kind === 260 && + if (node.parent.kind === 261 && node.parent.name === node && !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } - if (node.parent.kind === 183 && node.parent.type === node) { + if (node.parent.kind === 184 && node.parent.type === node) { return spanInNextNode(node.parent.type); } if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } - if ((node.parent.kind === 225 || - node.parent.kind === 145)) { + if ((node.parent.kind === 226 || + node.parent.kind === 146)) { var paramOrVarDecl = node.parent; if (paramOrVarDecl.initializer === node || paramOrVarDecl.type === node || @@ -58786,7 +58847,7 @@ var ts; return spanInPreviousNode(node); } } - if (node.parent.kind === 193) { + if (node.parent.kind === 194) { var binaryExpression = node.parent; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && (binaryExpression.right === node || @@ -58798,7 +58859,7 @@ var ts; } } function textSpanFromVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.kind === 226 && + if (variableDeclaration.parent.kind === 227 && variableDeclaration.parent.declarations[0] === variableDeclaration) { return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); } @@ -58807,7 +58868,7 @@ var ts; } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 214) { + if (variableDeclaration.parent.parent.kind === 215) { return spanInNode(variableDeclaration.parent.parent); } if (ts.isBindingPattern(variableDeclaration.name)) { @@ -58815,10 +58876,10 @@ var ts; } if (variableDeclaration.initializer || ts.hasModifier(variableDeclaration, 1) || - variableDeclaration.parent.parent.kind === 215) { + variableDeclaration.parent.parent.kind === 216) { return textSpanFromVariableDeclaration(variableDeclaration); } - if (variableDeclaration.parent.kind === 226 && + if (variableDeclaration.parent.kind === 227 && variableDeclaration.parent.declarations[0] !== variableDeclaration) { return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } @@ -58847,7 +58908,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return ts.hasModifier(functionDeclaration, 1) || - (functionDeclaration.parent.kind === 228 && functionDeclaration.kind !== 151); + (functionDeclaration.parent.kind === 229 && functionDeclaration.kind !== 152); } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -58867,22 +58928,22 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 232: + case 233: if (ts.getModuleInstanceState(block.parent) !== 1) { return undefined; } - case 212: - case 210: - case 214: - return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); case 213: + case 211: case 215: + return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); + case 214: + case 216: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 226) { + if (forLikeStatement.initializer.kind === 227) { var variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -58904,62 +58965,62 @@ var ts; } } function spanInBindingPattern(bindingPattern) { - var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 ? element : undefined; }); + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 200 ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 175) { + if (bindingPattern.parent.kind === 176) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { - ts.Debug.assert(node.kind !== 174 && node.kind !== 173); - var elements = node.kind === 176 ? + ts.Debug.assert(node.kind !== 175 && node.kind !== 174); + var elements = node.kind === 177 ? node.elements : node.properties; - var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 ? element : undefined; }); + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 200 ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node.parent.kind === 193 ? node.parent : node); + return textSpan(node.parent.kind === 194 ? node.parent : node); } function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 231: + case 232: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 228: + case 229: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 234: + case 235: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 233: + case 234: if (ts.getModuleInstanceState(node.parent.parent) !== 1) { return undefined; } - case 231: - case 228: + case 232: + case 229: return textSpan(node); - case 206: + case 207: if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 259: + case 260: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 234: + case 235: var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; - case 173: + case 174: var bindingPattern = node.parent; return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -58972,7 +59033,7 @@ var ts; } function spanInCloseBracketToken(node) { switch (node.parent.kind) { - case 174: + case 175: var bindingPattern = node.parent; return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -58984,33 +59045,33 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 211 || - node.parent.kind === 180 || - node.parent.kind === 181) { + if (node.parent.kind === 212 || + node.parent.kind === 181 || + node.parent.kind === 182) { return spanInPreviousNode(node); } - if (node.parent.kind === 184) { + if (node.parent.kind === 185) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInCloseParenToken(node) { switch (node.parent.kind) { - case 185: - case 227: case 186: + case 228: + case 187: + case 151: case 150: - case 149: - case 152: case 153: - case 151: - case 212: - case 211: + case 154: + case 152: case 213: - case 215: - case 180: + case 212: + case 214: + case 216: case 181: - case 184: + case 182: + case 185: return spanInPreviousNode(node); default: return spanInNode(node.parent); @@ -59018,26 +59079,26 @@ var ts; } function spanInColonToken(node) { if (ts.isFunctionLike(node.parent) || - node.parent.kind === 260 || - node.parent.kind === 145) { + node.parent.kind === 261 || + node.parent.kind === 146) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 183) { + if (node.parent.kind === 184) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 211) { + if (node.parent.kind === 212) { return textSpanEndingAtNextToken(node, node.parent.expression); } return spanInNode(node.parent); } function spanInOfKeyword(node) { - if (node.parent.kind === 215) { + if (node.parent.kind === 216) { return spanInNextNode(node); } return spanInNode(node.parent); @@ -59052,25 +59113,25 @@ var ts; function createClassifier() { var scanner = ts.createScanner(5, false); var noRegexTable = []; - noRegexTable[70] = true; + noRegexTable[71] = true; noRegexTable[9] = true; noRegexTable[8] = true; - noRegexTable[11] = true; - noRegexTable[98] = true; - noRegexTable[42] = true; + noRegexTable[12] = true; + noRegexTable[99] = true; noRegexTable[43] = true; - noRegexTable[19] = true; - noRegexTable[21] = true; - noRegexTable[17] = true; - noRegexTable[100] = true; - noRegexTable[85] = true; + noRegexTable[44] = true; + noRegexTable[20] = true; + noRegexTable[22] = true; + noRegexTable[18] = true; + noRegexTable[101] = true; + noRegexTable[86] = true; var templateStack = []; function canFollow(keyword1, keyword2) { if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 124 || - keyword2 === 134 || - keyword2 === 122 || - keyword2 === 114) { + if (keyword2 === 125 || + keyword2 === 135 || + keyword2 === 123 || + keyword2 === 115) { return true; } return false; @@ -59153,7 +59214,7 @@ var ts; text = "}\n" + text; offset = 2; case 6: - templateStack.push(13); + templateStack.push(14); break; } scanner.setText(text); @@ -59165,55 +59226,55 @@ var ts; do { token = scanner.scan(); if (!ts.isTrivia(token)) { - if ((token === 40 || token === 62) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 11) { - token = 11; + if ((token === 41 || token === 63) && !noRegexTable[lastNonTriviaToken]) { + if (scanner.reScanSlashToken() === 12) { + token = 12; } } - else if (lastNonTriviaToken === 22 && isKeyword(token)) { - token = 70; + else if (lastNonTriviaToken === 23 && isKeyword(token)) { + token = 71; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - token = 70; + token = 71; } - else if (lastNonTriviaToken === 70 && - token === 26) { + else if (lastNonTriviaToken === 71 && + token === 27) { angleBracketStack++; } - else if (token === 28 && angleBracketStack > 0) { + else if (token === 29 && angleBracketStack > 0) { angleBracketStack--; } - else if (token === 118 || - token === 135 || - token === 132 || - token === 121 || - token === 136) { + else if (token === 119 || + token === 136 || + token === 133 || + token === 122 || + token === 137) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - token = 70; + token = 71; } } - else if (token === 13) { + else if (token === 14) { templateStack.push(token); } - else if (token === 16) { + else if (token === 17) { if (templateStack.length > 0) { templateStack.push(token); } } - else if (token === 17) { + else if (token === 18) { if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 13) { + if (lastTemplateStackToken === 14) { token = scanner.reScanTemplateToken(); - if (token === 15) { + if (token === 16) { templateStack.pop(); } else { - ts.Debug.assert(token === 14, "Should have been a template middle. Was " + token); + ts.Debug.assert(token === 15, "Should have been a template middle. Was " + token); } } else { - ts.Debug.assert(lastTemplateStackToken === 16, "Should have been an open brace. Was: " + token); + ts.Debug.assert(lastTemplateStackToken === 17, "Should have been an open brace. Was: " + token); templateStack.pop(); } } @@ -59251,10 +59312,10 @@ var ts; } else if (ts.isTemplateLiteralKind(token)) { if (scanner.isUnterminated()) { - if (token === 15) { + if (token === 16) { result.endOfLineState = 5; } - else if (token === 12) { + else if (token === 13) { result.endOfLineState = 4; } else { @@ -59262,7 +59323,7 @@ var ts; } } } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 13) { + else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 14) { result.endOfLineState = 6; } } @@ -59286,43 +59347,43 @@ var ts; } function isBinaryExpressionOperatorToken(token) { switch (token) { - case 38: - case 40: + case 39: case 41: - case 36: + case 42: case 37: - case 44: + case 38: case 45: case 46: - case 26: - case 28: + case 47: + case 27: case 29: case 30: - case 92: - case 91: - case 117: case 31: + case 93: + case 92: + case 118: case 32: case 33: case 34: - case 47: - case 49: + case 35: case 48: - case 52: + case 50: + case 49: case 53: - case 68: - case 67: + case 54: case 69: - case 64: + case 68: + case 70: case 65: case 66: - case 58: + case 67: case 59: case 60: - case 62: + case 61: case 63: - case 57: - case 25: + case 64: + case 58: + case 26: return true; default: return false; @@ -59330,19 +59391,19 @@ var ts; } function isPrefixUnaryExpressionOperatorToken(token) { switch (token) { - case 36: case 37: + case 38: + case 52: case 51: - case 50: - case 42: case 43: + case 44: return true; default: return false; } } function isKeyword(token) { - return token >= 71 && token <= 141; + return token >= 72 && token <= 142; } function classFromKind(token) { if (isKeyword(token)) { @@ -59351,7 +59412,7 @@ var ts; else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { return 5; } - else if (token >= 16 && token <= 69) { + else if (token >= 17 && token <= 70) { return 10; } switch (token) { @@ -59359,7 +59420,7 @@ var ts; return 4; case 9: return 6; - case 11: + case 12: return 7; case 7: case 3: @@ -59368,7 +59429,7 @@ var ts; case 5: case 4: return 8; - case 70: + case 71: default: if (ts.isTemplateLiteralKind(token)) { return 6; @@ -59388,10 +59449,10 @@ var ts; ts.getSemanticClassifications = getSemanticClassifications; function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 232: - case 228: + case 233: case 229: - case 227: + case 230: + case 228: cancellationToken.throwIfCancellationRequested(); } } @@ -59435,7 +59496,7 @@ var ts; return undefined; function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 232 && + return declaration.kind === 233 && ts.getModuleInstanceState(declaration) === 1; }); } @@ -59444,7 +59505,7 @@ var ts; if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { var kind = node.kind; checkForClassificationCancellation(cancellationToken, kind); - if (kind === 70 && !ts.nodeIsMissing(node)) { + if (kind === 71 && !ts.nodeIsMissing(node)) { var identifier = node; if (classifiableNames.get(identifier.text)) { var symbol = typeChecker.getSymbolAtLocation(node); @@ -59576,16 +59637,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18); pos = tag.tagName.end; switch (tag.kind) { - case 285: + case 286: processJSDocParameterTag(tag); break; - case 288: + case 289: processJSDocTemplateTag(tag); break; - case 287: + case 288: processElement(tag.typeExpression); break; - case 286: + case 287: processElement(tag.typeExpression); break; } @@ -59666,22 +59727,22 @@ var ts; } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 250: + case 251: if (token.parent.tagName === token) { return 19; } break; - case 251: + case 252: if (token.parent.tagName === token) { return 20; } break; - case 249: + case 250: if (token.parent.tagName === token) { return 21; } break; - case 252: + case 253: if (token.parent.name === token) { return 22; } @@ -59693,25 +59754,25 @@ var ts; if (ts.isKeyword(tokenKind)) { return 3; } - if (tokenKind === 26 || tokenKind === 28) { + if (tokenKind === 27 || tokenKind === 29) { if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { return 10; } } if (ts.isPunctuation(tokenKind)) { if (token) { - if (tokenKind === 57) { - if (token.parent.kind === 225 || - token.parent.kind === 148 || - token.parent.kind === 145 || - token.parent.kind === 252) { + if (tokenKind === 58) { + if (token.parent.kind === 226 || + token.parent.kind === 149 || + token.parent.kind === 146 || + token.parent.kind === 253) { return 5; } } - if (token.parent.kind === 193 || - token.parent.kind === 191 || + if (token.parent.kind === 194 || token.parent.kind === 192 || - token.parent.kind === 194) { + token.parent.kind === 193 || + token.parent.kind === 195) { return 5; } } @@ -59721,9 +59782,9 @@ var ts; return 4; } else if (tokenKind === 9) { - return token.parent.kind === 252 ? 24 : 6; + return token.parent.kind === 253 ? 24 : 6; } - else if (tokenKind === 11) { + else if (tokenKind === 12) { return 6; } else if (ts.isTemplateLiteralKind(tokenKind)) { @@ -59732,35 +59793,35 @@ var ts; else if (tokenKind === 10) { return 23; } - else if (tokenKind === 70) { + else if (tokenKind === 71) { if (token) { switch (token.parent.kind) { - case 228: + case 229: if (token.parent.name === token) { return 11; } return; - case 144: + case 145: if (token.parent.name === token) { return 15; } return; - case 229: + case 230: if (token.parent.name === token) { return 13; } return; - case 231: + case 232: if (token.parent.name === token) { return 12; } return; - case 232: + case 233: if (token.parent.name === token) { return 14; } return; - case 145: + case 146: if (token.parent.name === token) { return ts.isThisIdentifier(token) ? 3 : 17; } @@ -60224,7 +60285,7 @@ var ts; else { if (!symbols || symbols.length === 0) { if (sourceFile.languageVariant === 1 && - location.parent && location.parent.kind === 251) { + location.parent && location.parent.kind === 252) { var tagName = location.parent.parent.openingElement.tagName; entries.push({ name: tagName.text, @@ -60304,15 +60365,15 @@ var ts; if (!node || node.kind !== 9) { return undefined; } - if (node.parent.kind === 260 && - node.parent.parent.kind === 177 && + if (node.parent.kind === 261 && + node.parent.parent.kind === 178 && node.parent.name === node) { return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log); } else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) { return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log); } - else if (node.parent.kind === 237 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) { + else if (node.parent.kind === 238 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) { return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker); } else if (isEqualityExpression(node.parent)) { @@ -60462,9 +60523,9 @@ var ts; requestJsDocTagName = true; } switch (tag.kind) { - case 287: - case 285: + case 288: case 286: + case 287: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -60500,12 +60561,12 @@ var ts; return undefined; } var parent = contextToken.parent; - if (contextToken.kind === 22) { - if (parent.kind === 178) { + if (contextToken.kind === 23) { + if (parent.kind === 179) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent.kind === 142) { + else if (parent.kind === 143) { node = contextToken.parent.left; isRightOfDot = true; } @@ -60514,25 +60575,25 @@ var ts; } } else if (sourceFile.languageVariant === 1) { - if (parent && parent.kind === 178) { + if (parent && parent.kind === 179) { contextToken = parent; parent = parent.parent; } switch (parent.kind) { - case 251: - if (contextToken.kind === 40) { + case 252: + if (contextToken.kind === 41) { isStartingCloseTag = true; location = contextToken; } break; - case 193: + case 194: if (!(parent.left.flags & 32768)) { break; } - case 249: - case 248: case 250: - if (contextToken.kind === 26) { + case 249: + case 251: + if (contextToken.kind === 27) { isRightOfOpenTag = true; location = contextToken; } @@ -60579,7 +60640,7 @@ var ts; isGlobalCompletion = false; isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 70 || node.kind === 142 || node.kind === 178) { + if (node.kind === 71 || node.kind === 143 || node.kind === 179) { var symbol = typeChecker.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { symbol = typeChecker.getAliasedSymbol(symbol); @@ -60625,7 +60686,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType = void 0; - if ((jsxContainer.kind === 249) || (jsxContainer.kind === 250)) { + if ((jsxContainer.kind === 250) || (jsxContainer.kind === 251)) { attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer); if (attrsType) { symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties); @@ -60646,9 +60707,9 @@ var ts; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; if (scopeNode) { isGlobalCompletion = - scopeNode.kind === 264 || - scopeNode.kind === 195 || - scopeNode.kind === 255 || + scopeNode.kind === 265 || + scopeNode.kind === 196 || + scopeNode.kind === 256 || ts.isStatement(scopeNode); } var symbolMeanings = 793064 | 107455 | 1920 | 8388608; @@ -60675,12 +60736,12 @@ var ts; if (contextToken.kind === 10) { return true; } - if (contextToken.kind === 28 && contextToken.parent) { - if (contextToken.parent.kind === 250) { + if (contextToken.kind === 29 && contextToken.parent) { + if (contextToken.parent.kind === 251) { return true; } - if (contextToken.parent.kind === 251 || contextToken.parent.kind === 249) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 248; + if (contextToken.parent.kind === 252 || contextToken.parent.kind === 250) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 249; } } return false; @@ -60689,41 +60750,41 @@ var ts; if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { - case 25: - return containingNodeKind === 180 - || containingNodeKind === 151 - || containingNodeKind === 181 - || containingNodeKind === 176 - || containingNodeKind === 193 - || containingNodeKind === 159; - case 18: - return containingNodeKind === 180 - || containingNodeKind === 151 - || containingNodeKind === 181 - || containingNodeKind === 184 - || containingNodeKind === 167; - case 20: - return containingNodeKind === 176 - || containingNodeKind === 156 - || containingNodeKind === 143; - case 127: + case 26: + return containingNodeKind === 181 + || containingNodeKind === 152 + || containingNodeKind === 182 + || containingNodeKind === 177 + || containingNodeKind === 194 + || containingNodeKind === 160; + case 19: + return containingNodeKind === 181 + || containingNodeKind === 152 + || containingNodeKind === 182 + || containingNodeKind === 185 + || containingNodeKind === 168; + case 21: + return containingNodeKind === 177 + || containingNodeKind === 157 + || containingNodeKind === 144; case 128: + case 129: return true; - case 22: - return containingNodeKind === 232; - case 16: - return containingNodeKind === 228; - case 57: - return containingNodeKind === 225 - || containingNodeKind === 193; - case 13: - return containingNodeKind === 195; + case 23: + return containingNodeKind === 233; + case 17: + return containingNodeKind === 229; + case 58: + return containingNodeKind === 226 + || containingNodeKind === 194; case 14: - return containingNodeKind === 204; - case 113: - case 111: + return containingNodeKind === 196; + case 15: + return containingNodeKind === 205; + case 114: case 112: - return containingNodeKind === 148; + case 113: + return containingNodeKind === 149; } switch (previousToken.getText()) { case "public": @@ -60736,7 +60797,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 - || contextToken.kind === 11 + || contextToken.kind === 12 || ts.isTemplateLiteralKind(contextToken.kind)) { var start_3 = contextToken.getStart(); var end = contextToken.getEnd(); @@ -60745,7 +60806,7 @@ var ts; } if (position === end) { return !!contextToken.isUnterminated - || contextToken.kind === 11; + || contextToken.kind === 12; } } return false; @@ -60754,22 +60815,22 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 177) { + if (objectLikeContainer.kind === 178) { isNewIdentifierLocation = true; typeForObject = typeChecker.getContextualType(objectLikeContainer); typeForObject = typeForObject && typeForObject.getNonNullableType(); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 173) { + else if (objectLikeContainer.kind === 174) { isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); if (ts.isVariableLike(rootDeclaration)) { var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type); - if (!canGetType && rootDeclaration.kind === 145) { + if (!canGetType && rootDeclaration.kind === 146) { if (ts.isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); } - else if (rootDeclaration.parent.kind === 150 || rootDeclaration.parent.kind === 153) { + else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) { canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -60795,9 +60856,9 @@ var ts; return true; } function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 240 ? - 237 : - 243; + var declarationKind = namedImportsOrExports.kind === 241 ? + 238 : + 244; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -60817,10 +60878,10 @@ var ts; function tryGetObjectLikeCompletionContainer(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16: - case 25: + case 17: + case 26: var parent = contextToken.parent; - if (parent && (parent.kind === 177 || parent.kind === 173)) { + if (parent && (parent.kind === 178 || parent.kind === 174)) { return parent; } break; @@ -60831,11 +60892,11 @@ var ts; function tryGetNamedImportsOrExportsForCompletion(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16: - case 25: + case 17: + case 26: switch (contextToken.parent.kind) { - case 240: - case 244: + case 241: + case 245: return contextToken.parent; } } @@ -60846,32 +60907,32 @@ var ts; if (contextToken) { var parent = contextToken.parent; switch (contextToken.kind) { - case 27: - case 40: - case 70: - case 178: - case 253: - case 252: + case 28: + case 41: + case 71: + case 179: case 254: - if (parent && (parent.kind === 249 || parent.kind === 250)) { + case 253: + case 255: + if (parent && (parent.kind === 250 || parent.kind === 251)) { return parent; } - else if (parent.kind === 252) { + else if (parent.kind === 253) { return parent.parent.parent; } break; case 9: - if (parent && ((parent.kind === 252) || (parent.kind === 254))) { + if (parent && ((parent.kind === 253) || (parent.kind === 255))) { return parent.parent.parent; } break; - case 17: + case 18: if (parent && - parent.kind === 255 && - parent.parent && parent.parent.kind === 252) { + parent.kind === 256 && + parent.parent && parent.parent.kind === 253) { return parent.parent.parent.parent; } - if (parent && parent.kind === 254) { + if (parent && parent.kind === 255) { return parent.parent.parent; } break; @@ -60884,9 +60945,9 @@ var ts; return false; } switch (kind) { - case 151: + case 152: + case 161: case 160: - case 159: return false; default: return true; @@ -60895,67 +60956,67 @@ var ts; function isSolelyIdentifierDefinitionLocation(contextToken) { var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { - case 25: - return containingNodeKind === 225 || - containingNodeKind === 226 || - containingNodeKind === 207 || - containingNodeKind === 231 || + case 26: + return containingNodeKind === 226 || + containingNodeKind === 227 || + containingNodeKind === 208 || + containingNodeKind === 232 || isFunction(containingNodeKind) || - containingNodeKind === 228 || - containingNodeKind === 198 || containingNodeKind === 229 || - containingNodeKind === 174 || - containingNodeKind === 230; - case 22: - return containingNodeKind === 174; - case 55: + containingNodeKind === 199 || + containingNodeKind === 230 || + containingNodeKind === 175 || + containingNodeKind === 231; + case 23: return containingNodeKind === 175; - case 20: - return containingNodeKind === 174; - case 18: - return containingNodeKind === 259 || + case 56: + return containingNodeKind === 176; + case 21: + return containingNodeKind === 175; + case 19: + return containingNodeKind === 260 || isFunction(containingNodeKind); - case 16: - return containingNodeKind === 231 || - containingNodeKind === 229 || - containingNodeKind === 162; - case 24: - return containingNodeKind === 147 && + case 17: + return containingNodeKind === 232 || + containingNodeKind === 230 || + containingNodeKind === 163; + case 25: + return containingNodeKind === 148 && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 229 || - contextToken.parent.parent.kind === 162); - case 26: - return containingNodeKind === 228 || - containingNodeKind === 198 || - containingNodeKind === 229 || + (contextToken.parent.parent.kind === 230 || + contextToken.parent.parent.kind === 163); + case 27: + return containingNodeKind === 229 || + containingNodeKind === 199 || containingNodeKind === 230 || + containingNodeKind === 231 || isFunction(containingNodeKind); - case 114: - return containingNodeKind === 148; - case 23: - return containingNodeKind === 145 || + case 115: + return containingNodeKind === 149; + case 24: + return containingNodeKind === 146 || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 174); - case 113: - case 111: + contextToken.parent.parent.kind === 175); + case 114: case 112: - return containingNodeKind === 145; - case 117: - return containingNodeKind === 241 || - containingNodeKind === 245 || - containingNodeKind === 239; - case 74: - case 82: - case 108: - case 88: - case 103: - case 124: - case 134: - case 90: - case 109: + case 113: + return containingNodeKind === 146; + case 118: + return containingNodeKind === 242 || + containingNodeKind === 246 || + containingNodeKind === 240; case 75: - case 115: - case 137: + case 83: + case 109: + case 89: + case 104: + case 125: + case 135: + case 91: + case 110: + case 76: + case 116: + case 138: return true; } switch (contextToken.getText()) { @@ -61007,20 +61068,20 @@ var ts; var existingMemberNames = ts.createMap(); for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; - if (m.kind !== 260 && - m.kind !== 261 && - m.kind !== 175 && - m.kind !== 150 && - m.kind !== 152 && - m.kind !== 153) { + if (m.kind !== 261 && + m.kind !== 262 && + m.kind !== 176 && + m.kind !== 151 && + m.kind !== 153 && + m.kind !== 154) { continue; } if (m.getStart() <= position && position <= m.getEnd()) { continue; } var existingName = void 0; - if (m.kind === 175 && m.propertyName) { - if (m.propertyName.kind === 70) { + if (m.kind === 176 && m.propertyName) { + if (m.propertyName.kind === 71) { existingName = m.propertyName.text; } } @@ -61038,7 +61099,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 252) { + if (attr.kind === 253) { seenNames.set(attr.name.text, true); } } @@ -61071,7 +61132,7 @@ var ts; return name; } var keywordCompletions = []; - for (var i = 71; i <= 141; i++) { + for (var i = 72; i <= 142; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ts.ScriptElementKind.keyword, @@ -61083,10 +61144,10 @@ var ts; return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind); } function isEqualityOperatorKind(kind) { - return kind === 31 || - kind === 32 || + return kind === 32 || kind === 33 || - kind === 34; + kind === 34 || + kind === 35; } })(Completions = ts.Completions || (ts.Completions = {})); })(ts || (ts = {})); @@ -61146,74 +61207,74 @@ var ts; return undefined; } switch (node.kind) { - case 89: - case 81: - if (hasKind(node.parent, 210)) { + case 90: + case 82: + if (hasKind(node.parent, 211)) { return getIfElseOccurrences(node.parent, sourceFile); } break; - case 95: - if (hasKind(node.parent, 218)) { + case 96: + if (hasKind(node.parent, 219)) { return highlightSpans(getReturnOccurrences(node.parent)); } break; - case 99: - if (hasKind(node.parent, 222)) { + case 100: + if (hasKind(node.parent, 223)) { return highlightSpans(getThrowOccurrences(node.parent)); } break; - case 101: - case 73: - case 86: - var tryStatement = node.kind === 73 ? parent(parent(node)) : parent(node); - if (hasKind(tryStatement, 223)) { + case 102: + case 74: + case 87: + var tryStatement = node.kind === 74 ? parent(parent(node)) : parent(node); + if (hasKind(tryStatement, 224)) { return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile)); } break; - case 97: - if (hasKind(node.parent, 220)) { + case 98: + if (hasKind(node.parent, 221)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent)); } break; - case 72: - case 78: - if (hasKind(parent(parent(parent(node))), 220)) { + case 73: + case 79: + if (hasKind(parent(parent(parent(node))), 221)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent)); } break; - case 71: - case 76: - if (hasKind(node.parent, 217) || hasKind(node.parent, 216)) { + case 72: + case 77: + if (hasKind(node.parent, 218) || hasKind(node.parent, 217)) { return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent)); } break; - case 87: - if (hasKind(node.parent, 213) || - hasKind(node.parent, 214) || - hasKind(node.parent, 215)) { + case 88: + if (hasKind(node.parent, 214) || + hasKind(node.parent, 215) || + hasKind(node.parent, 216)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 105: - case 80: - if (hasKind(node.parent, 212) || hasKind(node.parent, 211)) { + case 106: + case 81: + if (hasKind(node.parent, 213) || hasKind(node.parent, 212)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 122: - if (hasKind(node.parent, 151)) { + case 123: + if (hasKind(node.parent, 152)) { return highlightSpans(getConstructorOccurrences(node.parent)); } break; - case 124: - case 134: - if (hasKind(node.parent, 152) || hasKind(node.parent, 153)) { + case 125: + case 135: + if (hasKind(node.parent, 153) || hasKind(node.parent, 154)) { return highlightSpans(getGetAndSetOccurrences(node.parent)); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 207)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 208)) { return highlightSpans(getModifierOccurrences(node.kind, node.parent)); } } @@ -61226,10 +61287,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 222) { + if (node.kind === 223) { statementAccumulator.push(node); } - else if (node.kind === 223) { + else if (node.kind === 224) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -61250,10 +61311,10 @@ var ts; var child = throwStatement; while (child.parent) { var parent_2 = child.parent; - if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264) { + if (ts.isFunctionBlock(parent_2) || parent_2.kind === 265) { return parent_2; } - if (parent_2.kind === 223) { + if (parent_2.kind === 224) { var tryStatement = parent_2; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; @@ -61268,7 +61329,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 217 || node.kind === 216) { + if (node.kind === 218 || node.kind === 217) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -61283,15 +61344,15 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node = statement.parent; node; node = node.parent) { switch (node.kind) { - case 220: - if (statement.kind === 216) { + case 221: + if (statement.kind === 217) { continue; } - case 213: case 214: case 215: + case 216: + case 213: case 212: - case 211: if (!statement.label || isLabeledBy(node, statement.label.text)) { return node; } @@ -61308,24 +61369,24 @@ var ts; function getModifierOccurrences(modifier, declaration) { var container = declaration.parent; if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 228 || - container.kind === 198 || - (declaration.kind === 145 && hasKind(container, 151)))) { + if (!(container.kind === 229 || + container.kind === 199 || + (declaration.kind === 146 && hasKind(container, 152)))) { return undefined; } } - else if (modifier === 114) { - if (!(container.kind === 228 || container.kind === 198)) { + else if (modifier === 115) { + if (!(container.kind === 229 || container.kind === 199)) { return undefined; } } - else if (modifier === 83 || modifier === 123) { - if (!(container.kind === 233 || container.kind === 264)) { + else if (modifier === 84 || modifier === 124) { + if (!(container.kind === 234 || container.kind === 265)) { return undefined; } } - else if (modifier === 116) { - if (!(container.kind === 228 || declaration.kind === 228)) { + else if (modifier === 117) { + if (!(container.kind === 229 || declaration.kind === 229)) { return undefined; } } @@ -61336,8 +61397,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 233: - case 264: + case 234: + case 265: if (modifierFlag & 128) { nodes = declaration.members.concat(declaration); } @@ -61345,15 +61406,15 @@ var ts; nodes = container.statements; } break; - case 151: + case 152: nodes = container.parameters.concat(container.parent.members); break; - case 228: - case 198: + case 229: + case 199: nodes = container.members; if (modifierFlag & 28) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 151 && member; + return member.kind === 152 && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -61374,19 +61435,19 @@ var ts; return keywords; function getFlagFromModifier(modifier) { switch (modifier) { - case 113: + case 114: return 4; - case 111: - return 8; case 112: + return 8; + case 113: return 16; - case 114: + case 115: return 32; - case 83: + case 84: return 1; - case 123: + case 124: return 2; - case 116: + case 117: return 128; default: ts.Debug.fail(); @@ -61406,13 +61467,13 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 152); tryPushAccessorKeyword(accessorDeclaration.symbol, 153); + tryPushAccessorKeyword(accessorDeclaration.symbol, 154); return keywords; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 134); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 125, 135); }); } } } @@ -61421,18 +61482,18 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 122); + return pushKeywordIf(keywords, token, 123); }); }); return keywords; } function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) { - if (loopNode.kind === 211) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 88, 106, 81)) { + if (loopNode.kind === 212) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 105)) { + if (pushKeywordIf(keywords, loopTokens[i], 106)) { break; } } @@ -61441,7 +61502,7 @@ var ts; var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71, 76); + pushKeywordIf(keywords, statement.getFirstToken(), 72, 77); } }); return keywords; @@ -61450,13 +61511,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 213: case 214: case 215: - case 211: + case 216: case 212: + case 213: return getLoopBreakContinueOccurrences(owner); - case 220: + case 221: return getSwitchCaseDefaultOccurrences(owner); } } @@ -61464,13 +61525,13 @@ var ts; } function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 97); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 98); ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 72, 78); + pushKeywordIf(keywords, clause.getFirstToken(), 73, 79); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71); + pushKeywordIf(keywords, statement.getFirstToken(), 72); } }); }); @@ -61478,13 +61539,13 @@ var ts; } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 101); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 102); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 74); } if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 86); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 87); } return keywords; } @@ -61495,50 +61556,50 @@ var ts; } var keywords = []; ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100); }); if (ts.isFunctionBlock(owner)) { ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96); }); } return keywords; } function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); - if (!(func && hasKind(func.body, 206))) { + if (!(func && hasKind(func.body, 207))) { return undefined; } var keywords = []; ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96); }); ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100); }); return keywords; } function getIfElseOccurrences(ifStatement, sourceFile) { var keywords = []; - while (hasKind(ifStatement.parent, 210) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 211) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } while (ifStatement) { var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 89); + pushKeywordIf(keywords, children[0], 90); for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 81)) { + if (pushKeywordIf(keywords, children[i], 82)) { break; } } - if (!hasKind(ifStatement.elseStatement, 210)) { + if (!hasKind(ifStatement.elseStatement, 211)) { break; } ifStatement = ifStatement.elseStatement; } var result = []; for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 81 && i < keywords.length - 1) { + if (keywords[i].kind === 82 && i < keywords.length - 1) { var elseKeyword = keywords[i]; var ifKeyword = keywords[i + 1]; var shouldCombindElseAndIf = true; @@ -61563,7 +61624,7 @@ var ts; return result; } function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 221; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 222; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -61728,12 +61789,12 @@ var ts; } cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 180: + case 181: if (!isAvailableThroughGlobal) { var parent = direct.parent; - if (exportKind === 2 && parent.kind === 225) { + if (exportKind === 2 && parent.kind === 226) { var name = parent.name; - if (name.kind === 70) { + if (name.kind === 71) { directImports.push(name); break; } @@ -61741,19 +61802,19 @@ var ts; addIndirectUser(direct.getSourceFile()); } break; - case 236: + case 237: handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1)); break; - case 237: + case 238: var namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { handleNamespaceImport(direct, namedBindings.name); } else { directImports.push(direct); } break; - case 243: + case 244: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); } @@ -61770,7 +61831,7 @@ var ts; } else if (!isAvailableThroughGlobal) { var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - ts.Debug.assert(sourceFileLike.kind === 264 || sourceFileLike.kind === 232); + ts.Debug.assert(sourceFileLike.kind === 265 || sourceFileLike.kind === 233); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUsers(sourceFileLike); } @@ -61818,26 +61879,26 @@ var ts; } return { importSearches: importSearches, singleReferences: singleReferences }; function handleImport(decl) { - if (decl.kind === 236) { + if (decl.kind === 237) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } return; } - if (decl.kind === 70) { + if (decl.kind === 71) { handleNamespaceImportLike(decl); return; } if (decl.moduleSpecifier.kind !== 9) { return; } - if (decl.kind === 243) { + if (decl.kind === 244) { searchForNamedImport(decl.exportClause); return; } var importClause = decl.importClause; var namedBindings = importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { handleNamespaceImportLike(namedBindings.name); return; } @@ -61876,7 +61937,7 @@ var ts; } } else { - var localSymbol = element.kind === 245 && element.propertyName + var localSymbol = element.kind === 246 && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); @@ -61887,7 +61948,7 @@ var ts; function findNamespaceReExports(sourceFileLike, name, checker) { var namespaceImportSymbol = checker.getSymbolAtLocation(name); return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) { - if (statement.kind !== 243) + if (statement.kind !== 244) return; var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier; if (moduleSpecifier || !exportClause) @@ -61920,7 +61981,7 @@ var ts; return map; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return ts.forEach(sourceFileLike.kind === 264 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { + return ts.forEach(sourceFileLike.kind === 265 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action)); }); } @@ -61934,18 +61995,18 @@ var ts; else { forEachPossibleImportOrExportStatement(sourceFile, function (statement) { switch (statement.kind) { - case 243: - case 237: { + case 244: + case 238: { var decl = statement; if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9) { action(decl, decl.moduleSpecifier); } break; } - case 236: { + case 237: { var decl = statement; var moduleReference = decl.moduleReference; - if (moduleReference.kind === 247 && + if (moduleReference.kind === 248 && moduleReference.expression.kind === 9) { action(decl, moduleReference.expression); } @@ -61967,10 +62028,10 @@ var ts; } function importerFromModuleSpecifier(moduleSpecifier) { var decl = moduleSpecifier.parent; - if (decl.kind === 237 || decl.kind === 243) { + if (decl.kind === 238 || decl.kind === 244) { return decl; } - ts.Debug.assert(decl.kind === 247); + ts.Debug.assert(decl.kind === 248); return decl.parent; } function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { @@ -61978,8 +62039,8 @@ var ts; function getExport() { var parent = node.parent; if (symbol.flags & 7340032) { - if (parent.kind === 178) { - return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 + if (parent.kind === 179) { + return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194 ? getSpecialPropertyExport(parent.parent, false) : undefined; } @@ -61990,9 +62051,9 @@ var ts; } } else { - var exportNode = parent.kind === 225 ? ts.getAncestor(parent, 207) : parent; - if (ts.hasModifier(exportNode, 1)) { - if (exportNode.kind === 236 && exportNode.moduleReference === node) { + var exportNode = getExportNode(parent); + if (exportNode && ts.hasModifier(exportNode, 1)) { + if (exportNode.kind === 237 && exportNode.moduleReference === node) { if (comingFromExport) { return undefined; } @@ -62003,15 +62064,15 @@ var ts; return exportInfo(symbol, getExportKindForDeclaration(exportNode)); } } - else if (parent.kind === 242) { + else if (parent.kind === 243) { var exportingModuleSymbol = parent.symbol.parent; ts.Debug.assert(!!exportingModuleSymbol); return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } }; } - else if (parent.kind === 193) { + else if (parent.kind === 194) { return getSpecialPropertyExport(parent, true); } - else if (parent.parent.kind === 193) { + else if (parent.parent.kind === 194) { return getSpecialPropertyExport(parent.parent, true); } } @@ -62055,17 +62116,26 @@ var ts; } } FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; + function getExportNode(parent) { + if (parent.kind === 226) { + var p = parent; + return p.parent.kind === 260 ? undefined : p.parent.parent.kind === 208 ? p.parent.parent : undefined; + } + else { + return parent; + } + } function isNodeImport(node) { var parent = node.parent; switch (parent.kind) { - case 236: + case 237: return parent.name === node && isExternalModuleImportEquals(parent) ? { isNamedImport: false } : undefined; - case 241: + case 242: return parent.propertyName ? undefined : { isNamedImport: true }; - case 238: case 239: + case 240: ts.Debug.assert(parent.name === node); return { isNamedImport: false }; default: @@ -62083,7 +62153,7 @@ var ts; } var name = ts.forEach(symbol.declarations, function (_a) { var name = _a.name; - return name && name.kind === 70 && name.text; + return name && name.kind === 71 && name.text; }); ts.Debug.assert(!!name); return name; @@ -62102,22 +62172,22 @@ var ts; return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 180) { + if (node.kind === 181) { return node.getSourceFile(); } var parent = node.parent; - if (parent.kind === 264) { + if (parent.kind === 265) { return parent; } - ts.Debug.assert(parent.kind === 233 && isAmbientModuleDeclaration(parent.parent)); + ts.Debug.assert(parent.kind === 234 && isAmbientModuleDeclaration(parent.parent)); return parent.parent; } function isAmbientModuleDeclaration(node) { - return node.kind === 232 && node.name.kind === 9; + return node.kind === 233 && node.name.kind === 9; } function isExternalModuleImportEquals(_a) { var moduleReference = _a.moduleReference; - return moduleReference.kind === 247 && moduleReference.expression.kind === 9; + return moduleReference.kind === 248 && moduleReference.expression.kind === 9; } })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); })(ts || (ts = {})); @@ -62151,12 +62221,12 @@ var ts; } FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition; function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) { - if (node.parent.kind === 261) { + if (node.parent.kind === 262) { var result_4 = []; FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); }); return result_4; } - else if (node.kind === 96 || ts.isSuperProperty(node.parent)) { + else if (node.kind === 97 || ts.isSuperProperty(node.parent)) { var symbol = typeChecker.getSymbolAtLocation(node); return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; } @@ -62262,16 +62332,16 @@ var ts; if (symbol) { return getDefinitionKindAndDisplayParts(symbol, node, checker); } - else if (node.kind === 177) { + else if (node.kind === 178) { return { kind: ts.ScriptElementKind.interfaceElement, - displayParts: [ts.punctuationPart(18), ts.textPart("object literal"), ts.punctuationPart(19)] + displayParts: [ts.punctuationPart(19), ts.textPart("object literal"), ts.punctuationPart(20)] }; } - else if (node.kind === 198) { + else if (node.kind === 199) { return { kind: ts.ScriptElementKind.localClassElement, - displayParts: [ts.punctuationPart(18), ts.textPart("anonymous local class"), ts.punctuationPart(19)] + displayParts: [ts.punctuationPart(19), ts.textPart("anonymous local class"), ts.punctuationPart(20)] }; } else { @@ -62304,17 +62374,17 @@ var ts; return ts.createTextSpanFromBounds(start, end); } function isWriteAccess(node) { - if (node.kind === 70 && ts.isDeclarationName(node)) { + if (node.kind === 71 && ts.isDeclarationName(node)) { return true; } var parent = node.parent; if (parent) { - if (parent.kind === 192 || parent.kind === 191) { + if (parent.kind === 193 || parent.kind === 192) { return true; } - else if (parent.kind === 193 && parent.left === node) { + else if (parent.kind === 194 && parent.left === node) { var operator = parent.operatorToken.kind; - return 57 <= operator && operator <= 69; + return 58 <= operator && operator <= 70; } } return false; @@ -62328,7 +62398,7 @@ var ts; (function (Core) { function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) { if (options === void 0) { options = {}; } - if (node.kind === 264) { + if (node.kind === 265) { return undefined; } if (!options.implementations) { @@ -62366,7 +62436,7 @@ var ts; if (ts.isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 96) { + if (node.kind === 97) { return getReferencesForSuperKeyword(node); } return undefined; @@ -62404,7 +62474,7 @@ var ts; var symbolIdToReferences = []; var inheritsFromCache = ts.createMap(); var sourceFileToSeenSymbols = []; - var isForConstructor = originalLocation.kind === 122; + var isForConstructor = originalLocation.kind === 123; var importTracker; return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference, markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() }); @@ -62494,14 +62564,14 @@ var ts; checker.getPropertySymbolOfDestructuringAssignment(location); } function isObjectBindingPatternElementWithoutPropertyName(symbol) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175); + var bindingElement = ts.getDeclarationOfKind(symbol, 176); return bindingElement && - bindingElement.parent.kind === 173 && + bindingElement.parent.kind === 174 && !bindingElement.propertyName; } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) { if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175); + var bindingElement = ts.getDeclarationOfKind(symbol, 176); var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); } @@ -62509,7 +62579,7 @@ var ts; } function getSymbolScope(symbol) { var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 185 || valueDeclaration.kind === 198)) { + if (valueDeclaration && (valueDeclaration.kind === 186 || valueDeclaration.kind === 199)) { return valueDeclaration; } if (!declarations) { @@ -62518,7 +62588,7 @@ var ts; if (flags & (4 | 8192)) { var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 228); + return ts.getAncestor(privateDeclaration, 229); } } if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { @@ -62537,7 +62607,7 @@ var ts; if (scope && scope !== container) { return undefined; } - if (!container || container.kind === 264 && !ts.isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 265 && !ts.isExternalOrCommonJsModule(container)) { return undefined; } scope = container; @@ -62585,7 +62655,7 @@ var ts; } function isValidReferencePosition(node, searchSymbolName) { switch (node && node.kind) { - case 70: + case 71: return node.getWidth() === searchSymbolName.length; case 9: return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) && @@ -62650,7 +62720,7 @@ var ts; return; } if (ts.isExportSpecifier(parent)) { - ts.Debug.assert(referenceLocation.kind === 70); + ts.Debug.assert(referenceLocation.kind === 71); getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state); return; } @@ -62691,7 +62761,7 @@ var ts; } } if (!(referenceLocation === propertyName && state.isForRename)) { - var exportKind = referenceLocation.originalKeywordKind === 78 ? 1 : 0; + var exportKind = referenceLocation.originalKeywordKind === 79 ? 1 : 0; var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker); ts.Debug.assert(!!exportInfo); searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state); @@ -62768,16 +62838,16 @@ var ts; function findOwnConstructorReferences(classSymbol, sourceFile, addNode) { for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) { var decl = _a[_i]; - var ctrKeyword = ts.findChildOfKind(decl, 122, sourceFile); - ts.Debug.assert(decl.kind === 151 && !!ctrKeyword); + var ctrKeyword = ts.findChildOfKind(decl, 123, sourceFile); + ts.Debug.assert(decl.kind === 152 && !!ctrKeyword); addNode(ctrKeyword); } classSymbol.exports.forEach(function (member) { var decl = member.valueDeclaration; - if (decl && decl.kind === 150) { + if (decl && decl.kind === 151) { var body = decl.body; if (body) { - forEachDescendantOfKind(body, 98, function (thisKeyword) { + forEachDescendantOfKind(body, 99, function (thisKeyword) { if (ts.isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -62794,10 +62864,10 @@ var ts; } for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - ts.Debug.assert(decl.kind === 151); + ts.Debug.assert(decl.kind === 152); var body = decl.body; if (body) { - forEachDescendantOfKind(body, 96, function (node) { + forEachDescendantOfKind(body, 97, function (node) { if (ts.isCallExpressionTarget(node)) { addNode(node); } @@ -62810,10 +62880,10 @@ var ts; addReference(refNode.parent); return; } - if (refNode.kind !== 70) { + if (refNode.kind !== 71) { return; } - if (refNode.parent.kind === 261) { + if (refNode.parent.kind === 262) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference); } var containingClass = getContainingClassIfInHeritageClause(refNode); @@ -62828,7 +62898,7 @@ var ts; addReference(parent.initializer); } else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) { - if (parent.body.kind === 206) { + if (parent.body.kind === 207) { ts.forEachReturnStatement(parent.body, function (returnStatement) { if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) { addReference(returnStatement.expression); @@ -62869,12 +62939,12 @@ var ts; } function getContainingClassIfInHeritageClause(node) { if (node && node.parent) { - if (node.kind === 200 - && node.parent.kind === 258 + if (node.kind === 201 + && node.parent.kind === 259 && ts.isClassLike(node.parent.parent)) { return node.parent.parent; } - else if (node.kind === 70 || node.kind === 178) { + else if (node.kind === 71 || node.kind === 179) { return getContainingClassIfInHeritageClause(node.parent); } } @@ -62882,13 +62952,13 @@ var ts; } function isImplementationExpression(node) { switch (node.kind) { - case 184: + case 185: return isImplementationExpression(node.expression); + case 187: case 186: - case 185: + case 178: + case 199: case 177: - case 198: - case 176: return true; default: return false; @@ -62922,7 +62992,7 @@ var ts; } return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); } - else if (declaration.kind === 229) { + else if (declaration.kind === 230) { if (parentIsInterface) { return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference); } @@ -62949,13 +63019,13 @@ var ts; } var staticFlag = 32; switch (searchSpaceNode.kind) { - case 148: - case 147: - case 150: case 149: + case 148: case 151: + case 150: case 152: case 153: + case 154: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -62968,7 +63038,7 @@ var ts; for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) { var position = possiblePositions_4[_i]; var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 96) { + if (!node || node.kind !== 97) { continue; } var container = ts.getSuperContainer(node, false); @@ -62982,32 +63052,32 @@ var ts; var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); var staticFlag = 32; switch (searchSpaceNode.kind) { + case 151: case 150: - case 149: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } + case 149: case 148: - case 147: - case 151: case 152: case 153: + case 154: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 264: + case 265: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } - case 227: - case 185: + case 228: + case 186: break; default: return undefined; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 264) { + if (searchSpaceNode.kind === 265) { ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); @@ -63031,26 +63101,26 @@ var ts; } var container = ts.getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 185: - case 227: + case 186: + case 228: if (searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; + case 151: case 150: - case 149: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 198: - case 228: + case 199: + case 229: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32) === staticFlag) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 264: - if (container.kind === 264 && !ts.isExternalModule(container)) { + case 265: + if (container.kind === 265 && !ts.isExternalModule(container)) { result.push(FindAllReferences.nodeEntry(node)); } break; @@ -63084,7 +63154,7 @@ var ts; var result = [symbol]; var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location); if (containingObjectLiteralElement) { - if (containingObjectLiteralElement.kind !== 261) { + if (containingObjectLiteralElement.kind !== 262) { var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); if (propertySymbol) { result.push(propertySymbol); @@ -63098,7 +63168,7 @@ var ts; result.push(shorthandValueSymbol); } } - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 146 && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -63130,7 +63200,7 @@ var ts; getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 229) { + else if (declaration.kind === 230) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -63187,7 +63257,7 @@ var ts; }); } function getNameFromObjectLiteralElement(node) { - if (node.name.kind === 143) { + if (node.name.kind === 144) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression)) { return nameExpression.text; @@ -63242,7 +63312,7 @@ var ts; if (node.initializer) { return true; } - else if (node.kind === 225) { + else if (node.kind === 226) { var parentStatement = getParentStatementOfVariableDeclaration(node); return parentStatement && ts.hasModifier(parentStatement, 2); } @@ -63252,18 +63322,18 @@ var ts; } else { switch (node.kind) { - case 228: - case 198: - case 231: + case 229: + case 199: case 232: + case 233: return true; } } return false; } function getParentStatementOfVariableDeclaration(node) { - if (node.parent && node.parent.parent && node.parent.parent.kind === 207) { - ts.Debug.assert(node.parent.kind === 226); + if (node.parent && node.parent.parent && node.parent.parent.kind === 208) { + ts.Debug.assert(node.parent.kind === 227); return node.parent.parent; } } @@ -63355,13 +63425,13 @@ var ts; } if (symbol.flags & 8388608) { var declaration = symbol.declarations[0]; - if (node.kind === 70 && + if (node.kind === 71 && (node.parent === declaration || - (declaration.kind === 241 && declaration.parent && declaration.parent.kind === 240))) { + (declaration.kind === 242 && declaration.parent && declaration.parent.kind === 241))) { symbol = typeChecker.getAliasedSymbol(symbol); } } - if (node.parent.kind === 261) { + if (node.parent.kind === 262) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -63431,7 +63501,7 @@ var ts; } return result; function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (ts.isNewExpressionTarget(location) || location.kind === 122) { + if (ts.isNewExpressionTarget(location) || location.kind === 123) { if (symbol.flags & 32) { for (var _i = 0, _a = symbol.getDeclarations(); _i < _a.length; _i++) { var declaration = _a[_i]; @@ -63458,7 +63528,7 @@ var ts; var definition; for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) { var d = signatureDeclarations_1[_i]; - if (selectConstructors ? d.kind === 151 : isSignatureDeclaration(d)) { + if (selectConstructors ? d.kind === 152 : isSignatureDeclaration(d)) { declarations.push(d); if (d.body) definition = d; @@ -63473,10 +63543,10 @@ var ts; } function isSignatureDeclaration(node) { switch (node.kind) { + case 152: + case 228: case 151: - case 227: case 150: - case 149: return true; default: return false; @@ -63626,7 +63696,7 @@ var ts; var doc = jsDocs_1[_i]; var tagsForDoc = doc.tags; if (tagsForDoc) { - tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283; }).map(function (jsDocTag) { + tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 284; }).map(function (jsDocTag) { return { name: jsDocTag.tagName.text, text: jsDocTag.comment @@ -63685,16 +63755,16 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 227: - case 150: - case 151: case 228: - case 207: + case 151: + case 152: + case 229: + case 208: break findOwner; - case 264: + case 265: return undefined; - case 232: - if (commentOwner.parent.kind === 232) { + case 233: + if (commentOwner.parent.kind === 233) { return undefined; } break findOwner; @@ -63711,7 +63781,7 @@ var ts; var docParams = ""; for (var i = 0; i < parameters.length; i++) { var currentName = parameters[i].name; - var paramName = currentName.kind === 70 ? + var paramName = currentName.kind === 71 ? currentName.text : "param" + i; if (isJavaScriptFile) { @@ -63734,7 +63804,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 207) { + if (commentOwner.kind === 208) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -63744,17 +63814,17 @@ var ts; return ts.emptyArray; } function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 184) { + while (rightHandSide.kind === 185) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 185: case 186: + case 187: return rightHandSide.parameters; - case 198: + case 199: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151) { + if (member.kind === 152) { return member.parameters; } } @@ -63970,7 +64040,7 @@ var ts; } rawItems = ts.filter(rawItems, function (item) { var decl = item.declaration; - if (decl.kind === 238 || decl.kind === 241 || decl.kind === 236) { + if (decl.kind === 239 || decl.kind === 242 || decl.kind === 237) { var importer = checker.getSymbolAtLocation(decl.name); var imported = checker.getAliasedSymbol(importer); return importer.name !== imported.name; @@ -63997,7 +64067,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 || + if (node.kind === 71 || node.kind === 9 || node.kind === 8) { return node.text; @@ -64011,7 +64081,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 143) { + else if (declaration.name.kind === 144) { return tryAddComputedPropertyName(declaration.name.expression, containers, true); } else { @@ -64028,7 +64098,7 @@ var ts; } return true; } - if (expression.kind === 178) { + if (expression.kind === 179) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -64039,7 +64109,7 @@ var ts; } function getContainers(declaration) { var containers = []; - if (declaration.name.kind === 143) { + if (declaration.name.kind === 144) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) { return undefined; } @@ -64190,7 +64260,7 @@ var ts; return; } switch (node.kind) { - case 151: + case 152: var ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) { @@ -64200,28 +64270,28 @@ var ts; } } break; - case 150: - case 152: + case 151: case 153: - case 149: + case 154: + case 150: if (!ts.hasDynamicName(node)) { addNodeWithRecursiveChild(node, node.body); } break; + case 149: case 148: - case 147: if (!ts.hasDynamicName(node)) { addLeafNode(node); } break; - case 238: + case 239: var importClause = node; if (importClause.name) { addLeafNode(importClause); } var namedBindings = importClause.namedBindings; if (namedBindings) { - if (namedBindings.kind === 239) { + if (namedBindings.kind === 240) { addLeafNode(namedBindings); } else { @@ -64232,8 +64302,8 @@ var ts; } } break; - case 175: - case 225: + case 176: + case 226: var decl = node; var name = decl.name; if (ts.isBindingPattern(name)) { @@ -64246,12 +64316,12 @@ var ts; addNodeWithRecursiveChild(decl, decl.initializer); } break; + case 187: + case 228: case 186: - case 227: - case 185: addNodeWithRecursiveChild(node, node.body); break; - case 231: + case 232: startNode(node); for (var _d = 0, _e = node.members; _d < _e.length; _d++) { var member = _e[_d]; @@ -64261,9 +64331,9 @@ var ts; } endNode(); break; - case 228: - case 198: case 229: + case 199: + case 230: startNode(node); for (var _f = 0, _g = node.members; _f < _g.length; _f++) { var member = _g[_f]; @@ -64271,21 +64341,21 @@ var ts; } endNode(); break; - case 232: + case 233: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 245: - case 236: - case 156: - case 154: + case 246: + case 237: + case 157: case 155: - case 230: + case 156: + case 231: addLeafNode(node); break; default: ts.forEach(node.jsDoc, function (jsDoc) { ts.forEach(jsDoc.tags, function (tag) { - if (tag.kind === 289) { + if (tag.kind === 290) { addLeafNode(tag); } }); @@ -64333,12 +64403,12 @@ var ts; } }); function shouldReallyMerge(a, b) { - return a.kind === b.kind && (a.kind !== 232 || areSameModule(a, b)); + return a.kind === b.kind && (a.kind !== 233 || areSameModule(a, b)); function areSameModule(a, b) { if (a.body.kind !== b.body.kind) { return false; } - if (a.body.kind !== 232) { + if (a.body.kind !== 233) { return true; } return areSameModule(a.body, b.body); @@ -64372,7 +64442,7 @@ var ts; } } function tryGetName(node) { - if (node.kind === 232) { + if (node.kind === 233) { return getModuleName(node); } var decl = node; @@ -64380,18 +64450,18 @@ var ts; return ts.getPropertyNameForPropertyNameNode(decl.name); } switch (node.kind) { - case 185: case 186: - case 198: + case 187: + case 199: return getFunctionOrClassName(node); - case 289: + case 290: return getJSDocTypedefTagName(node); default: return undefined; } } function getItemName(node) { - if (node.kind === 232) { + if (node.kind === 233) { return getModuleName(node); } var name = node.name; @@ -64402,29 +64472,29 @@ var ts; } } switch (node.kind) { - case 264: + case 265: var sourceFile = node; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; - case 186: - case 227: - case 185: + case 187: case 228: - case 198: + case 186: + case 229: + case 199: if (ts.getModifierFlags(node) & 512) { return "default"; } return getFunctionOrClassName(node); - case 151: + case 152: return "constructor"; - case 155: + case 156: return "new()"; - case 154: + case 155: return "()"; - case 156: + case 157: return "[]"; - case 289: + case 290: return getJSDocTypedefTagName(node); default: return ""; @@ -64436,10 +64506,10 @@ var ts; } else { var parentNode = node.parent && node.parent.parent; - if (parentNode && parentNode.kind === 207) { + if (parentNode && parentNode.kind === 208) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70) { + if (nameIdentifier.kind === 71) { return nameIdentifier.text; } } @@ -64464,24 +64534,24 @@ var ts; return topLevel; function isTopLevel(item) { switch (navigationBarNodeKind(item)) { - case 228: - case 198: - case 231: case 229: + case 199: case 232: - case 264: case 230: - case 289: + case 233: + case 265: + case 231: + case 290: return true; - case 151: - case 150: case 152: + case 151: case 153: - case 225: + case 154: + case 226: return hasSomeImportantChild(item); + case 187: + case 228: case 186: - case 227: - case 185: return isTopLevelFunctionDeclaration(item); default: return false; @@ -64491,10 +64561,10 @@ var ts; return false; } switch (navigationBarNodeKind(item.parent)) { - case 233: - case 264: - case 150: + case 234: + case 265: case 151: + case 152: return true; default: return hasSomeImportantChild(item); @@ -64503,7 +64573,7 @@ var ts; function hasSomeImportantChild(item) { return ts.forEach(item.children, function (child) { var childKind = navigationBarNodeKind(child); - return childKind !== 225 && childKind !== 175; + return childKind !== 226 && childKind !== 176; }); } } @@ -64557,25 +64627,25 @@ var ts; } var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 232) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 233) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } return result.join("."); } function getInteriorModule(decl) { - return decl.body.kind === 232 ? getInteriorModule(decl.body) : decl; + return decl.body.kind === 233 ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 143; + return !member.name || member.name.kind === 144; } function getNodeSpan(node) { - return node.kind === 264 + return node.kind === 265 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromNode(node, curSourceFile); } function getModifiers(node) { - if (node.parent && node.parent.kind === 225) { + if (node.parent && node.parent.kind === 226) { node = node.parent; } return ts.getNodeModifiers(node); @@ -64584,14 +64654,14 @@ var ts; if (node.name && ts.getFullWidth(node.name) > 0) { return ts.declarationNameToString(node.name); } - else if (node.parent.kind === 225) { + else if (node.parent.kind === 226) { return ts.declarationNameToString(node.parent.name); } - else if (node.parent.kind === 193 && - node.parent.operatorToken.kind === 57) { + else if (node.parent.kind === 194 && + node.parent.operatorToken.kind === 58) { return nodeText(node.parent.left).replace(whiteSpaceRegex, ""); } - else if (node.parent.kind === 260 && node.parent.name) { + else if (node.parent.kind === 261 && node.parent.name) { return nodeText(node.parent.name); } else if (ts.getModifierFlags(node) & 512) { @@ -64602,7 +64672,7 @@ var ts; } } function isFunctionOrClassExpression(node) { - return node.kind === 185 || node.kind === 186 || node.kind === 198; + return node.kind === 186 || node.kind === 187 || node.kind === 199; } })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); @@ -64675,7 +64745,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 186; + return ts.isFunctionBlock(node) && node.parent.kind !== 187; } var depth = 0; var maxDepth = 20; @@ -64688,30 +64758,30 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 206: + case 207: if (!ts.isFunctionBlock(n)) { var parent = n.parent; - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); - if (parent.kind === 211 || - parent.kind === 214 || + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); + if (parent.kind === 212 || parent.kind === 215 || + parent.kind === 216 || + parent.kind === 214 || + parent.kind === 211 || parent.kind === 213 || - parent.kind === 210 || - parent.kind === 212 || - parent.kind === 219 || - parent.kind === 259) { + parent.kind === 220 || + parent.kind === 260) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 223) { + if (parent.kind === 224) { var tryStatement = parent; if (tryStatement.tryBlock === n) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87, sourceFile); if (finallyKeyword) { addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); break; @@ -64727,25 +64797,25 @@ var ts; }); break; } - case 233: { - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); + case 234: { + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 228: case 229: - case 231: - case 177: - case 234: { - var openBrace = ts.findChildOfKind(n, 16, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17, sourceFile); + case 230: + case 232: + case 178: + case 235: { + var openBrace = ts.findChildOfKind(n, 17, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 176: - var openBracket = ts.findChildOfKind(n, 20, sourceFile); - var closeBracket = ts.findChildOfKind(n, 21, sourceFile); + case 177: + var openBracket = ts.findChildOfKind(n, 21, sourceFile); + var closeBracket = ts.findChildOfKind(n, 22, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); break; } @@ -65183,10 +65253,10 @@ var ts; var externalModule = false; function nextToken() { var token = ts.scanner.scan(); - if (token === 16) { + if (token === 17) { braceNesting++; } - else if (token === 17) { + else if (token === 18) { braceNesting--; } return token; @@ -65234,9 +65304,9 @@ var ts; } function tryConsumeDeclare() { var token = ts.scanner.getToken(); - if (token === 123) { + if (token === 124) { token = nextToken(); - if (token === 127) { + if (token === 128) { token = nextToken(); if (token === 9) { recordAmbientExternalModule(); @@ -65248,42 +65318,42 @@ var ts; } function tryConsumeImport() { var token = ts.scanner.getToken(); - if (token === 90) { + if (token === 91) { token = nextToken(); if (token === 9) { recordModuleName(); return true; } else { - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); return true; } } - else if (token === 57) { + else if (token === 58) { if (tryConsumeRequireCall(true)) { return true; } } - else if (token === 25) { + else if (token === 26) { token = nextToken(); } else { return true; } } - if (token === 16) { + if (token === 17) { token = nextToken(); - while (token !== 17 && token !== 1) { + while (token !== 18 && token !== 1) { token = nextToken(); } - if (token === 17) { + if (token === 18) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65291,13 +65361,13 @@ var ts; } } } - else if (token === 38) { + else if (token === 39) { token = nextToken(); - if (token === 117) { + if (token === 118) { token = nextToken(); - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65313,17 +65383,17 @@ var ts; } function tryConsumeExport() { var token = ts.scanner.getToken(); - if (token === 83) { + if (token === 84) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 16) { + if (token === 17) { token = nextToken(); - while (token !== 17 && token !== 1) { + while (token !== 18 && token !== 1) { token = nextToken(); } - if (token === 17) { + if (token === 18) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65331,20 +65401,20 @@ var ts; } } } - else if (token === 38) { + else if (token === 39) { token = nextToken(); - if (token === 139) { + if (token === 140) { token = nextToken(); if (token === 9) { recordModuleName(); } } } - else if (token === 90) { + else if (token === 91) { token = nextToken(); - if (token === 70 || ts.isKeyword(token)) { + if (token === 71 || ts.isKeyword(token)) { token = nextToken(); - if (token === 57) { + if (token === 58) { if (tryConsumeRequireCall(true)) { return true; } @@ -65357,9 +65427,9 @@ var ts; } function tryConsumeRequireCall(skipCurrentToken) { var token = skipCurrentToken ? nextToken() : ts.scanner.getToken(); - if (token === 131) { + if (token === 132) { token = nextToken(); - if (token === 18) { + if (token === 19) { token = nextToken(); if (token === 9) { recordModuleName(); @@ -65371,27 +65441,27 @@ var ts; } function tryConsumeDefine() { var token = ts.scanner.getToken(); - if (token === 70 && ts.scanner.getTokenValue() === "define") { + if (token === 71 && ts.scanner.getTokenValue() === "define") { token = nextToken(); - if (token !== 18) { + if (token !== 19) { return true; } token = nextToken(); if (token === 9) { token = nextToken(); - if (token === 25) { + if (token === 26) { token = nextToken(); } else { return true; } } - if (token !== 20) { + if (token !== 21) { return true; } token = nextToken(); var i = 0; - while (token !== 21 && token !== 1) { + while (token !== 22 && token !== 1) { if (token === 9) { recordModuleName(); i++; @@ -65484,8 +65554,8 @@ var ts; if (ts.some(declarations, isDefinedInLibraryFile)) { return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); } - if (node.kind === 70 && - node.originalKeywordKind === 78 && + if (node.kind === 71 && + node.originalKeywordKind === 79 && symbol.parent.flags & 1536) { return undefined; } @@ -65534,7 +65604,7 @@ var ts; return ts.createTextSpan(start, width); } function nodeIsEligibleForRename(node) { - return node.kind === 70 || + return node.kind === 71 || node.kind === 9 || ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || ts.isThis(node); @@ -65578,14 +65648,14 @@ var ts; } SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; function createJavaScriptSignatureHelpItems(argumentInfo, program) { - if (argumentInfo.invocation.kind !== 180) { + if (argumentInfo.invocation.kind !== 181) { return undefined; } var callExpression = argumentInfo.invocation; var expression = callExpression.expression; - var name = expression.kind === 70 + var name = expression.kind === 71 ? expression - : expression.kind === 178 + : expression.kind === 179 ? expression.name : undefined; if (!name || !name.text) { @@ -65614,10 +65684,10 @@ var ts; } } function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { - if (node.parent.kind === 180 || node.parent.kind === 181) { + if (node.parent.kind === 181 || node.parent.kind === 182) { var callExpression = node.parent; - if (node.kind === 26 || - node.kind === 18) { + if (node.kind === 27 || + node.kind === 19) { var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; ts.Debug.assert(list !== undefined); @@ -65646,24 +65716,24 @@ var ts; } return undefined; } - else if (node.kind === 12 && node.parent.kind === 182) { + else if (node.kind === 13 && node.parent.kind === 183) { if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, 0, sourceFile); } } - else if (node.kind === 13 && node.parent.parent.kind === 182) { + else if (node.kind === 14 && node.parent.parent.kind === 183) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195); + ts.Debug.assert(templateExpression.kind === 196); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } - else if (node.parent.kind === 204 && node.parent.parent.parent.kind === 182) { + else if (node.parent.kind === 205 && node.parent.parent.parent.kind === 183) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195); - if (node.kind === 15 && !ts.isInsideTemplateLiteral(node, position)) { + ts.Debug.assert(templateExpression.kind === 196); + if (node.kind === 16 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); @@ -65692,7 +65762,7 @@ var ts; if (child === node) { break; } - if (child.kind !== 25) { + if (child.kind !== 26) { argumentIndex++; } } @@ -65700,8 +65770,8 @@ var ts; } function getArgumentCount(argumentsList) { var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 25) { + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 26; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 26) { argumentCount++; } return argumentCount; @@ -65717,7 +65787,7 @@ var ts; return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { - var argumentCount = tagExpression.template.kind === 12 + var argumentCount = tagExpression.template.kind === 13 ? 1 : tagExpression.template.templateSpans.length + 1; ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); @@ -65738,7 +65808,7 @@ var ts; var template = taggedTemplate.template; var applicableSpanStart = template.getStart(); var applicableSpanEnd = template.getEnd(); - if (template.kind === 195) { + if (template.kind === 196) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -65747,7 +65817,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node, position, sourceFile) { - for (var n = node; n.kind !== 264; n = n.parent) { + for (var n = node; n.kind !== 265; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -65800,10 +65870,10 @@ var ts; var isVariadic; if (isTypeParameterList) { isVariadic = false; - prefixDisplayParts.push(ts.punctuationPart(26)); + prefixDisplayParts.push(ts.punctuationPart(27)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(28)); + suffixDisplayParts.push(ts.punctuationPart(29)); var parameterParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.thisParameter, candidateSignature.parameters, writer, invocation); }); @@ -65815,10 +65885,10 @@ var ts; return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); }); ts.addRange(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(18)); + prefixDisplayParts.push(ts.punctuationPart(19)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(19)); + suffixDisplayParts.push(ts.punctuationPart(20)); } var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); @@ -65828,7 +65898,7 @@ var ts; isVariadic: isVariadic, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(25), ts.spacePart()], + separatorDisplayParts: [ts.punctuationPart(26), ts.spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment(), tags: candidateSignature.getJsDocTags() @@ -65880,7 +65950,7 @@ var ts; function getSymbolKind(typeChecker, symbol, location) { var flags = symbol.flags; if (flags & 32) - return ts.getDeclarationOfKind(symbol, 198) ? + return ts.getDeclarationOfKind(symbol, 199) ? ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement; if (flags & 384) return ts.ScriptElementKind.enumElement; @@ -65911,7 +65981,7 @@ var ts; if (typeChecker.isArgumentsSymbol(symbol)) { return ts.ScriptElementKind.localVariableElement; } - if (location.kind === 98 && ts.isExpression(location)) { + if (location.kind === 99 && ts.isExpression(location)) { return ts.ScriptElementKind.parameterElement; } var flags = symbol.flags; @@ -65976,7 +66046,7 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); var hasAddedSymbolInfo; - var isThisExpression = location.kind === 98 && ts.isExpression(location); + var isThisExpression = location.kind === 99 && ts.isExpression(location); var type; if (symbolKind !== ts.ScriptElementKind.unknown || symbolFlags & 32 || symbolFlags & 8388608) { if (symbolKind === ts.ScriptElementKind.memberGetAccessorElement || symbolKind === ts.ScriptElementKind.memberSetAccessorElement) { @@ -65985,14 +66055,14 @@ var ts; var signature = void 0; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 178) { + if (location.parent && location.parent.kind === 179) { var right = location.parent.name; if (right === location || (right && right.getFullWidth() === 0)) { location = location.parent; } } var callExpressionLike = void 0; - if (location.kind === 180 || location.kind === 181) { + if (location.kind === 181 || location.kind === 182) { callExpressionLike = location; } else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) { @@ -66007,7 +66077,7 @@ var ts; if (!signature && candidateSignatures.length) { signature = candidateSignatures[0]; } - var useConstructSignatures = callExpressionLike.kind === 181 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96); + var useConstructSignatures = callExpressionLike.kind === 182 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 97); var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : undefined; @@ -66022,7 +66092,7 @@ var ts; pushTypePart(symbolKind); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93)); + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } addFullSymbolName(symbol); @@ -66038,10 +66108,10 @@ var ts; case ts.ScriptElementKind.letElement: case ts.ScriptElementKind.parameterElement: case ts.ScriptElementKind.localVariableElement: - displayParts.push(ts.punctuationPart(55)); + displayParts.push(ts.punctuationPart(56)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93)); + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } if (!(type.flags & 32768 && type.objectFlags & 16) && type.symbol) { @@ -66056,21 +66126,21 @@ var ts; } } else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 122 && location.parent.kind === 151)) { + (location.kind === 123 && location.parent.kind === 152)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 151 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + var allSignatures = functionDeclaration.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 151) { + if (functionDeclaration.kind === 152) { symbolKind = ts.ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -66079,11 +66149,11 @@ var ts; } } if (symbolFlags & 32 && !hasAddedSymbolInfo && !isThisExpression) { - if (ts.getDeclarationOfKind(symbol, 198)) { + if (ts.getDeclarationOfKind(symbol, 199)) { pushTypePart(ts.ScriptElementKind.localClassElement); } else { - displayParts.push(ts.keywordPart(74)); + displayParts.push(ts.keywordPart(75)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); @@ -66091,45 +66161,45 @@ var ts; } if ((symbolFlags & 64) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(108)); + displayParts.push(ts.keywordPart(109)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(137)); + displayParts.push(ts.keywordPart(138)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512)); } if (symbolFlags & 384) { addNewLineIfDisplayPartsExist(); if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(75)); + displayParts.push(ts.keywordPart(76)); displayParts.push(ts.spacePart()); } - displayParts.push(ts.keywordPart(82)); + displayParts.push(ts.keywordPart(83)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 232); - var isNamespace = declaration && declaration.name && declaration.name.kind === 70; - displayParts.push(ts.keywordPart(isNamespace ? 128 : 127)); + var declaration = ts.getDeclarationOfKind(symbol, 233); + var isNamespace = declaration && declaration.name && declaration.name.kind === 71; + displayParts.push(ts.keywordPart(isNamespace ? 129 : 128)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if ((symbolFlags & 262144) && (semanticMeaning & 2)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.textPart("type parameter")); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.textPart("type parameter")); + displayParts.push(ts.punctuationPart(20)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); if (symbol.parent) { @@ -66138,25 +66208,25 @@ var ts; writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - var declaration = ts.getDeclarationOfKind(symbol, 144); + var declaration = ts.getDeclarationOfKind(symbol, 145); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { addInPrefix(); var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 155) { - displayParts.push(ts.keywordPart(93)); + if (declaration.kind === 156) { + displayParts.push(ts.keywordPart(94)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 154 && declaration.name) { + else if (declaration.kind !== 155 && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32)); } - else if (declaration.kind === 230) { + else if (declaration.kind === 231) { addInPrefix(); - displayParts.push(ts.keywordPart(137)); + displayParts.push(ts.keywordPart(138)); displayParts.push(ts.spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -66168,11 +66238,11 @@ var ts; symbolKind = ts.ScriptElementKind.enumMemberElement; addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 263) { + if (declaration.kind === 264) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral)); } @@ -66180,33 +66250,33 @@ var ts; } if (symbolFlags & 8388608) { addNewLineIfDisplayPartsExist(); - if (symbol.declarations[0].kind === 235) { - displayParts.push(ts.keywordPart(83)); + if (symbol.declarations[0].kind === 236) { + displayParts.push(ts.keywordPart(84)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(128)); + displayParts.push(ts.keywordPart(129)); } else { - displayParts.push(ts.keywordPart(90)); + displayParts.push(ts.keywordPart(91)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 236) { + if (declaration.kind === 237) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(131)); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); + displayParts.push(ts.keywordPart(132)); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); + displayParts.push(ts.punctuationPart(20)); } else { var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); if (internalAliasSymbol) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57)); + displayParts.push(ts.operatorPart(58)); displayParts.push(ts.spacePart()); addFullSymbolName(internalAliasSymbol, enclosingDeclaration); } @@ -66220,7 +66290,7 @@ var ts; if (type) { if (isThisExpression) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(98)); + displayParts.push(ts.keywordPart(99)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); @@ -66230,7 +66300,7 @@ var ts; symbolFlags & 3 || symbolKind === ts.ScriptElementKind.localVariableElement || isThisExpression) { - displayParts.push(ts.punctuationPart(55)); + displayParts.push(ts.punctuationPart(56)); displayParts.push(ts.spacePart()); if (type.symbol && type.symbol.flags & 262144) { var typeParameterParts = ts.mapToDisplayParts(function (writer) { @@ -66261,10 +66331,10 @@ var ts; documentation = symbol.getDocumentationComment(); tags = symbol.getJsDocTags(); if (documentation.length === 0 && symbol.flags & 4) { - if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264; })) { + if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 265; })) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (!declaration.parent || declaration.parent.kind !== 193) { + if (!declaration.parent || declaration.parent.kind !== 194) { continue; } var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -66288,7 +66358,7 @@ var ts; } function addInPrefix() { displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(91)); + displayParts.push(ts.keywordPart(92)); displayParts.push(ts.spacePart()); } function addFullSymbolName(symbol, enclosingDeclaration) { @@ -66313,9 +66383,9 @@ var ts; displayParts.push(ts.textOrKeywordPart(symbolKind)); return; default: - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.textOrKeywordPart(symbolKind)); displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.textOrKeywordPart(symbolKind)); + displayParts.push(ts.punctuationPart(20)); return; } } @@ -66323,12 +66393,12 @@ var ts; ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32)); if (allSignatures.length > 1) { displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(18)); - displayParts.push(ts.operatorPart(36)); + displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.operatorPart(37)); displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), ts.SymbolDisplayPartKind.numericLiteral)); displayParts.push(ts.spacePart()); displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(19)); + displayParts.push(ts.punctuationPart(20)); } documentation = signature.getDocumentationComment(); tags = signature.getJsDocTags(); @@ -66346,14 +66416,14 @@ var ts; return false; } return ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 185) { + if (declaration.kind === 186) { return true; } - if (declaration.kind !== 225 && declaration.kind !== 227) { + if (declaration.kind !== 226 && declaration.kind !== 228) { return false; } for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { - if (parent.kind === 264 || parent.kind === 233) { + if (parent.kind === 265 || parent.kind === 234) { return false; } } @@ -66541,11 +66611,11 @@ var ts; function shouldRescanGreaterThanToken(node) { if (node) { switch (node.kind) { - case 30: - case 65: + case 31: case 66: + case 67: + case 47: case 46: - case 45: return true; } } @@ -66554,11 +66624,11 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { + case 253: + case 251: case 252: case 250: - case 251: - case 249: - return node.kind === 70; + return node.kind === 71; } } return false; @@ -66567,14 +66637,14 @@ var ts; return node && node.kind === 10; } function shouldRescanSlashToken(container) { - return container.kind === 11; + return container.kind === 12; } function shouldRescanTemplateToken(container) { - return container.kind === 14 || - container.kind === 15; + return container.kind === 15 || + container.kind === 16; } function startsWithSlashToken(t) { - return t === 40 || t === 62; + return t === 41 || t === 63; } function readTokenInfo(n) { ts.Debug.assert(scanner !== undefined); @@ -66605,7 +66675,7 @@ var ts; scanner.scan(); } var currentToken = scanner.getToken(); - if (expectedScanAction === 1 && currentToken === 28) { + if (expectedScanAction === 1 && currentToken === 29) { currentToken = scanner.reScanGreaterToken(); ts.Debug.assert(n.kind === currentToken); lastScanAction = 1; @@ -66615,11 +66685,11 @@ var ts; ts.Debug.assert(n.kind === currentToken); lastScanAction = 2; } - else if (expectedScanAction === 3 && currentToken === 17) { + else if (expectedScanAction === 3 && currentToken === 18) { currentToken = scanner.reScanTemplateToken(); lastScanAction = 3; } - else if (expectedScanAction === 4 && currentToken === 70) { + else if (expectedScanAction === 4 && currentToken === 71) { currentToken = scanner.scanJsxIdentifier(); lastScanAction = 4; } @@ -66753,8 +66823,8 @@ var ts; return startLine === endLine; }; FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 16, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 17, this.sourceFile); + var openBrace = ts.findChildOfKind(node, 17, this.sourceFile); + var closeBrace = ts.findChildOfKind(node, 18, this.sourceFile); if (openBrace && closeBrace) { var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; @@ -66921,91 +66991,91 @@ var ts; function Rules() { this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1)); this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1)); - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromRange(0, 141, [19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2)); - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17, 81), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17, 105), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2)); + this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2)); + this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromRange(0, 142, [20])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(18, 82), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(18, 106), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromTokens([22, 26, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8)); this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([70, 3, 74, 83, 90]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19, 3, 80, 101, 86, 81]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); - this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8)); - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); + this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([71, 3, 75, 84, 91]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20, 3, 81, 102, 87, 82]); + this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1); + this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); + this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2)); + this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8)); + this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); + this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4)); this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 42), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(42, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(36, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(36, 42), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(43, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(37, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(37, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([103, 99, 93, 79, 95, 102, 120]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109, 75]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); - this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19, 80, 81, 72]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2)); - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101, 86]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 134]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(44, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(43, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(37, 37), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(37, 43), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(44, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(38, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 100, 94, 80, 96, 103, 121]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110, 76]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8)); + this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20, 81, 82, 73]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([102, 87]), 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125, 135]), 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); - this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127, 131]), 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 130, 134, 114, 137, 139, 126]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 139])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); - this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(23, 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.FromTokens([19, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(19, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.FromTokens([18, 20, 28, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8)); - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 134, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38, formatting.Shared.TokenRange.FromTokens([70, 18])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115, 38]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2)); - this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(119, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(119, 88), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(70, formatting.Shared.TokenRange.FromTokens([12, 13])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 40), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8)); + this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128, 132]), 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117, 75, 124, 79, 83, 84, 85, 125, 108, 91, 109, 128, 129, 112, 114, 113, 131, 135, 115, 138, 140, 127]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([85, 108, 140])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2)); + this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 36), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(36, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(24, 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(55, formatting.Shared.TokenRange.FromTokens([20, 26])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 27), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(20, 27), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 29), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.FromTokens([19, 21, 29, 26])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8)); + this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([117, 71, 84, 79, 75, 115, 114, 112, 113, 125, 135, 21, 39])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2)); + this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(89, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8)); + this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(39, formatting.Shared.TokenRange.FromTokens([71, 19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2)); + this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(116, 39), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8)); + this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 39]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2)); + this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(120, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(120, 89), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(71, formatting.Shared.TokenRange.FromTokens([13, 14])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 71), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 41), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(41, 29), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8)); this.HighPriorityCommonRules = [ this.IgnoreBeforeComment, this.IgnoreAfterLineComment, this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, @@ -67060,41 +67130,41 @@ var ts; this.SpaceAfterSemicolon, this.SpaceBetweenStatements, this.SpaceAfterTryFinally ]; - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8)); + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8)); this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2)); this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8)); this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8)); - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8)); - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8)); - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(18, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(20, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13, 14]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13, 14]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14, 15])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); - this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14, 15])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); - this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); - this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); - this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); - this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8)); - this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8)); - this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2)); + this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2)); + this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8)); + this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8)); + this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2)); + this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); + this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); + this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8)); + this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2)); + this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2)); + this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8)); + this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8)); + this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2)); } Rules.prototype.getRuleName = function (rule) { var o = this; @@ -67106,36 +67176,36 @@ var ts; throw new Error("Unknown rule"); }; Rules.IsForContext = function (context) { - return context.contextNode.kind === 213; + return context.contextNode.kind === 214; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 193: case 194: - case 201: - case 245: - case 241: - case 157: - case 165: + case 195: + case 202: + case 246: + case 242: + case 158: case 166: + case 167: return true; - case 175: - case 230: - case 236: - case 225: - case 145: - case 263: + case 176: + case 231: + case 237: + case 226: + case 146: + case 264: + case 149: case 148: - case 147: - return context.currentTokenSpan.kind === 57 || context.nextTokenSpan.kind === 57; - case 214: - case 144: - return context.currentTokenSpan.kind === 91 || context.nextTokenSpan.kind === 91; + return context.currentTokenSpan.kind === 58 || context.nextTokenSpan.kind === 58; case 215: - return context.currentTokenSpan.kind === 141 || context.nextTokenSpan.kind === 141; + case 145: + return context.currentTokenSpan.kind === 92 || context.nextTokenSpan.kind === 92; + case 216: + return context.currentTokenSpan.kind === 142 || context.nextTokenSpan.kind === 142; } return false; }; @@ -67143,13 +67213,13 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 194; + return context.contextNode.kind === 195; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); }; Rules.IsBraceWrappedContext = function (context) { - return context.contextNode.kind === 173 || Rules.IsSingleLineBlockContext(context); + return context.contextNode.kind === 174 || Rules.IsSingleLineBlockContext(context); }; Rules.IsBeforeMultilineBlockContext = function (context) { return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -67171,65 +67241,65 @@ var ts; return true; } switch (node.kind) { - case 206: + case 207: + case 235: + case 178: case 234: - case 177: - case 233: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 227: + case 228: + case 151: case 150: - case 149: - case 152: case 153: case 154: - case 185: - case 151: + case 155: case 186: - case 229: + case 152: + case 187: + case 230: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 227 || context.contextNode.kind === 185; + return context.contextNode.kind === 228 || context.contextNode.kind === 186; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 228: - case 198: case 229: - case 231: - case 162: + case 199: + case 230: case 232: - case 243: + case 163: + case 233: case 244: - case 237: - case 240: + case 245: + case 238: + case 241: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 228: - case 232: - case 231: - case 259: + case 229: case 233: - case 220: + case 232: + case 260: + case 234: + case 221: return true; - case 206: { + case 207: { var blockParent = context.currentTokenParent.parent; - if (blockParent.kind !== 186 && - blockParent.kind !== 185) { + if (blockParent.kind !== 187 && + blockParent.kind !== 186) { return true; } } @@ -67238,59 +67308,59 @@ var ts; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 210: - case 220: - case 213: + case 211: + case 221: case 214: case 215: + case 216: + case 213: + case 224: case 212: - case 223: - case 211: - case 219: - case 259: + case 220: + case 260: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 177; + return context.contextNode.kind === 178; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 180; + return context.contextNode.kind === 181; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 181; + return context.contextNode.kind === 182; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); }; Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 25; + return context.currentTokenSpan.kind !== 26; }; Rules.IsNextTokenNotCloseBracket = function (context) { - return context.nextTokenSpan.kind !== 21; + return context.nextTokenSpan.kind !== 22; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 186; + return context.contextNode.kind === 187; }; Rules.IsNonJsxSameLineTokenContext = function (context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 10; }; Rules.IsNonJsxElementContext = function (context) { - return context.contextNode.kind !== 248; + return context.contextNode.kind !== 249; }; Rules.IsJsxExpressionContext = function (context) { - return context.contextNode.kind === 255; + return context.contextNode.kind === 256; }; Rules.IsNextTokenParentJsxAttribute = function (context) { - return context.nextTokenParent.kind === 252; + return context.nextTokenParent.kind === 253; }; Rules.IsJsxAttributeContext = function (context) { - return context.contextNode.kind === 252; + return context.contextNode.kind === 253; }; Rules.IsJsxSelfClosingElementContext = function (context) { - return context.contextNode.kind === 249; + return context.contextNode.kind === 250; }; Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); @@ -67305,42 +67375,42 @@ var ts; while (ts.isPartOfExpression(node)) { node = node.parent; } - return node.kind === 146; + return node.kind === 147; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 226 && + return context.currentTokenParent.kind === 227 && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 232; + return context.contextNode.kind === 233; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 162; + return context.contextNode.kind === 163; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { - if (token.kind !== 26 && token.kind !== 28) { + if (token.kind !== 27 && token.kind !== 29) { return false; } switch (parent.kind) { - case 158: - case 183: + case 159: + case 184: + case 231: + case 229: + case 199: case 230: case 228: - case 198: - case 229: - case 227: - case 185: case 186: + case 187: + case 151: case 150: - case 149: - case 154: case 155: - case 180: + case 156: case 181: - case 200: + case 182: + case 201: return true; default: return false; @@ -67351,16 +67421,16 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 183; + return context.contextNode.kind === 184; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 189; + return context.currentTokenSpan.kind === 105 && context.currentTokenParent.kind === 190; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 196 && context.contextNode.expression !== undefined; + return context.contextNode.kind === 197 && context.contextNode.expression !== undefined; }; Rules.IsNonNullAssertionContext = function (context) { - return context.contextNode.kind === 202; + return context.contextNode.kind === 203; }; return Rules; }()); @@ -67382,7 +67452,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 141 + 1; + this.mapRowLength = 142 + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); var rulesBucketConstructionStateList = new Array(this.map.length); this.FillRules(rules, rulesBucketConstructionStateList); @@ -67395,7 +67465,7 @@ var ts; }); }; RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - ts.Debug.assert(row <= 141 && column <= 141, "Must compute formatting context from tokens"); + ts.Debug.assert(row <= 142 && column <= 142, "Must compute formatting context from tokens"); var rulesBucketIndex = (row * this.mapRowLength) + column; return rulesBucketIndex; }; @@ -67559,7 +67629,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0; token <= 141; token++) { + for (var token = 0; token <= 142; token++) { result.push(token); } return result; @@ -67603,17 +67673,17 @@ var ts; }()); TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3])); - TokenRange.Keywords = TokenRange.FromRange(71, 141); - TokenRange.BinaryOperators = TokenRange.FromRange(26, 69); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 141, 117, 125]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42, 43, 51, 50]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 70, 18, 20, 16, 98, 93]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]); + TokenRange.Keywords = TokenRange.FromRange(72, 142); + TokenRange.BinaryOperators = TokenRange.FromRange(27, 70); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92, 93, 142, 118, 126]); + TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43, 44, 52, 51]); + TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 71, 19, 21, 17, 99, 94]); + TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]); + TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]); + TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]); + TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]); TokenRange.Comments = TokenRange.FromTokens([2, 3]); - TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 135, 121, 136, 104, 118]); + TokenRange.TypeNames = TokenRange.FromTokens([71, 133, 136, 122, 137, 105, 119]); Shared.TokenRange = TokenRange; })(Shared = formatting.Shared || (formatting.Shared = {})); })(formatting = ts.formatting || (ts.formatting = {})); @@ -67788,11 +67858,11 @@ var ts; } formatting.formatOnEnter = formatOnEnter; function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 24, sourceFile, options, rulesProvider, 3); + return formatOutermostParent(position, 25, sourceFile, options, rulesProvider, 3); } formatting.formatOnSemicolon = formatOnSemicolon; function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 17, sourceFile, options, rulesProvider, 4); + return formatOutermostParent(position, 18, sourceFile, options, rulesProvider, 4); } formatting.formatOnClosingCurly = formatOnClosingCurly; function formatDocument(sourceFile, rulesProvider, options) { @@ -67840,17 +67910,17 @@ var ts; } function isListElement(parent, node) { switch (parent.kind) { - case 228: case 229: + case 230: return ts.rangeContainsRange(parent.members, node); - case 232: - var body = parent.body; - return body && body.kind === 233 && ts.rangeContainsRange(body.statements, node); - case 264: - case 206: case 233: + var body = parent.body; + return body && body.kind === 234 && ts.rangeContainsRange(body.statements, node); + case 265: + case 207: + case 234: return ts.rangeContainsRange(parent.statements, node); - case 259: + case 260: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -68010,18 +68080,18 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 228: return 74; - case 229: return 108; - case 227: return 88; - case 231: return 231; - case 152: return 124; - case 153: return 134; - case 150: + case 229: return 75; + case 230: return 109; + case 228: return 89; + case 232: return 232; + case 153: return 125; + case 154: return 135; + case 151: if (node.asteriskToken) { - return 38; + return 39; } - case 148: - case 145: + case 149: + case 146: return node.name.kind; } } @@ -68029,9 +68099,9 @@ var ts; return { getIndentationForComment: function (kind, tokenIndentation, container) { switch (kind) { - case 17: - case 21: - case 19: + case 18: + case 22: + case 20: return indentation + getEffectiveDelta(delta, container); } return tokenIndentation !== -1 ? tokenIndentation : indentation; @@ -68043,26 +68113,26 @@ var ts; } } switch (kind) { - case 16: case 17: case 18: case 19: - case 81: - case 105: - case 56: + case 20: + case 82: + case 106: + case 57: return indentation; - case 40: - case 28: { - if (container.kind === 250 || - container.kind === 251 || - container.kind === 249) { + case 41: + case 29: { + if (container.kind === 251 || + container.kind === 252 || + container.kind === 250) { return indentation; } break; } - case 20: - case 21: { - if (container.kind !== 171) { + case 21: + case 22: { + if (container.kind !== 172) { return indentation; } break; @@ -68150,11 +68220,11 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 146 ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 147 ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent.kind === 176 && inheritedIndentation === -1) { + if (isFirstListItem && parent.kind === 177 && inheritedIndentation === -1) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -68470,41 +68540,41 @@ var ts; } function getOpenTokenForList(node, list) { switch (node.kind) { + case 152: + case 228: + case 186: case 151: - case 227: - case 185: case 150: - case 149: - case 186: + case 187: if (node.typeParameters === list) { - return 26; + return 27; } else if (node.parameters === list) { - return 18; + return 19; } break; - case 180: case 181: + case 182: if (node.typeArguments === list) { - return 26; + return 27; } else if (node.arguments === list) { - return 18; + return 19; } break; - case 158: + case 159: if (node.typeArguments === list) { - return 26; + return 27; } } return 0; } function getCloseTokenForOpenToken(kind) { switch (kind) { - case 18: - return 19; - case 26: - return 28; + case 19: + return 20; + case 27: + return 29; } return 0; } @@ -68590,7 +68660,7 @@ var ts; var current_1 = position; while (current_1 > 0) { var char = sourceFile.text.charCodeAt(current_1); - if (!ts.isWhiteSpace(char)) { + if (!ts.isWhiteSpaceLike(char)) { break; } current_1--; @@ -68598,7 +68668,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 25 && precedingToken.parent.kind !== 193) { + if (precedingToken.kind === 26 && precedingToken.parent.kind !== 194) { var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1) { return actualIndentation; @@ -68701,7 +68771,7 @@ var ts; } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) && - (parent.kind === 264 || !parentAndChildShareLine); + (parent.kind === 265 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -68718,10 +68788,10 @@ var ts; if (!nextToken) { return 0; } - if (nextToken.kind === 16) { + if (nextToken.kind === 17) { return 1; } - else if (nextToken.kind === 17) { + else if (nextToken.kind === 18) { var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; return lineAtPosition === nextTokenStartLine ? 2 : 0; } @@ -68731,8 +68801,8 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 210 && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 81, sourceFile); + if (parent.kind === 211 && parent.elseStatement === child) { + var elseKeyword = ts.findChildOfKind(parent, 82, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -68746,37 +68816,37 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 158: + case 159: return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd()); - case 177: + case 178: return node.parent.properties; - case 176: + case 177: return node.parent.elements; - case 227: - case 185: + case 228: case 186: - case 150: - case 149: - case 154: + case 187: case 151: - case 160: - case 155: { + case 150: + case 155: + case 152: + case 161: + case 156: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd()); } - case 228: + case 229: return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd()); - case 181: - case 180: { + case 182: + case 181: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd()); } - case 226: + case 227: return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd()); - case 240: - case 244: + case 241: + case 245: return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd()); } } @@ -68792,11 +68862,11 @@ var ts; } } function getLineIndentationWhenExpressionIsInMultiLine(node, sourceFile, options) { - if (node.kind === 19) { + if (node.kind === 20) { return -1; } - if (node.parent && (node.parent.kind === 180 || - node.parent.kind === 181) && + if (node.parent && (node.parent.kind === 181 || + node.parent.kind === 182) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -68814,10 +68884,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 180: case 181: - case 178: + case 182: case 179: + case 180: node = node.expression; break; default: @@ -68831,7 +68901,7 @@ var ts; var node = list[index]; var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; i--) { - if (list[i].kind === 25) { + if (list[i].kind === 26) { continue; } var prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; @@ -68871,49 +68941,49 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 209: - case 228: - case 198: + case 210: case 229: - case 231: + case 199: case 230: - case 176: - case 206: - case 233: + case 232: + case 231: case 177: - case 162: - case 171: - case 164: + case 207: case 234: - case 257: - case 256: - case 184: case 178: - case 180: + case 163: + case 172: + case 165: + case 235: + case 258: + case 257: + case 185: + case 179: case 181: - case 207: - case 225: - case 242: - case 218: - case 194: + case 182: + case 208: + case 226: + case 243: + case 219: + case 195: + case 175: case 174: - case 173: + case 251: case 250: - case 249: - case 255: - case 149: - case 154: + case 256: + case 150: case 155: - case 145: - case 159: + case 156: + case 146: case 160: - case 167: - case 182: - case 190: - case 244: - case 240: + case 161: + case 168: + case 183: + case 191: case 245: case 241: + case 246: + case 242: return true; } return false; @@ -68921,27 +68991,27 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0; switch (parent.kind) { - case 211: case 212: - case 214: - case 215: case 213: - case 210: - case 227: - case 185: - case 150: + case 215: + case 216: + case 214: + case 211: + case 228: case 186: case 151: + case 187: case 152: case 153: - return childKind !== 206; - case 243: - return childKind !== 244; - case 237: - return childKind !== 238 || - (child.namedBindings && child.namedBindings.kind !== 240); - case 248: - return childKind !== 251; + case 154: + return childKind !== 207; + case 244: + return childKind !== 245; + case 238: + return childKind !== 239 || + (child.namedBindings && child.namedBindings.kind !== 241); + case 249: + return childKind !== 252; } return indentByDefault; } @@ -69024,7 +69094,7 @@ var ts; } textChanges.getAdjustedEndPosition = getAdjustedEndPosition; function isSeparator(node, candidate) { - return candidate && node.parent && (candidate.kind === 25 || (candidate.kind === 24 && node.parent.kind === 177)); + return candidate && node.parent && (candidate.kind === 26 || (candidate.kind === 25 && node.parent.kind === 178)); } function spaces(count) { var s = ""; @@ -69126,15 +69196,15 @@ var ts; ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) { if (options === void 0) { options = {}; } if ((ts.isStatementButNotDeclaration(after)) || + after.kind === 149 || after.kind === 148 || - after.kind === 147 || - after.kind === 149) { + after.kind === 150) { if (sourceFile.text.charCodeAt(after.end - 1) !== 59) { this.changes.push({ sourceFile: sourceFile, options: {}, range: { pos: after.end, end: after.end }, - node: ts.createToken(24) + node: ts.createToken(25) }); } } @@ -69185,11 +69255,11 @@ var ts; var separator = void 0; var multilineList = false; if (containingList.length === 1) { - separator = 25; + separator = 26; } else { var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile); - separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25; + separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 26; var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; } @@ -69390,7 +69460,7 @@ var ts; if (force || !isTrivia(s)) { this.lastNonTriviaPosition = this.writer.getTextPos(); var i = 0; - while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) { + while (ts.isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { i++; } this.lastNonTriviaPosition -= i; @@ -69551,10 +69621,10 @@ var ts; var sourceFile = context.sourceFile; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind !== 70) { + if (token.kind !== 71) { return undefined; } - if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98) { + if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99) { return undefined; } var classMemberDeclaration = ts.getThisContainer(token, false); @@ -69570,7 +69640,7 @@ var ts; function getActionsForAddMissingMemberInJavaScriptFile() { var memberName = token.getText(); if (isStatic) { - if (classDeclaration.kind === 198) { + if (classDeclaration.kind === 199) { return undefined; } var className = classDeclaration.name.getText(); @@ -69604,15 +69674,15 @@ var ts; } function getActionsForAddMissingMemberInTypeScriptFile() { var typeNode; - if (token.parent.parent.kind === 193) { + if (token.parent.parent.kind === 194) { var binaryExpression = token.parent.parent; var checker = context.program.getTypeChecker(); var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right))); typeNode = checker.typeToTypeNode(widenedType, classDeclaration); } - typeNode = typeNode || ts.createKeywordTypeNode(118); + typeNode = typeNode || ts.createKeywordTypeNode(119); var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile); - var property = ts.createProperty(undefined, isStatic ? [ts.createToken(114)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined); + var property = ts.createProperty(undefined, isStatic ? [ts.createToken(115)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined); var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter }); var actions = [{ @@ -69620,7 +69690,7 @@ var ts; changes: propertyChangeTracker.getChanges() }]; if (!isStatic) { - var stringTypeNode = ts.createKeywordTypeNode(135); + var stringTypeNode = ts.createKeywordTypeNode(136); var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined); var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode); var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69686,7 +69756,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 98) { + if (token.kind !== 99) { return undefined; } var constructor = ts.getContainingFunction(token); @@ -69694,7 +69764,7 @@ var ts; if (!superCall) { return undefined; } - if (superCall.expression && superCall.expression.kind === 180) { + if (superCall.expression && superCall.expression.kind === 181) { var arguments_1 = superCall.expression.arguments; for (var i = 0; i < arguments_1.length; i++) { if (arguments_1[i].expression === token) { @@ -69710,7 +69780,7 @@ var ts; changes: changeTracker.getChanges() }]; function findSuperCall(n) { - if (n.kind === 209 && ts.isSuperCall(n.expression)) { + if (n.kind === 210 && ts.isSuperCall(n.expression)) { return n; } if (ts.isFunctionLike(n)) { @@ -69731,7 +69801,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 122) { + if (token.kind !== 123) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69756,7 +69826,7 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); var classDeclNode = ts.getContainingClass(token); - if (!(token.kind === 70 && ts.isClassLike(classDeclNode))) { + if (!(token.kind === 71 && ts.isClassLike(classDeclNode))) { return undefined; } var heritageClauses = classDeclNode.heritageClauses; @@ -69764,15 +69834,15 @@ var ts; return undefined; } var extendsToken = heritageClauses[0].getFirstToken(); - if (!(extendsToken && extendsToken.kind === 84)) { + if (!(extendsToken && extendsToken.kind === 85)) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); - changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107)); + changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(108)); for (var i = 1; i < heritageClauses.length; i++) { var keywordToken = heritageClauses[i].getFirstToken(); if (keywordToken) { - changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25)); + changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(26)); } } var result = [{ @@ -69793,7 +69863,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 70) { + if (token.kind !== 71) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -69819,15 +69889,15 @@ var ts; var sourceFile = context.sourceFile; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind === 20) { + if (token.kind === 21) { token = ts.getTokenAtPosition(sourceFile, start + 1); } switch (token.kind) { - case 70: + case 71: switch (token.parent.kind) { - case 225: + case 226: switch (token.parent.parent.parent.kind) { - case 213: + case 214: var forStatement = token.parent.parent.parent; var forInitializer = forStatement.initializer; if (forInitializer.declarations.length === 1) { @@ -69836,16 +69906,16 @@ var ts; else { return deleteNodeInList(token.parent); } - case 215: + case 216: var forOfStatement = token.parent.parent.parent; - if (forOfStatement.initializer.kind === 226) { + if (forOfStatement.initializer.kind === 227) { var forOfInitializer = forOfStatement.initializer; return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()); } break; - case 214: + case 215: return undefined; - case 259: + case 260: var catchClause = token.parent.parent; var parameter = catchClause.variableDeclaration.getChildren()[0]; return deleteNode(parameter); @@ -69858,15 +69928,15 @@ var ts; return deleteNodeInList(token.parent); } } - case 144: + case 145: var typeParameters = token.parent.parent.typeParameters; if (typeParameters.length === 1) { var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1); - if (!previousToken || previousToken.kind !== 26) { + if (!previousToken || previousToken.kind !== 27) { return deleteRange(typeParameters); } var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end); - if (!nextToken || nextToken.kind !== 28) { + if (!nextToken || nextToken.kind !== 29) { return deleteRange(typeParameters); } return deleteNodeRange(previousToken, nextToken); @@ -69874,7 +69944,7 @@ var ts; else { return deleteNodeInList(token.parent); } - case 145: + case 146: var functionDeclaration = token.parent.parent; if (functionDeclaration.parameters.length === 1) { return deleteNode(token.parent); @@ -69882,43 +69952,43 @@ var ts; else { return deleteNodeInList(token.parent); } - case 236: - var importEquals = ts.getAncestor(token, 236); + case 237: + var importEquals = ts.getAncestor(token, 237); return deleteNode(importEquals); - case 241: + case 242: var namedImports = token.parent.parent; if (namedImports.elements.length === 1) { - var importSpec = ts.getAncestor(token, 237); + var importSpec = ts.getAncestor(token, 238); return deleteNode(importSpec); } else { return deleteNodeInList(token.parent); } - case 238: + case 239: var importClause = token.parent; if (!importClause.namedBindings) { - var importDecl = ts.getAncestor(importClause, 237); + var importDecl = ts.getAncestor(importClause, 238); return deleteNode(importDecl); } else { var start_4 = importClause.name.getStart(sourceFile); var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end); - if (nextToken && nextToken.kind === 25) { + if (nextToken && nextToken.kind === 26) { return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) }); } else { return deleteNode(importClause.name); } } - case 239: + case 240: var namespaceImport = token.parent; if (namespaceImport.name === token && !namespaceImport.parent.name) { - var importDecl = ts.getAncestor(namespaceImport, 237); + var importDecl = ts.getAncestor(namespaceImport, 238); return deleteNode(importDecl); } else { var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1); - if (previousToken && previousToken.kind === 25) { + if (previousToken && previousToken.kind === 26) { var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart); return deleteRange({ pos: startPosition, end: namespaceImport.end }); } @@ -69926,8 +69996,8 @@ var ts; } } break; - case 148: - case 239: + case 149: + case 240: return deleteNode(token.parent); } if (ts.isDeclarationName(token)) { @@ -70115,10 +70185,10 @@ var ts; function getImportDeclaration(moduleSpecifier) { var node = moduleSpecifier; while (node) { - if (node.kind === 237) { + if (node.kind === 238) { return node; } - if (node.kind === 236) { + if (node.kind === 237) { return node; } node = node.parent; @@ -70151,9 +70221,9 @@ var ts; var existingModuleSpecifier; for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) { var declaration = declarations_14[_i]; - if (declaration.kind === 237) { + if (declaration.kind === 238) { var namedBindings = declaration.importClause && declaration.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239) { + if (namedBindings && namedBindings.kind === 240) { namespaceImportDeclaration = declaration; } else { @@ -70180,7 +70250,7 @@ var ts; } return actions; function getModuleSpecifierFromImportEqualsDeclaration(declaration) { - if (declaration.moduleReference && declaration.moduleReference.kind === 247) { + if (declaration.moduleReference && declaration.moduleReference.kind === 248) { return declaration.moduleReference.expression.getText(); } return declaration.moduleReference.getText(); @@ -70196,7 +70266,7 @@ var ts; } function getCodeActionForNamespaceImport(declaration) { var namespacePrefix; - if (declaration.kind === 237) { + if (declaration.kind === 238) { namespacePrefix = declaration.importClause.namedBindings.name.getText(); } else { @@ -70210,7 +70280,7 @@ var ts; if (!lastImportDeclaration) { for (var i = sourceFile.statements.length - 1; i >= 0; i--) { var statement = sourceFile.statements[i]; - if (statement.kind === 236 || statement.kind === 237) { + if (statement.kind === 237 || statement.kind === 238) { lastImportDeclaration = statement; break; } @@ -70244,7 +70314,7 @@ var ts; tryGetModuleNameFromRootDirs() || ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory)); function tryGetModuleNameFromAmbientModule() { - if (moduleSymbol.valueDeclaration.kind !== 264) { + if (moduleSymbol.valueDeclaration.kind !== 265) { return moduleSymbol.name; } } @@ -70506,15 +70576,15 @@ var ts; var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); var optional = !!(symbol.flags & 67108864); switch (declaration.kind) { - case 152: case 153: - case 147: + case 154: case 148: + case 149: var typeNode = checker.typeToTypeNode(type, enclosingDeclaration); - var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(54) : undefined, typeNode, undefined); + var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(55) : undefined, typeNode, undefined); return property; - case 149: case 150: + case 151: var signatures = checker.getSignaturesOfType(type, 0); if (!ts.some(signatures)) { return undefined; @@ -70549,12 +70619,12 @@ var ts; return undefined; } function signatureToMethodDeclaration(signature, enclosingDeclaration, body) { - var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150, enclosingDeclaration); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration); if (signatureDeclaration) { signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; - signatureDeclaration.questionToken = optional ? ts.createToken(54) : undefined; + signatureDeclaration.questionToken = optional ? ts.createToken(55) : undefined; signatureDeclaration.body = body; } return signatureDeclaration; @@ -70578,19 +70648,19 @@ var ts; var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); }); var parameters = []; for (var i = 0; i < maxNonRestArgs; i++) { - var anyType = ts.createKeywordTypeNode(118); - var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(54) : undefined, anyType, undefined); + var anyType = ts.createKeywordTypeNode(119); + var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(55) : undefined, anyType, undefined); parameters.push(newParameter); } if (someSigHasRestParameter) { - var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118)); - var restParameter = ts.createParameter(undefined, undefined, ts.createToken(23), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(54) : undefined, anyArrayType, undefined); + var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119)); + var restParameter = ts.createParameter(undefined, undefined, ts.createToken(24), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(55) : undefined, anyArrayType, undefined); parameters.push(restParameter); } return createStubbedMethod(modifiers, name, optional, undefined, parameters, undefined); } function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) { - return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(54) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); + return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); } codefix.createStubbedMethod = createStubbedMethod; function createStubbedMethodBody() { @@ -70598,10 +70668,10 @@ var ts; } function createVisibilityModifier(flags) { if (flags & 4) { - return ts.createToken(113); + return ts.createToken(114); } else if (flags & 16) { - return ts.createToken(112); + return ts.createToken(113); } return undefined; } @@ -70611,8 +70681,8 @@ var ts; (function (ts) { ts.servicesVersion = "0.5"; function createNode(kind, pos, end, parent) { - var node = kind >= 142 ? new NodeObject(kind, pos, end) : - kind === 70 ? new IdentifierObject(70, pos, end) : + var node = kind >= 143 ? new NodeObject(kind, pos, end) : + kind === 71 ? new IdentifierObject(71, pos, end) : new TokenObject(kind, pos, end); node.parent = parent; return node; @@ -70669,7 +70739,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(293, nodes.pos, nodes.end, this); + var list = createNode(294, nodes.pos, nodes.end, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) { @@ -70688,11 +70758,11 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 142) { + if (this.kind >= 143) { ts.scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos_3 = this.pos; - var useJSDocScanner_1 = this.kind >= 282 && this.kind <= 292; + var useJSDocScanner_1 = this.kind >= 283 && this.kind <= 293; var processNode = function (node) { var isJSDocTagNode = ts.isJSDocTag(node); if (!isJSDocTagNode && pos_3 < node.pos) { @@ -70745,8 +70815,8 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 266 || kid.kind > 292; }); - return child.kind < 142 ? + var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 293; }); + return child.kind < 143 ? child : child.getFirstToken(sourceFile); }; @@ -70756,7 +70826,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 142 ? child : child.getLastToken(sourceFile); + return child.kind < 143 ? child : child.getLastToken(sourceFile); }; NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) { return ts.forEachChild(this, cbNode, cbNodeArray); @@ -70861,7 +70931,7 @@ var ts; } return IdentifierObject; }(TokenOrIdentifierObject)); - IdentifierObject.prototype.kind = 70; + IdentifierObject.prototype.kind = 71; var TypeObject = (function () { function TypeObject(checker, flags) { this.checker = checker; @@ -70993,9 +71063,9 @@ var ts; if (result_7 !== undefined) { return result_7; } - if (declaration.name.kind === 143) { + if (declaration.name.kind === 144) { var expr = declaration.name.expression; - if (expr.kind === 178) { + if (expr.kind === 179) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -71005,7 +71075,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 || + if (node.kind === 71 || node.kind === 9 || node.kind === 8) { return node.text; @@ -71015,10 +71085,10 @@ var ts; } function visit(node) { switch (node.kind) { - case 227: - case 185: + case 228: + case 186: + case 151: case 150: - case 149: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -71035,30 +71105,30 @@ var ts; } ts.forEachChild(node, visit); break; - case 228: - case 198: case 229: + case 199: case 230: case 231: case 232: - case 236: - case 245: - case 241: - case 236: - case 238: + case 233: + case 237: + case 246: + case 242: + case 237: case 239: - case 152: + case 240: case 153: - case 162: + case 154: + case 163: addDeclaration(node); ts.forEachChild(node, visit); break; - case 145: + case 146: if (!ts.hasModifier(node, 92)) { break; } - case 225: - case 175: { + case 226: + case 176: { var decl = node; if (ts.isBindingPattern(decl.name)) { ts.forEachChild(decl.name, visit); @@ -71067,24 +71137,24 @@ var ts; if (decl.initializer) visit(decl.initializer); } - case 263: + case 264: + case 149: case 148: - case 147: addDeclaration(node); break; - case 243: + case 244: if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 237: + case 238: var importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239) { + if (importClause.namedBindings.kind === 240) { addDeclaration(importClause.namedBindings); } else { @@ -71550,12 +71620,12 @@ var ts; var symbol = typeChecker.getSymbolAtLocation(node); if (!symbol || typeChecker.isUnknownSymbol(symbol)) { switch (node.kind) { - case 70: - case 178: - case 142: - case 98: - case 168: - case 96: + case 71: + case 179: + case 143: + case 99: + case 169: + case 97: var type = typeChecker.getTypeAtLocation(node); if (type) { return { @@ -71684,16 +71754,16 @@ var ts; return; } switch (node.kind) { - case 178: - case 142: + case 179: + case 143: case 9: - case 85: - case 100: - case 94: - case 96: - case 98: - case 168: - case 70: + case 86: + case 101: + case 95: + case 97: + case 99: + case 169: + case 71: break; default: return; @@ -71704,7 +71774,7 @@ var ts; nodeForStartPos = nodeForStartPos.parent; } else if (ts.isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 232 && + if (nodeForStartPos.parent.parent.kind === 233 && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } @@ -71784,14 +71854,14 @@ var ts; return result; function getMatchingTokenKind(token) { switch (token.kind) { - case 16: return 17; - case 18: return 19; - case 20: return 21; - case 26: return 28; - case 17: return 16; - case 19: return 18; - case 21: return 20; - case 28: return 26; + case 17: return 18; + case 19: return 20; + case 21: return 22; + case 27: return 29; + case 18: return 17; + case 20: return 19; + case 22: return 21; + case 29: return 27; } return undefined; } @@ -71997,13 +72067,13 @@ var ts; sourceFile.nameTable = nameTable; function walk(node) { switch (node.kind) { - case 70: + case 71: setNameTable(node.text, node); break; case 9: case 8: if (ts.isDeclarationName(node) || - node.parent.kind === 247 || + node.parent.kind === 248 || isArgumentOfElementAccessExpression(node) || ts.isLiteralComputedPropertyDeclarationName(node)) { setNameTable(node.text, node); @@ -72025,13 +72095,13 @@ var ts; } function isObjectLiteralElement(node) { switch (node.kind) { - case 252: - case 254: - case 260: + case 253: + case 255: case 261: - case 150: - case 152: + case 262: + case 151: case 153: + case 154: return true; } return false; @@ -72040,12 +72110,12 @@ var ts; switch (node.kind) { case 9: case 8: - if (node.parent.kind === 143) { + if (node.parent.kind === 144) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined; } - case 70: + case 71: return isObjectLiteralElement(node.parent) && - (node.parent.parent.kind === 177 || node.parent.parent.kind === 253) && + (node.parent.parent.kind === 178 || node.parent.parent.kind === 254) && node.parent.name === node ? node.parent : undefined; } return undefined; @@ -72078,7 +72148,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 179 && + node.parent.kind === 180 && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { @@ -75389,7 +75459,7 @@ var ts; BuilderFileInfo.prototype.containsOnlyAmbientModules = function (sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; - if (statement.kind !== 232 || statement.name.kind !== 9) { + if (statement.kind !== 233 || statement.name.kind !== 9) { return false; } } diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index e78592223647a..ee2e324119658 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -24,7 +24,7 @@ declare namespace ts { } /** ES6 Map interface. */ interface Map { - get(key: string): T; + get(key: string): T | undefined; has(key: string): boolean; set(key: string, value: T): this; delete(key: string): boolean; @@ -73,323 +73,324 @@ declare namespace ts { NumericLiteral = 8, StringLiteral = 9, JsxText = 10, - RegularExpressionLiteral = 11, - NoSubstitutionTemplateLiteral = 12, - TemplateHead = 13, - TemplateMiddle = 14, - TemplateTail = 15, - OpenBraceToken = 16, - CloseBraceToken = 17, - OpenParenToken = 18, - CloseParenToken = 19, - OpenBracketToken = 20, - CloseBracketToken = 21, - DotToken = 22, - DotDotDotToken = 23, - SemicolonToken = 24, - CommaToken = 25, - LessThanToken = 26, - LessThanSlashToken = 27, - GreaterThanToken = 28, - LessThanEqualsToken = 29, - GreaterThanEqualsToken = 30, - EqualsEqualsToken = 31, - ExclamationEqualsToken = 32, - EqualsEqualsEqualsToken = 33, - ExclamationEqualsEqualsToken = 34, - EqualsGreaterThanToken = 35, - PlusToken = 36, - MinusToken = 37, - AsteriskToken = 38, - AsteriskAsteriskToken = 39, - SlashToken = 40, - PercentToken = 41, - PlusPlusToken = 42, - MinusMinusToken = 43, - LessThanLessThanToken = 44, - GreaterThanGreaterThanToken = 45, - GreaterThanGreaterThanGreaterThanToken = 46, - AmpersandToken = 47, - BarToken = 48, - CaretToken = 49, - ExclamationToken = 50, - TildeToken = 51, - AmpersandAmpersandToken = 52, - BarBarToken = 53, - QuestionToken = 54, - ColonToken = 55, - AtToken = 56, - EqualsToken = 57, - PlusEqualsToken = 58, - MinusEqualsToken = 59, - AsteriskEqualsToken = 60, - AsteriskAsteriskEqualsToken = 61, - SlashEqualsToken = 62, - PercentEqualsToken = 63, - LessThanLessThanEqualsToken = 64, - GreaterThanGreaterThanEqualsToken = 65, - GreaterThanGreaterThanGreaterThanEqualsToken = 66, - AmpersandEqualsToken = 67, - BarEqualsToken = 68, - CaretEqualsToken = 69, - Identifier = 70, - BreakKeyword = 71, - CaseKeyword = 72, - CatchKeyword = 73, - ClassKeyword = 74, - ConstKeyword = 75, - ContinueKeyword = 76, - DebuggerKeyword = 77, - DefaultKeyword = 78, - DeleteKeyword = 79, - DoKeyword = 80, - ElseKeyword = 81, - EnumKeyword = 82, - ExportKeyword = 83, - ExtendsKeyword = 84, - FalseKeyword = 85, - FinallyKeyword = 86, - ForKeyword = 87, - FunctionKeyword = 88, - IfKeyword = 89, - ImportKeyword = 90, - InKeyword = 91, - InstanceOfKeyword = 92, - NewKeyword = 93, - NullKeyword = 94, - ReturnKeyword = 95, - SuperKeyword = 96, - SwitchKeyword = 97, - ThisKeyword = 98, - ThrowKeyword = 99, - TrueKeyword = 100, - TryKeyword = 101, - TypeOfKeyword = 102, - VarKeyword = 103, - VoidKeyword = 104, - WhileKeyword = 105, - WithKeyword = 106, - ImplementsKeyword = 107, - InterfaceKeyword = 108, - LetKeyword = 109, - PackageKeyword = 110, - PrivateKeyword = 111, - ProtectedKeyword = 112, - PublicKeyword = 113, - StaticKeyword = 114, - YieldKeyword = 115, - AbstractKeyword = 116, - AsKeyword = 117, - AnyKeyword = 118, - AsyncKeyword = 119, - AwaitKeyword = 120, - BooleanKeyword = 121, - ConstructorKeyword = 122, - DeclareKeyword = 123, - GetKeyword = 124, - IsKeyword = 125, - KeyOfKeyword = 126, - ModuleKeyword = 127, - NamespaceKeyword = 128, - NeverKeyword = 129, - ReadonlyKeyword = 130, - RequireKeyword = 131, - NumberKeyword = 132, - ObjectKeyword = 133, - SetKeyword = 134, - StringKeyword = 135, - SymbolKeyword = 136, - TypeKeyword = 137, - UndefinedKeyword = 138, - FromKeyword = 139, - GlobalKeyword = 140, - OfKeyword = 141, - QualifiedName = 142, - ComputedPropertyName = 143, - TypeParameter = 144, - Parameter = 145, - Decorator = 146, - PropertySignature = 147, - PropertyDeclaration = 148, - MethodSignature = 149, - MethodDeclaration = 150, - Constructor = 151, - GetAccessor = 152, - SetAccessor = 153, - CallSignature = 154, - ConstructSignature = 155, - IndexSignature = 156, - TypePredicate = 157, - TypeReference = 158, - FunctionType = 159, - ConstructorType = 160, - TypeQuery = 161, - TypeLiteral = 162, - ArrayType = 163, - TupleType = 164, - UnionType = 165, - IntersectionType = 166, - ParenthesizedType = 167, - ThisType = 168, - TypeOperator = 169, - IndexedAccessType = 170, - MappedType = 171, - LiteralType = 172, - ObjectBindingPattern = 173, - ArrayBindingPattern = 174, - BindingElement = 175, - ArrayLiteralExpression = 176, - ObjectLiteralExpression = 177, - PropertyAccessExpression = 178, - ElementAccessExpression = 179, - CallExpression = 180, - NewExpression = 181, - TaggedTemplateExpression = 182, - TypeAssertionExpression = 183, - ParenthesizedExpression = 184, - FunctionExpression = 185, - ArrowFunction = 186, - DeleteExpression = 187, - TypeOfExpression = 188, - VoidExpression = 189, - AwaitExpression = 190, - PrefixUnaryExpression = 191, - PostfixUnaryExpression = 192, - BinaryExpression = 193, - ConditionalExpression = 194, - TemplateExpression = 195, - YieldExpression = 196, - SpreadElement = 197, - ClassExpression = 198, - OmittedExpression = 199, - ExpressionWithTypeArguments = 200, - AsExpression = 201, - NonNullExpression = 202, - MetaProperty = 203, - TemplateSpan = 204, - SemicolonClassElement = 205, - Block = 206, - VariableStatement = 207, - EmptyStatement = 208, - ExpressionStatement = 209, - IfStatement = 210, - DoStatement = 211, - WhileStatement = 212, - ForStatement = 213, - ForInStatement = 214, - ForOfStatement = 215, - ContinueStatement = 216, - BreakStatement = 217, - ReturnStatement = 218, - WithStatement = 219, - SwitchStatement = 220, - LabeledStatement = 221, - ThrowStatement = 222, - TryStatement = 223, - DebuggerStatement = 224, - VariableDeclaration = 225, - VariableDeclarationList = 226, - FunctionDeclaration = 227, - ClassDeclaration = 228, - InterfaceDeclaration = 229, - TypeAliasDeclaration = 230, - EnumDeclaration = 231, - ModuleDeclaration = 232, - ModuleBlock = 233, - CaseBlock = 234, - NamespaceExportDeclaration = 235, - ImportEqualsDeclaration = 236, - ImportDeclaration = 237, - ImportClause = 238, - NamespaceImport = 239, - NamedImports = 240, - ImportSpecifier = 241, - ExportAssignment = 242, - ExportDeclaration = 243, - NamedExports = 244, - ExportSpecifier = 245, - MissingDeclaration = 246, - ExternalModuleReference = 247, - JsxElement = 248, - JsxSelfClosingElement = 249, - JsxOpeningElement = 250, - JsxClosingElement = 251, - JsxAttribute = 252, - JsxAttributes = 253, - JsxSpreadAttribute = 254, - JsxExpression = 255, - CaseClause = 256, - DefaultClause = 257, - HeritageClause = 258, - CatchClause = 259, - PropertyAssignment = 260, - ShorthandPropertyAssignment = 261, - SpreadAssignment = 262, - EnumMember = 263, - SourceFile = 264, - Bundle = 265, - JSDocTypeExpression = 266, - JSDocAllType = 267, - JSDocUnknownType = 268, - JSDocArrayType = 269, - JSDocUnionType = 270, - JSDocTupleType = 271, - JSDocNullableType = 272, - JSDocNonNullableType = 273, - JSDocRecordType = 274, - JSDocRecordMember = 275, - JSDocTypeReference = 276, - JSDocOptionalType = 277, - JSDocFunctionType = 278, - JSDocVariadicType = 279, - JSDocConstructorType = 280, - JSDocThisType = 281, - JSDocComment = 282, - JSDocTag = 283, - JSDocAugmentsTag = 284, - JSDocParameterTag = 285, - JSDocReturnTag = 286, - JSDocTypeTag = 287, - JSDocTemplateTag = 288, - JSDocTypedefTag = 289, - JSDocPropertyTag = 290, - JSDocTypeLiteral = 291, - JSDocLiteralType = 292, - SyntaxList = 293, - NotEmittedStatement = 294, - PartiallyEmittedExpression = 295, - MergeDeclarationMarker = 296, - EndOfDeclarationMarker = 297, - Count = 298, - FirstAssignment = 57, - LastAssignment = 69, - FirstCompoundAssignment = 58, - LastCompoundAssignment = 69, - FirstReservedWord = 71, - LastReservedWord = 106, - FirstKeyword = 71, - LastKeyword = 141, - FirstFutureReservedWord = 107, - LastFutureReservedWord = 115, - FirstTypeNode = 157, - LastTypeNode = 172, - FirstPunctuation = 16, - LastPunctuation = 69, + JsxTextAllWhiteSpaces = 11, + RegularExpressionLiteral = 12, + NoSubstitutionTemplateLiteral = 13, + TemplateHead = 14, + TemplateMiddle = 15, + TemplateTail = 16, + OpenBraceToken = 17, + CloseBraceToken = 18, + OpenParenToken = 19, + CloseParenToken = 20, + OpenBracketToken = 21, + CloseBracketToken = 22, + DotToken = 23, + DotDotDotToken = 24, + SemicolonToken = 25, + CommaToken = 26, + LessThanToken = 27, + LessThanSlashToken = 28, + GreaterThanToken = 29, + LessThanEqualsToken = 30, + GreaterThanEqualsToken = 31, + EqualsEqualsToken = 32, + ExclamationEqualsToken = 33, + EqualsEqualsEqualsToken = 34, + ExclamationEqualsEqualsToken = 35, + EqualsGreaterThanToken = 36, + PlusToken = 37, + MinusToken = 38, + AsteriskToken = 39, + AsteriskAsteriskToken = 40, + SlashToken = 41, + PercentToken = 42, + PlusPlusToken = 43, + MinusMinusToken = 44, + LessThanLessThanToken = 45, + GreaterThanGreaterThanToken = 46, + GreaterThanGreaterThanGreaterThanToken = 47, + AmpersandToken = 48, + BarToken = 49, + CaretToken = 50, + ExclamationToken = 51, + TildeToken = 52, + AmpersandAmpersandToken = 53, + BarBarToken = 54, + QuestionToken = 55, + ColonToken = 56, + AtToken = 57, + EqualsToken = 58, + PlusEqualsToken = 59, + MinusEqualsToken = 60, + AsteriskEqualsToken = 61, + AsteriskAsteriskEqualsToken = 62, + SlashEqualsToken = 63, + PercentEqualsToken = 64, + LessThanLessThanEqualsToken = 65, + GreaterThanGreaterThanEqualsToken = 66, + GreaterThanGreaterThanGreaterThanEqualsToken = 67, + AmpersandEqualsToken = 68, + BarEqualsToken = 69, + CaretEqualsToken = 70, + Identifier = 71, + BreakKeyword = 72, + CaseKeyword = 73, + CatchKeyword = 74, + ClassKeyword = 75, + ConstKeyword = 76, + ContinueKeyword = 77, + DebuggerKeyword = 78, + DefaultKeyword = 79, + DeleteKeyword = 80, + DoKeyword = 81, + ElseKeyword = 82, + EnumKeyword = 83, + ExportKeyword = 84, + ExtendsKeyword = 85, + FalseKeyword = 86, + FinallyKeyword = 87, + ForKeyword = 88, + FunctionKeyword = 89, + IfKeyword = 90, + ImportKeyword = 91, + InKeyword = 92, + InstanceOfKeyword = 93, + NewKeyword = 94, + NullKeyword = 95, + ReturnKeyword = 96, + SuperKeyword = 97, + SwitchKeyword = 98, + ThisKeyword = 99, + ThrowKeyword = 100, + TrueKeyword = 101, + TryKeyword = 102, + TypeOfKeyword = 103, + VarKeyword = 104, + VoidKeyword = 105, + WhileKeyword = 106, + WithKeyword = 107, + ImplementsKeyword = 108, + InterfaceKeyword = 109, + LetKeyword = 110, + PackageKeyword = 111, + PrivateKeyword = 112, + ProtectedKeyword = 113, + PublicKeyword = 114, + StaticKeyword = 115, + YieldKeyword = 116, + AbstractKeyword = 117, + AsKeyword = 118, + AnyKeyword = 119, + AsyncKeyword = 120, + AwaitKeyword = 121, + BooleanKeyword = 122, + ConstructorKeyword = 123, + DeclareKeyword = 124, + GetKeyword = 125, + IsKeyword = 126, + KeyOfKeyword = 127, + ModuleKeyword = 128, + NamespaceKeyword = 129, + NeverKeyword = 130, + ReadonlyKeyword = 131, + RequireKeyword = 132, + NumberKeyword = 133, + ObjectKeyword = 134, + SetKeyword = 135, + StringKeyword = 136, + SymbolKeyword = 137, + TypeKeyword = 138, + UndefinedKeyword = 139, + FromKeyword = 140, + GlobalKeyword = 141, + OfKeyword = 142, + QualifiedName = 143, + ComputedPropertyName = 144, + TypeParameter = 145, + Parameter = 146, + Decorator = 147, + PropertySignature = 148, + PropertyDeclaration = 149, + MethodSignature = 150, + MethodDeclaration = 151, + Constructor = 152, + GetAccessor = 153, + SetAccessor = 154, + CallSignature = 155, + ConstructSignature = 156, + IndexSignature = 157, + TypePredicate = 158, + TypeReference = 159, + FunctionType = 160, + ConstructorType = 161, + TypeQuery = 162, + TypeLiteral = 163, + ArrayType = 164, + TupleType = 165, + UnionType = 166, + IntersectionType = 167, + ParenthesizedType = 168, + ThisType = 169, + TypeOperator = 170, + IndexedAccessType = 171, + MappedType = 172, + LiteralType = 173, + ObjectBindingPattern = 174, + ArrayBindingPattern = 175, + BindingElement = 176, + ArrayLiteralExpression = 177, + ObjectLiteralExpression = 178, + PropertyAccessExpression = 179, + ElementAccessExpression = 180, + CallExpression = 181, + NewExpression = 182, + TaggedTemplateExpression = 183, + TypeAssertionExpression = 184, + ParenthesizedExpression = 185, + FunctionExpression = 186, + ArrowFunction = 187, + DeleteExpression = 188, + TypeOfExpression = 189, + VoidExpression = 190, + AwaitExpression = 191, + PrefixUnaryExpression = 192, + PostfixUnaryExpression = 193, + BinaryExpression = 194, + ConditionalExpression = 195, + TemplateExpression = 196, + YieldExpression = 197, + SpreadElement = 198, + ClassExpression = 199, + OmittedExpression = 200, + ExpressionWithTypeArguments = 201, + AsExpression = 202, + NonNullExpression = 203, + MetaProperty = 204, + TemplateSpan = 205, + SemicolonClassElement = 206, + Block = 207, + VariableStatement = 208, + EmptyStatement = 209, + ExpressionStatement = 210, + IfStatement = 211, + DoStatement = 212, + WhileStatement = 213, + ForStatement = 214, + ForInStatement = 215, + ForOfStatement = 216, + ContinueStatement = 217, + BreakStatement = 218, + ReturnStatement = 219, + WithStatement = 220, + SwitchStatement = 221, + LabeledStatement = 222, + ThrowStatement = 223, + TryStatement = 224, + DebuggerStatement = 225, + VariableDeclaration = 226, + VariableDeclarationList = 227, + FunctionDeclaration = 228, + ClassDeclaration = 229, + InterfaceDeclaration = 230, + TypeAliasDeclaration = 231, + EnumDeclaration = 232, + ModuleDeclaration = 233, + ModuleBlock = 234, + CaseBlock = 235, + NamespaceExportDeclaration = 236, + ImportEqualsDeclaration = 237, + ImportDeclaration = 238, + ImportClause = 239, + NamespaceImport = 240, + NamedImports = 241, + ImportSpecifier = 242, + ExportAssignment = 243, + ExportDeclaration = 244, + NamedExports = 245, + ExportSpecifier = 246, + MissingDeclaration = 247, + ExternalModuleReference = 248, + JsxElement = 249, + JsxSelfClosingElement = 250, + JsxOpeningElement = 251, + JsxClosingElement = 252, + JsxAttribute = 253, + JsxAttributes = 254, + JsxSpreadAttribute = 255, + JsxExpression = 256, + CaseClause = 257, + DefaultClause = 258, + HeritageClause = 259, + CatchClause = 260, + PropertyAssignment = 261, + ShorthandPropertyAssignment = 262, + SpreadAssignment = 263, + EnumMember = 264, + SourceFile = 265, + Bundle = 266, + JSDocTypeExpression = 267, + JSDocAllType = 268, + JSDocUnknownType = 269, + JSDocArrayType = 270, + JSDocUnionType = 271, + JSDocTupleType = 272, + JSDocNullableType = 273, + JSDocNonNullableType = 274, + JSDocRecordType = 275, + JSDocRecordMember = 276, + JSDocTypeReference = 277, + JSDocOptionalType = 278, + JSDocFunctionType = 279, + JSDocVariadicType = 280, + JSDocConstructorType = 281, + JSDocThisType = 282, + JSDocComment = 283, + JSDocTag = 284, + JSDocAugmentsTag = 285, + JSDocParameterTag = 286, + JSDocReturnTag = 287, + JSDocTypeTag = 288, + JSDocTemplateTag = 289, + JSDocTypedefTag = 290, + JSDocPropertyTag = 291, + JSDocTypeLiteral = 292, + JSDocLiteralType = 293, + SyntaxList = 294, + NotEmittedStatement = 295, + PartiallyEmittedExpression = 296, + MergeDeclarationMarker = 297, + EndOfDeclarationMarker = 298, + Count = 299, + FirstAssignment = 58, + LastAssignment = 70, + FirstCompoundAssignment = 59, + LastCompoundAssignment = 70, + FirstReservedWord = 72, + LastReservedWord = 107, + FirstKeyword = 72, + LastKeyword = 142, + FirstFutureReservedWord = 108, + LastFutureReservedWord = 116, + FirstTypeNode = 158, + LastTypeNode = 173, + FirstPunctuation = 17, + LastPunctuation = 70, FirstToken = 0, - LastToken = 141, + LastToken = 142, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, - LastLiteralToken = 12, - FirstTemplateToken = 12, - LastTemplateToken = 15, - FirstBinaryOperator = 26, - LastBinaryOperator = 69, - FirstNode = 142, - FirstJSDocNode = 266, - LastJSDocNode = 292, - FirstJSDocTagNode = 282, - LastJSDocTagNode = 292, + LastLiteralToken = 13, + FirstTemplateToken = 13, + LastTemplateToken = 16, + FirstBinaryOperator = 27, + LastBinaryOperator = 70, + FirstNode = 143, + FirstJSDocNode = 267, + LastJSDocNode = 293, + FirstJSDocTagNode = 283, + LastJSDocTagNode = 293, } enum NodeFlags { None = 0, @@ -1065,6 +1066,7 @@ declare namespace ts { } interface JsxText extends Node { kind: SyntaxKind.JsxText; + containsOnlyWhiteSpaces: boolean; parent?: JsxElement; } type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; @@ -2603,7 +2605,7 @@ declare namespace ts { function tokenToString(t: SyntaxKind): string; function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; - function isWhiteSpace(ch: number): boolean; + function isWhiteSpaceLike(ch: number): boolean; /** Does not include line breaks. For that, see isWhiteSpaceLike. */ function isWhiteSpaceSingleLine(ch: number): boolean; function isLineBreak(ch: number): boolean; diff --git a/lib/typescript.js b/lib/typescript.js index a52d86c4e10ec..97d836262898d 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -52,352 +52,353 @@ var ts; SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral"; SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 11] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 12] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 13] = "NoSubstitutionTemplateLiteral"; // Pseudo-literals - SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail"; + SyntaxKind[SyntaxKind["TemplateHead"] = 14] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 15] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 16] = "TemplateTail"; // Punctuation - SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken"; - SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 17] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 18] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 19] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 20] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 21] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 22] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 23] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 24] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 25] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 26] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 27] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 28] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 29] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 30] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 31] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 32] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 33] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 34] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 35] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 36] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 37] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 38] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 39] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 40] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 41] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 42] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 43] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 44] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 45] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 47] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 48] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 49] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 50] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 51] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 52] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 53] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 54] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 55] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 56] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 57] = "AtToken"; // Assignments - SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 58] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 59] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 60] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 61] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 62] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 63] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 64] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 65] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 67] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 68] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 69] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 70] = "CaretEqualsToken"; // Identifiers - SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier"; + SyntaxKind[SyntaxKind["Identifier"] = 71] = "Identifier"; // Reserved words - SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 72] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 73] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 74] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 75] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 76] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 77] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 78] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 79] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 80] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 81] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 82] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 83] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 84] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 85] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 86] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 87] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 88] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 89] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 90] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 91] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 92] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 93] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 94] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 95] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 96] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 97] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 98] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 99] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 100] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 101] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 102] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 103] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 104] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 105] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 106] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 107] = "WithKeyword"; // Strict mode reserved words - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 108] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 109] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 110] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 111] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 112] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 113] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 114] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 115] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 116] = "YieldKeyword"; // Contextual keywords - SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword"; - SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword"; - SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword"; - SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword"; - SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword"; - SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword"; - SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword"; - SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword"; - SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 117] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 118] = "AsKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 119] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 120] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 121] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 122] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 123] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 124] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 125] = "GetKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 126] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 127] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 128] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 129] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 130] = "NeverKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 131] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 132] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 133] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 134] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 135] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 136] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 137] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 138] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 139] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 140] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 141] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 142] = "OfKeyword"; // Parse tree nodes // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 143] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 144] = "ComputedPropertyName"; // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator"; + SyntaxKind[SyntaxKind["TypeParameter"] = 145] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 146] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 147] = "Decorator"; // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 148] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 149] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 150] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 151] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 152] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 153] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 154] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 155] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 156] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 157] = "IndexSignature"; // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType"; - SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator"; - SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType"; - SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType"; - SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType"; + SyntaxKind[SyntaxKind["TypePredicate"] = 158] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 159] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 160] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 161] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 162] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 163] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 164] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 165] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 166] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 167] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 168] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 169] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 170] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 171] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 172] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 173] = "LiteralType"; // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 174] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 175] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 176] = "BindingElement"; // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement"; - SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression"; - SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression"; - SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 177] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 178] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 179] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 180] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 181] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 182] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 183] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 184] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 185] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 186] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 187] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 188] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 189] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 190] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 191] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 192] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 193] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 194] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 195] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 196] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 197] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 198] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 199] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 200] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 201] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 202] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 203] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 204] = "MetaProperty"; // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 205] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 206] = "SemicolonClassElement"; // Element - SyntaxKind[SyntaxKind["Block"] = 206] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock"; - SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["Block"] = 207] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 208] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 209] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 210] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 211] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 212] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 213] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 214] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 215] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 216] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 217] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 218] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 219] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 220] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 221] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 222] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 223] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 224] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 225] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 226] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 227] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 228] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 229] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 230] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 231] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 232] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 233] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 234] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 235] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 236] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 237] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 238] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 239] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 240] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 241] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 242] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 243] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 244] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 245] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 246] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 247] = "MissingDeclaration"; // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 248] = "ExternalModuleReference"; // JSX - SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxElement"] = 249] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 250] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 251] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 252] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 253] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 254] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 255] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 256] = "JsxExpression"; // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause"; + SyntaxKind[SyntaxKind["CaseClause"] = 257] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 258] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 259] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 260] = "CatchClause"; // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 261] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 262] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 263] = "SpreadAssignment"; // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember"; + SyntaxKind[SyntaxKind["EnumMember"] = 264] = "EnumMember"; // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile"; - SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle"; + SyntaxKind[SyntaxKind["SourceFile"] = 265] = "SourceFile"; + SyntaxKind[SyntaxKind["Bundle"] = 266] = "Bundle"; // JSDoc nodes - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 267] = "JSDocTypeExpression"; // The * type - SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 268] = "JSDocAllType"; // The ? type - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag"; - SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral"; - SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 269] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 270] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 271] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 272] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 273] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 274] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 275] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 276] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 277] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 278] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 279] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 280] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 281] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 282] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 298] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 299] = "Count"; // Markers - SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment"; - SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 70] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 72] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 107] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 72] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 142] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 108] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 116] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 158] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 173] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 17] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 70] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 142] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode"; - SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode"; - SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 13] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 13] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 16] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 27] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); var NodeFlags; (function (NodeFlags) { @@ -4427,6 +4428,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -4788,135 +4790,135 @@ var ts; (function (ts) { /* @internal */ function tokenIsIdentifierOrKeyword(token) { - return token >= 70 /* Identifier */; + return token >= 71 /* Identifier */; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116 /* AbstractKeyword */, - "any": 118 /* AnyKeyword */, - "as": 117 /* AsKeyword */, - "boolean": 121 /* BooleanKeyword */, - "break": 71 /* BreakKeyword */, - "case": 72 /* CaseKeyword */, - "catch": 73 /* CatchKeyword */, - "class": 74 /* ClassKeyword */, - "continue": 76 /* ContinueKeyword */, - "const": 75 /* ConstKeyword */, - "constructor": 122 /* ConstructorKeyword */, - "debugger": 77 /* DebuggerKeyword */, - "declare": 123 /* DeclareKeyword */, - "default": 78 /* DefaultKeyword */, - "delete": 79 /* DeleteKeyword */, - "do": 80 /* DoKeyword */, - "else": 81 /* ElseKeyword */, - "enum": 82 /* EnumKeyword */, - "export": 83 /* ExportKeyword */, - "extends": 84 /* ExtendsKeyword */, - "false": 85 /* FalseKeyword */, - "finally": 86 /* FinallyKeyword */, - "for": 87 /* ForKeyword */, - "from": 139 /* FromKeyword */, - "function": 88 /* FunctionKeyword */, - "get": 124 /* GetKeyword */, - "if": 89 /* IfKeyword */, - "implements": 107 /* ImplementsKeyword */, - "import": 90 /* ImportKeyword */, - "in": 91 /* InKeyword */, - "instanceof": 92 /* InstanceOfKeyword */, - "interface": 108 /* InterfaceKeyword */, - "is": 125 /* IsKeyword */, - "keyof": 126 /* KeyOfKeyword */, - "let": 109 /* LetKeyword */, - "module": 127 /* ModuleKeyword */, - "namespace": 128 /* NamespaceKeyword */, - "never": 129 /* NeverKeyword */, - "new": 93 /* NewKeyword */, - "null": 94 /* NullKeyword */, - "number": 132 /* NumberKeyword */, - "object": 133 /* ObjectKeyword */, - "package": 110 /* PackageKeyword */, - "private": 111 /* PrivateKeyword */, - "protected": 112 /* ProtectedKeyword */, - "public": 113 /* PublicKeyword */, - "readonly": 130 /* ReadonlyKeyword */, - "require": 131 /* RequireKeyword */, - "global": 140 /* GlobalKeyword */, - "return": 95 /* ReturnKeyword */, - "set": 134 /* SetKeyword */, - "static": 114 /* StaticKeyword */, - "string": 135 /* StringKeyword */, - "super": 96 /* SuperKeyword */, - "switch": 97 /* SwitchKeyword */, - "symbol": 136 /* SymbolKeyword */, - "this": 98 /* ThisKeyword */, - "throw": 99 /* ThrowKeyword */, - "true": 100 /* TrueKeyword */, - "try": 101 /* TryKeyword */, - "type": 137 /* TypeKeyword */, - "typeof": 102 /* TypeOfKeyword */, - "undefined": 138 /* UndefinedKeyword */, - "var": 103 /* VarKeyword */, - "void": 104 /* VoidKeyword */, - "while": 105 /* WhileKeyword */, - "with": 106 /* WithKeyword */, - "yield": 115 /* YieldKeyword */, - "async": 119 /* AsyncKeyword */, - "await": 120 /* AwaitKeyword */, - "of": 141 /* OfKeyword */, - "{": 16 /* OpenBraceToken */, - "}": 17 /* CloseBraceToken */, - "(": 18 /* OpenParenToken */, - ")": 19 /* CloseParenToken */, - "[": 20 /* OpenBracketToken */, - "]": 21 /* CloseBracketToken */, - ".": 22 /* DotToken */, - "...": 23 /* DotDotDotToken */, - ";": 24 /* SemicolonToken */, - ",": 25 /* CommaToken */, - "<": 26 /* LessThanToken */, - ">": 28 /* GreaterThanToken */, - "<=": 29 /* LessThanEqualsToken */, - ">=": 30 /* GreaterThanEqualsToken */, - "==": 31 /* EqualsEqualsToken */, - "!=": 32 /* ExclamationEqualsToken */, - "===": 33 /* EqualsEqualsEqualsToken */, - "!==": 34 /* ExclamationEqualsEqualsToken */, - "=>": 35 /* EqualsGreaterThanToken */, - "+": 36 /* PlusToken */, - "-": 37 /* MinusToken */, - "**": 39 /* AsteriskAsteriskToken */, - "*": 38 /* AsteriskToken */, - "/": 40 /* SlashToken */, - "%": 41 /* PercentToken */, - "++": 42 /* PlusPlusToken */, - "--": 43 /* MinusMinusToken */, - "<<": 44 /* LessThanLessThanToken */, - ">": 45 /* GreaterThanGreaterThanToken */, - ">>>": 46 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 47 /* AmpersandToken */, - "|": 48 /* BarToken */, - "^": 49 /* CaretToken */, - "!": 50 /* ExclamationToken */, - "~": 51 /* TildeToken */, - "&&": 52 /* AmpersandAmpersandToken */, - "||": 53 /* BarBarToken */, - "?": 54 /* QuestionToken */, - ":": 55 /* ColonToken */, - "=": 57 /* EqualsToken */, - "+=": 58 /* PlusEqualsToken */, - "-=": 59 /* MinusEqualsToken */, - "*=": 60 /* AsteriskEqualsToken */, - "**=": 61 /* AsteriskAsteriskEqualsToken */, - "/=": 62 /* SlashEqualsToken */, - "%=": 63 /* PercentEqualsToken */, - "<<=": 64 /* LessThanLessThanEqualsToken */, - ">>=": 65 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 67 /* AmpersandEqualsToken */, - "|=": 68 /* BarEqualsToken */, - "^=": 69 /* CaretEqualsToken */, - "@": 56 /* AtToken */, + "abstract": 117 /* AbstractKeyword */, + "any": 119 /* AnyKeyword */, + "as": 118 /* AsKeyword */, + "boolean": 122 /* BooleanKeyword */, + "break": 72 /* BreakKeyword */, + "case": 73 /* CaseKeyword */, + "catch": 74 /* CatchKeyword */, + "class": 75 /* ClassKeyword */, + "continue": 77 /* ContinueKeyword */, + "const": 76 /* ConstKeyword */, + "constructor": 123 /* ConstructorKeyword */, + "debugger": 78 /* DebuggerKeyword */, + "declare": 124 /* DeclareKeyword */, + "default": 79 /* DefaultKeyword */, + "delete": 80 /* DeleteKeyword */, + "do": 81 /* DoKeyword */, + "else": 82 /* ElseKeyword */, + "enum": 83 /* EnumKeyword */, + "export": 84 /* ExportKeyword */, + "extends": 85 /* ExtendsKeyword */, + "false": 86 /* FalseKeyword */, + "finally": 87 /* FinallyKeyword */, + "for": 88 /* ForKeyword */, + "from": 140 /* FromKeyword */, + "function": 89 /* FunctionKeyword */, + "get": 125 /* GetKeyword */, + "if": 90 /* IfKeyword */, + "implements": 108 /* ImplementsKeyword */, + "import": 91 /* ImportKeyword */, + "in": 92 /* InKeyword */, + "instanceof": 93 /* InstanceOfKeyword */, + "interface": 109 /* InterfaceKeyword */, + "is": 126 /* IsKeyword */, + "keyof": 127 /* KeyOfKeyword */, + "let": 110 /* LetKeyword */, + "module": 128 /* ModuleKeyword */, + "namespace": 129 /* NamespaceKeyword */, + "never": 130 /* NeverKeyword */, + "new": 94 /* NewKeyword */, + "null": 95 /* NullKeyword */, + "number": 133 /* NumberKeyword */, + "object": 134 /* ObjectKeyword */, + "package": 111 /* PackageKeyword */, + "private": 112 /* PrivateKeyword */, + "protected": 113 /* ProtectedKeyword */, + "public": 114 /* PublicKeyword */, + "readonly": 131 /* ReadonlyKeyword */, + "require": 132 /* RequireKeyword */, + "global": 141 /* GlobalKeyword */, + "return": 96 /* ReturnKeyword */, + "set": 135 /* SetKeyword */, + "static": 115 /* StaticKeyword */, + "string": 136 /* StringKeyword */, + "super": 97 /* SuperKeyword */, + "switch": 98 /* SwitchKeyword */, + "symbol": 137 /* SymbolKeyword */, + "this": 99 /* ThisKeyword */, + "throw": 100 /* ThrowKeyword */, + "true": 101 /* TrueKeyword */, + "try": 102 /* TryKeyword */, + "type": 138 /* TypeKeyword */, + "typeof": 103 /* TypeOfKeyword */, + "undefined": 139 /* UndefinedKeyword */, + "var": 104 /* VarKeyword */, + "void": 105 /* VoidKeyword */, + "while": 106 /* WhileKeyword */, + "with": 107 /* WithKeyword */, + "yield": 116 /* YieldKeyword */, + "async": 120 /* AsyncKeyword */, + "await": 121 /* AwaitKeyword */, + "of": 142 /* OfKeyword */, + "{": 17 /* OpenBraceToken */, + "}": 18 /* CloseBraceToken */, + "(": 19 /* OpenParenToken */, + ")": 20 /* CloseParenToken */, + "[": 21 /* OpenBracketToken */, + "]": 22 /* CloseBracketToken */, + ".": 23 /* DotToken */, + "...": 24 /* DotDotDotToken */, + ";": 25 /* SemicolonToken */, + ",": 26 /* CommaToken */, + "<": 27 /* LessThanToken */, + ">": 29 /* GreaterThanToken */, + "<=": 30 /* LessThanEqualsToken */, + ">=": 31 /* GreaterThanEqualsToken */, + "==": 32 /* EqualsEqualsToken */, + "!=": 33 /* ExclamationEqualsToken */, + "===": 34 /* EqualsEqualsEqualsToken */, + "!==": 35 /* ExclamationEqualsEqualsToken */, + "=>": 36 /* EqualsGreaterThanToken */, + "+": 37 /* PlusToken */, + "-": 38 /* MinusToken */, + "**": 40 /* AsteriskAsteriskToken */, + "*": 39 /* AsteriskToken */, + "/": 41 /* SlashToken */, + "%": 42 /* PercentToken */, + "++": 43 /* PlusPlusToken */, + "--": 44 /* MinusMinusToken */, + "<<": 45 /* LessThanLessThanToken */, + ">": 46 /* GreaterThanGreaterThanToken */, + ">>>": 47 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 48 /* AmpersandToken */, + "|": 49 /* BarToken */, + "^": 50 /* CaretToken */, + "!": 51 /* ExclamationToken */, + "~": 52 /* TildeToken */, + "&&": 53 /* AmpersandAmpersandToken */, + "||": 54 /* BarBarToken */, + "?": 55 /* QuestionToken */, + ":": 56 /* ColonToken */, + "=": 58 /* EqualsToken */, + "+=": 59 /* PlusEqualsToken */, + "-=": 60 /* MinusEqualsToken */, + "*=": 61 /* AsteriskEqualsToken */, + "**=": 62 /* AsteriskAsteriskEqualsToken */, + "/=": 63 /* SlashEqualsToken */, + "%=": 64 /* PercentEqualsToken */, + "<<=": 65 /* LessThanLessThanEqualsToken */, + ">>=": 66 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 68 /* AmpersandEqualsToken */, + "|=": 69 /* BarEqualsToken */, + "^=": 70 /* CaretEqualsToken */, + "@": 57 /* AtToken */, }); /* As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers @@ -5089,10 +5091,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; /** Does not include line breaks. For that, see isWhiteSpaceLike. */ function isWhiteSpaceSingleLine(ch) { // Note: nextLine is in the Zs space, and should be considered to be a whitespace. @@ -5229,7 +5231,7 @@ var ts; } break; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -5391,7 +5393,7 @@ var ts; } break scan; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -5496,8 +5498,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 /* Identifier */ || token > 106 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */; }, + isIdentifier: function () { return token === 71 /* Identifier */ || token > 107 /* LastReservedWord */; }, + isReservedWord: function () { return token >= 72 /* FirstReservedWord */ && token <= 107 /* LastReservedWord */; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -5647,7 +5649,7 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */; + resultingToken = startedWithBacktick ? 13 /* NoSubstitutionTemplateLiteral */ : 16 /* TemplateTail */; break; } var currChar = text.charCodeAt(pos); @@ -5655,14 +5657,14 @@ var ts; if (currChar === 96 /* backtick */) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */; + resultingToken = startedWithBacktick ? 13 /* NoSubstitutionTemplateLiteral */ : 16 /* TemplateTail */; break; } // '${' if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 /* TemplateHead */ : 14 /* TemplateMiddle */; + resultingToken = startedWithBacktick ? 14 /* TemplateHead */ : 15 /* TemplateMiddle */; break; } // Escape character @@ -5843,7 +5845,7 @@ var ts; } } } - return token = 70 /* Identifier */; + return token = 71 /* Identifier */; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -5924,12 +5926,12 @@ var ts; case 33 /* exclamation */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 34 /* ExclamationEqualsEqualsToken */; + return pos += 3, token = 35 /* ExclamationEqualsEqualsToken */; } - return pos += 2, token = 32 /* ExclamationEqualsToken */; + return pos += 2, token = 33 /* ExclamationEqualsToken */; } pos++; - return token = 50 /* ExclamationToken */; + return token = 51 /* ExclamationToken */; case 34 /* doubleQuote */: case 39 /* singleQuote */: tokenValue = scanString(); @@ -5938,68 +5940,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 63 /* PercentEqualsToken */; + return pos += 2, token = 64 /* PercentEqualsToken */; } pos++; - return token = 41 /* PercentToken */; + return token = 42 /* PercentToken */; case 38 /* ampersand */: if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 52 /* AmpersandAmpersandToken */; + return pos += 2, token = 53 /* AmpersandAmpersandToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 67 /* AmpersandEqualsToken */; + return pos += 2, token = 68 /* AmpersandEqualsToken */; } pos++; - return token = 47 /* AmpersandToken */; + return token = 48 /* AmpersandToken */; case 40 /* openParen */: pos++; - return token = 18 /* OpenParenToken */; + return token = 19 /* OpenParenToken */; case 41 /* closeParen */: pos++; - return token = 19 /* CloseParenToken */; + return token = 20 /* CloseParenToken */; case 42 /* asterisk */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* AsteriskEqualsToken */; + return pos += 2, token = 61 /* AsteriskEqualsToken */; } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 61 /* AsteriskAsteriskEqualsToken */; + return pos += 3, token = 62 /* AsteriskAsteriskEqualsToken */; } - return pos += 2, token = 39 /* AsteriskAsteriskToken */; + return pos += 2, token = 40 /* AsteriskAsteriskToken */; } pos++; - return token = 38 /* AsteriskToken */; + return token = 39 /* AsteriskToken */; case 43 /* plus */: if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 42 /* PlusPlusToken */; + return pos += 2, token = 43 /* PlusPlusToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* PlusEqualsToken */; + return pos += 2, token = 59 /* PlusEqualsToken */; } pos++; - return token = 36 /* PlusToken */; + return token = 37 /* PlusToken */; case 44 /* comma */: pos++; - return token = 25 /* CommaToken */; + return token = 26 /* CommaToken */; case 45 /* minus */: if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 43 /* MinusMinusToken */; + return pos += 2, token = 44 /* MinusMinusToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 59 /* MinusEqualsToken */; + return pos += 2, token = 60 /* MinusEqualsToken */; } pos++; - return token = 37 /* MinusToken */; + return token = 38 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 23 /* DotDotDotToken */; + return pos += 3, token = 24 /* DotDotDotToken */; } pos++; - return token = 22 /* DotToken */; + return token = 23 /* DotToken */; case 47 /* slash */: // Single-line comment if (text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -6045,10 +6047,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* SlashEqualsToken */; + return pos += 2, token = 63 /* SlashEqualsToken */; } pos++; - return token = 40 /* SlashToken */; + return token = 41 /* SlashToken */; case 48 /* _0 */: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { pos += 2; @@ -6106,10 +6108,10 @@ var ts; return token = 8 /* NumericLiteral */; case 58 /* colon */: pos++; - return token = 55 /* ColonToken */; + return token = 56 /* ColonToken */; case 59 /* semicolon */: pos++; - return token = 24 /* SemicolonToken */; + return token = 25 /* SemicolonToken */; case 60 /* lessThan */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6122,20 +6124,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 64 /* LessThanLessThanEqualsToken */; + return pos += 3, token = 65 /* LessThanLessThanEqualsToken */; } - return pos += 2, token = 44 /* LessThanLessThanToken */; + return pos += 2, token = 45 /* LessThanLessThanToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 29 /* LessThanEqualsToken */; + return pos += 2, token = 30 /* LessThanEqualsToken */; } if (languageVariant === 1 /* JSX */ && text.charCodeAt(pos + 1) === 47 /* slash */ && text.charCodeAt(pos + 2) !== 42 /* asterisk */) { - return pos += 2, token = 27 /* LessThanSlashToken */; + return pos += 2, token = 28 /* LessThanSlashToken */; } pos++; - return token = 26 /* LessThanToken */; + return token = 27 /* LessThanToken */; case 61 /* equals */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6148,15 +6150,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 33 /* EqualsEqualsEqualsToken */; + return pos += 3, token = 34 /* EqualsEqualsEqualsToken */; } - return pos += 2, token = 31 /* EqualsEqualsToken */; + return pos += 2, token = 32 /* EqualsEqualsToken */; } if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 35 /* EqualsGreaterThanToken */; + return pos += 2, token = 36 /* EqualsGreaterThanToken */; } pos++; - return token = 57 /* EqualsToken */; + return token = 58 /* EqualsToken */; case 62 /* greaterThan */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6168,43 +6170,43 @@ var ts; } } pos++; - return token = 28 /* GreaterThanToken */; + return token = 29 /* GreaterThanToken */; case 63 /* question */: pos++; - return token = 54 /* QuestionToken */; + return token = 55 /* QuestionToken */; case 91 /* openBracket */: pos++; - return token = 20 /* OpenBracketToken */; + return token = 21 /* OpenBracketToken */; case 93 /* closeBracket */: pos++; - return token = 21 /* CloseBracketToken */; + return token = 22 /* CloseBracketToken */; case 94 /* caret */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 69 /* CaretEqualsToken */; + return pos += 2, token = 70 /* CaretEqualsToken */; } pos++; - return token = 49 /* CaretToken */; + return token = 50 /* CaretToken */; case 123 /* openBrace */: pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; case 124 /* bar */: if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 53 /* BarBarToken */; + return pos += 2, token = 54 /* BarBarToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 68 /* BarEqualsToken */; + return pos += 2, token = 69 /* BarEqualsToken */; } pos++; - return token = 48 /* BarToken */; + return token = 49 /* BarToken */; case 125 /* closeBrace */: pos++; - return token = 17 /* CloseBraceToken */; + return token = 18 /* CloseBraceToken */; case 126 /* tilde */: pos++; - return token = 51 /* TildeToken */; + return token = 52 /* TildeToken */; case 64 /* at */: pos++; - return token = 56 /* AtToken */; + return token = 57 /* AtToken */; case 92 /* backslash */: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -6242,29 +6244,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28 /* GreaterThanToken */) { + if (token === 29 /* GreaterThanToken */) { if (text.charCodeAt(pos) === 62 /* greaterThan */) { if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */; + return pos += 3, token = 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */; } - return pos += 2, token = 46 /* GreaterThanGreaterThanGreaterThanToken */; + return pos += 2, token = 47 /* GreaterThanGreaterThanGreaterThanToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 65 /* GreaterThanGreaterThanEqualsToken */; + return pos += 2, token = 66 /* GreaterThanGreaterThanEqualsToken */; } pos++; - return token = 45 /* GreaterThanGreaterThanToken */; + return token = 46 /* GreaterThanGreaterThanToken */; } if (text.charCodeAt(pos) === 61 /* equals */) { pos++; - return token = 30 /* GreaterThanEqualsToken */; + return token = 31 /* GreaterThanEqualsToken */; } } return token; } function reScanSlashToken() { - if (token === 40 /* SlashToken */ || token === 62 /* SlashEqualsToken */) { + if (token === 41 /* SlashToken */ || token === 63 /* SlashEqualsToken */) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -6309,7 +6311,7 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11 /* RegularExpressionLiteral */; + token = 12 /* RegularExpressionLiteral */; } return token; } @@ -6317,7 +6319,7 @@ var ts; * Unconditionally back up and scan a template expression portion. */ function reScanTemplateToken() { - ts.Debug.assert(token === 17 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -6334,17 +6336,20 @@ var ts; if (char === 60 /* lessThan */) { if (text.charCodeAt(pos + 1) === 47 /* slash */) { pos += 2; - return token = 27 /* LessThanSlashToken */; + return token = 28 /* LessThanSlashToken */; } pos++; - return token = 26 /* LessThanToken */; + return token = 27 /* LessThanToken */; } if (char === 123 /* openBrace */) { pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; } + // First non-whitespace character on this line. + var firstNonWhitespace = 0; + // These initial values are special because the first line is: + // firstNonWhitespace = 0 to indicate that we want leading whitspace, while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -6356,8 +6361,21 @@ var ts; } break; } + // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. + // i.e (- : whitespace) + //
---- + //
becomes
+ // + //
----
becomes
----
+ if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10 /* JsxText */; + return firstNonWhitespace === -1 ? 11 /* JsxTextAllWhiteSpaces */ : 10 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that // they allow dashes @@ -6407,42 +6425,42 @@ var ts; return token = 5 /* WhitespaceTrivia */; case 64 /* at */: pos++; - return token = 56 /* AtToken */; + return token = 57 /* AtToken */; case 10 /* lineFeed */: case 13 /* carriageReturn */: pos++; return token = 4 /* NewLineTrivia */; case 42 /* asterisk */: pos++; - return token = 38 /* AsteriskToken */; + return token = 39 /* AsteriskToken */; case 123 /* openBrace */: pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; case 125 /* closeBrace */: pos++; - return token = 17 /* CloseBraceToken */; + return token = 18 /* CloseBraceToken */; case 91 /* openBracket */: pos++; - return token = 20 /* OpenBracketToken */; + return token = 21 /* OpenBracketToken */; case 93 /* closeBracket */: pos++; - return token = 21 /* CloseBracketToken */; + return token = 22 /* CloseBracketToken */; case 61 /* equals */: pos++; - return token = 57 /* EqualsToken */; + return token = 58 /* EqualsToken */; case 44 /* comma */: pos++; - return token = 25 /* CommaToken */; + return token = 26 /* CommaToken */; case 46 /* dot */: pos++; - return token = 22 /* DotToken */; + return token = 23 /* DotToken */; } if (isIdentifierStart(ch, 5 /* Latest */)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5 /* Latest */) && pos < end) { pos++; } - return token = 70 /* Identifier */; + return token = 71 /* Identifier */; } else { return pos += 1, token = 0 /* Unknown */; @@ -6674,7 +6692,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 264 /* SourceFile */) { + while (node && node.kind !== 265 /* SourceFile */) { node = node.parent; } return node; @@ -6682,11 +6700,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 206 /* Block */: - case 234 /* CaseBlock */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return true; } return false; @@ -6762,7 +6780,7 @@ var ts; } ts.nodeIsPresent = nodeIsPresent; function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 141 /* LastToken */; + return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* LastToken */; } ts.isToken = isToken; function getTokenPosOfNode(node, sourceFile, includeJsDoc) { @@ -6781,18 +6799,18 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 293 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 294 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; function isJSDocNode(node) { - return node.kind >= 266 /* FirstJSDocNode */ && node.kind <= 292 /* LastJSDocNode */; + return node.kind >= 267 /* FirstJSDocNode */ && node.kind <= 293 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; function isJSDocTag(node) { - return node.kind >= 282 /* FirstJSDocTagNode */ && node.kind <= 292 /* LastJSDocTagNode */; + return node.kind >= 283 /* FirstJSDocTagNode */ && node.kind <= 293 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { @@ -6834,13 +6852,13 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: return getQuotedEscapedLiteralText('"', node.text, '"'); - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return getQuotedEscapedLiteralText("`", node.text, "`"); - case 13 /* TemplateHead */: + case 14 /* TemplateHead */: return getQuotedEscapedLiteralText("`", node.text, "${"); - case 14 /* TemplateMiddle */: + case 15 /* TemplateMiddle */: return getQuotedEscapedLiteralText("}", node.text, "${"); - case 15 /* TemplateTail */: + case 16 /* TemplateTail */: return getQuotedEscapedLiteralText("}", node.text, "`"); case 8 /* NumericLiteral */: return node.text; @@ -6869,11 +6887,11 @@ var ts; ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isCatchClauseVariableDeclarationOrBindingElement(declaration) { var node = getRootDeclaration(declaration); - return node.kind === 225 /* VariableDeclaration */ && node.parent.kind === 259 /* CatchClause */; + return node.kind === 226 /* VariableDeclaration */ && node.parent.kind === 260 /* CatchClause */; } ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement; function isAmbientModule(node) { - return node && node.kind === 232 /* ModuleDeclaration */ && + return node && node.kind === 233 /* ModuleDeclaration */ && (node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; @@ -6884,11 +6902,11 @@ var ts; ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; function isShorthandAmbientModule(node) { // The only kind of module that can be missing a body is a shorthand ambient module. - return node && node.kind === 232 /* ModuleDeclaration */ && (!node.body); + return node && node.kind === 233 /* ModuleDeclaration */ && (!node.body); } function isBlockScopedContainerTopLevel(node) { - return node.kind === 264 /* SourceFile */ || - node.kind === 232 /* ModuleDeclaration */ || + return node.kind === 265 /* SourceFile */ || + node.kind === 233 /* ModuleDeclaration */ || isFunctionLike(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; @@ -6904,9 +6922,9 @@ var ts; return false; } switch (node.parent.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.isExternalModule(node.parent); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; @@ -6918,22 +6936,22 @@ var ts; ts.isEffectiveExternalModule = isEffectiveExternalModule; function isBlockScope(node, parentNode) { switch (node.kind) { - case 264 /* SourceFile */: - case 234 /* CaseBlock */: - case 259 /* CatchClause */: - case 232 /* ModuleDeclaration */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 265 /* SourceFile */: + case 235 /* CaseBlock */: + case 260 /* CatchClause */: + case 233 /* ModuleDeclaration */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return true; - case 206 /* Block */: + case 207 /* Block */: // function block is not considered block-scope container // see comment in binder.ts: bind(...), case for SyntaxKind.Block return parentNode && !isFunctionLike(parentNode); @@ -6966,12 +6984,12 @@ var ts; ts.getNameFromIndexInfo = getNameFromIndexInfo; function getTextOfPropertyName(name) { switch (name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return name.text; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: return name.text; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: if (isStringOrNumericLiteral(name.expression)) { return name.expression.text; } @@ -6981,11 +6999,11 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name); - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return entityNameToString(name.expression) + "." + entityNameToString(name.name); } } @@ -7022,7 +7040,7 @@ var ts; ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; function getErrorSpanForArrowFunction(sourceFile, node) { var pos = ts.skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 206 /* Block */) { + if (node.body && node.body.kind === 207 /* Block */) { var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; if (startLine < endLine) { @@ -7036,7 +7054,7 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false); if (pos_1 === sourceFile.text.length) { // file is empty - return span for the beginning of the file @@ -7045,23 +7063,23 @@ var ts; return getSpanOfTokenAtPosition(sourceFile, pos_1); // This list is a work in progress. Add missing node kinds to improve their error // spans. - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 230 /* TypeAliasDeclaration */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 231 /* TypeAliasDeclaration */: errorNode = node.name; break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { @@ -7084,7 +7102,7 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 231 /* EnumDeclaration */ && isConst(node); + return node.kind === 232 /* EnumDeclaration */ && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isConst(node) { @@ -7097,11 +7115,11 @@ var ts; } ts.isLet = isLet; function isSuperCall(n) { - return n.kind === 180 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */; + return n.kind === 181 /* CallExpression */ && n.expression.kind === 97 /* SuperKeyword */; } ts.isSuperCall = isSuperCall; function isPrologueDirective(node) { - return node.kind === 209 /* ExpressionStatement */ + return node.kind === 210 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; @@ -7114,10 +7132,10 @@ var ts; } ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJSDocCommentRanges(node, text) { - var commentRanges = (node.kind === 145 /* Parameter */ || - node.kind === 144 /* TypeParameter */ || - node.kind === 185 /* FunctionExpression */ || - node.kind === 186 /* ArrowFunction */) ? + var commentRanges = (node.kind === 146 /* Parameter */ || + node.kind === 145 /* TypeParameter */ || + node.kind === 186 /* FunctionExpression */ || + node.kind === 187 /* ArrowFunction */) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); // True if the comment starts with '/**' but not if it is '/**/' @@ -7132,40 +7150,40 @@ var ts; ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (157 /* FirstTypeNode */ <= node.kind && node.kind <= 172 /* LastTypeNode */) { + if (158 /* FirstTypeNode */ <= node.kind && node.kind <= 173 /* LastTypeNode */) { return true; } switch (node.kind) { - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 135 /* StringKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 136 /* StringKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: return true; - case 104 /* VoidKeyword */: - return node.parent.kind !== 189 /* VoidExpression */; - case 200 /* ExpressionWithTypeArguments */: + case 105 /* VoidKeyword */: + return node.parent.kind !== 190 /* VoidExpression */; + case 201 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); // Identifiers and qualified names may be type nodes, depending on their context. Climb // above them to find the lowest container - case 70 /* Identifier */: + case 71 /* Identifier */: // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node) { + else if (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + ts.Debug.assert(node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); // falls through - case 142 /* QualifiedName */: - case 178 /* PropertyAccessExpression */: - case 98 /* ThisKeyword */: + case 143 /* QualifiedName */: + case 179 /* PropertyAccessExpression */: + case 99 /* ThisKeyword */: var parent = node.parent; - if (parent.kind === 161 /* TypeQuery */) { + if (parent.kind === 162 /* TypeQuery */) { return false; } // Do not recursively call isPartOfTypeNode on the parent. In the example: @@ -7174,38 +7192,38 @@ var ts; // // Calling isPartOfTypeNode would consider the qualified name A.B a type node. // Only C and A.B.C are type nodes. - if (157 /* FirstTypeNode */ <= parent.kind && parent.kind <= 172 /* LastTypeNode */) { + if (158 /* FirstTypeNode */ <= parent.kind && parent.kind <= 173 /* LastTypeNode */) { return true; } switch (parent.kind) { - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return node === parent.constraint; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 145 /* Parameter */: - case 225 /* VariableDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 146 /* Parameter */: + case 226 /* VariableDeclaration */: return node === parent.type; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return node === parent.type; - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return node === parent.type; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return node === parent.type; - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. return false; } @@ -7224,7 +7242,7 @@ var ts; } ts.isChildOfNodeWithKind = isChildOfNodeWithKind; function isPrefixUnaryExpression(node) { - return node.kind === 191 /* PrefixUnaryExpression */; + return node.kind === 192 /* PrefixUnaryExpression */; } ts.isPrefixUnaryExpression = isPrefixUnaryExpression; // Warning: This has the same semantics as the forEach family of functions, @@ -7233,23 +7251,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitor(node); - case 234 /* CaseBlock */: - case 206 /* Block */: - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 219 /* WithStatement */: - case 220 /* SwitchStatement */: - case 256 /* CaseClause */: - case 257 /* DefaultClause */: - case 221 /* LabeledStatement */: - case 223 /* TryStatement */: - case 259 /* CatchClause */: + case 235 /* CaseBlock */: + case 207 /* Block */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 220 /* WithStatement */: + case 221 /* SwitchStatement */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: + case 222 /* LabeledStatement */: + case 224 /* TryStatement */: + case 260 /* CatchClause */: return ts.forEachChild(node, traverse); } } @@ -7259,19 +7277,19 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } return; - case 231 /* EnumDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: // These are not allowed inside a generator now, but eventually they may be allowed // as local types. Regardless, any yield statements contained within them should be // skipped in this traversal. @@ -7279,7 +7297,7 @@ var ts; default: if (isFunctionLike(node)) { var name = node.name; - if (name && name.kind === 143 /* ComputedPropertyName */) { + if (name && name.kind === 144 /* ComputedPropertyName */) { // Note that we will not include methods/accessors of a class because they would require // first descending into the class. This is by design. traverse(name.expression); @@ -7302,10 +7320,10 @@ var ts; * @param node The type node. */ function getRestParameterElementType(node) { - if (node && node.kind === 163 /* ArrayType */) { + if (node && node.kind === 164 /* ArrayType */) { return node.elementType; } - else if (node && node.kind === 158 /* TypeReference */) { + else if (node && node.kind === 159 /* TypeReference */) { return ts.singleOrUndefined(node.typeArguments); } else { @@ -7316,14 +7334,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 175 /* BindingElement */: - case 263 /* EnumMember */: - case 145 /* Parameter */: - case 260 /* PropertyAssignment */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 261 /* ShorthandPropertyAssignment */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 264 /* EnumMember */: + case 146 /* Parameter */: + case 261 /* PropertyAssignment */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 262 /* ShorthandPropertyAssignment */: + case 226 /* VariableDeclaration */: return true; } } @@ -7331,11 +7349,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */); + return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */); + return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -7344,19 +7362,19 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return true; } return false; @@ -7364,13 +7382,13 @@ var ts; ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return true; } return false; @@ -7378,13 +7396,13 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return true; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -7395,7 +7413,7 @@ var ts; if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 221 /* LabeledStatement */) { + if (node.statement.kind !== 222 /* LabeledStatement */) { return node.statement; } node = node.statement; @@ -7403,17 +7421,17 @@ var ts; } ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel; function isFunctionBlock(node) { - return node && node.kind === 206 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 207 /* Block */ && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 150 /* MethodDeclaration */ && node.parent.kind === 177 /* ObjectLiteralExpression */; + return node && node.kind === 151 /* MethodDeclaration */ && node.parent.kind === 178 /* ObjectLiteralExpression */; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isObjectLiteralOrClassExpressionMethod(node) { - return node.kind === 150 /* MethodDeclaration */ && - (node.parent.kind === 177 /* ObjectLiteralExpression */ || - node.parent.kind === 198 /* ClassExpression */); + return node.kind === 151 /* MethodDeclaration */ && + (node.parent.kind === 178 /* ObjectLiteralExpression */ || + node.parent.kind === 199 /* ClassExpression */); } ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod; function isIdentifierTypePredicate(predicate) { @@ -7449,7 +7467,7 @@ var ts; return undefined; } switch (node.kind) { - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: // If the grandparent node is an object literal (as opposed to a class), // then the computed property is not a 'this' container. // A computed property name in a class needs to be a this container @@ -7464,9 +7482,9 @@ var ts; // the *body* of the container. node = node.parent; break; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -7477,26 +7495,26 @@ var ts; node = node.parent; } break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } // falls through - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 232 /* ModuleDeclaration */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 231 /* EnumDeclaration */: - case 264 /* SourceFile */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 233 /* ModuleDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 232 /* EnumDeclaration */: + case 265 /* SourceFile */: return node; } } @@ -7506,9 +7524,9 @@ var ts; var container = getThisContainer(node, /*includeArrowFunctions*/ false); if (container) { switch (container.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return container; } } @@ -7530,27 +7548,27 @@ var ts; return node; } switch (node.kind) { - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: node = node.parent; break; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: if (!stopOnFunctions) { continue; } // falls through - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return node; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -7566,14 +7584,14 @@ var ts; } ts.getSuperContainer = getSuperContainer; function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */) { + if (func.kind === 186 /* FunctionExpression */ || func.kind === 187 /* ArrowFunction */) { var prev = func; var parent = func.parent; - while (parent.kind === 184 /* ParenthesizedExpression */) { + while (parent.kind === 185 /* ParenthesizedExpression */) { prev = parent; parent = parent.parent; } - if (parent.kind === 180 /* CallExpression */ && parent.expression === prev) { + if (parent.kind === 181 /* CallExpression */ && parent.expression === prev) { return parent; } } @@ -7584,21 +7602,21 @@ var ts; */ function isSuperProperty(node) { var kind = node.kind; - return (kind === 178 /* PropertyAccessExpression */ || kind === 179 /* ElementAccessExpression */) - && node.expression.kind === 96 /* SuperKeyword */; + return (kind === 179 /* PropertyAccessExpression */ || kind === 180 /* ElementAccessExpression */) + && node.expression.kind === 97 /* SuperKeyword */; } ts.isSuperProperty = isSuperProperty; function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 158 /* TypeReference */: - case 276 /* JSDocTypeReference */: + case 159 /* TypeReference */: + case 277 /* JSDocTypeReference */: return node.typeName; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : undefined; - case 70 /* Identifier */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 143 /* QualifiedName */: return node; } return undefined; @@ -7606,12 +7624,12 @@ var ts; ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function isCallLikeExpression(node) { switch (node.kind) { - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 182 /* TaggedTemplateExpression */: - case 146 /* Decorator */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 183 /* TaggedTemplateExpression */: + case 147 /* Decorator */: return true; default: return false; @@ -7619,7 +7637,7 @@ var ts; } ts.isCallLikeExpression = isCallLikeExpression; function getInvokedExpression(node) { - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { return node.tag; } else if (isJsxOpeningLikeElement(node)) { @@ -7631,25 +7649,25 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: // classes are valid targets return true; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 228 /* ClassDeclaration */; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: + return node.parent.kind === 229 /* ClassDeclaration */; + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: // if this method has a body and its parent is a class declaration, this is a valid target. return node.body !== undefined - && node.parent.kind === 228 /* ClassDeclaration */; - case 145 /* Parameter */: + && node.parent.kind === 229 /* ClassDeclaration */; + case 146 /* Parameter */: // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; return node.parent.body !== undefined - && (node.parent.kind === 151 /* Constructor */ - || node.parent.kind === 150 /* MethodDeclaration */ - || node.parent.kind === 153 /* SetAccessor */) - && node.parent.parent.kind === 228 /* ClassDeclaration */; + && (node.parent.kind === 152 /* Constructor */ + || node.parent.kind === 151 /* MethodDeclaration */ + || node.parent.kind === 154 /* SetAccessor */) + && node.parent.parent.kind === 229 /* ClassDeclaration */; } return false; } @@ -7665,19 +7683,19 @@ var ts; ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; function childIsDecorated(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return ts.forEach(node.members, nodeOrChildIsDecorated); - case 150 /* MethodDeclaration */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 154 /* SetAccessor */: return ts.forEach(node.parameters, nodeIsDecorated); } } ts.childIsDecorated = childIsDecorated; function isJSXTagName(node) { var parent = node.parent; - if (parent.kind === 250 /* JsxOpeningElement */ || - parent.kind === 249 /* JsxSelfClosingElement */ || - parent.kind === 251 /* JsxClosingElement */) { + if (parent.kind === 251 /* JsxOpeningElement */ || + parent.kind === 250 /* JsxSelfClosingElement */ || + parent.kind === 252 /* JsxClosingElement */) { return parent.tagName === node; } return false; @@ -7685,100 +7703,100 @@ var ts; ts.isJSXTagName = isJSXTagName; function isPartOfExpression(node) { switch (node.kind) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 11 /* RegularExpressionLiteral */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 182 /* TaggedTemplateExpression */: - case 201 /* AsExpression */: - case 183 /* TypeAssertionExpression */: - case 202 /* NonNullExpression */: - case 184 /* ParenthesizedExpression */: - case 185 /* FunctionExpression */: - case 198 /* ClassExpression */: - case 186 /* ArrowFunction */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 188 /* TypeOfExpression */: - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: - case 193 /* BinaryExpression */: - case 194 /* ConditionalExpression */: - case 197 /* SpreadElement */: - case 195 /* TemplateExpression */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 199 /* OmittedExpression */: - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 196 /* YieldExpression */: - case 190 /* AwaitExpression */: - case 203 /* MetaProperty */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 12 /* RegularExpressionLiteral */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 183 /* TaggedTemplateExpression */: + case 202 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 203 /* NonNullExpression */: + case 185 /* ParenthesizedExpression */: + case 186 /* FunctionExpression */: + case 199 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 189 /* TypeOfExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: + case 194 /* BinaryExpression */: + case 195 /* ConditionalExpression */: + case 198 /* SpreadElement */: + case 196 /* TemplateExpression */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 200 /* OmittedExpression */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 197 /* YieldExpression */: + case 191 /* AwaitExpression */: + case 204 /* MetaProperty */: return true; - case 142 /* QualifiedName */: - while (node.parent.kind === 142 /* QualifiedName */) { + case 143 /* QualifiedName */: + while (node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node); - case 70 /* Identifier */: - if (node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node)) { + return node.parent.kind === 162 /* TypeQuery */ || isJSXTagName(node); + case 71 /* Identifier */: + if (node.parent.kind === 162 /* TypeQuery */ || isJSXTagName(node)) { return true; } // falls through case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: var parent = node.parent; switch (parent.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 263 /* EnumMember */: - case 260 /* PropertyAssignment */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 264 /* EnumMember */: + case 261 /* PropertyAssignment */: + case 176 /* BindingElement */: return parent.initializer === node; - case 209 /* ExpressionStatement */: - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 218 /* ReturnStatement */: - case 219 /* WithStatement */: - case 220 /* SwitchStatement */: - case 256 /* CaseClause */: - case 222 /* ThrowStatement */: - case 220 /* SwitchStatement */: + case 210 /* ExpressionStatement */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 219 /* ReturnStatement */: + case 220 /* WithStatement */: + case 221 /* SwitchStatement */: + case 257 /* CaseClause */: + case 223 /* ThrowStatement */: + case 221 /* SwitchStatement */: return parent.expression === node; - case 213 /* ForStatement */: + case 214 /* ForStatement */: var forStatement = parent; - return (forStatement.initializer === node && forStatement.initializer.kind !== 226 /* VariableDeclarationList */) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 227 /* VariableDeclarationList */) || forStatement.condition === node || forStatement.incrementor === node; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: var forInStatement = parent; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226 /* VariableDeclarationList */) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 227 /* VariableDeclarationList */) || forInStatement.expression === node; - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return node === parent.expression; - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return node === parent.expression; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return node === parent.expression; - case 146 /* Decorator */: - case 255 /* JsxExpression */: - case 254 /* JsxSpreadAttribute */: - case 262 /* SpreadAssignment */: + case 147 /* Decorator */: + case 256 /* JsxExpression */: + case 255 /* JsxSpreadAttribute */: + case 263 /* SpreadAssignment */: return true; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent); default: if (isPartOfExpression(parent)) { @@ -7796,7 +7814,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */; + return node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 248 /* ExternalModuleReference */; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -7805,7 +7823,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 247 /* ExternalModuleReference */; + return node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 248 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -7822,18 +7840,18 @@ var ts; * This function does not test if the node is in a JavaScript file or not. */ function isRequireCall(callExpression, checkArgumentIsStringLiteral) { - if (callExpression.kind !== 180 /* CallExpression */) { + if (callExpression.kind !== 181 /* CallExpression */) { return false; } var _a = callExpression, expression = _a.expression, args = _a.arguments; - if (expression.kind !== 70 /* Identifier */ || expression.text !== "require") { + if (expression.kind !== 71 /* Identifier */ || expression.text !== "require") { return false; } if (args.length !== 1) { return false; } var arg = args[0]; - return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 12 /* NoSubstitutionTemplateLiteral */; + return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -7845,9 +7863,9 @@ var ts; * This function does not test if the node is in a JavaScript file or not. */ function isDeclarationOfFunctionOrClassExpression(s) { - if (s.valueDeclaration && s.valueDeclaration.kind === 225 /* VariableDeclaration */) { + if (s.valueDeclaration && s.valueDeclaration.kind === 226 /* VariableDeclaration */) { var declaration = s.valueDeclaration; - return declaration.initializer && (declaration.initializer.kind === 185 /* FunctionExpression */ || declaration.initializer.kind === 198 /* ClassExpression */); + return declaration.initializer && (declaration.initializer.kind === 186 /* FunctionExpression */ || declaration.initializer.kind === 199 /* ClassExpression */); } return false; } @@ -7874,11 +7892,11 @@ var ts; return 0 /* None */; } var expr = expression; - if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 178 /* PropertyAccessExpression */) { + if (expr.operatorToken.kind !== 58 /* EqualsToken */ || expr.left.kind !== 179 /* PropertyAccessExpression */) { return 0 /* None */; } var lhs = expr.left; - if (lhs.expression.kind === 70 /* Identifier */) { + if (lhs.expression.kind === 71 /* Identifier */) { var lhsId = lhs.expression; if (lhsId.text === "exports") { // exports.name = expr @@ -7893,13 +7911,13 @@ var ts; return 5 /* Property */; } } - else if (lhs.expression.kind === 98 /* ThisKeyword */) { + else if (lhs.expression.kind === 99 /* ThisKeyword */) { return 4 /* ThisProperty */; } - else if (lhs.expression.kind === 178 /* PropertyAccessExpression */) { + else if (lhs.expression.kind === 179 /* PropertyAccessExpression */) { // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 70 /* Identifier */) { + if (innerPropertyAccess.expression.kind === 71 /* Identifier */) { // module.exports.name = expr var innerPropertyAccessIdentifier = innerPropertyAccess.expression; if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { @@ -7914,35 +7932,35 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { var reference = node.moduleReference; - if (reference.kind === 247 /* ExternalModuleReference */) { + if (reference.kind === 248 /* ExternalModuleReference */) { return reference.expression; } } - if (node.kind === 243 /* ExportDeclaration */) { + if (node.kind === 244 /* ExportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + if (node.kind === 233 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { return node.name; } } ts.getExternalModuleName = getExternalModuleName; function getNamespaceDeclarationNode(node) { - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 240 /* NamespaceImport */) { return importClause.namedBindings; } } ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode; function isDefaultImport(node) { - return node.kind === 237 /* ImportDeclaration */ + return node.kind === 238 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; } @@ -7950,13 +7968,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 145 /* Parameter */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 261 /* ShorthandPropertyAssignment */: - case 260 /* PropertyAssignment */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 146 /* Parameter */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 262 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return node.questionToken !== undefined; } } @@ -7964,9 +7982,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 278 /* JSDocFunctionType */ && + return node.kind === 279 /* JSDocFunctionType */ && node.parameters.length > 0 && - node.parameters[0].type.kind === 280 /* JSDocConstructorType */; + node.parameters[0].type.kind === 281 /* JSDocConstructorType */; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getCommentsFromJSDoc(node) { @@ -7974,7 +7992,7 @@ var ts; } ts.getCommentsFromJSDoc = getCommentsFromJSDoc; function hasJSDocParameterTags(node) { - var parameterTags = getJSDocTags(node, 285 /* JSDocParameterTag */); + var parameterTags = getJSDocTags(node, 286 /* JSDocParameterTag */); return parameterTags && parameterTags.length > 0; } ts.hasJSDocParameterTags = hasJSDocParameterTags; @@ -7984,7 +8002,7 @@ var ts; var result = []; for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) { var doc = docs_1[_i]; - if (doc.kind === 285 /* JSDocParameterTag */) { + if (doc.kind === 286 /* JSDocParameterTag */) { if (doc.kind === kind) { result.push(doc); } @@ -8019,9 +8037,9 @@ var ts; // var x = function(name) { return name.length; } var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) && parent.initializer === node && - parent.parent.parent.kind === 207 /* VariableStatement */; + parent.parent.parent.kind === 208 /* VariableStatement */; var isVariableOfVariableDeclarationStatement = isVariableLike(node) && - parent.parent.kind === 207 /* VariableStatement */; + parent.parent.kind === 208 /* VariableStatement */; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent : isVariableOfVariableDeclarationStatement ? parent.parent : undefined; @@ -8030,20 +8048,20 @@ var ts; } // Also recognize when the node is the RHS of an assignment expression var isSourceOfAssignmentExpressionStatement = parent && parent.parent && - parent.kind === 193 /* BinaryExpression */ && - parent.operatorToken.kind === 57 /* EqualsToken */ && - parent.parent.kind === 209 /* ExpressionStatement */; + parent.kind === 194 /* BinaryExpression */ && + parent.operatorToken.kind === 58 /* EqualsToken */ && + parent.parent.kind === 210 /* ExpressionStatement */; if (isSourceOfAssignmentExpressionStatement) { getJSDocsWorker(parent.parent); } - var isModuleDeclaration = node.kind === 232 /* ModuleDeclaration */ && - parent && parent.kind === 232 /* ModuleDeclaration */; - var isPropertyAssignmentExpression = parent && parent.kind === 260 /* PropertyAssignment */; + var isModuleDeclaration = node.kind === 233 /* ModuleDeclaration */ && + parent && parent.kind === 233 /* ModuleDeclaration */; + var isPropertyAssignmentExpression = parent && parent.kind === 261 /* PropertyAssignment */; if (isModuleDeclaration || isPropertyAssignmentExpression) { getJSDocsWorker(parent); } // Pull parameter comments from declaring function as well - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { cache = ts.concatenate(cache, getJSDocParameterTags(node)); } if (isVariableLike(node) && node.initializer) { @@ -8058,18 +8076,18 @@ var ts; return undefined; } var func = param.parent; - var tags = getJSDocTags(func, 285 /* JSDocParameterTag */); + var tags = getJSDocTags(func, 286 /* JSDocParameterTag */); if (!param.name) { // this is an anonymous jsdoc param from a `function(type1, type2): type3` specification var i = func.parameters.indexOf(param); - var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */; }); + var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */; }); if (paramTags && 0 <= i && i < paramTags.length) { return [paramTags[i]]; } } - else if (param.name.kind === 70 /* Identifier */) { + else if (param.name.kind === 71 /* Identifier */) { var name_1 = param.name.text; - return ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */ && tag.parameterName.text === name_1; }); + return ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */ && tag.parameterName.text === name_1; }); } else { // TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines @@ -8079,8 +8097,8 @@ var ts; } ts.getJSDocParameterTags = getJSDocParameterTags; function getJSDocType(node) { - var tag = getFirstJSDocTag(node, 287 /* JSDocTypeTag */); - if (!tag && node.kind === 145 /* Parameter */) { + var tag = getFirstJSDocTag(node, 288 /* JSDocTypeTag */); + if (!tag && node.kind === 146 /* Parameter */) { var paramTags = getJSDocParameterTags(node); if (paramTags) { tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; }); @@ -8090,15 +8108,15 @@ var ts; } ts.getJSDocType = getJSDocType; function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, 284 /* JSDocAugmentsTag */); + return getFirstJSDocTag(node, 285 /* JSDocAugmentsTag */); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, 286 /* JSDocReturnTag */); + return getFirstJSDocTag(node, 287 /* JSDocReturnTag */); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, 288 /* JSDocTemplateTag */); + return getFirstJSDocTag(node, 289 /* JSDocTemplateTag */); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function hasRestParameter(s) { @@ -8111,8 +8129,8 @@ var ts; ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { if (node && (node.flags & 65536 /* JavaScriptFile */)) { - if (node.type && node.type.kind === 279 /* JSDocVariadicType */ || - ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279 /* JSDocVariadicType */; })) { + if (node.type && node.type.kind === 280 /* JSDocVariadicType */ || + ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 280 /* JSDocVariadicType */; })) { return true; } } @@ -8133,30 +8151,30 @@ var ts; var parent = node.parent; while (true) { switch (parent.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? - binaryOperator === 57 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ : + binaryOperator === 58 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: var unaryOperator = parent.operator; - return unaryOperator === 42 /* PlusPlusToken */ || unaryOperator === 43 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + return unaryOperator === 43 /* PlusPlusToken */ || unaryOperator === 44 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 184 /* ParenthesizedExpression */: - case 176 /* ArrayLiteralExpression */: - case 197 /* SpreadElement */: + case 185 /* ParenthesizedExpression */: + case 177 /* ArrayLiteralExpression */: + case 198 /* SpreadElement */: node = parent; break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: if (parent.name !== node) { return 0 /* None */; } node = parent.parent; break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: if (parent.name === node) { return 0 /* None */; } @@ -8179,14 +8197,14 @@ var ts; ts.isAssignmentTarget = isAssignmentTarget; // a node is delete target iff. it is PropertyAccessExpression/ElementAccessExpression with parentheses skipped function isDeleteTarget(node) { - if (node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) { + if (node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) { return false; } node = node.parent; - while (node && node.kind === 184 /* ParenthesizedExpression */) { + while (node && node.kind === 185 /* ParenthesizedExpression */) { node = node.parent; } - return node && node.kind === 187 /* DeleteExpression */; + return node && node.kind === 188 /* DeleteExpression */; } ts.isDeleteTarget = isDeleteTarget; function isNodeDescendantOf(node, ancestor) { @@ -8200,7 +8218,7 @@ var ts; ts.isNodeDescendantOf = isNodeDescendantOf; function isInAmbientContext(node) { while (node) { - if (hasModifier(node, 2 /* Ambient */) || (node.kind === 264 /* SourceFile */ && node.isDeclarationFile)) { + if (hasModifier(node, 2 /* Ambient */) || (node.kind === 265 /* SourceFile */ && node.isDeclarationFile)) { return true; } node = node.parent; @@ -8210,11 +8228,11 @@ var ts; ts.isInAmbientContext = isInAmbientContext; // True if the given identifier, string literal, or number literal is the name of a declaration node function isDeclarationName(name) { - if (name.kind !== 70 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) { + if (name.kind !== 71 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) { return false; } var parent = name.parent; - if (parent.kind === 241 /* ImportSpecifier */ || parent.kind === 245 /* ExportSpecifier */) { + if (parent.kind === 242 /* ImportSpecifier */ || parent.kind === 246 /* ExportSpecifier */) { if (parent.propertyName) { return true; } @@ -8227,7 +8245,7 @@ var ts; ts.isDeclarationName = isDeclarationName; function isLiteralComputedPropertyDeclarationName(node) { return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && - node.parent.kind === 143 /* ComputedPropertyName */ && + node.parent.kind === 144 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; @@ -8235,31 +8253,31 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 263 /* EnumMember */: - case 260 /* PropertyAssignment */: - case 178 /* PropertyAccessExpression */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 264 /* EnumMember */: + case 261 /* PropertyAssignment */: + case 179 /* PropertyAccessExpression */: // Name in member declaration or property name in property access return parent.name === node; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: // Name on right hand side of dot in a type query if (parent.right === node) { - while (parent.kind === 142 /* QualifiedName */) { + while (parent.kind === 143 /* QualifiedName */) { parent = parent.parent; } - return parent.kind === 161 /* TypeQuery */; + return parent.kind === 162 /* TypeQuery */; } return false; - case 175 /* BindingElement */: - case 241 /* ImportSpecifier */: + case 176 /* BindingElement */: + case 242 /* ImportSpecifier */: // Property name in binding element or import specifier return parent.propertyName === node; - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: // Any name in an export specifier return true; } @@ -8275,13 +8293,13 @@ var ts; // export = // export default function isAliasSymbolDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ || - node.kind === 235 /* NamespaceExportDeclaration */ || - node.kind === 238 /* ImportClause */ && !!node.name || - node.kind === 239 /* NamespaceImport */ || - node.kind === 241 /* ImportSpecifier */ || - node.kind === 245 /* ExportSpecifier */ || - node.kind === 242 /* ExportAssignment */ && exportAssignmentIsAlias(node); + return node.kind === 237 /* ImportEqualsDeclaration */ || + node.kind === 236 /* NamespaceExportDeclaration */ || + node.kind === 239 /* ImportClause */ && !!node.name || + node.kind === 240 /* NamespaceImport */ || + node.kind === 242 /* ImportSpecifier */ || + node.kind === 246 /* ExportSpecifier */ || + node.kind === 243 /* ExportAssignment */ && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function exportAssignmentIsAlias(node) { @@ -8289,17 +8307,17 @@ var ts; } ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84 /* ExtendsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 85 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 107 /* ImplementsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 108 /* ImplementsKeyword */); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84 /* ExtendsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 85 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : undefined; } ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; @@ -8367,7 +8385,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 71 /* FirstKeyword */ <= token && token <= 141 /* LastKeyword */; + return 72 /* FirstKeyword */ <= token && token <= 142 /* LastKeyword */; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -8387,14 +8405,14 @@ var ts; function getFunctionFlags(node) { var flags = 0 /* Normal */; switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } // falls through - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (hasModifier(node, 256 /* Async */)) { flags |= 2 /* Async */; } @@ -8408,10 +8426,10 @@ var ts; ts.getFunctionFlags = getFunctionFlags; function isAsyncFunction(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: return node.body !== undefined && node.asteriskToken === undefined && hasModifier(node, 256 /* Async */); @@ -8441,7 +8459,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 143 /* ComputedPropertyName */ && + return name.kind === 144 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } @@ -8456,10 +8474,10 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 145 /* Parameter */) { + if (name.kind === 71 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 146 /* Parameter */) { return name.text; } - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -8480,7 +8498,7 @@ var ts; * Includes the word "Symbol" with unicode escapes */ function isESSymbolIdentifier(node) { - return node.kind === 70 /* Identifier */ && node.text === "Symbol"; + return node.kind === 71 /* Identifier */ && node.text === "Symbol"; } ts.isESSymbolIdentifier = isESSymbolIdentifier; function isPushOrUnshiftIdentifier(node) { @@ -8489,17 +8507,17 @@ var ts; ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier; function isModifierKind(token) { switch (token) { - case 116 /* AbstractKeyword */: - case 119 /* AsyncKeyword */: - case 75 /* ConstKeyword */: - case 123 /* DeclareKeyword */: - case 78 /* DefaultKeyword */: - case 83 /* ExportKeyword */: - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 130 /* ReadonlyKeyword */: - case 114 /* StaticKeyword */: + case 117 /* AbstractKeyword */: + case 120 /* AsyncKeyword */: + case 76 /* ConstKeyword */: + case 124 /* DeclareKeyword */: + case 79 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 131 /* ReadonlyKeyword */: + case 115 /* StaticKeyword */: return true; } return false; @@ -8507,11 +8525,11 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 145 /* Parameter */; + return root.kind === 146 /* Parameter */; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 175 /* BindingElement */) { + while (node.kind === 176 /* BindingElement */) { node = node.parent.parent; } return node; @@ -8519,15 +8537,15 @@ var ts; ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(node) { var kind = node.kind; - return kind === 151 /* Constructor */ - || kind === 185 /* FunctionExpression */ - || kind === 227 /* FunctionDeclaration */ - || kind === 186 /* ArrowFunction */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 232 /* ModuleDeclaration */ - || kind === 264 /* SourceFile */; + return kind === 152 /* Constructor */ + || kind === 186 /* FunctionExpression */ + || kind === 228 /* FunctionDeclaration */ + || kind === 187 /* ArrowFunction */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 233 /* ModuleDeclaration */ + || kind === 265 /* SourceFile */; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function nodeIsSynthesized(node) { @@ -8536,7 +8554,7 @@ var ts; } ts.nodeIsSynthesized = nodeIsSynthesized; function getOriginalSourceFileOrBundle(sourceFileOrBundle) { - if (sourceFileOrBundle.kind === 265 /* Bundle */) { + if (sourceFileOrBundle.kind === 266 /* Bundle */) { return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile)); } return getOriginalSourceFile(sourceFileOrBundle); @@ -8561,38 +8579,38 @@ var ts; })(Associativity = ts.Associativity || (ts.Associativity = {})); function getExpressionAssociativity(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 /* NewExpression */ && expression.arguments !== undefined; return getOperatorAssociativity(expression.kind, operator, hasArguments); } ts.getExpressionAssociativity = getExpressionAssociativity; function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 181 /* NewExpression */: + case 182 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 191 /* PrefixUnaryExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 190 /* AwaitExpression */: - case 194 /* ConditionalExpression */: - case 196 /* YieldExpression */: + case 192 /* PrefixUnaryExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 191 /* AwaitExpression */: + case 195 /* ConditionalExpression */: + case 197 /* YieldExpression */: return 1 /* Right */; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (operator) { - case 39 /* AsteriskAsteriskToken */: - case 57 /* EqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 68 /* BarEqualsToken */: + case 40 /* AsteriskAsteriskToken */: + case 58 /* EqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 69 /* BarEqualsToken */: return 1 /* Right */; } } @@ -8601,15 +8619,15 @@ var ts; ts.getOperatorAssociativity = getOperatorAssociativity; function getExpressionPrecedence(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 /* NewExpression */ && expression.arguments !== undefined; return getOperatorPrecedence(expression.kind, operator, hasArguments); } ts.getExpressionPrecedence = getExpressionPrecedence; function getOperator(expression) { - if (expression.kind === 193 /* BinaryExpression */) { + if (expression.kind === 194 /* BinaryExpression */) { return expression.operatorToken.kind; } - else if (expression.kind === 191 /* PrefixUnaryExpression */ || expression.kind === 192 /* PostfixUnaryExpression */) { + else if (expression.kind === 192 /* PrefixUnaryExpression */ || expression.kind === 193 /* PostfixUnaryExpression */) { return expression.operator; } else { @@ -8619,106 +8637,106 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 70 /* Identifier */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 71 /* Identifier */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 198 /* ClassExpression */: - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 11 /* RegularExpressionLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 195 /* TemplateExpression */: - case 184 /* ParenthesizedExpression */: - case 199 /* OmittedExpression */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 199 /* ClassExpression */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 12 /* RegularExpressionLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 196 /* TemplateExpression */: + case 185 /* ParenthesizedExpression */: + case 200 /* OmittedExpression */: return 19; - case 182 /* TaggedTemplateExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 183 /* TaggedTemplateExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: return 18; - case 181 /* NewExpression */: + case 182 /* NewExpression */: return hasArguments ? 18 : 17; - case 180 /* CallExpression */: + case 181 /* CallExpression */: return 17; - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return 16; - case 191 /* PrefixUnaryExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 190 /* AwaitExpression */: + case 192 /* PrefixUnaryExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 191 /* AwaitExpression */: return 15; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (operatorKind) { - case 50 /* ExclamationToken */: - case 51 /* TildeToken */: + case 51 /* ExclamationToken */: + case 52 /* TildeToken */: return 15; - case 39 /* AsteriskAsteriskToken */: - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: + case 40 /* AsteriskAsteriskToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: return 14; - case 36 /* PlusToken */: - case 37 /* MinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: return 13; - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return 12; - case 26 /* LessThanToken */: - case 29 /* LessThanEqualsToken */: - case 28 /* GreaterThanToken */: - case 30 /* GreaterThanEqualsToken */: - case 91 /* InKeyword */: - case 92 /* InstanceOfKeyword */: + case 27 /* LessThanToken */: + case 30 /* LessThanEqualsToken */: + case 29 /* GreaterThanToken */: + case 31 /* GreaterThanEqualsToken */: + case 92 /* InKeyword */: + case 93 /* InstanceOfKeyword */: return 11; - case 31 /* EqualsEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return 10; - case 47 /* AmpersandToken */: + case 48 /* AmpersandToken */: return 9; - case 49 /* CaretToken */: + case 50 /* CaretToken */: return 8; - case 48 /* BarToken */: + case 49 /* BarToken */: return 7; - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return 6; - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return 5; - case 57 /* EqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 68 /* BarEqualsToken */: + case 58 /* EqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 69 /* BarEqualsToken */: return 3; - case 25 /* CommaToken */: + case 26 /* CommaToken */: return 0; default: return -1; } - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return 4; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return 2; - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return 1; default: return -1; @@ -9073,7 +9091,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 151 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 152 /* Constructor */ && nodeIsPresent(member.body)) { return member; } }); @@ -9101,11 +9119,11 @@ var ts; } ts.parameterIsThisKeyword = parameterIsThisKeyword; function isThisIdentifier(node) { - return node && node.kind === 70 /* Identifier */ && identifierIsThisKeyword(node); + return node && node.kind === 71 /* Identifier */ && identifierIsThisKeyword(node); } ts.isThisIdentifier = isThisIdentifier; function identifierIsThisKeyword(id) { - return id.originalKeywordKind === 98 /* ThisKeyword */; + return id.originalKeywordKind === 99 /* ThisKeyword */; } ts.identifierIsThisKeyword = identifierIsThisKeyword; function getAllAccessorDeclarations(declarations, accessor) { @@ -9115,10 +9133,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 152 /* GetAccessor */) { + if (accessor.kind === 153 /* GetAccessor */) { getAccessor = accessor; } - else if (accessor.kind === 153 /* SetAccessor */) { + else if (accessor.kind === 154 /* SetAccessor */) { setAccessor = accessor; } else { @@ -9127,7 +9145,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 152 /* GetAccessor */ || member.kind === 153 /* SetAccessor */) + if ((member.kind === 153 /* GetAccessor */ || member.kind === 154 /* SetAccessor */) && hasModifier(member, 32 /* Static */) === hasModifier(accessor, 32 /* Static */)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -9138,10 +9156,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 152 /* GetAccessor */ && !getAccessor) { + if (member.kind === 153 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 153 /* SetAccessor */ && !setAccessor) { + if (member.kind === 154 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -9368,7 +9386,7 @@ var ts; flags |= modifierToFlag(modifier.kind); } } - if (node.flags & 4 /* NestedNamespace */ || (node.kind === 70 /* Identifier */ && node.isInJSDocNamespace)) { + if (node.flags & 4 /* NestedNamespace */ || (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace)) { flags |= 1 /* Export */; } node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */; @@ -9377,35 +9395,35 @@ var ts; ts.getModifierFlags = getModifierFlags; function modifierToFlag(token) { switch (token) { - case 114 /* StaticKeyword */: return 32 /* Static */; - case 113 /* PublicKeyword */: return 4 /* Public */; - case 112 /* ProtectedKeyword */: return 16 /* Protected */; - case 111 /* PrivateKeyword */: return 8 /* Private */; - case 116 /* AbstractKeyword */: return 128 /* Abstract */; - case 83 /* ExportKeyword */: return 1 /* Export */; - case 123 /* DeclareKeyword */: return 2 /* Ambient */; - case 75 /* ConstKeyword */: return 2048 /* Const */; - case 78 /* DefaultKeyword */: return 512 /* Default */; - case 119 /* AsyncKeyword */: return 256 /* Async */; - case 130 /* ReadonlyKeyword */: return 64 /* Readonly */; + case 115 /* StaticKeyword */: return 32 /* Static */; + case 114 /* PublicKeyword */: return 4 /* Public */; + case 113 /* ProtectedKeyword */: return 16 /* Protected */; + case 112 /* PrivateKeyword */: return 8 /* Private */; + case 117 /* AbstractKeyword */: return 128 /* Abstract */; + case 84 /* ExportKeyword */: return 1 /* Export */; + case 124 /* DeclareKeyword */: return 2 /* Ambient */; + case 76 /* ConstKeyword */: return 2048 /* Const */; + case 79 /* DefaultKeyword */: return 512 /* Default */; + case 120 /* AsyncKeyword */: return 256 /* Async */; + case 131 /* ReadonlyKeyword */: return 64 /* Readonly */; } return 0 /* None */; } ts.modifierToFlag = modifierToFlag; function isLogicalOperator(token) { - return token === 53 /* BarBarToken */ - || token === 52 /* AmpersandAmpersandToken */ - || token === 50 /* ExclamationToken */; + return token === 54 /* BarBarToken */ + || token === 53 /* AmpersandAmpersandToken */ + || token === 51 /* ExclamationToken */; } ts.isLogicalOperator = isLogicalOperator; function isAssignmentOperator(token) { - return token >= 57 /* FirstAssignment */ && token <= 69 /* LastAssignment */; + return token >= 58 /* FirstAssignment */ && token <= 70 /* LastAssignment */; } ts.isAssignmentOperator = isAssignmentOperator; /** Get `C` given `N` if `N` is in the position `class C extends N` where `N` is an ExpressionWithTypeArguments. */ function tryGetClassExtendingExpressionWithTypeArguments(node) { - if (node.kind === 200 /* ExpressionWithTypeArguments */ && - node.parent.token === 84 /* ExtendsKeyword */ && + if (node.kind === 201 /* ExpressionWithTypeArguments */ && + node.parent.token === 85 /* ExtendsKeyword */ && isClassLike(node.parent.parent)) { return node.parent.parent; } @@ -9414,7 +9432,7 @@ var ts; function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment - ? node.operatorToken.kind === 57 /* EqualsToken */ + ? node.operatorToken.kind === 58 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } @@ -9422,8 +9440,8 @@ var ts; function isDestructuringAssignment(node) { if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) { var kind = node.left.kind; - return kind === 177 /* ObjectLiteralExpression */ - || kind === 176 /* ArrayLiteralExpression */; + return kind === 178 /* ObjectLiteralExpression */ + || kind === 177 /* ArrayLiteralExpression */; } return false; } @@ -9435,7 +9453,7 @@ var ts; } ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { return true; } else if (isPropertyAccessExpression(node)) { @@ -9450,31 +9468,31 @@ var ts; } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; function isExpressionWithTypeArgumentsInClassImplementsClause(node) { - return node.kind === 200 /* ExpressionWithTypeArguments */ + return node.kind === 201 /* ExpressionWithTypeArguments */ && isEntityNameExpression(node.expression) && node.parent - && node.parent.token === 107 /* ImplementsKeyword */ + && node.parent.token === 108 /* ImplementsKeyword */ && node.parent.parent && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause; function isEntityNameExpression(node) { - return node.kind === 70 /* Identifier */ || - node.kind === 178 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression); + return node.kind === 71 /* Identifier */ || + node.kind === 179 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression); } ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node); + return (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node) || + (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteral(expression) { - return expression.kind === 177 /* ObjectLiteralExpression */ && + return expression.kind === 178 /* ObjectLiteralExpression */ && expression.properties.length === 0; } ts.isEmptyObjectLiteral = isEmptyObjectLiteral; function isEmptyArrayLiteral(expression) { - return expression.kind === 176 /* ArrayLiteralExpression */ && + return expression.kind === 177 /* ArrayLiteralExpression */ && expression.elements.length === 0; } ts.isEmptyArrayLiteral = isEmptyArrayLiteral; @@ -9586,49 +9604,49 @@ var ts; var kind = node.kind; if (kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */ - || kind === 11 /* RegularExpressionLiteral */ - || kind === 12 /* NoSubstitutionTemplateLiteral */ - || kind === 70 /* Identifier */ - || kind === 98 /* ThisKeyword */ - || kind === 96 /* SuperKeyword */ - || kind === 100 /* TrueKeyword */ - || kind === 85 /* FalseKeyword */ - || kind === 94 /* NullKeyword */) { + || kind === 12 /* RegularExpressionLiteral */ + || kind === 13 /* NoSubstitutionTemplateLiteral */ + || kind === 71 /* Identifier */ + || kind === 99 /* ThisKeyword */ + || kind === 97 /* SuperKeyword */ + || kind === 101 /* TrueKeyword */ + || kind === 86 /* FalseKeyword */ + || kind === 95 /* NullKeyword */) { return true; } - else if (kind === 178 /* PropertyAccessExpression */) { + else if (kind === 179 /* PropertyAccessExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 179 /* ElementAccessExpression */) { + else if (kind === 180 /* ElementAccessExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1) && isSimpleExpressionWorker(node.argumentExpression, depth + 1); } - else if (kind === 191 /* PrefixUnaryExpression */ - || kind === 192 /* PostfixUnaryExpression */) { + else if (kind === 192 /* PrefixUnaryExpression */ + || kind === 193 /* PostfixUnaryExpression */) { return isSimpleExpressionWorker(node.operand, depth + 1); } - else if (kind === 193 /* BinaryExpression */) { - return node.operatorToken.kind !== 39 /* AsteriskAsteriskToken */ + else if (kind === 194 /* BinaryExpression */) { + return node.operatorToken.kind !== 40 /* AsteriskAsteriskToken */ && isSimpleExpressionWorker(node.left, depth + 1) && isSimpleExpressionWorker(node.right, depth + 1); } - else if (kind === 194 /* ConditionalExpression */) { + else if (kind === 195 /* ConditionalExpression */) { return isSimpleExpressionWorker(node.condition, depth + 1) && isSimpleExpressionWorker(node.whenTrue, depth + 1) && isSimpleExpressionWorker(node.whenFalse, depth + 1); } - else if (kind === 189 /* VoidExpression */ - || kind === 188 /* TypeOfExpression */ - || kind === 187 /* DeleteExpression */) { + else if (kind === 190 /* VoidExpression */ + || kind === 189 /* TypeOfExpression */ + || kind === 188 /* DeleteExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 176 /* ArrayLiteralExpression */) { + else if (kind === 177 /* ArrayLiteralExpression */) { return node.elements.length === 0; } - else if (kind === 177 /* ObjectLiteralExpression */) { + else if (kind === 178 /* ObjectLiteralExpression */) { return node.properties.length === 0; } - else if (kind === 180 /* CallExpression */) { + else if (kind === 181 /* CallExpression */) { if (!isSimpleExpressionWorker(node.expression, depth + 1)) { return false; } @@ -9806,8 +9824,8 @@ var ts; var parseNode = ts.getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -9828,7 +9846,7 @@ var ts; if (node.symbol) { for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 228 /* ClassDeclaration */ && declaration !== node) { + if (declaration.kind === 229 /* ClassDeclaration */ && declaration !== node) { return true; } } @@ -9858,15 +9876,15 @@ var ts; ts.isNodeArray = isNodeArray; // Literals function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 12 /* NoSubstitutionTemplateLiteral */; + return node.kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral; function isLiteralKind(kind) { - return 8 /* FirstLiteralToken */ <= kind && kind <= 12 /* LastLiteralToken */; + return 8 /* FirstLiteralToken */ <= kind && kind <= 13 /* LastLiteralToken */; } ts.isLiteralKind = isLiteralKind; function isTextualLiteralKind(kind) { - return kind === 9 /* StringLiteral */ || kind === 12 /* NoSubstitutionTemplateLiteral */; + return kind === 9 /* StringLiteral */ || kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isTextualLiteralKind = isTextualLiteralKind; function isLiteralExpression(node) { @@ -9875,26 +9893,26 @@ var ts; ts.isLiteralExpression = isLiteralExpression; // Pseudo-literals function isTemplateLiteralKind(kind) { - return 12 /* FirstTemplateToken */ <= kind && kind <= 15 /* LastTemplateToken */; + return 13 /* FirstTemplateToken */ <= kind && kind <= 16 /* LastTemplateToken */; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isTemplateHead(node) { - return node.kind === 13 /* TemplateHead */; + return node.kind === 14 /* TemplateHead */; } ts.isTemplateHead = isTemplateHead; function isTemplateMiddleOrTemplateTail(node) { var kind = node.kind; - return kind === 14 /* TemplateMiddle */ - || kind === 15 /* TemplateTail */; + return kind === 15 /* TemplateMiddle */ + || kind === 16 /* TemplateTail */; } ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail; // Identifiers function isIdentifier(node) { - return node.kind === 70 /* Identifier */; + return node.kind === 71 /* Identifier */; } ts.isIdentifier = isIdentifier; function isVoidExpression(node) { - return node.kind === 189 /* VoidExpression */; + return node.kind === 190 /* VoidExpression */; } ts.isVoidExpression = isVoidExpression; function isGeneratedIdentifier(node) { @@ -9909,95 +9927,95 @@ var ts; ts.isModifier = isModifier; // Names function isQualifiedName(node) { - return node.kind === 142 /* QualifiedName */; + return node.kind === 143 /* QualifiedName */; } ts.isQualifiedName = isQualifiedName; function isComputedPropertyName(node) { - return node.kind === 143 /* ComputedPropertyName */; + return node.kind === 144 /* ComputedPropertyName */; } ts.isComputedPropertyName = isComputedPropertyName; function isEntityName(node) { var kind = node.kind; - return kind === 142 /* QualifiedName */ - || kind === 70 /* Identifier */; + return kind === 143 /* QualifiedName */ + || kind === 71 /* Identifier */; } ts.isEntityName = isEntityName; function isPropertyName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ + return kind === 71 /* Identifier */ || kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */ - || kind === 143 /* ComputedPropertyName */; + || kind === 144 /* ComputedPropertyName */; } ts.isPropertyName = isPropertyName; function isModuleName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ + return kind === 71 /* Identifier */ || kind === 9 /* StringLiteral */; } ts.isModuleName = isModuleName; function isBindingName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ - || kind === 173 /* ObjectBindingPattern */ - || kind === 174 /* ArrayBindingPattern */; + return kind === 71 /* Identifier */ + || kind === 174 /* ObjectBindingPattern */ + || kind === 175 /* ArrayBindingPattern */; } ts.isBindingName = isBindingName; // Signature elements function isTypeParameter(node) { - return node.kind === 144 /* TypeParameter */; + return node.kind === 145 /* TypeParameter */; } ts.isTypeParameter = isTypeParameter; function isParameter(node) { - return node.kind === 145 /* Parameter */; + return node.kind === 146 /* Parameter */; } ts.isParameter = isParameter; function isDecorator(node) { - return node.kind === 146 /* Decorator */; + return node.kind === 147 /* Decorator */; } ts.isDecorator = isDecorator; // Type members function isMethodDeclaration(node) { - return node.kind === 150 /* MethodDeclaration */; + return node.kind === 151 /* MethodDeclaration */; } ts.isMethodDeclaration = isMethodDeclaration; function isClassElement(node) { var kind = node.kind; - return kind === 151 /* Constructor */ - || kind === 148 /* PropertyDeclaration */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 156 /* IndexSignature */ - || kind === 205 /* SemicolonClassElement */; + return kind === 152 /* Constructor */ + || kind === 149 /* PropertyDeclaration */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 157 /* IndexSignature */ + || kind === 206 /* SemicolonClassElement */; } ts.isClassElement = isClassElement; function isObjectLiteralElementLike(node) { var kind = node.kind; - return kind === 260 /* PropertyAssignment */ - || kind === 261 /* ShorthandPropertyAssignment */ - || kind === 262 /* SpreadAssignment */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 246 /* MissingDeclaration */; + return kind === 261 /* PropertyAssignment */ + || kind === 262 /* ShorthandPropertyAssignment */ + || kind === 263 /* SpreadAssignment */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 247 /* MissingDeclaration */; } ts.isObjectLiteralElementLike = isObjectLiteralElementLike; // Type function isTypeNodeKind(kind) { - return (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) - || kind === 118 /* AnyKeyword */ - || kind === 132 /* NumberKeyword */ - || kind === 133 /* ObjectKeyword */ - || kind === 121 /* BooleanKeyword */ - || kind === 135 /* StringKeyword */ - || kind === 136 /* SymbolKeyword */ - || kind === 98 /* ThisKeyword */ - || kind === 104 /* VoidKeyword */ - || kind === 138 /* UndefinedKeyword */ - || kind === 94 /* NullKeyword */ - || kind === 129 /* NeverKeyword */ - || kind === 200 /* ExpressionWithTypeArguments */; + return (kind >= 158 /* FirstTypeNode */ && kind <= 173 /* LastTypeNode */) + || kind === 119 /* AnyKeyword */ + || kind === 133 /* NumberKeyword */ + || kind === 134 /* ObjectKeyword */ + || kind === 122 /* BooleanKeyword */ + || kind === 136 /* StringKeyword */ + || kind === 137 /* SymbolKeyword */ + || kind === 99 /* ThisKeyword */ + || kind === 105 /* VoidKeyword */ + || kind === 139 /* UndefinedKeyword */ + || kind === 95 /* NullKeyword */ + || kind === 130 /* NeverKeyword */ + || kind === 201 /* ExpressionWithTypeArguments */; } /** * Node test that determines whether a node is a valid type node. @@ -10010,36 +10028,36 @@ var ts; ts.isTypeNode = isTypeNode; // Binding patterns function isArrayBindingPattern(node) { - return node.kind === 174 /* ArrayBindingPattern */; + return node.kind === 175 /* ArrayBindingPattern */; } ts.isArrayBindingPattern = isArrayBindingPattern; function isObjectBindingPattern(node) { - return node.kind === 173 /* ObjectBindingPattern */; + return node.kind === 174 /* ObjectBindingPattern */; } ts.isObjectBindingPattern = isObjectBindingPattern; function isBindingPattern(node) { if (node) { var kind = node.kind; - return kind === 174 /* ArrayBindingPattern */ - || kind === 173 /* ObjectBindingPattern */; + return kind === 175 /* ArrayBindingPattern */ + || kind === 174 /* ObjectBindingPattern */; } return false; } ts.isBindingPattern = isBindingPattern; function isAssignmentPattern(node) { var kind = node.kind; - return kind === 176 /* ArrayLiteralExpression */ - || kind === 177 /* ObjectLiteralExpression */; + return kind === 177 /* ArrayLiteralExpression */ + || kind === 178 /* ObjectLiteralExpression */; } ts.isAssignmentPattern = isAssignmentPattern; function isBindingElement(node) { - return node.kind === 175 /* BindingElement */; + return node.kind === 176 /* BindingElement */; } ts.isBindingElement = isBindingElement; function isArrayBindingElement(node) { var kind = node.kind; - return kind === 175 /* BindingElement */ - || kind === 199 /* OmittedExpression */; + return kind === 176 /* BindingElement */ + || kind === 200 /* OmittedExpression */; } ts.isArrayBindingElement = isArrayBindingElement; /** @@ -10047,9 +10065,9 @@ var ts; */ function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 176 /* BindingElement */: return true; } return false; @@ -10068,8 +10086,8 @@ var ts; */ function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 173 /* ObjectBindingPattern */: - case 177 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 178 /* ObjectLiteralExpression */: return true; } return false; @@ -10080,8 +10098,8 @@ var ts; */ function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: return true; } return false; @@ -10089,92 +10107,92 @@ var ts; ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern; // Expression function isArrayLiteralExpression(node) { - return node.kind === 176 /* ArrayLiteralExpression */; + return node.kind === 177 /* ArrayLiteralExpression */; } ts.isArrayLiteralExpression = isArrayLiteralExpression; function isObjectLiteralExpression(node) { - return node.kind === 177 /* ObjectLiteralExpression */; + return node.kind === 178 /* ObjectLiteralExpression */; } ts.isObjectLiteralExpression = isObjectLiteralExpression; function isPropertyAccessExpression(node) { - return node.kind === 178 /* PropertyAccessExpression */; + return node.kind === 179 /* PropertyAccessExpression */; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isPropertyAccessOrQualifiedName(node) { var kind = node.kind; - return kind === 178 /* PropertyAccessExpression */ - || kind === 142 /* QualifiedName */; + return kind === 179 /* PropertyAccessExpression */ + || kind === 143 /* QualifiedName */; } ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName; function isElementAccessExpression(node) { - return node.kind === 179 /* ElementAccessExpression */; + return node.kind === 180 /* ElementAccessExpression */; } ts.isElementAccessExpression = isElementAccessExpression; function isBinaryExpression(node) { - return node.kind === 193 /* BinaryExpression */; + return node.kind === 194 /* BinaryExpression */; } ts.isBinaryExpression = isBinaryExpression; function isConditionalExpression(node) { - return node.kind === 194 /* ConditionalExpression */; + return node.kind === 195 /* ConditionalExpression */; } ts.isConditionalExpression = isConditionalExpression; function isCallExpression(node) { - return node.kind === 180 /* CallExpression */; + return node.kind === 181 /* CallExpression */; } ts.isCallExpression = isCallExpression; function isTemplateLiteral(node) { var kind = node.kind; - return kind === 195 /* TemplateExpression */ - || kind === 12 /* NoSubstitutionTemplateLiteral */; + return kind === 196 /* TemplateExpression */ + || kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isTemplateLiteral = isTemplateLiteral; function isSpreadExpression(node) { - return node.kind === 197 /* SpreadElement */; + return node.kind === 198 /* SpreadElement */; } ts.isSpreadExpression = isSpreadExpression; function isExpressionWithTypeArguments(node) { - return node.kind === 200 /* ExpressionWithTypeArguments */; + return node.kind === 201 /* ExpressionWithTypeArguments */; } ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments; function isLeftHandSideExpressionKind(kind) { - return kind === 178 /* PropertyAccessExpression */ - || kind === 179 /* ElementAccessExpression */ - || kind === 181 /* NewExpression */ - || kind === 180 /* CallExpression */ - || kind === 248 /* JsxElement */ - || kind === 249 /* JsxSelfClosingElement */ - || kind === 182 /* TaggedTemplateExpression */ - || kind === 176 /* ArrayLiteralExpression */ - || kind === 184 /* ParenthesizedExpression */ - || kind === 177 /* ObjectLiteralExpression */ - || kind === 198 /* ClassExpression */ - || kind === 185 /* FunctionExpression */ - || kind === 70 /* Identifier */ - || kind === 11 /* RegularExpressionLiteral */ + return kind === 179 /* PropertyAccessExpression */ + || kind === 180 /* ElementAccessExpression */ + || kind === 182 /* NewExpression */ + || kind === 181 /* CallExpression */ + || kind === 249 /* JsxElement */ + || kind === 250 /* JsxSelfClosingElement */ + || kind === 183 /* TaggedTemplateExpression */ + || kind === 177 /* ArrayLiteralExpression */ + || kind === 185 /* ParenthesizedExpression */ + || kind === 178 /* ObjectLiteralExpression */ + || kind === 199 /* ClassExpression */ + || kind === 186 /* FunctionExpression */ + || kind === 71 /* Identifier */ + || kind === 12 /* RegularExpressionLiteral */ || kind === 8 /* NumericLiteral */ || kind === 9 /* StringLiteral */ - || kind === 12 /* NoSubstitutionTemplateLiteral */ - || kind === 195 /* TemplateExpression */ - || kind === 85 /* FalseKeyword */ - || kind === 94 /* NullKeyword */ - || kind === 98 /* ThisKeyword */ - || kind === 100 /* TrueKeyword */ - || kind === 96 /* SuperKeyword */ - || kind === 202 /* NonNullExpression */ - || kind === 203 /* MetaProperty */; + || kind === 13 /* NoSubstitutionTemplateLiteral */ + || kind === 196 /* TemplateExpression */ + || kind === 86 /* FalseKeyword */ + || kind === 95 /* NullKeyword */ + || kind === 99 /* ThisKeyword */ + || kind === 101 /* TrueKeyword */ + || kind === 97 /* SuperKeyword */ + || kind === 203 /* NonNullExpression */ + || kind === 204 /* MetaProperty */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind); } ts.isLeftHandSideExpression = isLeftHandSideExpression; function isUnaryExpressionKind(kind) { - return kind === 191 /* PrefixUnaryExpression */ - || kind === 192 /* PostfixUnaryExpression */ - || kind === 187 /* DeleteExpression */ - || kind === 188 /* TypeOfExpression */ - || kind === 189 /* VoidExpression */ - || kind === 190 /* AwaitExpression */ - || kind === 183 /* TypeAssertionExpression */ + return kind === 192 /* PrefixUnaryExpression */ + || kind === 193 /* PostfixUnaryExpression */ + || kind === 188 /* DeleteExpression */ + || kind === 189 /* TypeOfExpression */ + || kind === 190 /* VoidExpression */ + || kind === 191 /* AwaitExpression */ + || kind === 184 /* TypeAssertionExpression */ || isLeftHandSideExpressionKind(kind); } function isUnaryExpression(node) { @@ -10182,13 +10200,13 @@ var ts; } ts.isUnaryExpression = isUnaryExpression; function isExpressionKind(kind) { - return kind === 194 /* ConditionalExpression */ - || kind === 196 /* YieldExpression */ - || kind === 186 /* ArrowFunction */ - || kind === 193 /* BinaryExpression */ - || kind === 197 /* SpreadElement */ - || kind === 201 /* AsExpression */ - || kind === 199 /* OmittedExpression */ + return kind === 195 /* ConditionalExpression */ + || kind === 197 /* YieldExpression */ + || kind === 187 /* ArrowFunction */ + || kind === 194 /* BinaryExpression */ + || kind === 198 /* SpreadElement */ + || kind === 202 /* AsExpression */ + || kind === 200 /* OmittedExpression */ || isUnaryExpressionKind(kind); } function isExpression(node) { @@ -10197,16 +10215,16 @@ var ts; ts.isExpression = isExpression; function isAssertionExpression(node) { var kind = node.kind; - return kind === 183 /* TypeAssertionExpression */ - || kind === 201 /* AsExpression */; + return kind === 184 /* TypeAssertionExpression */ + || kind === 202 /* AsExpression */; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 295 /* PartiallyEmittedExpression */; + return node.kind === 296 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 294 /* NotEmittedStatement */; + return node.kind === 295 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -10215,17 +10233,17 @@ var ts; } ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode; function isOmittedExpression(node) { - return node.kind === 199 /* OmittedExpression */; + return node.kind === 200 /* OmittedExpression */; } ts.isOmittedExpression = isOmittedExpression; // Misc function isTemplateSpan(node) { - return node.kind === 204 /* TemplateSpan */; + return node.kind === 205 /* TemplateSpan */; } ts.isTemplateSpan = isTemplateSpan; // Element function isBlock(node) { - return node.kind === 206 /* Block */; + return node.kind === 207 /* Block */; } ts.isBlock = isBlock; function isConciseBody(node) { @@ -10243,135 +10261,135 @@ var ts; } ts.isForInitializer = isForInitializer; function isVariableDeclaration(node) { - return node.kind === 225 /* VariableDeclaration */; + return node.kind === 226 /* VariableDeclaration */; } ts.isVariableDeclaration = isVariableDeclaration; function isVariableDeclarationList(node) { - return node.kind === 226 /* VariableDeclarationList */; + return node.kind === 227 /* VariableDeclarationList */; } ts.isVariableDeclarationList = isVariableDeclarationList; function isCaseBlock(node) { - return node.kind === 234 /* CaseBlock */; + return node.kind === 235 /* CaseBlock */; } ts.isCaseBlock = isCaseBlock; function isModuleBody(node) { var kind = node.kind; - return kind === 233 /* ModuleBlock */ - || kind === 232 /* ModuleDeclaration */ - || kind === 70 /* Identifier */; + return kind === 234 /* ModuleBlock */ + || kind === 233 /* ModuleDeclaration */ + || kind === 71 /* Identifier */; } ts.isModuleBody = isModuleBody; function isNamespaceBody(node) { var kind = node.kind; - return kind === 233 /* ModuleBlock */ - || kind === 232 /* ModuleDeclaration */; + return kind === 234 /* ModuleBlock */ + || kind === 233 /* ModuleDeclaration */; } ts.isNamespaceBody = isNamespaceBody; function isJSDocNamespaceBody(node) { var kind = node.kind; - return kind === 70 /* Identifier */ - || kind === 232 /* ModuleDeclaration */; + return kind === 71 /* Identifier */ + || kind === 233 /* ModuleDeclaration */; } ts.isJSDocNamespaceBody = isJSDocNamespaceBody; function isImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */; + return node.kind === 237 /* ImportEqualsDeclaration */; } ts.isImportEqualsDeclaration = isImportEqualsDeclaration; function isImportClause(node) { - return node.kind === 238 /* ImportClause */; + return node.kind === 239 /* ImportClause */; } ts.isImportClause = isImportClause; function isNamedImportBindings(node) { var kind = node.kind; - return kind === 240 /* NamedImports */ - || kind === 239 /* NamespaceImport */; + return kind === 241 /* NamedImports */ + || kind === 240 /* NamespaceImport */; } ts.isNamedImportBindings = isNamedImportBindings; function isImportSpecifier(node) { - return node.kind === 241 /* ImportSpecifier */; + return node.kind === 242 /* ImportSpecifier */; } ts.isImportSpecifier = isImportSpecifier; function isNamedExports(node) { - return node.kind === 244 /* NamedExports */; + return node.kind === 245 /* NamedExports */; } ts.isNamedExports = isNamedExports; function isExportSpecifier(node) { - return node.kind === 245 /* ExportSpecifier */; + return node.kind === 246 /* ExportSpecifier */; } ts.isExportSpecifier = isExportSpecifier; function isModuleOrEnumDeclaration(node) { - return node.kind === 232 /* ModuleDeclaration */ || node.kind === 231 /* EnumDeclaration */; + return node.kind === 233 /* ModuleDeclaration */ || node.kind === 232 /* EnumDeclaration */; } ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration; function isDeclarationKind(kind) { - return kind === 186 /* ArrowFunction */ - || kind === 175 /* BindingElement */ - || kind === 228 /* ClassDeclaration */ - || kind === 198 /* ClassExpression */ - || kind === 151 /* Constructor */ - || kind === 231 /* EnumDeclaration */ - || kind === 263 /* EnumMember */ - || kind === 245 /* ExportSpecifier */ - || kind === 227 /* FunctionDeclaration */ - || kind === 185 /* FunctionExpression */ - || kind === 152 /* GetAccessor */ - || kind === 238 /* ImportClause */ - || kind === 236 /* ImportEqualsDeclaration */ - || kind === 241 /* ImportSpecifier */ - || kind === 229 /* InterfaceDeclaration */ - || kind === 252 /* JsxAttribute */ - || kind === 150 /* MethodDeclaration */ - || kind === 149 /* MethodSignature */ - || kind === 232 /* ModuleDeclaration */ - || kind === 235 /* NamespaceExportDeclaration */ - || kind === 239 /* NamespaceImport */ - || kind === 145 /* Parameter */ - || kind === 260 /* PropertyAssignment */ - || kind === 148 /* PropertyDeclaration */ - || kind === 147 /* PropertySignature */ - || kind === 153 /* SetAccessor */ - || kind === 261 /* ShorthandPropertyAssignment */ - || kind === 230 /* TypeAliasDeclaration */ - || kind === 144 /* TypeParameter */ - || kind === 225 /* VariableDeclaration */ - || kind === 289 /* JSDocTypedefTag */; + return kind === 187 /* ArrowFunction */ + || kind === 176 /* BindingElement */ + || kind === 229 /* ClassDeclaration */ + || kind === 199 /* ClassExpression */ + || kind === 152 /* Constructor */ + || kind === 232 /* EnumDeclaration */ + || kind === 264 /* EnumMember */ + || kind === 246 /* ExportSpecifier */ + || kind === 228 /* FunctionDeclaration */ + || kind === 186 /* FunctionExpression */ + || kind === 153 /* GetAccessor */ + || kind === 239 /* ImportClause */ + || kind === 237 /* ImportEqualsDeclaration */ + || kind === 242 /* ImportSpecifier */ + || kind === 230 /* InterfaceDeclaration */ + || kind === 253 /* JsxAttribute */ + || kind === 151 /* MethodDeclaration */ + || kind === 150 /* MethodSignature */ + || kind === 233 /* ModuleDeclaration */ + || kind === 236 /* NamespaceExportDeclaration */ + || kind === 240 /* NamespaceImport */ + || kind === 146 /* Parameter */ + || kind === 261 /* PropertyAssignment */ + || kind === 149 /* PropertyDeclaration */ + || kind === 148 /* PropertySignature */ + || kind === 154 /* SetAccessor */ + || kind === 262 /* ShorthandPropertyAssignment */ + || kind === 231 /* TypeAliasDeclaration */ + || kind === 145 /* TypeParameter */ + || kind === 226 /* VariableDeclaration */ + || kind === 290 /* JSDocTypedefTag */; } function isDeclarationStatementKind(kind) { - return kind === 227 /* FunctionDeclaration */ - || kind === 246 /* MissingDeclaration */ - || kind === 228 /* ClassDeclaration */ - || kind === 229 /* InterfaceDeclaration */ - || kind === 230 /* TypeAliasDeclaration */ - || kind === 231 /* EnumDeclaration */ - || kind === 232 /* ModuleDeclaration */ - || kind === 237 /* ImportDeclaration */ - || kind === 236 /* ImportEqualsDeclaration */ - || kind === 243 /* ExportDeclaration */ - || kind === 242 /* ExportAssignment */ - || kind === 235 /* NamespaceExportDeclaration */; + return kind === 228 /* FunctionDeclaration */ + || kind === 247 /* MissingDeclaration */ + || kind === 229 /* ClassDeclaration */ + || kind === 230 /* InterfaceDeclaration */ + || kind === 231 /* TypeAliasDeclaration */ + || kind === 232 /* EnumDeclaration */ + || kind === 233 /* ModuleDeclaration */ + || kind === 238 /* ImportDeclaration */ + || kind === 237 /* ImportEqualsDeclaration */ + || kind === 244 /* ExportDeclaration */ + || kind === 243 /* ExportAssignment */ + || kind === 236 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 217 /* BreakStatement */ - || kind === 216 /* ContinueStatement */ - || kind === 224 /* DebuggerStatement */ - || kind === 211 /* DoStatement */ - || kind === 209 /* ExpressionStatement */ - || kind === 208 /* EmptyStatement */ - || kind === 214 /* ForInStatement */ - || kind === 215 /* ForOfStatement */ - || kind === 213 /* ForStatement */ - || kind === 210 /* IfStatement */ - || kind === 221 /* LabeledStatement */ - || kind === 218 /* ReturnStatement */ - || kind === 220 /* SwitchStatement */ - || kind === 222 /* ThrowStatement */ - || kind === 223 /* TryStatement */ - || kind === 207 /* VariableStatement */ - || kind === 212 /* WhileStatement */ - || kind === 219 /* WithStatement */ - || kind === 294 /* NotEmittedStatement */ - || kind === 297 /* EndOfDeclarationMarker */ - || kind === 296 /* MergeDeclarationMarker */; + return kind === 218 /* BreakStatement */ + || kind === 217 /* ContinueStatement */ + || kind === 225 /* DebuggerStatement */ + || kind === 212 /* DoStatement */ + || kind === 210 /* ExpressionStatement */ + || kind === 209 /* EmptyStatement */ + || kind === 215 /* ForInStatement */ + || kind === 216 /* ForOfStatement */ + || kind === 214 /* ForStatement */ + || kind === 211 /* IfStatement */ + || kind === 222 /* LabeledStatement */ + || kind === 219 /* ReturnStatement */ + || kind === 221 /* SwitchStatement */ + || kind === 223 /* ThrowStatement */ + || kind === 224 /* TryStatement */ + || kind === 208 /* VariableStatement */ + || kind === 213 /* WhileStatement */ + || kind === 220 /* WithStatement */ + || kind === 295 /* NotEmittedStatement */ + || kind === 298 /* EndOfDeclarationMarker */ + || kind === 297 /* MergeDeclarationMarker */; } function isDeclaration(node) { return isDeclarationKind(node.kind); @@ -10392,104 +10410,104 @@ var ts; var kind = node.kind; return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) - || kind === 206 /* Block */; + || kind === 207 /* Block */; } ts.isStatement = isStatement; // Module references function isModuleReference(node) { var kind = node.kind; - return kind === 247 /* ExternalModuleReference */ - || kind === 142 /* QualifiedName */ - || kind === 70 /* Identifier */; + return kind === 248 /* ExternalModuleReference */ + || kind === 143 /* QualifiedName */ + || kind === 71 /* Identifier */; } ts.isModuleReference = isModuleReference; // JSX function isJsxOpeningElement(node) { - return node.kind === 250 /* JsxOpeningElement */; + return node.kind === 251 /* JsxOpeningElement */; } ts.isJsxOpeningElement = isJsxOpeningElement; function isJsxClosingElement(node) { - return node.kind === 251 /* JsxClosingElement */; + return node.kind === 252 /* JsxClosingElement */; } ts.isJsxClosingElement = isJsxClosingElement; function isJsxTagNameExpression(node) { var kind = node.kind; - return kind === 98 /* ThisKeyword */ - || kind === 70 /* Identifier */ - || kind === 178 /* PropertyAccessExpression */; + return kind === 99 /* ThisKeyword */ + || kind === 71 /* Identifier */ + || kind === 179 /* PropertyAccessExpression */; } ts.isJsxTagNameExpression = isJsxTagNameExpression; function isJsxChild(node) { var kind = node.kind; - return kind === 248 /* JsxElement */ - || kind === 255 /* JsxExpression */ - || kind === 249 /* JsxSelfClosingElement */ + return kind === 249 /* JsxElement */ + || kind === 256 /* JsxExpression */ + || kind === 250 /* JsxSelfClosingElement */ || kind === 10 /* JsxText */; } ts.isJsxChild = isJsxChild; function isJsxAttributes(node) { var kind = node.kind; - return kind === 253 /* JsxAttributes */; + return kind === 254 /* JsxAttributes */; } ts.isJsxAttributes = isJsxAttributes; function isJsxAttributeLike(node) { var kind = node.kind; - return kind === 252 /* JsxAttribute */ - || kind === 254 /* JsxSpreadAttribute */; + return kind === 253 /* JsxAttribute */ + || kind === 255 /* JsxSpreadAttribute */; } ts.isJsxAttributeLike = isJsxAttributeLike; function isJsxSpreadAttribute(node) { - return node.kind === 254 /* JsxSpreadAttribute */; + return node.kind === 255 /* JsxSpreadAttribute */; } ts.isJsxSpreadAttribute = isJsxSpreadAttribute; function isJsxAttribute(node) { - return node.kind === 252 /* JsxAttribute */; + return node.kind === 253 /* JsxAttribute */; } ts.isJsxAttribute = isJsxAttribute; function isStringLiteralOrJsxExpression(node) { var kind = node.kind; return kind === 9 /* StringLiteral */ - || kind === 255 /* JsxExpression */; + || kind === 256 /* JsxExpression */; } ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression; function isJsxOpeningLikeElement(node) { var kind = node.kind; - return kind === 250 /* JsxOpeningElement */ - || kind === 249 /* JsxSelfClosingElement */; + return kind === 251 /* JsxOpeningElement */ + || kind === 250 /* JsxSelfClosingElement */; } ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement; // Clauses function isCaseOrDefaultClause(node) { var kind = node.kind; - return kind === 256 /* CaseClause */ - || kind === 257 /* DefaultClause */; + return kind === 257 /* CaseClause */ + || kind === 258 /* DefaultClause */; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isHeritageClause(node) { - return node.kind === 258 /* HeritageClause */; + return node.kind === 259 /* HeritageClause */; } ts.isHeritageClause = isHeritageClause; function isCatchClause(node) { - return node.kind === 259 /* CatchClause */; + return node.kind === 260 /* CatchClause */; } ts.isCatchClause = isCatchClause; // Property assignments function isPropertyAssignment(node) { - return node.kind === 260 /* PropertyAssignment */; + return node.kind === 261 /* PropertyAssignment */; } ts.isPropertyAssignment = isPropertyAssignment; function isShorthandPropertyAssignment(node) { - return node.kind === 261 /* ShorthandPropertyAssignment */; + return node.kind === 262 /* ShorthandPropertyAssignment */; } ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment; // Enum function isEnumMember(node) { - return node.kind === 263 /* EnumMember */; + return node.kind === 264 /* EnumMember */; } ts.isEnumMember = isEnumMember; // Top-level nodes function isSourceFile(node) { - return node.kind === 264 /* SourceFile */; + return node.kind === 265 /* SourceFile */; } ts.isSourceFile = isSourceFile; function isWatchSet(options) { @@ -10720,9 +10738,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 144 /* TypeParameter */) { + if (d && d.kind === 145 /* TypeParameter */) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) { return current; } } @@ -10730,11 +10748,11 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 151 /* Constructor */ && ts.isClassLike(node.parent.parent); + return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 175 /* BindingElement */ || ts.isBindingPattern(node))) { + while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) { node = node.parent; } return node; @@ -10742,14 +10760,14 @@ var ts; function getCombinedModifierFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = ts.getModifierFlags(node); - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 226 /* VariableDeclarationList */) { + if (node && node.kind === 227 /* VariableDeclarationList */) { flags |= ts.getModifierFlags(node); node = node.parent; } - if (node && node.kind === 207 /* VariableStatement */) { + if (node && node.kind === 208 /* VariableStatement */) { flags |= ts.getModifierFlags(node); } return flags; @@ -10765,14 +10783,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 226 /* VariableDeclarationList */) { + if (node && node.kind === 227 /* VariableDeclarationList */) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 207 /* VariableStatement */) { + if (node && node.kind === 208 /* VariableStatement */) { flags |= node.flags; } return flags; @@ -10965,7 +10983,7 @@ var ts; } // Identifiers function createIdentifier(text) { - var node = createSynthesizedNode(70 /* Identifier */); + var node = createSynthesizedNode(71 /* Identifier */); node.text = ts.escapeIdentifier(text); node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */; node.autoGenerateKind = 0 /* None */; @@ -11021,28 +11039,28 @@ var ts; ts.createToken = createToken; // Reserved words function createSuper() { - return createSynthesizedNode(96 /* SuperKeyword */); + return createSynthesizedNode(97 /* SuperKeyword */); } ts.createSuper = createSuper; function createThis() { - return createSynthesizedNode(98 /* ThisKeyword */); + return createSynthesizedNode(99 /* ThisKeyword */); } ts.createThis = createThis; function createNull() { - return createSynthesizedNode(94 /* NullKeyword */); + return createSynthesizedNode(95 /* NullKeyword */); } ts.createNull = createNull; function createTrue() { - return createSynthesizedNode(100 /* TrueKeyword */); + return createSynthesizedNode(101 /* TrueKeyword */); } ts.createTrue = createTrue; function createFalse() { - return createSynthesizedNode(85 /* FalseKeyword */); + return createSynthesizedNode(86 /* FalseKeyword */); } ts.createFalse = createFalse; // Names function createQualifiedName(left, right) { - var node = createSynthesizedNode(142 /* QualifiedName */); + var node = createSynthesizedNode(143 /* QualifiedName */); node.left = left; node.right = asName(right); return node; @@ -11056,7 +11074,7 @@ var ts; } ts.updateQualifiedName = updateQualifiedName; function createComputedPropertyName(expression) { - var node = createSynthesizedNode(143 /* ComputedPropertyName */); + var node = createSynthesizedNode(144 /* ComputedPropertyName */); node.expression = expression; return node; } @@ -11084,7 +11102,7 @@ var ts; : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(159 /* FunctionType */, typeParameters, parameters, type); + return createSignatureDeclaration(160 /* FunctionType */, typeParameters, parameters, type); } ts.createFunctionTypeNode = createFunctionTypeNode; function updateFunctionTypeNode(node, typeParameters, parameters, type) { @@ -11092,7 +11110,7 @@ var ts; } ts.updateFunctionTypeNode = updateFunctionTypeNode; function createConstructorTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(160 /* ConstructorType */, typeParameters, parameters, type); + return createSignatureDeclaration(161 /* ConstructorType */, typeParameters, parameters, type); } ts.createConstructorTypeNode = createConstructorTypeNode; function updateConstructorTypeNode(node, typeParameters, parameters, type) { @@ -11100,7 +11118,7 @@ var ts; } ts.updateConstructorTypeNode = updateConstructorTypeNode; function createCallSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(154 /* CallSignature */, typeParameters, parameters, type); + return createSignatureDeclaration(155 /* CallSignature */, typeParameters, parameters, type); } ts.createCallSignatureDeclaration = createCallSignatureDeclaration; function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { @@ -11108,7 +11126,7 @@ var ts; } ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration; function createConstructSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(155 /* ConstructSignature */, typeParameters, parameters, type); + return createSignatureDeclaration(156 /* ConstructSignature */, typeParameters, parameters, type); } ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration; function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { @@ -11116,7 +11134,7 @@ var ts; } ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration; function createMethodSignature(typeParameters, parameters, type, name, questionToken) { - var methodSignature = createSignatureDeclaration(149 /* MethodSignature */, typeParameters, parameters, type); + var methodSignature = createSignatureDeclaration(150 /* MethodSignature */, typeParameters, parameters, type); methodSignature.name = asName(name); methodSignature.questionToken = questionToken; return methodSignature; @@ -11138,11 +11156,11 @@ var ts; } ts.createKeywordTypeNode = createKeywordTypeNode; function createThisTypeNode() { - return createSynthesizedNode(168 /* ThisType */); + return createSynthesizedNode(169 /* ThisType */); } ts.createThisTypeNode = createThisTypeNode; function createLiteralTypeNode(literal) { - var literalTypeNode = createSynthesizedNode(172 /* LiteralType */); + var literalTypeNode = createSynthesizedNode(173 /* LiteralType */); literalTypeNode.literal = literal; return literalTypeNode; } @@ -11154,7 +11172,7 @@ var ts; } ts.updateLiteralTypeNode = updateLiteralTypeNode; function createTypeReferenceNode(typeName, typeArguments) { - var typeReference = createSynthesizedNode(158 /* TypeReference */); + var typeReference = createSynthesizedNode(159 /* TypeReference */); typeReference.typeName = asName(typeName); typeReference.typeArguments = asNodeArray(typeArguments); return typeReference; @@ -11168,7 +11186,7 @@ var ts; } ts.updateTypeReferenceNode = updateTypeReferenceNode; function createTypePredicateNode(parameterName, type) { - var typePredicateNode = createSynthesizedNode(157 /* TypePredicate */); + var typePredicateNode = createSynthesizedNode(158 /* TypePredicate */); typePredicateNode.parameterName = asName(parameterName); typePredicateNode.type = type; return typePredicateNode; @@ -11182,7 +11200,7 @@ var ts; } ts.updateTypePredicateNode = updateTypePredicateNode; function createTypeQueryNode(exprName) { - var typeQueryNode = createSynthesizedNode(161 /* TypeQuery */); + var typeQueryNode = createSynthesizedNode(162 /* TypeQuery */); typeQueryNode.exprName = exprName; return typeQueryNode; } @@ -11192,7 +11210,7 @@ var ts; } ts.updateTypeQueryNode = updateTypeQueryNode; function createArrayTypeNode(elementType) { - var arrayTypeNode = createSynthesizedNode(163 /* ArrayType */); + var arrayTypeNode = createSynthesizedNode(164 /* ArrayType */); arrayTypeNode.elementType = elementType; return arrayTypeNode; } @@ -11216,7 +11234,7 @@ var ts; } ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode; function createTypeLiteralNode(members) { - var typeLiteralNode = createSynthesizedNode(162 /* TypeLiteral */); + var typeLiteralNode = createSynthesizedNode(163 /* TypeLiteral */); typeLiteralNode.members = createNodeArray(members); return typeLiteralNode; } @@ -11228,7 +11246,7 @@ var ts; } ts.updateTypeLiteralNode = updateTypeLiteralNode; function createTupleTypeNode(elementTypes) { - var tupleTypeNode = createSynthesizedNode(164 /* TupleType */); + var tupleTypeNode = createSynthesizedNode(165 /* TupleType */); tupleTypeNode.elementTypes = createNodeArray(elementTypes); return tupleTypeNode; } @@ -11240,7 +11258,7 @@ var ts; } ts.updateTypleTypeNode = updateTypleTypeNode; function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) { - var mappedTypeNode = createSynthesizedNode(171 /* MappedType */); + var mappedTypeNode = createSynthesizedNode(172 /* MappedType */); mappedTypeNode.readonlyToken = readonlyToken; mappedTypeNode.typeParameter = typeParameter; mappedTypeNode.questionToken = questionToken; @@ -11258,8 +11276,8 @@ var ts; } ts.updateMappedTypeNode = updateMappedTypeNode; function createTypeOperatorNode(type) { - var typeOperatorNode = createSynthesizedNode(169 /* TypeOperator */); - typeOperatorNode.operator = 126 /* KeyOfKeyword */; + var typeOperatorNode = createSynthesizedNode(170 /* TypeOperator */); + typeOperatorNode.operator = 127 /* KeyOfKeyword */; typeOperatorNode.type = type; return typeOperatorNode; } @@ -11269,7 +11287,7 @@ var ts; } ts.updateTypeOperatorNode = updateTypeOperatorNode; function createIndexedAccessTypeNode(objectType, indexType) { - var indexedAccessTypeNode = createSynthesizedNode(170 /* IndexedAccessType */); + var indexedAccessTypeNode = createSynthesizedNode(171 /* IndexedAccessType */); indexedAccessTypeNode.objectType = objectType; indexedAccessTypeNode.indexType = indexType; return indexedAccessTypeNode; @@ -11284,7 +11302,7 @@ var ts; ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode; // Type Declarations function createTypeParameterDeclaration(name, constraint, defaultType) { - var typeParameter = createSynthesizedNode(144 /* TypeParameter */); + var typeParameter = createSynthesizedNode(145 /* TypeParameter */); typeParameter.name = asName(name); typeParameter.constraint = constraint; typeParameter.default = defaultType; @@ -11301,7 +11319,7 @@ var ts; ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration; // Signature elements function createPropertySignature(name, questionToken, type, initializer) { - var propertySignature = createSynthesizedNode(147 /* PropertySignature */); + var propertySignature = createSynthesizedNode(148 /* PropertySignature */); propertySignature.name = asName(name); propertySignature.questionToken = questionToken; propertySignature.type = type; @@ -11319,7 +11337,7 @@ var ts; } ts.updatePropertySignature = updatePropertySignature; function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) { - var indexSignature = createSynthesizedNode(156 /* IndexSignature */); + var indexSignature = createSynthesizedNode(157 /* IndexSignature */); indexSignature.decorators = asNodeArray(decorators); indexSignature.modifiers = asNodeArray(modifiers); indexSignature.parameters = createNodeArray(parameters); @@ -11338,7 +11356,7 @@ var ts; ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration; // Signature elements function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - var node = createSynthesizedNode(145 /* Parameter */); + var node = createSynthesizedNode(146 /* Parameter */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; @@ -11362,7 +11380,7 @@ var ts; } ts.updateParameter = updateParameter; function createDecorator(expression) { - var node = createSynthesizedNode(146 /* Decorator */); + var node = createSynthesizedNode(147 /* Decorator */); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -11375,7 +11393,7 @@ var ts; ts.updateDecorator = updateDecorator; // Type members function createProperty(decorators, modifiers, name, questionToken, type, initializer) { - var node = createSynthesizedNode(148 /* PropertyDeclaration */); + var node = createSynthesizedNode(149 /* PropertyDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11396,7 +11414,7 @@ var ts; } ts.updateProperty = updateProperty; function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(150 /* MethodDeclaration */); + var node = createSynthesizedNode(151 /* MethodDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -11423,7 +11441,7 @@ var ts; } ts.updateMethod = updateMethod; function createConstructor(decorators, modifiers, parameters, body) { - var node = createSynthesizedNode(151 /* Constructor */); + var node = createSynthesizedNode(152 /* Constructor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.typeParameters = undefined; @@ -11443,7 +11461,7 @@ var ts; } ts.updateConstructor = updateConstructor; function createGetAccessor(decorators, modifiers, name, parameters, type, body) { - var node = createSynthesizedNode(152 /* GetAccessor */); + var node = createSynthesizedNode(153 /* GetAccessor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11466,7 +11484,7 @@ var ts; } ts.updateGetAccessor = updateGetAccessor; function createSetAccessor(decorators, modifiers, name, parameters, body) { - var node = createSynthesizedNode(153 /* SetAccessor */); + var node = createSynthesizedNode(154 /* SetAccessor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11488,7 +11506,7 @@ var ts; ts.updateSetAccessor = updateSetAccessor; // Binding Patterns function createObjectBindingPattern(elements) { - var node = createSynthesizedNode(173 /* ObjectBindingPattern */); + var node = createSynthesizedNode(174 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); return node; } @@ -11500,7 +11518,7 @@ var ts; } ts.updateObjectBindingPattern = updateObjectBindingPattern; function createArrayBindingPattern(elements) { - var node = createSynthesizedNode(174 /* ArrayBindingPattern */); + var node = createSynthesizedNode(175 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); return node; } @@ -11512,7 +11530,7 @@ var ts; } ts.updateArrayBindingPattern = updateArrayBindingPattern; function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - var node = createSynthesizedNode(175 /* BindingElement */); + var node = createSynthesizedNode(176 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -11531,7 +11549,7 @@ var ts; ts.updateBindingElement = updateBindingElement; // Expression function createArrayLiteral(elements, multiLine) { - var node = createSynthesizedNode(176 /* ArrayLiteralExpression */); + var node = createSynthesizedNode(177 /* ArrayLiteralExpression */); node.elements = ts.parenthesizeListElements(createNodeArray(elements)); if (multiLine) { node.multiLine = true; @@ -11546,7 +11564,7 @@ var ts; } ts.updateArrayLiteral = updateArrayLiteral; function createObjectLiteral(properties, multiLine) { - var node = createSynthesizedNode(177 /* ObjectLiteralExpression */); + var node = createSynthesizedNode(178 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); if (multiLine) { node.multiLine = true; @@ -11561,7 +11579,7 @@ var ts; } ts.updateObjectLiteral = updateObjectLiteral; function createPropertyAccess(expression, name) { - var node = createSynthesizedNode(178 /* PropertyAccessExpression */); + var node = createSynthesizedNode(179 /* PropertyAccessExpression */); node.expression = ts.parenthesizeForAccess(expression); node.name = asName(name); setEmitFlags(node, 65536 /* NoIndentation */); @@ -11578,7 +11596,7 @@ var ts; } ts.updatePropertyAccess = updatePropertyAccess; function createElementAccess(expression, index) { - var node = createSynthesizedNode(179 /* ElementAccessExpression */); + var node = createSynthesizedNode(180 /* ElementAccessExpression */); node.expression = ts.parenthesizeForAccess(expression); node.argumentExpression = asExpression(index); return node; @@ -11592,7 +11610,7 @@ var ts; } ts.updateElementAccess = updateElementAccess; function createCall(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(180 /* CallExpression */); + var node = createSynthesizedNode(181 /* CallExpression */); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray)); @@ -11608,7 +11626,7 @@ var ts; } ts.updateCall = updateCall; function createNew(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(181 /* NewExpression */); + var node = createSynthesizedNode(182 /* NewExpression */); node.expression = ts.parenthesizeForNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined; @@ -11624,7 +11642,7 @@ var ts; } ts.updateNew = updateNew; function createTaggedTemplate(tag, template) { - var node = createSynthesizedNode(182 /* TaggedTemplateExpression */); + var node = createSynthesizedNode(183 /* TaggedTemplateExpression */); node.tag = ts.parenthesizeForAccess(tag); node.template = template; return node; @@ -11638,7 +11656,7 @@ var ts; } ts.updateTaggedTemplate = updateTaggedTemplate; function createTypeAssertion(type, expression) { - var node = createSynthesizedNode(183 /* TypeAssertionExpression */); + var node = createSynthesizedNode(184 /* TypeAssertionExpression */); node.type = type; node.expression = ts.parenthesizePrefixOperand(expression); return node; @@ -11652,7 +11670,7 @@ var ts; } ts.updateTypeAssertion = updateTypeAssertion; function createParen(expression) { - var node = createSynthesizedNode(184 /* ParenthesizedExpression */); + var node = createSynthesizedNode(185 /* ParenthesizedExpression */); node.expression = expression; return node; } @@ -11664,7 +11682,7 @@ var ts; } ts.updateParen = updateParen; function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(185 /* FunctionExpression */); + var node = createSynthesizedNode(186 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -11688,12 +11706,12 @@ var ts; } ts.updateFunctionExpression = updateFunctionExpression; function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - var node = createSynthesizedNode(186 /* ArrowFunction */); + var node = createSynthesizedNode(187 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35 /* EqualsGreaterThanToken */); + node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(36 /* EqualsGreaterThanToken */); node.body = ts.parenthesizeConciseBody(body); return node; } @@ -11709,7 +11727,7 @@ var ts; } ts.updateArrowFunction = updateArrowFunction; function createDelete(expression) { - var node = createSynthesizedNode(187 /* DeleteExpression */); + var node = createSynthesizedNode(188 /* DeleteExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11721,7 +11739,7 @@ var ts; } ts.updateDelete = updateDelete; function createTypeOf(expression) { - var node = createSynthesizedNode(188 /* TypeOfExpression */); + var node = createSynthesizedNode(189 /* TypeOfExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11733,7 +11751,7 @@ var ts; } ts.updateTypeOf = updateTypeOf; function createVoid(expression) { - var node = createSynthesizedNode(189 /* VoidExpression */); + var node = createSynthesizedNode(190 /* VoidExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11745,7 +11763,7 @@ var ts; } ts.updateVoid = updateVoid; function createAwait(expression) { - var node = createSynthesizedNode(190 /* AwaitExpression */); + var node = createSynthesizedNode(191 /* AwaitExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11757,7 +11775,7 @@ var ts; } ts.updateAwait = updateAwait; function createPrefix(operator, operand) { - var node = createSynthesizedNode(191 /* PrefixUnaryExpression */); + var node = createSynthesizedNode(192 /* PrefixUnaryExpression */); node.operator = operator; node.operand = ts.parenthesizePrefixOperand(operand); return node; @@ -11770,7 +11788,7 @@ var ts; } ts.updatePrefix = updatePrefix; function createPostfix(operand, operator) { - var node = createSynthesizedNode(192 /* PostfixUnaryExpression */); + var node = createSynthesizedNode(193 /* PostfixUnaryExpression */); node.operand = ts.parenthesizePostfixOperand(operand); node.operator = operator; return node; @@ -11783,7 +11801,7 @@ var ts; } ts.updatePostfix = updatePostfix; function createBinary(left, operator, right) { - var node = createSynthesizedNode(193 /* BinaryExpression */); + var node = createSynthesizedNode(194 /* BinaryExpression */); var operatorToken = asToken(operator); var operatorKind = operatorToken.kind; node.left = ts.parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined); @@ -11800,11 +11818,11 @@ var ts; } ts.updateBinary = updateBinary; function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) { - var node = createSynthesizedNode(194 /* ConditionalExpression */); + var node = createSynthesizedNode(195 /* ConditionalExpression */); node.condition = ts.parenthesizeForConditionalHead(condition); - node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54 /* QuestionToken */); + node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(55 /* QuestionToken */); node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue); - node.colonToken = whenFalse ? colonToken : createToken(55 /* ColonToken */); + node.colonToken = whenFalse ? colonToken : createToken(56 /* ColonToken */); node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse); return node; } @@ -11818,7 +11836,7 @@ var ts; } ts.updateConditional = updateConditional; function createTemplateExpression(head, templateSpans) { - var node = createSynthesizedNode(195 /* TemplateExpression */); + var node = createSynthesizedNode(196 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); return node; @@ -11832,9 +11850,9 @@ var ts; } ts.updateTemplateExpression = updateTemplateExpression; function createYield(asteriskTokenOrExpression, expression) { - var node = createSynthesizedNode(196 /* YieldExpression */); - node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined; - node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 /* AsteriskToken */ ? asteriskTokenOrExpression : expression; + var node = createSynthesizedNode(197 /* YieldExpression */); + node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 39 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined; + node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 39 /* AsteriskToken */ ? asteriskTokenOrExpression : expression; return node; } ts.createYield = createYield; @@ -11846,7 +11864,7 @@ var ts; } ts.updateYield = updateYield; function createSpread(expression) { - var node = createSynthesizedNode(197 /* SpreadElement */); + var node = createSynthesizedNode(198 /* SpreadElement */); node.expression = ts.parenthesizeExpressionForList(expression); return node; } @@ -11858,7 +11876,7 @@ var ts; } ts.updateSpread = updateSpread; function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(198 /* ClassExpression */); + var node = createSynthesizedNode(199 /* ClassExpression */); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11879,11 +11897,11 @@ var ts; } ts.updateClassExpression = updateClassExpression; function createOmittedExpression() { - return createSynthesizedNode(199 /* OmittedExpression */); + return createSynthesizedNode(200 /* OmittedExpression */); } ts.createOmittedExpression = createOmittedExpression; function createExpressionWithTypeArguments(typeArguments, expression) { - var node = createSynthesizedNode(200 /* ExpressionWithTypeArguments */); + var node = createSynthesizedNode(201 /* ExpressionWithTypeArguments */); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); return node; @@ -11897,7 +11915,7 @@ var ts; } ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments; function createAsExpression(expression, type) { - var node = createSynthesizedNode(201 /* AsExpression */); + var node = createSynthesizedNode(202 /* AsExpression */); node.expression = expression; node.type = type; return node; @@ -11911,7 +11929,7 @@ var ts; } ts.updateAsExpression = updateAsExpression; function createNonNullExpression(expression) { - var node = createSynthesizedNode(202 /* NonNullExpression */); + var node = createSynthesizedNode(203 /* NonNullExpression */); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -11924,7 +11942,7 @@ var ts; ts.updateNonNullExpression = updateNonNullExpression; // Misc function createTemplateSpan(expression, literal) { - var node = createSynthesizedNode(204 /* TemplateSpan */); + var node = createSynthesizedNode(205 /* TemplateSpan */); node.expression = expression; node.literal = literal; return node; @@ -11939,7 +11957,7 @@ var ts; ts.updateTemplateSpan = updateTemplateSpan; // Element function createBlock(statements, multiLine) { - var block = createSynthesizedNode(206 /* Block */); + var block = createSynthesizedNode(207 /* Block */); block.statements = createNodeArray(statements); if (multiLine) block.multiLine = multiLine; @@ -11953,7 +11971,7 @@ var ts; } ts.updateBlock = updateBlock; function createVariableStatement(modifiers, declarationList) { - var node = createSynthesizedNode(207 /* VariableStatement */); + var node = createSynthesizedNode(208 /* VariableStatement */); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; @@ -11968,7 +11986,7 @@ var ts; } ts.updateVariableStatement = updateVariableStatement; function createVariableDeclarationList(declarations, flags) { - var node = createSynthesizedNode(226 /* VariableDeclarationList */); + var node = createSynthesizedNode(227 /* VariableDeclarationList */); node.flags |= flags; node.declarations = createNodeArray(declarations); return node; @@ -11981,7 +11999,7 @@ var ts; } ts.updateVariableDeclarationList = updateVariableDeclarationList; function createVariableDeclaration(name, type, initializer) { - var node = createSynthesizedNode(225 /* VariableDeclaration */); + var node = createSynthesizedNode(226 /* VariableDeclaration */); node.name = asName(name); node.type = type; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -11997,11 +12015,11 @@ var ts; } ts.updateVariableDeclaration = updateVariableDeclaration; function createEmptyStatement() { - return createSynthesizedNode(208 /* EmptyStatement */); + return createSynthesizedNode(209 /* EmptyStatement */); } ts.createEmptyStatement = createEmptyStatement; function createStatement(expression) { - var node = createSynthesizedNode(209 /* ExpressionStatement */); + var node = createSynthesizedNode(210 /* ExpressionStatement */); node.expression = ts.parenthesizeExpressionForExpressionStatement(expression); return node; } @@ -12013,7 +12031,7 @@ var ts; } ts.updateStatement = updateStatement; function createIf(expression, thenStatement, elseStatement) { - var node = createSynthesizedNode(210 /* IfStatement */); + var node = createSynthesizedNode(211 /* IfStatement */); node.expression = expression; node.thenStatement = thenStatement; node.elseStatement = elseStatement; @@ -12029,7 +12047,7 @@ var ts; } ts.updateIf = updateIf; function createDo(statement, expression) { - var node = createSynthesizedNode(211 /* DoStatement */); + var node = createSynthesizedNode(212 /* DoStatement */); node.statement = statement; node.expression = expression; return node; @@ -12043,7 +12061,7 @@ var ts; } ts.updateDo = updateDo; function createWhile(expression, statement) { - var node = createSynthesizedNode(212 /* WhileStatement */); + var node = createSynthesizedNode(213 /* WhileStatement */); node.expression = expression; node.statement = statement; return node; @@ -12057,7 +12075,7 @@ var ts; } ts.updateWhile = updateWhile; function createFor(initializer, condition, incrementor, statement) { - var node = createSynthesizedNode(213 /* ForStatement */); + var node = createSynthesizedNode(214 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -12075,7 +12093,7 @@ var ts; } ts.updateFor = updateFor; function createForIn(initializer, expression, statement) { - var node = createSynthesizedNode(214 /* ForInStatement */); + var node = createSynthesizedNode(215 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = statement; @@ -12091,7 +12109,7 @@ var ts; } ts.updateForIn = updateForIn; function createForOf(awaitModifier, initializer, expression, statement) { - var node = createSynthesizedNode(215 /* ForOfStatement */); + var node = createSynthesizedNode(216 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; @@ -12109,7 +12127,7 @@ var ts; } ts.updateForOf = updateForOf; function createContinue(label) { - var node = createSynthesizedNode(216 /* ContinueStatement */); + var node = createSynthesizedNode(217 /* ContinueStatement */); node.label = asName(label); return node; } @@ -12121,7 +12139,7 @@ var ts; } ts.updateContinue = updateContinue; function createBreak(label) { - var node = createSynthesizedNode(217 /* BreakStatement */); + var node = createSynthesizedNode(218 /* BreakStatement */); node.label = asName(label); return node; } @@ -12133,7 +12151,7 @@ var ts; } ts.updateBreak = updateBreak; function createReturn(expression) { - var node = createSynthesizedNode(218 /* ReturnStatement */); + var node = createSynthesizedNode(219 /* ReturnStatement */); node.expression = expression; return node; } @@ -12145,7 +12163,7 @@ var ts; } ts.updateReturn = updateReturn; function createWith(expression, statement) { - var node = createSynthesizedNode(219 /* WithStatement */); + var node = createSynthesizedNode(220 /* WithStatement */); node.expression = expression; node.statement = statement; return node; @@ -12159,7 +12177,7 @@ var ts; } ts.updateWith = updateWith; function createSwitch(expression, caseBlock) { - var node = createSynthesizedNode(220 /* SwitchStatement */); + var node = createSynthesizedNode(221 /* SwitchStatement */); node.expression = ts.parenthesizeExpressionForList(expression); node.caseBlock = caseBlock; return node; @@ -12173,7 +12191,7 @@ var ts; } ts.updateSwitch = updateSwitch; function createLabel(label, statement) { - var node = createSynthesizedNode(221 /* LabeledStatement */); + var node = createSynthesizedNode(222 /* LabeledStatement */); node.label = asName(label); node.statement = statement; return node; @@ -12187,7 +12205,7 @@ var ts; } ts.updateLabel = updateLabel; function createThrow(expression) { - var node = createSynthesizedNode(222 /* ThrowStatement */); + var node = createSynthesizedNode(223 /* ThrowStatement */); node.expression = expression; return node; } @@ -12199,7 +12217,7 @@ var ts; } ts.updateThrow = updateThrow; function createTry(tryBlock, catchClause, finallyBlock) { - var node = createSynthesizedNode(223 /* TryStatement */); + var node = createSynthesizedNode(224 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -12215,7 +12233,7 @@ var ts; } ts.updateTry = updateTry; function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(227 /* FunctionDeclaration */); + var node = createSynthesizedNode(228 /* FunctionDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -12241,7 +12259,7 @@ var ts; } ts.updateFunctionDeclaration = updateFunctionDeclaration; function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(228 /* ClassDeclaration */); + var node = createSynthesizedNode(229 /* ClassDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12263,7 +12281,7 @@ var ts; } ts.updateClassDeclaration = updateClassDeclaration; function createEnumDeclaration(decorators, modifiers, name, members) { - var node = createSynthesizedNode(231 /* EnumDeclaration */); + var node = createSynthesizedNode(232 /* EnumDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12281,7 +12299,7 @@ var ts; } ts.updateEnumDeclaration = updateEnumDeclaration; function createModuleDeclaration(decorators, modifiers, name, body, flags) { - var node = createSynthesizedNode(232 /* ModuleDeclaration */); + var node = createSynthesizedNode(233 /* ModuleDeclaration */); node.flags |= flags; node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); @@ -12300,7 +12318,7 @@ var ts; } ts.updateModuleDeclaration = updateModuleDeclaration; function createModuleBlock(statements) { - var node = createSynthesizedNode(233 /* ModuleBlock */); + var node = createSynthesizedNode(234 /* ModuleBlock */); node.statements = createNodeArray(statements); return node; } @@ -12312,7 +12330,7 @@ var ts; } ts.updateModuleBlock = updateModuleBlock; function createCaseBlock(clauses) { - var node = createSynthesizedNode(234 /* CaseBlock */); + var node = createSynthesizedNode(235 /* CaseBlock */); node.clauses = createNodeArray(clauses); return node; } @@ -12324,7 +12342,7 @@ var ts; } ts.updateCaseBlock = updateCaseBlock; function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) { - var node = createSynthesizedNode(236 /* ImportEqualsDeclaration */); + var node = createSynthesizedNode(237 /* ImportEqualsDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12342,7 +12360,7 @@ var ts; } ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration; function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) { - var node = createSynthesizedNode(237 /* ImportDeclaration */); + var node = createSynthesizedNode(238 /* ImportDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; @@ -12359,7 +12377,7 @@ var ts; } ts.updateImportDeclaration = updateImportDeclaration; function createImportClause(name, namedBindings) { - var node = createSynthesizedNode(238 /* ImportClause */); + var node = createSynthesizedNode(239 /* ImportClause */); node.name = name; node.namedBindings = namedBindings; return node; @@ -12373,7 +12391,7 @@ var ts; } ts.updateImportClause = updateImportClause; function createNamespaceImport(name) { - var node = createSynthesizedNode(239 /* NamespaceImport */); + var node = createSynthesizedNode(240 /* NamespaceImport */); node.name = name; return node; } @@ -12385,7 +12403,7 @@ var ts; } ts.updateNamespaceImport = updateNamespaceImport; function createNamedImports(elements) { - var node = createSynthesizedNode(240 /* NamedImports */); + var node = createSynthesizedNode(241 /* NamedImports */); node.elements = createNodeArray(elements); return node; } @@ -12397,7 +12415,7 @@ var ts; } ts.updateNamedImports = updateNamedImports; function createImportSpecifier(propertyName, name) { - var node = createSynthesizedNode(241 /* ImportSpecifier */); + var node = createSynthesizedNode(242 /* ImportSpecifier */); node.propertyName = propertyName; node.name = name; return node; @@ -12411,7 +12429,7 @@ var ts; } ts.updateImportSpecifier = updateImportSpecifier; function createExportAssignment(decorators, modifiers, isExportEquals, expression) { - var node = createSynthesizedNode(242 /* ExportAssignment */); + var node = createSynthesizedNode(243 /* ExportAssignment */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; @@ -12428,7 +12446,7 @@ var ts; } ts.updateExportAssignment = updateExportAssignment; function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) { - var node = createSynthesizedNode(243 /* ExportDeclaration */); + var node = createSynthesizedNode(244 /* ExportDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.exportClause = exportClause; @@ -12446,7 +12464,7 @@ var ts; } ts.updateExportDeclaration = updateExportDeclaration; function createNamedExports(elements) { - var node = createSynthesizedNode(244 /* NamedExports */); + var node = createSynthesizedNode(245 /* NamedExports */); node.elements = createNodeArray(elements); return node; } @@ -12458,7 +12476,7 @@ var ts; } ts.updateNamedExports = updateNamedExports; function createExportSpecifier(propertyName, name) { - var node = createSynthesizedNode(245 /* ExportSpecifier */); + var node = createSynthesizedNode(246 /* ExportSpecifier */); node.propertyName = asName(propertyName); node.name = asName(name); return node; @@ -12473,7 +12491,7 @@ var ts; ts.updateExportSpecifier = updateExportSpecifier; // Module references function createExternalModuleReference(expression) { - var node = createSynthesizedNode(247 /* ExternalModuleReference */); + var node = createSynthesizedNode(248 /* ExternalModuleReference */); node.expression = expression; return node; } @@ -12486,7 +12504,7 @@ var ts; ts.updateExternalModuleReference = updateExternalModuleReference; // JSX function createJsxElement(openingElement, children, closingElement) { - var node = createSynthesizedNode(248 /* JsxElement */); + var node = createSynthesizedNode(249 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -12502,7 +12520,7 @@ var ts; } ts.updateJsxElement = updateJsxElement; function createJsxSelfClosingElement(tagName, attributes) { - var node = createSynthesizedNode(249 /* JsxSelfClosingElement */); + var node = createSynthesizedNode(250 /* JsxSelfClosingElement */); node.tagName = tagName; node.attributes = attributes; return node; @@ -12516,7 +12534,7 @@ var ts; } ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement; function createJsxOpeningElement(tagName, attributes) { - var node = createSynthesizedNode(250 /* JsxOpeningElement */); + var node = createSynthesizedNode(251 /* JsxOpeningElement */); node.tagName = tagName; node.attributes = attributes; return node; @@ -12530,7 +12548,7 @@ var ts; } ts.updateJsxOpeningElement = updateJsxOpeningElement; function createJsxClosingElement(tagName) { - var node = createSynthesizedNode(251 /* JsxClosingElement */); + var node = createSynthesizedNode(252 /* JsxClosingElement */); node.tagName = tagName; return node; } @@ -12542,7 +12560,7 @@ var ts; } ts.updateJsxClosingElement = updateJsxClosingElement; function createJsxAttributes(properties) { - var jsxAttributes = createSynthesizedNode(253 /* JsxAttributes */); + var jsxAttributes = createSynthesizedNode(254 /* JsxAttributes */); jsxAttributes.properties = createNodeArray(properties); return jsxAttributes; } @@ -12555,7 +12573,7 @@ var ts; } ts.updateJsxAttributes = updateJsxAttributes; function createJsxAttribute(name, initializer) { - var node = createSynthesizedNode(252 /* JsxAttribute */); + var node = createSynthesizedNode(253 /* JsxAttribute */); node.name = name; node.initializer = initializer; return node; @@ -12569,7 +12587,7 @@ var ts; } ts.updateJsxAttribute = updateJsxAttribute; function createJsxSpreadAttribute(expression) { - var node = createSynthesizedNode(254 /* JsxSpreadAttribute */); + var node = createSynthesizedNode(255 /* JsxSpreadAttribute */); node.expression = expression; return node; } @@ -12581,7 +12599,7 @@ var ts; } ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute; function createJsxExpression(dotDotDotToken, expression) { - var node = createSynthesizedNode(255 /* JsxExpression */); + var node = createSynthesizedNode(256 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; return node; @@ -12595,7 +12613,7 @@ var ts; ts.updateJsxExpression = updateJsxExpression; // Clauses function createHeritageClause(token, types) { - var node = createSynthesizedNode(258 /* HeritageClause */); + var node = createSynthesizedNode(259 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); return node; @@ -12609,7 +12627,7 @@ var ts; } ts.updateHeritageClause = updateHeritageClause; function createCaseClause(expression, statements) { - var node = createSynthesizedNode(256 /* CaseClause */); + var node = createSynthesizedNode(257 /* CaseClause */); node.expression = ts.parenthesizeExpressionForList(expression); node.statements = createNodeArray(statements); return node; @@ -12623,7 +12641,7 @@ var ts; } ts.updateCaseClause = updateCaseClause; function createDefaultClause(statements) { - var node = createSynthesizedNode(257 /* DefaultClause */); + var node = createSynthesizedNode(258 /* DefaultClause */); node.statements = createNodeArray(statements); return node; } @@ -12636,7 +12654,7 @@ var ts; } ts.updateDefaultClause = updateDefaultClause; function createCatchClause(variableDeclaration, block) { - var node = createSynthesizedNode(259 /* CatchClause */); + var node = createSynthesizedNode(260 /* CatchClause */); node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration; node.block = block; return node; @@ -12651,7 +12669,7 @@ var ts; ts.updateCatchClause = updateCatchClause; // Property assignments function createPropertyAssignment(name, initializer) { - var node = createSynthesizedNode(260 /* PropertyAssignment */); + var node = createSynthesizedNode(261 /* PropertyAssignment */); node.name = asName(name); node.questionToken = undefined; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -12666,7 +12684,7 @@ var ts; } ts.updatePropertyAssignment = updatePropertyAssignment; function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - var node = createSynthesizedNode(261 /* ShorthandPropertyAssignment */); + var node = createSynthesizedNode(262 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined; return node; @@ -12680,7 +12698,7 @@ var ts; } ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment; function createSpreadAssignment(expression) { - var node = createSynthesizedNode(262 /* SpreadAssignment */); + var node = createSynthesizedNode(263 /* SpreadAssignment */); node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined; return node; } @@ -12694,7 +12712,7 @@ var ts; ts.updateSpreadAssignment = updateSpreadAssignment; // Enum function createEnumMember(name, initializer) { - var node = createSynthesizedNode(263 /* EnumMember */); + var node = createSynthesizedNode(264 /* EnumMember */); node.name = asName(name); node.initializer = initializer && ts.parenthesizeExpressionForList(initializer); return node; @@ -12710,7 +12728,7 @@ var ts; // Top-level nodes function updateSourceFileNode(node, statements) { if (node.statements !== statements) { - var updated = createSynthesizedNode(264 /* SourceFile */); + var updated = createSynthesizedNode(265 /* SourceFile */); updated.flags |= node.flags; updated.statements = createNodeArray(statements); updated.endOfFileToken = node.endOfFileToken; @@ -12789,7 +12807,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(294 /* NotEmittedStatement */); + var node = createSynthesizedNode(295 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -12801,7 +12819,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(297 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(298 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -12813,7 +12831,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(296 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(297 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -12828,7 +12846,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(295 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(296 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -12843,7 +12861,7 @@ var ts; } ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function createBundle(sourceFiles) { - var node = ts.createNode(265 /* Bundle */); + var node = ts.createNode(266 /* Bundle */); node.sourceFiles = sourceFiles; return node; } @@ -12857,47 +12875,47 @@ var ts; ts.updateBundle = updateBundle; // Compound nodes function createComma(left, right) { - return createBinary(left, 25 /* CommaToken */, right); + return createBinary(left, 26 /* CommaToken */, right); } ts.createComma = createComma; function createLessThan(left, right) { - return createBinary(left, 26 /* LessThanToken */, right); + return createBinary(left, 27 /* LessThanToken */, right); } ts.createLessThan = createLessThan; function createAssignment(left, right) { - return createBinary(left, 57 /* EqualsToken */, right); + return createBinary(left, 58 /* EqualsToken */, right); } ts.createAssignment = createAssignment; function createStrictEquality(left, right) { - return createBinary(left, 33 /* EqualsEqualsEqualsToken */, right); + return createBinary(left, 34 /* EqualsEqualsEqualsToken */, right); } ts.createStrictEquality = createStrictEquality; function createStrictInequality(left, right) { - return createBinary(left, 34 /* ExclamationEqualsEqualsToken */, right); + return createBinary(left, 35 /* ExclamationEqualsEqualsToken */, right); } ts.createStrictInequality = createStrictInequality; function createAdd(left, right) { - return createBinary(left, 36 /* PlusToken */, right); + return createBinary(left, 37 /* PlusToken */, right); } ts.createAdd = createAdd; function createSubtract(left, right) { - return createBinary(left, 37 /* MinusToken */, right); + return createBinary(left, 38 /* MinusToken */, right); } ts.createSubtract = createSubtract; function createPostfixIncrement(operand) { - return createPostfix(operand, 42 /* PlusPlusToken */); + return createPostfix(operand, 43 /* PlusPlusToken */); } ts.createPostfixIncrement = createPostfixIncrement; function createLogicalAnd(left, right) { - return createBinary(left, 52 /* AmpersandAmpersandToken */, right); + return createBinary(left, 53 /* AmpersandAmpersandToken */, right); } ts.createLogicalAnd = createLogicalAnd; function createLogicalOr(left, right) { - return createBinary(left, 53 /* BarBarToken */, right); + return createBinary(left, 54 /* BarBarToken */, right); } ts.createLogicalOr = createLogicalOr; function createLogicalNot(operand) { - return createPrefix(50 /* ExclamationToken */, operand); + return createPrefix(51 /* ExclamationToken */, operand); } ts.createLogicalNot = createLogicalNot; function createVoidZero() { @@ -12957,7 +12975,7 @@ var ts; // To avoid holding onto transformation artifacts, we keep track of any // parse tree node we are annotating. This allows us to clean them up after // all transformations have completed. - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } var sourceFile = ts.getSourceFileOfNode(node); @@ -13392,7 +13410,7 @@ var ts; if (!outermostLabeledStatement) { return node; } - var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 /* LabeledStatement */ + var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 222 /* LabeledStatement */ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node); if (afterRestoreLabelCallback) { @@ -13404,19 +13422,19 @@ var ts; function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { var target = skipParentheses(node); switch (target.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return cacheIdentifiers; - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return false; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: var elements = target.elements; if (elements.length === 0) { return false; } return true; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -13430,7 +13448,7 @@ var ts; thisArg = ts.createThis(); target = callee; } - else if (callee.kind === 96 /* SuperKeyword */) { + else if (callee.kind === 97 /* SuperKeyword */) { thisArg = ts.createThis(); target = languageVersion < 2 /* ES2015 */ ? ts.setTextRange(ts.createIdentifier("_super"), callee) @@ -13442,7 +13460,7 @@ var ts; } else { switch (callee.kind) { - case 178 /* PropertyAccessExpression */: { + case 179 /* PropertyAccessExpression */: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { // for `a.b()` target is `(_a = a).b` and thisArg is `_a` thisArg = ts.createTempVariable(recordTempVariable); @@ -13455,7 +13473,7 @@ var ts; } break; } - case 179 /* ElementAccessExpression */: { + case 180 /* ElementAccessExpression */: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { // for `a[b]()` target is `(_a = a)[b]` and thisArg is `_a` thisArg = ts.createTempVariable(recordTempVariable); @@ -13508,14 +13526,14 @@ var ts; ts.createExpressionForPropertyName = createExpressionForPropertyName; function createExpressionForObjectLiteralElementLike(node, property, receiver) { switch (property.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return createExpressionForPropertyAssignment(property, receiver); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(property, receiver); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return createExpressionForMethodDeclaration(property, receiver); } } @@ -13793,7 +13811,7 @@ var ts; } ts.ensureUseStrict = ensureUseStrict; function parenthesizeConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */); + var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* QuestionToken */); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { @@ -13814,7 +13832,7 @@ var ts; function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { var skipped = skipPartiallyEmittedExpressions(operand); // If the resulting expression is already parenthesized, we do not need to do any further processing. - if (skipped.kind === 184 /* ParenthesizedExpression */) { + if (skipped.kind === 185 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) @@ -13848,8 +13866,8 @@ var ts; // // If `a ** d` is on the left of operator `**`, we need to parenthesize to preserve // the intended order of operations: `(a ** b) ** c` - var binaryOperatorPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, binaryOperator); - var binaryOperatorAssociativity = ts.getOperatorAssociativity(193 /* BinaryExpression */, binaryOperator); + var binaryOperatorPrecedence = ts.getOperatorPrecedence(194 /* BinaryExpression */, binaryOperator); + var binaryOperatorAssociativity = ts.getOperatorAssociativity(194 /* BinaryExpression */, binaryOperator); var emittedOperand = skipPartiallyEmittedExpressions(operand); var operandPrecedence = ts.getExpressionPrecedence(emittedOperand); switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) { @@ -13858,7 +13876,7 @@ var ts; // and is a yield expression, then we do not need parentheses. if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ - && operand.kind === 196 /* YieldExpression */) { + && operand.kind === 197 /* YieldExpression */) { return false; } return true; @@ -13895,7 +13913,7 @@ var ts; // the same kind (recursively). // "a"+(1+2) => "a"+(1+2) // "a"+("b"+"c") => "a"+"b"+"c" - if (binaryOperator === 36 /* PlusToken */) { + if (binaryOperator === 37 /* PlusToken */) { var leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0 /* Unknown */; if (ts.isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { return false; @@ -13930,10 +13948,10 @@ var ts; // // While addition is associative in mathematics, JavaScript's `+` is not // guaranteed to be associative as it is overloaded with string concatenation. - return binaryOperator === 38 /* AsteriskToken */ - || binaryOperator === 48 /* BarToken */ - || binaryOperator === 47 /* AmpersandToken */ - || binaryOperator === 49 /* CaretToken */; + return binaryOperator === 39 /* AsteriskToken */ + || binaryOperator === 49 /* BarToken */ + || binaryOperator === 48 /* AmpersandToken */ + || binaryOperator === 50 /* CaretToken */; } /** * This function determines whether an expression consists of a homogeneous set of @@ -13946,7 +13964,7 @@ var ts; if (ts.isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) { + if (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 37 /* PlusToken */) { if (node.cachedLiteralKind !== undefined) { return node.cachedLiteralKind; } @@ -13961,7 +13979,7 @@ var ts; return 0 /* Unknown */; } function parenthesizeForConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */); + var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* QuestionToken */); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { @@ -13974,7 +13992,7 @@ var ts; // per ES grammar both 'whenTrue' and 'whenFalse' parts of conditional expression are assignment expressions // so in case when comma expression is introduced as a part of previous transformations // if should be wrapped in parens since comma operator has the lowest precedence - return e.kind === 193 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */ + return e.kind === 194 /* BinaryExpression */ && e.operatorToken.kind === 26 /* CommaToken */ ? ts.createParen(e) : e; } @@ -13988,9 +14006,9 @@ var ts; function parenthesizeForNew(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); switch (emittedExpression.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return ts.createParen(expression); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return emittedExpression.arguments ? expression : ts.createParen(expression); @@ -14013,7 +14031,7 @@ var ts; // var emittedExpression = skipPartiallyEmittedExpressions(expression); if (ts.isLeftHandSideExpression(emittedExpression) - && (emittedExpression.kind !== 181 /* NewExpression */ || emittedExpression.arguments)) { + && (emittedExpression.kind !== 182 /* NewExpression */ || emittedExpression.arguments)) { return expression; } return ts.setTextRange(ts.createParen(expression), expression); @@ -14051,7 +14069,7 @@ var ts; function parenthesizeExpressionForList(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression); - var commaPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, 25 /* CommaToken */); + var commaPrecedence = ts.getOperatorPrecedence(194 /* BinaryExpression */, 26 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(ts.createParen(expression), expression); @@ -14062,7 +14080,7 @@ var ts; if (ts.isCallExpression(emittedExpression)) { var callee = emittedExpression.expression; var kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 185 /* FunctionExpression */ || kind === 186 /* ArrowFunction */) { + if (kind === 186 /* FunctionExpression */ || kind === 187 /* ArrowFunction */) { var mutableCall = ts.getMutableClone(emittedExpression); mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee); return recreatePartiallyEmittedExpressions(expression, mutableCall); @@ -14070,7 +14088,7 @@ var ts; } else { var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind; - if (leftmostExpressionKind === 177 /* ObjectLiteralExpression */ || leftmostExpressionKind === 185 /* FunctionExpression */) { + if (leftmostExpressionKind === 178 /* ObjectLiteralExpression */ || leftmostExpressionKind === 186 /* FunctionExpression */) { return ts.setTextRange(ts.createParen(expression), expression); } } @@ -14094,21 +14112,21 @@ var ts; function getLeftmostExpression(node) { while (true) { switch (node.kind) { - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: node = node.operand; continue; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: node = node.left; continue; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: node = node.condition; continue; - case 180 /* CallExpression */: - case 179 /* ElementAccessExpression */: - case 178 /* PropertyAccessExpression */: + case 181 /* CallExpression */: + case 180 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: node = node.expression; continue; - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -14116,7 +14134,7 @@ var ts; } } function parenthesizeConciseBody(body) { - if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177 /* ObjectLiteralExpression */) { + if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 178 /* ObjectLiteralExpression */) { return ts.setTextRange(ts.createParen(body), body); } return body; @@ -14148,7 +14166,7 @@ var ts; } ts.skipOuterExpressions = skipOuterExpressions; function skipParentheses(node) { - while (node.kind === 184 /* ParenthesizedExpression */) { + while (node.kind === 185 /* ParenthesizedExpression */) { node = node.expression; } return node; @@ -14162,7 +14180,7 @@ var ts; } ts.skipAssertions = skipAssertions; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 295 /* PartiallyEmittedExpression */) { + while (node.kind === 296 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -14208,10 +14226,10 @@ var ts; var name = namespaceDeclaration.name; return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name)); } - if (node.kind === 237 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 238 /* ImportDeclaration */ && node.importClause) { return ts.getGeneratedNameForNode(node); } - if (node.kind === 243 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 244 /* ExportDeclaration */ && node.moduleSpecifier) { return ts.getGeneratedNameForNode(node); } return undefined; @@ -14329,7 +14347,7 @@ var ts; } if (ts.isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: // `b` in `({ a: b } = ...)` // `b` in `({ a: b = 1 } = ...)` // `{b}` in `({ a: {b} } = ...)` @@ -14341,11 +14359,11 @@ var ts; // `b[0]` in `({ a: b[0] } = ...)` // `b[0]` in `({ a: b[0] = 1 } = ...)` return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: // `a` in `({ a } = ...)` // `a` in `({ a = 1 } = ...)` return bindingElement.name; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: // `a` in `({ ...a } = ...)` return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } @@ -14377,12 +14395,12 @@ var ts; */ function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 145 /* Parameter */: - case 175 /* BindingElement */: + case 146 /* Parameter */: + case 176 /* BindingElement */: // `...` in `let [...a] = ...` return bindingElement.dotDotDotToken; - case 197 /* SpreadElement */: - case 262 /* SpreadAssignment */: + case 198 /* SpreadElement */: + case 263 /* SpreadAssignment */: // `...` in `[...a] = ...` return bindingElement; } @@ -14394,7 +14412,7 @@ var ts; */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 175 /* BindingElement */: + case 176 /* BindingElement */: // `a` in `let { a: b } = ...` // `[a]` in `let { [a]: b } = ...` // `"a"` in `let { "a": b } = ...` @@ -14406,7 +14424,7 @@ var ts; : propertyName; } break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: // `a` in `({ a: b } = ...)` // `[a]` in `({ [a]: b } = ...)` // `"a"` in `({ "a": b } = ...)` @@ -14418,7 +14436,7 @@ var ts; : propertyName; } break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: // `a` in `({ ...a } = ...)` return bindingElement.name; } @@ -14436,13 +14454,13 @@ var ts; */ function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: // `a` in `{a}` // `a` in `[a]` return name.elements; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: // `a` in `{a}` return name.properties; } @@ -14482,11 +14500,11 @@ var ts; ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement; function convertToAssignmentPattern(node) { switch (node.kind) { - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 173 /* ObjectBindingPattern */: - case 177 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 178 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -14534,20 +14552,20 @@ var ts; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // import "mod" // import x from "mod" // import * as x from "mod" // import { x, y } from "mod" externalImports.push(node); break; - case 236 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 247 /* ExternalModuleReference */) { + case 237 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 248 /* ExternalModuleReference */) { // import x = require("mod") externalImports.push(node); } break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { // export * from "mod" @@ -14577,13 +14595,13 @@ var ts; } } break; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { // export = x exportEquals = node; } break; - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: if (ts.hasModifier(node, 1 /* Export */)) { for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) { var decl = _e[_d]; @@ -14591,7 +14609,7 @@ var ts; } } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: if (ts.hasModifier(node, 1 /* Export */)) { if (ts.hasModifier(node, 512 /* Default */)) { // export default function() { } @@ -14611,7 +14629,7 @@ var ts; } } break; - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: if (ts.hasModifier(node, 1 /* Export */)) { if (ts.hasModifier(node, 512 /* Default */)) { // export default class { } @@ -14675,13 +14693,13 @@ var ts; var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 264 /* SourceFile */) { + if (kind === 265 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - else if (kind === 70 /* Identifier */) { + else if (kind === 71 /* Identifier */) { return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); } - else if (kind < 142 /* FirstNode */) { + else if (kind < 143 /* FirstNode */) { return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); } else { @@ -14724,29 +14742,29 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.default) || visitNode(cbNode, node.expression); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return visitNode(cbNode, node.expression); - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -14755,24 +14773,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -14783,326 +14801,326 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return visitNode(cbNode, node.exprName); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return visitNodes(cbNodes, node.members); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return visitNode(cbNode, node.elementType); - case 164 /* TupleType */: + case 165 /* TupleType */: return visitNodes(cbNodes, node.elementTypes); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return visitNodes(cbNodes, node.types); - case 167 /* ParenthesizedType */: - case 169 /* TypeOperator */: + case 168 /* ParenthesizedType */: + case 170 /* TypeOperator */: return visitNode(cbNode, node.type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return visitNode(cbNode, node.objectType) || visitNode(cbNode, node.indexType); - case 171 /* MappedType */: + case 172 /* MappedType */: return visitNode(cbNode, node.readonlyToken) || visitNode(cbNode, node.typeParameter) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return visitNode(cbNode, node.literal); - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return visitNodes(cbNodes, node.elements); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitNodes(cbNodes, node.elements); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitNodes(cbNodes, node.properties); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.name); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitNode(cbNode, node.expression); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return visitNode(cbNode, node.expression); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return visitNode(cbNode, node.expression); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return visitNode(cbNode, node.expression); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return visitNode(cbNode, node.operand); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitNode(cbNode, node.asteriskToken) || visitNode(cbNode, node.expression); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitNode(cbNode, node.expression); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return visitNode(cbNode, node.operand); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 201 /* AsExpression */: + case 202 /* AsExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return visitNode(cbNode, node.expression); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return visitNode(cbNode, node.name); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return visitNode(cbNode, node.expression); - case 206 /* Block */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return visitNodes(cbNodes, node.statements); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return visitNodes(cbNodes, node.declarations); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitNode(cbNode, node.expression); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitNode(cbNode, node.awaitModifier) || visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: return visitNode(cbNode, node.label); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitNode(cbNode, node.expression); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitNodes(cbNodes, node.clauses); - case 256 /* CaseClause */: + case 257 /* CaseClause */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return visitNodes(cbNodes, node.statements); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return visitNode(cbNode, node.expression); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 146 /* Decorator */: + case 147 /* Decorator */: return visitNode(cbNode, node.expression); - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return visitNode(cbNode, node.name); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return visitNode(cbNode, node.name); - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return visitNodes(cbNodes, node.elements); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return visitNode(cbNode, node.expression); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return visitNodes(cbNodes, node.types); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return visitNode(cbNode, node.expression); - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return visitNodes(cbNodes, node.decorators); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.attributes); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return visitNodes(cbNodes, node.properties); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return visitNode(cbNode, node.expression); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitNode(cbNode, node.dotDotDotToken) || visitNode(cbNode, node.expression); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return visitNode(cbNode, node.tagName); - case 266 /* JSDocTypeExpression */: + case 267 /* JSDocTypeExpression */: return visitNode(cbNode, node.type); - case 270 /* JSDocUnionType */: + case 271 /* JSDocUnionType */: return visitNodes(cbNodes, node.types); - case 271 /* JSDocTupleType */: + case 272 /* JSDocTupleType */: return visitNodes(cbNodes, node.types); - case 269 /* JSDocArrayType */: + case 270 /* JSDocArrayType */: return visitNode(cbNode, node.elementType); - case 273 /* JSDocNonNullableType */: + case 274 /* JSDocNonNullableType */: return visitNode(cbNode, node.type); - case 272 /* JSDocNullableType */: + case 273 /* JSDocNullableType */: return visitNode(cbNode, node.type); - case 274 /* JSDocRecordType */: + case 275 /* JSDocRecordType */: return visitNode(cbNode, node.literal); - case 276 /* JSDocTypeReference */: + case 277 /* JSDocTypeReference */: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 277 /* JSDocOptionalType */: + case 278 /* JSDocOptionalType */: return visitNode(cbNode, node.type); - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 279 /* JSDocVariadicType */: + case 280 /* JSDocVariadicType */: return visitNode(cbNode, node.type); - case 280 /* JSDocConstructorType */: + case 281 /* JSDocConstructorType */: return visitNode(cbNode, node.type); - case 281 /* JSDocThisType */: + case 282 /* JSDocThisType */: return visitNode(cbNode, node.type); - case 275 /* JSDocRecordMember */: + case 276 /* JSDocRecordMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 282 /* JSDocComment */: + case 283 /* JSDocComment */: return visitNodes(cbNodes, node.tags); - case 285 /* JSDocParameterTag */: + case 286 /* JSDocParameterTag */: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 286 /* JSDocReturnTag */: + case 287 /* JSDocReturnTag */: return visitNode(cbNode, node.typeExpression); - case 287 /* JSDocTypeTag */: + case 288 /* JSDocTypeTag */: return visitNode(cbNode, node.typeExpression); - case 284 /* JSDocAugmentsTag */: + case 285 /* JSDocAugmentsTag */: return visitNode(cbNode, node.typeExpression); - case 288 /* JSDocTemplateTag */: + case 289 /* JSDocTemplateTag */: return visitNodes(cbNodes, node.typeParameters); - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.name) || visitNode(cbNode, node.jsDocTypeLiteral); - case 291 /* JSDocTypeLiteral */: + case 292 /* JSDocTypeLiteral */: return visitNodes(cbNodes, node.jsDocPropertyTags); - case 290 /* JSDocPropertyTag */: + case 291 /* JSDocPropertyTag */: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name); - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); - case 292 /* JSDocLiteralType */: + case 293 /* JSDocLiteralType */: return visitNode(cbNode, node.literal); } } @@ -15375,7 +15393,7 @@ var ts; function createSourceFile(fileName, languageVersion, scriptKind) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible - var sourceFile = new SourceFileConstructor(264 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + var sourceFile = new SourceFileConstructor(265 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -15579,20 +15597,20 @@ var ts; } // Ignore strict mode flag because we will report an error in type checker instead. function isIdentifier() { - if (token() === 70 /* Identifier */) { + if (token() === 71 /* Identifier */) { return true; } // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is // considered a keyword and is not an identifier. - if (token() === 115 /* YieldKeyword */ && inYieldContext()) { + if (token() === 116 /* YieldKeyword */ && inYieldContext()) { return false; } // If we have a 'await' keyword, and we're in the [Await] context, then 'await' is // considered a keyword and is not an identifier. - if (token() === 120 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 121 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 106 /* LastReservedWord */; + return token() > 107 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } @@ -15635,22 +15653,22 @@ var ts; } function canParseSemicolon() { // If there's a real semicolon, then we can always parse it out. - if (token() === 24 /* SemicolonToken */) { + if (token() === 25 /* SemicolonToken */) { return true; } // We can parse out an optional semicolon in ASI cases in the following cases. - return token() === 17 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); + return token() === 18 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token() === 24 /* SemicolonToken */) { + if (token() === 25 /* SemicolonToken */) { // consume the semicolon if it was explicitly provided. nextToken(); } return true; } else { - return parseExpected(24 /* SemicolonToken */); + return parseExpected(25 /* SemicolonToken */); } } // note: this function creates only node @@ -15659,8 +15677,8 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return kind >= 142 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) : - kind === 70 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) : + return kind >= 143 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) : + kind === 71 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) : new TokenConstructor(kind, pos, pos); } function createNodeArray(elements, pos) { @@ -15711,16 +15729,16 @@ var ts; function createIdentifier(isIdentifier, diagnosticMessage) { identifierCount++; if (isIdentifier) { - var node = createNode(70 /* Identifier */); + var node = createNode(71 /* Identifier */); // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker - if (token() !== 70 /* Identifier */) { + if (token() !== 71 /* Identifier */) { node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } - return createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ false, diagnosticMessage || ts.Diagnostics.Identifier_expected); + return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ false, diagnosticMessage || ts.Diagnostics.Identifier_expected); } function parseIdentifier(diagnosticMessage) { return createIdentifier(isIdentifier(), diagnosticMessage); @@ -15737,7 +15755,7 @@ var ts; if (token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */) { return parseLiteralNode(/*internName*/ true); } - if (allowComputedPropertyNames && token() === 20 /* OpenBracketToken */) { + if (allowComputedPropertyNames && token() === 21 /* OpenBracketToken */) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -15755,13 +15773,13 @@ var ts; // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] - var node = createNode(143 /* ComputedPropertyName */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(144 /* ComputedPropertyName */); + parseExpected(21 /* OpenBracketToken */); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. node.expression = allowInAnd(parseExpression); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function parseContextualModifier(t) { @@ -15775,21 +15793,21 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token() === 75 /* ConstKeyword */) { + if (token() === 76 /* ConstKeyword */) { // 'const' is only a modifier if followed by 'enum'. - return nextToken() === 82 /* EnumKeyword */; + return nextToken() === 83 /* EnumKeyword */; } - if (token() === 83 /* ExportKeyword */) { + if (token() === 84 /* ExportKeyword */) { nextToken(); - if (token() === 78 /* DefaultKeyword */) { + if (token() === 79 /* DefaultKeyword */) { return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token() !== 38 /* AsteriskToken */ && token() !== 117 /* AsKeyword */ && token() !== 16 /* OpenBraceToken */ && canFollowModifier(); + return token() !== 39 /* AsteriskToken */ && token() !== 118 /* AsKeyword */ && token() !== 17 /* OpenBraceToken */ && canFollowModifier(); } - if (token() === 78 /* DefaultKeyword */) { + if (token() === 79 /* DefaultKeyword */) { return nextTokenIsClassOrFunctionOrAsync(); } - if (token() === 114 /* StaticKeyword */) { + if (token() === 115 /* StaticKeyword */) { nextToken(); return canFollowModifier(); } @@ -15799,17 +15817,17 @@ var ts; return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 20 /* OpenBracketToken */ - || token() === 16 /* OpenBraceToken */ - || token() === 38 /* AsteriskToken */ - || token() === 23 /* DotDotDotToken */ + return token() === 21 /* OpenBracketToken */ + || token() === 17 /* OpenBraceToken */ + || token() === 39 /* AsteriskToken */ + || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token() === 74 /* ClassKeyword */ || token() === 88 /* FunctionKeyword */ || - (token() === 116 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) || - (token() === 119 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); + return token() === 75 /* ClassKeyword */ || token() === 89 /* FunctionKeyword */ || + (token() === 117 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) || + (token() === 120 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } // True if positioned at the start of a list element function isListElement(parsingContext, inErrorRecovery) { @@ -15827,9 +15845,9 @@ var ts; // we're parsing. For example, if we have a semicolon in the middle of a class, then // we really don't want to assume the class is over and we're on a statement in the // outer module. We just want to consume and move on. - return !(token() === 24 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); + return !(token() === 25 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 72 /* CaseKeyword */ || token() === 78 /* DefaultKeyword */; + return token() === 73 /* CaseKeyword */ || token() === 79 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -15837,21 +15855,21 @@ var ts; // not in error recovery. If we're in error recovery, we don't want an errant // semicolon to be treated as a class member (since they're almost always used // for statements. - return lookAhead(isClassMemberStart) || (token() === 24 /* SemicolonToken */ && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 25 /* SemicolonToken */ && !inErrorRecovery); case 6 /* EnumMembers */: // Include open bracket computed properties. This technically also lets in indexers, // which would be a candidate for improved error reporting. - return token() === 20 /* OpenBracketToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || isLiteralPropertyName(); case 12 /* ObjectLiteralMembers */: - return token() === 20 /* OpenBracketToken */ || token() === 38 /* AsteriskToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || token() === 39 /* AsteriskToken */ || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); case 17 /* RestProperties */: return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: - return token() === 20 /* OpenBracketToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); case 7 /* HeritageClauseElement */: // If we see `{ ... }` then only consume it as an expression if it is followed by `,` or `{` // That way we won't consume the body of a class in its heritage clause. - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -15866,23 +15884,23 @@ var ts; case 8 /* VariableDeclarations */: return isIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 25 /* CommaToken */ || token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 26 /* CommaToken */ || token() === 24 /* DotDotDotToken */ || isIdentifierOrPattern(); case 18 /* TypeParameters */: return isIdentifier(); case 11 /* ArgumentExpressions */: case 15 /* ArrayLiteralMembers */: - return token() === 25 /* CommaToken */ || token() === 23 /* DotDotDotToken */ || isStartOfExpression(); + return token() === 26 /* CommaToken */ || token() === 24 /* DotDotDotToken */ || isStartOfExpression(); case 16 /* Parameters */: return isStartOfParameter(); case 19 /* TypeArguments */: case 20 /* TupleElementTypes */: - return token() === 25 /* CommaToken */ || isStartOfType(); + return token() === 26 /* CommaToken */ || isStartOfType(); case 21 /* HeritageClauses */: return isHeritageClause(); case 22 /* ImportOrExportSpecifiers */: return ts.tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: - return ts.tokenIsIdentifierOrKeyword(token()) || token() === 16 /* OpenBraceToken */; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 17 /* OpenBraceToken */; case 14 /* JsxChildren */: return true; case 23 /* JSDocFunctionParameters */: @@ -15895,8 +15913,8 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token() === 16 /* OpenBraceToken */); - if (nextToken() === 17 /* CloseBraceToken */) { + ts.Debug.assert(token() === 17 /* OpenBraceToken */); + if (nextToken() === 18 /* CloseBraceToken */) { // if we see "extends {}" then only treat the {} as what we're extending (and not // the class body) if we have: // @@ -15905,7 +15923,7 @@ var ts; // extends {} extends // extends {} implements var next = nextToken(); - return next === 25 /* CommaToken */ || next === 16 /* OpenBraceToken */ || next === 84 /* ExtendsKeyword */ || next === 107 /* ImplementsKeyword */; + return next === 26 /* CommaToken */ || next === 17 /* OpenBraceToken */ || next === 85 /* ExtendsKeyword */ || next === 108 /* ImplementsKeyword */; } return true; } @@ -15918,8 +15936,8 @@ var ts; return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 107 /* ImplementsKeyword */ || - token() === 84 /* ExtendsKeyword */) { + if (token() === 108 /* ImplementsKeyword */ || + token() === 85 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -15943,44 +15961,44 @@ var ts; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 22 /* ImportOrExportSpecifiers */: - return token() === 17 /* CloseBraceToken */; + return token() === 18 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 17 /* CloseBraceToken */ || token() === 72 /* CaseKeyword */ || token() === 78 /* DefaultKeyword */; + return token() === 18 /* CloseBraceToken */ || token() === 73 /* CaseKeyword */ || token() === 79 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 16 /* OpenBraceToken */ || token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 17 /* OpenBraceToken */ || token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 18 /* TypeParameters */: // Tokens other than '>' are here for better error recovery - return token() === 28 /* GreaterThanToken */ || token() === 18 /* OpenParenToken */ || token() === 16 /* OpenBraceToken */ || token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 29 /* GreaterThanToken */ || token() === 19 /* OpenParenToken */ || token() === 17 /* OpenBraceToken */ || token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: // Tokens other than ')' are here for better error recovery - return token() === 19 /* CloseParenToken */ || token() === 24 /* SemicolonToken */; + return token() === 20 /* CloseParenToken */ || token() === 25 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: case 20 /* TupleElementTypes */: case 10 /* ArrayBindingElements */: - return token() === 21 /* CloseBracketToken */; + return token() === 22 /* CloseBracketToken */; case 16 /* Parameters */: case 17 /* RestProperties */: // Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery - return token() === 19 /* CloseParenToken */ || token() === 21 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; + return token() === 20 /* CloseParenToken */ || token() === 22 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; case 19 /* TypeArguments */: // All other tokens should cause the type-argument to terminate except comma token - return token() !== 25 /* CommaToken */; + return token() !== 26 /* CommaToken */; case 21 /* HeritageClauses */: - return token() === 16 /* OpenBraceToken */ || token() === 17 /* CloseBraceToken */; + return token() === 17 /* OpenBraceToken */ || token() === 18 /* CloseBraceToken */; case 13 /* JsxAttributes */: - return token() === 28 /* GreaterThanToken */ || token() === 40 /* SlashToken */; + return token() === 29 /* GreaterThanToken */ || token() === 41 /* SlashToken */; case 14 /* JsxChildren */: - return token() === 26 /* LessThanToken */ && lookAhead(nextTokenIsSlash); + return token() === 27 /* LessThanToken */ && lookAhead(nextTokenIsSlash); case 23 /* JSDocFunctionParameters */: - return token() === 19 /* CloseParenToken */ || token() === 55 /* ColonToken */ || token() === 17 /* CloseBraceToken */; + return token() === 20 /* CloseParenToken */ || token() === 56 /* ColonToken */ || token() === 18 /* CloseBraceToken */; case 24 /* JSDocTypeArguments */: - return token() === 28 /* GreaterThanToken */ || token() === 17 /* CloseBraceToken */; + return token() === 29 /* GreaterThanToken */ || token() === 18 /* CloseBraceToken */; case 26 /* JSDocTupleTypes */: - return token() === 21 /* CloseBracketToken */ || token() === 17 /* CloseBraceToken */; + return token() === 22 /* CloseBracketToken */ || token() === 18 /* CloseBraceToken */; case 25 /* JSDocRecordMembers */: - return token() === 17 /* CloseBraceToken */; + return token() === 18 /* CloseBraceToken */; } } function isVariableDeclaratorListTerminator() { @@ -15998,7 +16016,7 @@ var ts; // For better error recovery, if we see an '=>' then we just stop immediately. We've got an // arrow function here and it's going to be very unlikely that we'll resynchronize and get // another variable declaration. - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { return true; } // Keep trying to parse out variable declarators. @@ -16163,20 +16181,20 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 151 /* Constructor */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 148 /* PropertyDeclaration */: - case 205 /* SemicolonClassElement */: + case 152 /* Constructor */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 206 /* SemicolonClassElement */: return true; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: // Method declarations are not necessarily reusable. An object-literal // may have a method calls "constructor(...)" and we must reparse that // into an actual .ConstructorDeclaration. var methodDeclaration = node; - var nameIsConstructor = methodDeclaration.name.kind === 70 /* Identifier */ && - methodDeclaration.name.originalKeywordKind === 122 /* ConstructorKeyword */; + var nameIsConstructor = methodDeclaration.name.kind === 71 /* Identifier */ && + methodDeclaration.name.originalKeywordKind === 123 /* ConstructorKeyword */; return !nameIsConstructor; } } @@ -16185,8 +16203,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: return true; } } @@ -16195,58 +16213,58 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 207 /* VariableStatement */: - case 206 /* Block */: - case 210 /* IfStatement */: - case 209 /* ExpressionStatement */: - case 222 /* ThrowStatement */: - case 218 /* ReturnStatement */: - case 220 /* SwitchStatement */: - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 213 /* ForStatement */: - case 212 /* WhileStatement */: - case 219 /* WithStatement */: - case 208 /* EmptyStatement */: - case 223 /* TryStatement */: - case 221 /* LabeledStatement */: - case 211 /* DoStatement */: - case 224 /* DebuggerStatement */: - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: - case 242 /* ExportAssignment */: - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + case 208 /* VariableStatement */: + case 207 /* Block */: + case 211 /* IfStatement */: + case 210 /* ExpressionStatement */: + case 223 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 221 /* SwitchStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 214 /* ForStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: + case 209 /* EmptyStatement */: + case 224 /* TryStatement */: + case 222 /* LabeledStatement */: + case 212 /* DoStatement */: + case 225 /* DebuggerStatement */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 231 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 263 /* EnumMember */; + return node.kind === 264 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 155 /* ConstructSignature */: - case 149 /* MethodSignature */: - case 156 /* IndexSignature */: - case 147 /* PropertySignature */: - case 154 /* CallSignature */: + case 156 /* ConstructSignature */: + case 150 /* MethodSignature */: + case 157 /* IndexSignature */: + case 148 /* PropertySignature */: + case 155 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 225 /* VariableDeclaration */) { + if (node.kind !== 226 /* VariableDeclaration */) { return false; } // Very subtle incremental parsing bug. Consider the following code: @@ -16267,7 +16285,7 @@ var ts; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 145 /* Parameter */) { + if (node.kind !== 146 /* Parameter */) { return false; } // See the comment in isReusableVariableDeclaration for why we do this. @@ -16324,7 +16342,7 @@ var ts; if (isListElement(kind, /*inErrorRecovery*/ false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); - if (parseOptional(25 /* CommaToken */)) { + if (parseOptional(26 /* CommaToken */)) { continue; } commaStart = -1; // Back to the state where the last token was not a comma @@ -16333,13 +16351,13 @@ var ts; } // We didn't get a comma, and the list wasn't terminated, explicitly parse // out a comma so we give a good error message. - parseExpected(25 /* CommaToken */); + parseExpected(26 /* CommaToken */); // If the token was a semicolon, and the caller allows that, then skip it and // continue. This ensures we get back on track and don't result in tons of // parse errors. For example, this can happen when people do things like use // a semicolon to delimit object literal members. Note: we'll have already // reported an error when we called parseExpected above. - if (considerSemicolonAsDelimiter && token() === 24 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { + if (considerSemicolonAsDelimiter && token() === 25 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -16378,8 +16396,8 @@ var ts; // The allowReservedWords parameter controls whether reserved words are permitted after the first dot function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(22 /* DotToken */)) { - var node = createNode(142 /* QualifiedName */, entity.pos); // !!! + while (parseOptional(23 /* DotToken */)) { + var node = createNode(143 /* QualifiedName */, entity.pos); // !!! node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -16412,33 +16430,33 @@ var ts; // Report that we need an identifier. However, report it right after the dot, // and not on the next token. This is because the next token might actually // be an identifier and the error would be quite confusing. - return createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected); + return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected); } } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(195 /* TemplateExpression */); + var template = createNode(196 /* TemplateExpression */); template.head = parseTemplateHead(); - ts.Debug.assert(template.head.kind === 13 /* TemplateHead */, "Template head has wrong token kind"); + ts.Debug.assert(template.head.kind === 14 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = createNodeArray(); do { templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 14 /* TemplateMiddle */); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 15 /* TemplateMiddle */); templateSpans.end = getNodeEnd(); template.templateSpans = templateSpans; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(204 /* TemplateSpan */); + var span = createNode(205 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; - if (token() === 17 /* CloseBraceToken */) { + if (token() === 18 /* CloseBraceToken */) { reScanTemplateToken(); literal = parseTemplateMiddleOrTemplateTail(); } else { - literal = parseExpectedToken(15 /* TemplateTail */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(17 /* CloseBraceToken */)); + literal = parseExpectedToken(16 /* TemplateTail */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(18 /* CloseBraceToken */)); } span.literal = literal; return finishNode(span); @@ -16448,12 +16466,12 @@ var ts; } function parseTemplateHead() { var fragment = parseLiteralLikeNode(token(), /*internName*/ false); - ts.Debug.assert(fragment.kind === 13 /* TemplateHead */, "Template head has wrong token kind"); + ts.Debug.assert(fragment.kind === 14 /* TemplateHead */, "Template head has wrong token kind"); return fragment; } function parseTemplateMiddleOrTemplateTail() { var fragment = parseLiteralLikeNode(token(), /*internName*/ false); - ts.Debug.assert(fragment.kind === 14 /* TemplateMiddle */ || fragment.kind === 15 /* TemplateTail */, "Template fragment has wrong token kind"); + ts.Debug.assert(fragment.kind === 15 /* TemplateMiddle */ || fragment.kind === 16 /* TemplateTail */, "Template fragment has wrong token kind"); return fragment; } function parseLiteralLikeNode(kind, internName) { @@ -16481,35 +16499,35 @@ var ts; } // TYPES function parseTypeReference() { - var node = createNode(158 /* TypeReference */); + var node = createNode(159 /* TypeReference */); node.typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected); - if (!scanner.hasPrecedingLineBreak() && token() === 26 /* LessThanToken */) { - node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (!scanner.hasPrecedingLineBreak() && token() === 27 /* LessThanToken */) { + node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(157 /* TypePredicate */, lhs.pos); + var node = createNode(158 /* TypePredicate */, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(168 /* ThisType */); + var node = createNode(169 /* ThisType */); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(161 /* TypeQuery */); - parseExpected(102 /* TypeOfKeyword */); + var node = createNode(162 /* TypeQuery */); + parseExpected(103 /* TypeOfKeyword */); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(144 /* TypeParameter */); + var node = createNode(145 /* TypeParameter */); node.name = parseIdentifier(); - if (parseOptional(84 /* ExtendsKeyword */)) { + if (parseOptional(85 /* ExtendsKeyword */)) { // It's not uncommon for people to write improper constraints to a generic. If the // user writes a constraint that is an expression and not an actual type, then parse // it out as an expression (so we can recover well), but report that a type is needed @@ -16528,35 +16546,35 @@ var ts; node.expression = parseUnaryExpressionOrHigher(); } } - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { node.default = parseType(); } return finishNode(node); } function parseTypeParameters() { - if (token() === 26 /* LessThanToken */) { - return parseBracketedList(18 /* TypeParameters */, parseTypeParameter, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (token() === 27 /* LessThanToken */) { + return parseBracketedList(18 /* TypeParameters */, parseTypeParameter, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } } function parseParameterType() { - if (parseOptional(55 /* ColonToken */)) { + if (parseOptional(56 /* ColonToken */)) { return parseType(); } return undefined; } function isStartOfParameter() { - return token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 /* AtToken */ || token() === 98 /* ThisKeyword */; + return token() === 24 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 57 /* AtToken */ || token() === 99 /* ThisKeyword */; } function parseParameter() { - var node = createNode(145 /* Parameter */); - if (token() === 98 /* ThisKeyword */) { + var node = createNode(146 /* Parameter */); + if (token() === 99 /* ThisKeyword */) { node.name = createIdentifier(/*isIdentifier*/ true); node.type = parseParameterType(); return finishNode(node); } node.decorators = parseDecorators(); node.modifiers = parseModifiers(); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] node.name = parseIdentifierOrPattern(); @@ -16571,7 +16589,7 @@ var ts; // to avoid this we'll advance cursor to the next token. nextToken(); } - node.questionToken = parseOptionalToken(54 /* QuestionToken */); + node.questionToken = parseOptionalToken(55 /* QuestionToken */); node.type = parseParameterType(); node.initializer = parseBindingElementInitializer(/*inParameter*/ true); // Do not check for initializers in an ambient context for parameters. This is not @@ -16591,7 +16609,7 @@ var ts; return parseInitializer(/*inParameter*/ true); } function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 35 /* EqualsGreaterThanToken */; + var returnTokenRequired = returnToken === 36 /* EqualsGreaterThanToken */; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { @@ -16616,7 +16634,7 @@ var ts; // // SingleNameBinding [Yield,Await]: // BindingIdentifier[?Yield,?Await]Initializer [In, ?Yield,?Await] opt - if (parseExpected(18 /* OpenParenToken */)) { + if (parseExpected(19 /* OpenParenToken */)) { var savedYieldContext = inYieldContext(); var savedAwaitContext = inAwaitContext(); setYieldContext(yieldContext); @@ -16624,7 +16642,7 @@ var ts; var result = parseDelimitedList(16 /* Parameters */, parseParameter); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); - if (!parseExpected(19 /* CloseParenToken */) && requireCompleteParameterList) { + if (!parseExpected(20 /* CloseParenToken */) && requireCompleteParameterList) { // Caller insisted that we had to end with a ) We didn't. So just return // undefined here. return undefined; @@ -16639,7 +16657,7 @@ var ts; function parseTypeMemberSemicolon() { // We allow type members to be separated by commas or (possibly ASI) semicolons. // First check if it was a comma. If so, we're done with the member. - if (parseOptional(25 /* CommaToken */)) { + if (parseOptional(26 /* CommaToken */)) { return; } // Didn't have a comma. We must have a (possible ASI) semicolon. @@ -16647,15 +16665,15 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 155 /* ConstructSignature */) { - parseExpected(93 /* NewKeyword */); + if (kind === 156 /* ConstructSignature */) { + parseExpected(94 /* NewKeyword */); } - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(node)); } function isIndexSignature() { - if (token() !== 20 /* OpenBracketToken */) { + if (token() !== 21 /* OpenBracketToken */) { return false; } return lookAhead(isUnambiguouslyIndexSignature); @@ -16678,7 +16696,7 @@ var ts; // [] // nextToken(); - if (token() === 23 /* DotDotDotToken */ || token() === 21 /* CloseBracketToken */) { + if (token() === 24 /* DotDotDotToken */ || token() === 22 /* CloseBracketToken */) { return true; } if (ts.isModifierKind(token())) { @@ -16697,49 +16715,49 @@ var ts; // A colon signifies a well formed indexer // A comma should be a badly formed indexer because comma expressions are not allowed // in computed properties. - if (token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */) { + if (token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */) { return true; } // Question mark could be an indexer with an optional property, // or it could be a conditional expression in a computed property. - if (token() !== 54 /* QuestionToken */) { + if (token() !== 55 /* QuestionToken */) { return false; } // If any of the following tokens are after the question mark, it cannot // be a conditional expression, so treat it as an indexer. nextToken(); - return token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || token() === 21 /* CloseBracketToken */; + return token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */ || token() === 22 /* CloseBracketToken */; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(156 /* IndexSignature */, fullStart); + var node = createNode(157 /* IndexSignature */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */); + node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 21 /* OpenBracketToken */, 22 /* CloseBracketToken */); node.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); return finishNode(node); } function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { - var method = createNode(149 /* MethodSignature */, fullStart); + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { + var method = createNode(150 /* MethodSignature */, fullStart); method.modifiers = modifiers; method.name = name; method.questionToken = questionToken; // Method signatures don't exist in expression contexts. So they have neither // [Yield] nor [Await] - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(method)); } else { - var property = createNode(147 /* PropertySignature */, fullStart); + var property = createNode(148 /* PropertySignature */, fullStart); property.modifiers = modifiers; property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token() === 57 /* EqualsToken */) { + if (token() === 58 /* EqualsToken */) { // Although type literal properties cannot not have initializers, we attempt // to parse an initializer so we can report in the checker that an interface // property or type literal property cannot have an initializer. @@ -16751,7 +16769,7 @@ var ts; } function isTypeMemberStart() { // Return true if we have the start of a signature member - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return true; } var idToken; @@ -16761,7 +16779,7 @@ var ts; nextToken(); } // Index signatures and computed property names are type members - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return true; } // Try to get the first property-like token following all modifiers @@ -16772,21 +16790,21 @@ var ts; // If we were able to get any potential identifier, check that it is // the start of a member declaration if (idToken) { - return token() === 18 /* OpenParenToken */ || - token() === 26 /* LessThanToken */ || - token() === 54 /* QuestionToken */ || - token() === 55 /* ColonToken */ || - token() === 25 /* CommaToken */ || + return token() === 19 /* OpenParenToken */ || + token() === 27 /* LessThanToken */ || + token() === 55 /* QuestionToken */ || + token() === 56 /* ColonToken */ || + token() === 26 /* CommaToken */ || canParseSemicolon(); } return false; } function parseTypeMember() { - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { - return parseSignatureMember(154 /* CallSignature */); + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { + return parseSignatureMember(155 /* CallSignature */); } - if (token() === 93 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(155 /* ConstructSignature */); + if (token() === 94 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(156 /* ConstructSignature */); } var fullStart = getNodePos(); var modifiers = parseModifiers(); @@ -16797,18 +16815,18 @@ var ts; } function isStartOfConstructSignature() { nextToken(); - return token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */; + return token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */; } function parseTypeLiteral() { - var node = createNode(162 /* TypeLiteral */); + var node = createNode(163 /* TypeLiteral */); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers() { var members; - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { members = parseList(4 /* TypeMembers */, parseTypeMember); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { members = createMissingList(); @@ -16817,57 +16835,57 @@ var ts; } function isStartOfMappedType() { nextToken(); - if (token() === 130 /* ReadonlyKeyword */) { + if (token() === 131 /* ReadonlyKeyword */) { nextToken(); } - return token() === 20 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 91 /* InKeyword */; + return token() === 21 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 92 /* InKeyword */; } function parseMappedTypeParameter() { - var node = createNode(144 /* TypeParameter */); + var node = createNode(145 /* TypeParameter */); node.name = parseIdentifier(); - parseExpected(91 /* InKeyword */); + parseExpected(92 /* InKeyword */); node.constraint = parseType(); return finishNode(node); } function parseMappedType() { - var node = createNode(171 /* MappedType */); - parseExpected(16 /* OpenBraceToken */); - node.readonlyToken = parseOptionalToken(130 /* ReadonlyKeyword */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(172 /* MappedType */); + parseExpected(17 /* OpenBraceToken */); + node.readonlyToken = parseOptionalToken(131 /* ReadonlyKeyword */); + parseExpected(21 /* OpenBracketToken */); node.typeParameter = parseMappedTypeParameter(); - parseExpected(21 /* CloseBracketToken */); - node.questionToken = parseOptionalToken(54 /* QuestionToken */); + parseExpected(22 /* CloseBracketToken */); + node.questionToken = parseOptionalToken(55 /* QuestionToken */); node.type = parseTypeAnnotation(); parseSemicolon(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseTupleType() { - var node = createNode(164 /* TupleType */); - node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */); + var node = createNode(165 /* TupleType */); + node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 21 /* OpenBracketToken */, 22 /* CloseBracketToken */); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(167 /* ParenthesizedType */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(168 /* ParenthesizedType */); + parseExpected(19 /* OpenParenToken */); node.type = parseType(); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 160 /* ConstructorType */) { - parseExpected(93 /* NewKeyword */); + if (kind === 161 /* ConstructorType */) { + parseExpected(94 /* NewKeyword */); } - fillSignature(35 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(36 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); return finishNode(node); } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token() === 22 /* DotToken */ ? undefined : node; + return token() === 23 /* DotToken */ ? undefined : node; } function parseLiteralTypeNode() { - var node = createNode(172 /* LiteralType */); + var node = createNode(173 /* LiteralType */); node.literal = parseSimpleUnaryExpression(); finishNode(node); return node; @@ -16877,43 +16895,43 @@ var ts; } function parseNonArrayType() { switch (token()) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseLiteralTypeNode(); - case 37 /* MinusToken */: + case 38 /* MinusToken */: return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); - case 104 /* VoidKeyword */: - case 94 /* NullKeyword */: + case 105 /* VoidKeyword */: + case 95 /* NullKeyword */: return parseTokenNode(); - case 98 /* ThisKeyword */: { + case 99 /* ThisKeyword */: { var thisKeyword = parseThisTypeNode(); - if (token() === 125 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 102 /* TypeOfKeyword */: + case 103 /* TypeOfKeyword */: return parseTypeQuery(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseTupleType(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseParenthesizedType(); default: return parseTypeReference(); @@ -16921,32 +16939,32 @@ var ts; } function isStartOfType() { switch (token()) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 98 /* ThisKeyword */: - case 102 /* TypeOfKeyword */: - case 129 /* NeverKeyword */: - case 16 /* OpenBraceToken */: - case 20 /* OpenBracketToken */: - case 26 /* LessThanToken */: - case 48 /* BarToken */: - case 47 /* AmpersandToken */: - case 93 /* NewKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 99 /* ThisKeyword */: + case 103 /* TypeOfKeyword */: + case 130 /* NeverKeyword */: + case 17 /* OpenBraceToken */: + case 21 /* OpenBracketToken */: + case 27 /* LessThanToken */: + case 49 /* BarToken */: + case 48 /* AmpersandToken */: + case 94 /* NewKeyword */: case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 133 /* ObjectKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 134 /* ObjectKeyword */: return true; - case 37 /* MinusToken */: + case 38 /* MinusToken */: return lookAhead(nextTokenIsNumericLiteral); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, // or something that starts a type. We don't want to consider things like '(1)' a type. return lookAhead(isStartOfParenthesizedOrFunctionType); @@ -16956,29 +16974,29 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token() === 19 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); + return token() === 20 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(20 /* OpenBracketToken */)) { + while (!scanner.hasPrecedingLineBreak() && parseOptional(21 /* OpenBracketToken */)) { if (isStartOfType()) { - var node = createNode(170 /* IndexedAccessType */, type.pos); + var node = createNode(171 /* IndexedAccessType */, type.pos); node.objectType = type; node.indexType = parseType(); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(node); } else { - var node = createNode(163 /* ArrayType */, type.pos); + var node = createNode(164 /* ArrayType */, type.pos); node.elementType = type; - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(node); } } return type; } function parseTypeOperator(operator) { - var node = createNode(169 /* TypeOperator */); + var node = createNode(170 /* TypeOperator */); parseExpected(operator); node.operator = operator; node.type = parseTypeOperatorOrHigher(); @@ -16986,8 +17004,8 @@ var ts; } function parseTypeOperatorOrHigher() { switch (token()) { - case 126 /* KeyOfKeyword */: - return parseTypeOperator(126 /* KeyOfKeyword */); + case 127 /* KeyOfKeyword */: + return parseTypeOperator(127 /* KeyOfKeyword */); } return parseArrayTypeOrHigher(); } @@ -17007,27 +17025,27 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(166 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */); + return parseUnionOrIntersectionType(167 /* IntersectionType */, parseTypeOperatorOrHigher, 48 /* AmpersandToken */); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(165 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */); + return parseUnionOrIntersectionType(166 /* UnionType */, parseIntersectionTypeOrHigher, 49 /* BarToken */); } function isStartOfFunctionType() { - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { return true; } - return token() === 18 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 19 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); } function skipParameterStart() { if (ts.isModifierKind(token())) { // Skip modifiers parseModifiers(); } - if (isIdentifier() || token() === 98 /* ThisKeyword */) { + if (isIdentifier() || token() === 99 /* ThisKeyword */) { nextToken(); return true; } - if (token() === 20 /* OpenBracketToken */ || token() === 16 /* OpenBraceToken */) { + if (token() === 21 /* OpenBracketToken */ || token() === 17 /* OpenBraceToken */) { // Return true if we can parse an array or object binding pattern with no errors var previousErrorCount = parseDiagnostics.length; parseIdentifierOrPattern(); @@ -17037,7 +17055,7 @@ var ts; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token() === 19 /* CloseParenToken */ || token() === 23 /* DotDotDotToken */) { + if (token() === 20 /* CloseParenToken */ || token() === 24 /* DotDotDotToken */) { // ( ) // ( ... return true; @@ -17045,17 +17063,17 @@ var ts; if (skipParameterStart()) { // We successfully skipped modifiers (if any) and an identifier or binding pattern, // now see if we have something that indicates a parameter declaration - if (token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || - token() === 54 /* QuestionToken */ || token() === 57 /* EqualsToken */) { + if (token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */ || + token() === 55 /* QuestionToken */ || token() === 58 /* EqualsToken */) { // ( xxx : // ( xxx , // ( xxx ? // ( xxx = return true; } - if (token() === 19 /* CloseParenToken */) { + if (token() === 20 /* CloseParenToken */) { nextToken(); - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { // ( xxx ) => return true; } @@ -17067,7 +17085,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(157 /* TypePredicate */, typePredicateVariable.pos); + var node = createNode(158 /* TypePredicate */, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -17078,7 +17096,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token() === 125 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -17090,37 +17108,37 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(159 /* FunctionType */); + return parseFunctionOrConstructorType(160 /* FunctionType */); } - if (token() === 93 /* NewKeyword */) { - return parseFunctionOrConstructorType(160 /* ConstructorType */); + if (token() === 94 /* NewKeyword */) { + return parseFunctionOrConstructorType(161 /* ConstructorType */); } return parseUnionTypeOrHigher(); } function parseTypeAnnotation() { - return parseOptional(55 /* ColonToken */) ? parseType() : undefined; + return parseOptional(56 /* ColonToken */) ? parseType() : undefined; } // EXPRESSIONS function isStartOfLeftHandSideExpression() { switch (token()) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 18 /* OpenParenToken */: - case 20 /* OpenBracketToken */: - case 16 /* OpenBraceToken */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 93 /* NewKeyword */: - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - case 70 /* Identifier */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 19 /* OpenParenToken */: + case 21 /* OpenBracketToken */: + case 17 /* OpenBraceToken */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 94 /* NewKeyword */: + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + case 71 /* Identifier */: return true; default: return isIdentifier(); @@ -17131,18 +17149,18 @@ var ts; return true; } switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 79 /* DeleteKeyword */: - case 102 /* TypeOfKeyword */: - case 104 /* VoidKeyword */: - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: - case 26 /* LessThanToken */: - case 120 /* AwaitKeyword */: - case 115 /* YieldKeyword */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 80 /* DeleteKeyword */: + case 103 /* TypeOfKeyword */: + case 105 /* VoidKeyword */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: + case 27 /* LessThanToken */: + case 121 /* AwaitKeyword */: + case 116 /* YieldKeyword */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -17160,10 +17178,10 @@ var ts; } function isStartOfExpressionStatement() { // As per the grammar, none of '{' or 'function' or 'class' can start an expression statement. - return token() !== 16 /* OpenBraceToken */ && - token() !== 88 /* FunctionKeyword */ && - token() !== 74 /* ClassKeyword */ && - token() !== 56 /* AtToken */ && + return token() !== 17 /* OpenBraceToken */ && + token() !== 89 /* FunctionKeyword */ && + token() !== 75 /* ClassKeyword */ && + token() !== 57 /* AtToken */ && isStartOfExpression(); } function parseExpression() { @@ -17177,7 +17195,7 @@ var ts; } var expr = parseAssignmentExpressionOrHigher(); var operatorToken; - while ((operatorToken = parseOptionalToken(25 /* CommaToken */))) { + while ((operatorToken = parseOptionalToken(26 /* CommaToken */))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } if (saveDecoratorContext) { @@ -17186,7 +17204,7 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token() !== 57 /* EqualsToken */) { + if (token() !== 58 /* EqualsToken */) { // It's not uncommon during typing for the user to miss writing the '=' token. Check if // there is no newline after the last token and if we're on an expression. If so, parse // this as an equals-value clause with a missing equals. @@ -17195,7 +17213,7 @@ var ts; // it's more likely that a { would be a allowed (as an object literal). While this // is also allowed for parameters, the risk is that we consume the { as an object // literal when it really will be for the block following the parameter. - if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 16 /* OpenBraceToken */) || !isStartOfExpression()) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 17 /* OpenBraceToken */) || !isStartOfExpression()) { // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - // do not try to parse initializer return undefined; @@ -17203,7 +17221,7 @@ var ts; } // Initializer[In, Yield] : // = AssignmentExpression[?In, ?Yield] - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); return parseAssignmentExpressionOrHigher(); } function parseAssignmentExpressionOrHigher() { @@ -17249,7 +17267,7 @@ var ts; // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single // identifier and the current token is an arrow. - if (expr.kind === 70 /* Identifier */ && token() === 35 /* EqualsGreaterThanToken */) { + if (expr.kind === 71 /* Identifier */ && token() === 36 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression(expr); } // Now see if we might be in cases '2' or '3'. @@ -17265,7 +17283,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token() === 115 /* YieldKeyword */) { + if (token() === 116 /* YieldKeyword */) { // If we have a 'yield' keyword, and this is a context where yield expressions are // allowed, then definitely parse out a yield expression. if (inYieldContext()) { @@ -17294,15 +17312,15 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(196 /* YieldExpression */); + var node = createNode(197 /* YieldExpression */); // YieldExpression[In] : // yield // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token() === 38 /* AsteriskToken */ || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + (token() === 39 /* AsteriskToken */ || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17313,21 +17331,21 @@ var ts; } } function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { - ts.Debug.assert(token() === 35 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + ts.Debug.assert(token() === 36 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); var node; if (asyncModifier) { - node = createNode(186 /* ArrowFunction */, asyncModifier.pos); + node = createNode(187 /* ArrowFunction */, asyncModifier.pos); node.modifiers = asyncModifier; } else { - node = createNode(186 /* ArrowFunction */, identifier.pos); + node = createNode(187 /* ArrowFunction */, identifier.pos); } - var parameter = createNode(145 /* Parameter */, identifier.pos); + var parameter = createNode(146 /* Parameter */, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = createNodeArray([parameter], parameter.pos); node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(35 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(36 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier); return addJSDocComment(finishNode(node)); } @@ -17352,8 +17370,8 @@ var ts; // If we have an arrow, then try to parse the body. Even if not, try to parse if we // have an opening brace, just in case we're in an error state. var lastToken = token(); - arrowFunction.equalsGreaterThanToken = parseExpectedToken(35 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 35 /* EqualsGreaterThanToken */ || lastToken === 16 /* OpenBraceToken */) + arrowFunction.equalsGreaterThanToken = parseExpectedToken(36 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 36 /* EqualsGreaterThanToken */ || lastToken === 17 /* OpenBraceToken */) ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return addJSDocComment(finishNode(arrowFunction)); @@ -17363,10 +17381,10 @@ var ts; // Unknown -> There *might* be a parenthesized arrow function here. // Speculatively look ahead to be sure, and rollback if not. function isParenthesizedArrowFunctionExpression() { - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */ || token() === 119 /* AsyncKeyword */) { + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */ || token() === 120 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { // ERROR RECOVERY TWEAK: // If we see a standalone => try to parse it as an arrow function expression as that's // likely what the user intended to write. @@ -17376,28 +17394,28 @@ var ts; return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0 /* False */; } - if (token() !== 18 /* OpenParenToken */ && token() !== 26 /* LessThanToken */) { + if (token() !== 19 /* OpenParenToken */ && token() !== 27 /* LessThanToken */) { return 0 /* False */; } } var first = token(); var second = nextToken(); - if (first === 18 /* OpenParenToken */) { - if (second === 19 /* CloseParenToken */) { + if (first === 19 /* OpenParenToken */) { + if (second === 20 /* CloseParenToken */) { // Simple cases: "() =>", "(): ", and "() {". // This is an arrow function with no parameters. // The last one is not actually an arrow function, // but this is probably what the user intended. var third = nextToken(); switch (third) { - case 35 /* EqualsGreaterThanToken */: - case 55 /* ColonToken */: - case 16 /* OpenBraceToken */: + case 36 /* EqualsGreaterThanToken */: + case 56 /* ColonToken */: + case 17 /* OpenBraceToken */: return 1 /* True */; default: return 0 /* False */; @@ -17409,12 +17427,12 @@ var ts; // ({ x }) => { } // ([ x ]) // ({ x }) - if (second === 20 /* OpenBracketToken */ || second === 16 /* OpenBraceToken */) { + if (second === 21 /* OpenBracketToken */ || second === 17 /* OpenBraceToken */) { return 2 /* Unknown */; } // Simple case: "(..." // This is an arrow function with a rest parameter. - if (second === 23 /* DotDotDotToken */) { + if (second === 24 /* DotDotDotToken */) { return 1 /* True */; } // If we had "(" followed by something that's not an identifier, @@ -17427,7 +17445,7 @@ var ts; } // If we have something like "(a:", then we must have a // type-annotated parameter in an arrow function expression. - if (nextToken() === 55 /* ColonToken */) { + if (nextToken() === 56 /* ColonToken */) { return 1 /* True */; } // This *could* be a parenthesized arrow function. @@ -17435,7 +17453,7 @@ var ts; return 2 /* Unknown */; } else { - ts.Debug.assert(first === 26 /* LessThanToken */); + ts.Debug.assert(first === 27 /* LessThanToken */); // If we have "<" not followed by an identifier, // then this definitely is not an arrow function. if (!isIdentifier()) { @@ -17445,17 +17463,17 @@ var ts; if (sourceFile.languageVariant === 1 /* JSX */) { var isArrowFunctionInJsx = lookAhead(function () { var third = nextToken(); - if (third === 84 /* ExtendsKeyword */) { + if (third === 85 /* ExtendsKeyword */) { var fourth = nextToken(); switch (fourth) { - case 57 /* EqualsToken */: - case 28 /* GreaterThanToken */: + case 58 /* EqualsToken */: + case 29 /* GreaterThanToken */: return false; default: return true; } } - else if (third === 25 /* CommaToken */) { + else if (third === 26 /* CommaToken */) { return true; } return false; @@ -17474,7 +17492,7 @@ var ts; } function tryParseAsyncSimpleArrowFunctionExpression() { // We do a check here so that we won't be doing unnecessarily call to "lookAhead" - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); if (isUnParenthesizedAsyncArrowFunction === 1 /* True */) { var asyncModifier = parseModifiersForArrowFunction(); @@ -17488,23 +17506,23 @@ var ts; // AsyncArrowFunctionExpression: // 1) async[no LineTerminator here]AsyncArrowBindingIdentifier[?Yield][no LineTerminator here]=>AsyncConciseBody[?In] // 2) CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await][no LineTerminator here]=>AsyncConciseBody[?In] - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { nextToken(); // If the "async" is followed by "=>" token then it is not a begining of an async arrow-function // but instead a simple arrow-function which will be parsed inside "parseAssignmentExpressionOrHigher" - if (scanner.hasPrecedingLineBreak() || token() === 35 /* EqualsGreaterThanToken */) { + if (scanner.hasPrecedingLineBreak() || token() === 36 /* EqualsGreaterThanToken */) { return 0 /* False */; } // Check for un-parenthesized AsyncArrowFunction var expr = parseBinaryExpressionOrHigher(/*precedence*/ 0); - if (!scanner.hasPrecedingLineBreak() && expr.kind === 70 /* Identifier */ && token() === 35 /* EqualsGreaterThanToken */) { + if (!scanner.hasPrecedingLineBreak() && expr.kind === 71 /* Identifier */ && token() === 36 /* EqualsGreaterThanToken */) { return 1 /* True */; } } return 0 /* False */; } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(186 /* ArrowFunction */); + var node = createNode(187 /* ArrowFunction */); node.modifiers = parseModifiersForArrowFunction(); var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */); // Arrow functions are never generators. @@ -17514,7 +17532,7 @@ var ts; // a => (b => c) // And think that "(b =>" was actually a parenthesized arrow function with a missing // close paren. - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); // If we couldn't get parameters, we definitely could not parse out an arrow function. if (!node.parameters) { return undefined; @@ -17527,19 +17545,19 @@ var ts; // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation. // // So we need just a bit of lookahead to ensure that it can only be a signature. - if (!allowAmbiguity && token() !== 35 /* EqualsGreaterThanToken */ && token() !== 16 /* OpenBraceToken */) { + if (!allowAmbiguity && token() !== 36 /* EqualsGreaterThanToken */ && token() !== 17 /* OpenBraceToken */) { // Returning undefined here will cause our caller to rewind to where we started from. return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseFunctionBlock(/*allowYield*/ false, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); } - if (token() !== 24 /* SemicolonToken */ && - token() !== 88 /* FunctionKeyword */ && - token() !== 74 /* ClassKeyword */ && + if (token() !== 25 /* SemicolonToken */ && + token() !== 89 /* FunctionKeyword */ && + token() !== 75 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { // Check if we got a plain statement (i.e. no expression-statements, no function/class expressions/declarations) @@ -17564,17 +17582,17 @@ var ts; } function parseConditionalExpressionRest(leftOperand) { // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. - var questionToken = parseOptionalToken(54 /* QuestionToken */); + var questionToken = parseOptionalToken(55 /* QuestionToken */); if (!questionToken) { return leftOperand; } // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - var node = createNode(194 /* ConditionalExpression */, leftOperand.pos); + var node = createNode(195 /* ConditionalExpression */, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(55 /* ColonToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(55 /* ColonToken */)); + node.colonToken = parseExpectedToken(56 /* ColonToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(56 /* ColonToken */)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17583,7 +17601,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 91 /* InKeyword */ || t === 141 /* OfKeyword */; + return t === 92 /* InKeyword */ || t === 142 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -17612,16 +17630,16 @@ var ts; // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand // a ** b - c // ^token; leftOperand = b. Return b to the caller as a rightOperand - var consumeCurrentOperator = token() === 39 /* AsteriskAsteriskToken */ ? + var consumeCurrentOperator = token() === 40 /* AsteriskAsteriskToken */ ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token() === 91 /* InKeyword */ && inDisallowInContext()) { + if (token() === 92 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 117 /* AsKeyword */) { + if (token() === 118 /* AsKeyword */) { // Make sure we *do* perform ASI for constructs like this: // var x = foo // as (Bar) @@ -17642,48 +17660,48 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token() === 91 /* InKeyword */) { + if (inDisallowInContext() && token() === 92 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { switch (token()) { - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return 1; - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return 2; - case 48 /* BarToken */: + case 49 /* BarToken */: return 3; - case 49 /* CaretToken */: + case 50 /* CaretToken */: return 4; - case 47 /* AmpersandToken */: + case 48 /* AmpersandToken */: return 5; - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return 6; - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: - case 92 /* InstanceOfKeyword */: - case 91 /* InKeyword */: - case 117 /* AsKeyword */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: + case 93 /* InstanceOfKeyword */: + case 92 /* InKeyword */: + case 118 /* AsKeyword */: return 7; - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return 8; - case 36 /* PlusToken */: - case 37 /* MinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: return 9; - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: return 10; - case 39 /* AsteriskAsteriskToken */: + case 40 /* AsteriskAsteriskToken */: return 11; } // -1 is lower than all other precedences. Returning it will cause binary expression @@ -17691,45 +17709,45 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(193 /* BinaryExpression */, left.pos); + var node = createNode(194 /* BinaryExpression */, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(201 /* AsExpression */, left.pos); + var node = createNode(202 /* AsExpression */, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(191 /* PrefixUnaryExpression */); + var node = createNode(192 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(187 /* DeleteExpression */); + var node = createNode(188 /* DeleteExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(188 /* TypeOfExpression */); + var node = createNode(189 /* TypeOfExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(189 /* VoidExpression */); + var node = createNode(190 /* VoidExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token() === 120 /* AwaitKeyword */) { + if (token() === 121 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -17739,7 +17757,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(190 /* AwaitExpression */); + var node = createNode(191 /* AwaitExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -17763,7 +17781,7 @@ var ts; */ if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token() === 39 /* AsteriskAsteriskToken */ ? + return token() === 40 /* AsteriskAsteriskToken */ ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } @@ -17780,9 +17798,9 @@ var ts; */ var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 39 /* AsteriskAsteriskToken */) { + if (token() === 40 /* AsteriskAsteriskToken */) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 183 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 184 /* TypeAssertionExpression */) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -17807,23 +17825,23 @@ var ts; */ function parseSimpleUnaryExpression() { switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 79 /* DeleteKeyword */: + case 80 /* DeleteKeyword */: return parseDeleteExpression(); - case 102 /* TypeOfKeyword */: + case 103 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 104 /* VoidKeyword */: + case 105 /* VoidKeyword */: return parseVoidExpression(); - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: // This is modified UnaryExpression grammar in TypeScript // UnaryExpression (modified): // < type > UnaryExpression return parseTypeAssertion(); - case 120 /* AwaitKeyword */: + case 121 /* AwaitKeyword */: if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -17846,16 +17864,16 @@ var ts; // This function is called inside parseUnaryExpression to decide // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 79 /* DeleteKeyword */: - case 102 /* TypeOfKeyword */: - case 104 /* VoidKeyword */: - case 120 /* AwaitKeyword */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 80 /* DeleteKeyword */: + case 103 /* TypeOfKeyword */: + case 105 /* VoidKeyword */: + case 121 /* AwaitKeyword */: return false; - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression if (sourceFile.languageVariant !== 1 /* JSX */) { return false; @@ -17878,21 +17896,21 @@ var ts; * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ function parseIncrementExpression() { - if (token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) { - var node = createNode(191 /* PrefixUnaryExpression */); + if (token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) { + var node = createNode(192 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 /* JSX */ && token() === 26 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 /* JSX */ && token() === 27 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { // JSXElement is part of primaryExpression return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(192 /* PostfixUnaryExpression */, expression.pos); + if ((token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(193 /* PostfixUnaryExpression */, expression.pos); node.operand = expression; node.operator = token(); nextToken(); @@ -17931,7 +17949,7 @@ var ts; // the last two CallExpression productions. Or we have a MemberExpression which either // completes the LeftHandSideExpression, or starts the beginning of the first four // CallExpression productions. - var expression = token() === 96 /* SuperKeyword */ + var expression = token() === 97 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); // Now, we *may* be complete. However, we might have consumed the start of a @@ -17991,14 +18009,14 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token() === 18 /* OpenParenToken */ || token() === 22 /* DotToken */ || token() === 20 /* OpenBracketToken */) { + if (token() === 19 /* OpenParenToken */ || token() === 23 /* DotToken */ || token() === 21 /* OpenBracketToken */) { return expression; } // If we have seen "super" it must be followed by '(' or '.'. // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(178 /* PropertyAccessExpression */, expression.pos); + var node = createNode(179 /* PropertyAccessExpression */, expression.pos); node.expression = expression; - parseExpectedToken(22 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(23 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); return finishNode(node); } @@ -18006,10 +18024,10 @@ var ts; if (lhs.kind !== rhs.kind) { return false; } - if (lhs.kind === 70 /* Identifier */) { + if (lhs.kind === 71 /* Identifier */) { return lhs.text === rhs.text; } - if (lhs.kind === 98 /* ThisKeyword */) { + if (lhs.kind === 99 /* ThisKeyword */) { return true; } // If we are at this statement then we must have PropertyAccessExpression and because tag name in Jsx element can only @@ -18021,8 +18039,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 250 /* JsxOpeningElement */) { - var node = createNode(248 /* JsxElement */, opening.pos); + if (opening.kind === 251 /* JsxOpeningElement */) { + var node = createNode(249 /* JsxElement */, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -18032,7 +18050,7 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 249 /* JsxSelfClosingElement */); + ts.Debug.assert(opening.kind === 250 /* JsxSelfClosingElement */); // Nothing else to do for self-closing elements result = opening; } @@ -18043,15 +18061,15 @@ var ts; // does less damage and we can report a better error. // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios // of one sort or another. - if (inExpressionContext && token() === 26 /* LessThanToken */) { + if (inExpressionContext && token() === 27 /* LessThanToken */) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(193 /* BinaryExpression */, result.pos); + var badNode = createNode(194 /* BinaryExpression */, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(25 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); + badNode.operatorToken = createMissingNode(26 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } @@ -18060,16 +18078,18 @@ var ts; } function parseJsxText() { var node = createNode(10 /* JsxText */, scanner.getStartPos()); + node.containsOnlyWhiteSpaces = currentToken === 11 /* JsxTextAllWhiteSpaces */; currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token()) { case 10 /* JsxText */: + case 11 /* JsxTextAllWhiteSpaces */: return parseJsxText(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseJsxExpression(/*inExpressionContext*/ false); - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); } ts.Debug.fail("Unknown JSX child kind " + token()); @@ -18080,7 +18100,7 @@ var ts; parsingContext |= 1 << 14 /* JsxChildren */; while (true) { currentToken = scanner.reScanJsxToken(); - if (token() === 27 /* LessThanSlashToken */) { + if (token() === 28 /* LessThanSlashToken */) { // Closing tag break; } @@ -18093,40 +18113,43 @@ var ts; else if (token() === 7 /* ConflictMarkerTrivia */) { break; } - result.push(parseJsxChild()); + var child = parseJsxChild(); + if (child) { + result.push(child); + } } result.end = scanner.getTokenPos(); parsingContext = saveParsingContext; return result; } function parseJsxAttributes() { - var jsxAttributes = createNode(253 /* JsxAttributes */); + var jsxAttributes = createNode(254 /* JsxAttributes */); jsxAttributes.properties = parseList(13 /* JsxAttributes */, parseJsxAttribute); return finishNode(jsxAttributes); } function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { var fullStart = scanner.getStartPos(); - parseExpected(26 /* LessThanToken */); + parseExpected(27 /* LessThanToken */); var tagName = parseJsxElementName(); var attributes = parseJsxAttributes(); var node; - if (token() === 28 /* GreaterThanToken */) { + if (token() === 29 /* GreaterThanToken */) { // Closing tag, so scan the immediately-following text with the JSX scanning instead // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate // scanning errors - node = createNode(250 /* JsxOpeningElement */, fullStart); + node = createNode(251 /* JsxOpeningElement */, fullStart); scanJsxText(); } else { - parseExpected(40 /* SlashToken */); + parseExpected(41 /* SlashToken */); if (inExpressionContext) { - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); } else { - parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); + parseExpected(29 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } - node = createNode(249 /* JsxSelfClosingElement */, fullStart); + node = createNode(250 /* JsxSelfClosingElement */, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -18139,10 +18162,10 @@ var ts; // primaryExpression in the form of an identifier and "this" keyword // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword // We only want to consider "this" as a primaryExpression - var expression = token() === 98 /* ThisKeyword */ ? + var expression = token() === 99 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); - while (parseOptional(22 /* DotToken */)) { - var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos); + while (parseOptional(23 /* DotToken */)) { + var propertyAccess = createNode(179 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); expression = finishNode(propertyAccess); @@ -18150,29 +18173,29 @@ var ts; return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(255 /* JsxExpression */); - parseExpected(16 /* OpenBraceToken */); - if (token() !== 17 /* CloseBraceToken */) { - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(256 /* JsxExpression */); + parseExpected(17 /* OpenBraceToken */); + if (token() !== 18 /* CloseBraceToken */) { + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { - parseExpected(17 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false); + parseExpected(18 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } return finishNode(node); } function parseJsxAttribute() { - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(252 /* JsxAttribute */); + var node = createNode(253 /* JsxAttribute */); node.name = parseIdentifierName(); - if (token() === 57 /* EqualsToken */) { + if (token() === 58 /* EqualsToken */) { switch (scanJsxAttributeValue()) { case 9 /* StringLiteral */: node.initializer = parseLiteralNode(); @@ -18185,72 +18208,72 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(254 /* JsxSpreadAttribute */); - parseExpected(16 /* OpenBraceToken */); - parseExpected(23 /* DotDotDotToken */); + var node = createNode(255 /* JsxSpreadAttribute */); + parseExpected(17 /* OpenBraceToken */); + parseExpected(24 /* DotDotDotToken */); node.expression = parseExpression(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(251 /* JsxClosingElement */); - parseExpected(27 /* LessThanSlashToken */); + var node = createNode(252 /* JsxClosingElement */); + parseExpected(28 /* LessThanSlashToken */); node.tagName = parseJsxElementName(); if (inExpressionContext) { - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); } else { - parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); + parseExpected(29 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } return finishNode(node); } function parseTypeAssertion() { - var node = createNode(183 /* TypeAssertionExpression */); - parseExpected(26 /* LessThanToken */); + var node = createNode(184 /* TypeAssertionExpression */); + parseExpected(27 /* LessThanToken */); node.type = parseType(); - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseMemberExpressionRest(expression) { while (true) { - var dotToken = parseOptionalToken(22 /* DotToken */); + var dotToken = parseOptionalToken(23 /* DotToken */); if (dotToken) { - var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos); + var propertyAccess = createNode(179 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); expression = finishNode(propertyAccess); continue; } - if (token() === 50 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 51 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); - var nonNullExpression = createNode(202 /* NonNullExpression */, expression.pos); + var nonNullExpression = createNode(203 /* NonNullExpression */, expression.pos); nonNullExpression.expression = expression; expression = finishNode(nonNullExpression); continue; } // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(20 /* OpenBracketToken */)) { - var indexedAccess = createNode(179 /* ElementAccessExpression */, expression.pos); + if (!inDecoratorContext() && parseOptional(21 /* OpenBracketToken */)) { + var indexedAccess = createNode(180 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". // Check for that common pattern and report a better error message. - if (token() !== 21 /* CloseBracketToken */) { + if (token() !== 22 /* CloseBracketToken */) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { var literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); expression = finishNode(indexedAccess); continue; } - if (token() === 12 /* NoSubstitutionTemplateLiteral */ || token() === 13 /* TemplateHead */) { - var tagExpression = createNode(182 /* TaggedTemplateExpression */, expression.pos); + if (token() === 13 /* NoSubstitutionTemplateLiteral */ || token() === 14 /* TemplateHead */) { + var tagExpression = createNode(183 /* TaggedTemplateExpression */, expression.pos); tagExpression.tag = expression; - tagExpression.template = token() === 12 /* NoSubstitutionTemplateLiteral */ + tagExpression.template = token() === 13 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -18262,7 +18285,7 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { // See if this is the start of a generic invocation. If so, consume it and // keep checking for postfix expressions. Otherwise, it's just a '<' that's // part of an arithmetic expression. Break out so we consume it higher in the @@ -18271,15 +18294,15 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(180 /* CallExpression */, expression.pos); + var callExpr = createNode(181 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token() === 18 /* OpenParenToken */) { - var callExpr = createNode(180 /* CallExpression */, expression.pos); + else if (token() === 19 /* OpenParenToken */) { + var callExpr = createNode(181 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -18289,17 +18312,17 @@ var ts; } } function parseArgumentList() { - parseExpected(18 /* OpenParenToken */); + parseExpected(19 /* OpenParenToken */); var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return result; } function parseTypeArgumentsInExpression() { - if (!parseOptional(26 /* LessThanToken */)) { + if (!parseOptional(27 /* LessThanToken */)) { return undefined; } var typeArguments = parseDelimitedList(19 /* TypeArguments */, parseType); - if (!parseExpected(28 /* GreaterThanToken */)) { + if (!parseExpected(29 /* GreaterThanToken */)) { // If it doesn't have the closing > then it's definitely not an type argument list. return undefined; } @@ -18311,32 +18334,32 @@ var ts; } function canFollowTypeArgumentsInExpression() { switch (token()) { - case 18 /* OpenParenToken */: // foo( + case 19 /* OpenParenToken */: // foo( // this case are the only case where this token can legally follow a type argument // list. So we definitely want to treat this as a type arg list. - case 22 /* DotToken */: // foo. - case 19 /* CloseParenToken */: // foo) - case 21 /* CloseBracketToken */: // foo] - case 55 /* ColonToken */: // foo: - case 24 /* SemicolonToken */: // foo; - case 54 /* QuestionToken */: // foo? - case 31 /* EqualsEqualsToken */: // foo == - case 33 /* EqualsEqualsEqualsToken */: // foo === - case 32 /* ExclamationEqualsToken */: // foo != - case 34 /* ExclamationEqualsEqualsToken */: // foo !== - case 52 /* AmpersandAmpersandToken */: // foo && - case 53 /* BarBarToken */: // foo || - case 49 /* CaretToken */: // foo ^ - case 47 /* AmpersandToken */: // foo & - case 48 /* BarToken */: // foo | - case 17 /* CloseBraceToken */: // foo } + case 23 /* DotToken */: // foo. + case 20 /* CloseParenToken */: // foo) + case 22 /* CloseBracketToken */: // foo] + case 56 /* ColonToken */: // foo: + case 25 /* SemicolonToken */: // foo; + case 55 /* QuestionToken */: // foo? + case 32 /* EqualsEqualsToken */: // foo == + case 34 /* EqualsEqualsEqualsToken */: // foo === + case 33 /* ExclamationEqualsToken */: // foo != + case 35 /* ExclamationEqualsEqualsToken */: // foo !== + case 53 /* AmpersandAmpersandToken */: // foo && + case 54 /* BarBarToken */: // foo || + case 50 /* CaretToken */: // foo ^ + case 48 /* AmpersandToken */: // foo & + case 49 /* BarToken */: // foo | + case 18 /* CloseBraceToken */: // foo } case 1 /* EndOfFileToken */: // these cases can't legally follow a type arg list. However, they're not legal // expressions either. The user is probably in the middle of a generic type. So // treat it as such. return true; - case 25 /* CommaToken */: // foo, - case 16 /* OpenBraceToken */: // foo { + case 26 /* CommaToken */: // foo, + case 17 /* OpenBraceToken */: // foo { // We don't want to treat these as type arguments. Otherwise we'll parse this // as an invocation expression. Instead, we want to parse out the expression // in isolation from the type arguments. @@ -18349,21 +18372,21 @@ var ts; switch (token()) { case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseTokenNode(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseParenthesizedExpression(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseArrayLiteralExpression(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. // If we encounter `async [no LineTerminator here] function` then this is an async // function; otherwise, its an identifier. @@ -18371,68 +18394,68 @@ var ts; break; } return parseFunctionExpression(); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassExpression(); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionExpression(); - case 93 /* NewKeyword */: + case 94 /* NewKeyword */: return parseNewExpression(); - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - if (reScanSlashToken() === 11 /* RegularExpressionLiteral */) { + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + if (reScanSlashToken() === 12 /* RegularExpressionLiteral */) { return parseLiteralNode(); } break; - case 13 /* TemplateHead */: + case 14 /* TemplateHead */: return parseTemplateExpression(); } return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(184 /* ParenthesizedExpression */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(185 /* ParenthesizedExpression */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseSpreadElement() { - var node = createNode(197 /* SpreadElement */); - parseExpected(23 /* DotDotDotToken */); + var node = createNode(198 /* SpreadElement */); + parseExpected(24 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token() === 23 /* DotDotDotToken */ ? parseSpreadElement() : - token() === 25 /* CommaToken */ ? createNode(199 /* OmittedExpression */) : + return token() === 24 /* DotDotDotToken */ ? parseSpreadElement() : + token() === 26 /* CommaToken */ ? createNode(200 /* OmittedExpression */) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(176 /* ArrayLiteralExpression */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(177 /* ArrayLiteralExpression */); + parseExpected(21 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(124 /* GetKeyword */)) { - return parseAccessorDeclaration(152 /* GetAccessor */, fullStart, decorators, modifiers); + if (parseContextualModifier(125 /* GetKeyword */)) { + return parseAccessorDeclaration(153 /* GetAccessor */, fullStart, decorators, modifiers); } - else if (parseContextualModifier(134 /* SetKeyword */)) { - return parseAccessorDeclaration(153 /* SetAccessor */, fullStart, decorators, modifiers); + else if (parseContextualModifier(135 /* SetKeyword */)) { + return parseAccessorDeclaration(154 /* SetAccessor */, fullStart, decorators, modifiers); } return undefined; } function parseObjectLiteralElement() { var fullStart = scanner.getStartPos(); - var dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); if (dotDotDotToken) { - var spreadElement = createNode(262 /* SpreadAssignment */, fullStart); + var spreadElement = createNode(263 /* SpreadAssignment */, fullStart); spreadElement.expression = parseAssignmentExpressionOrHigher(); return addJSDocComment(finishNode(spreadElement)); } @@ -18442,12 +18465,12 @@ var ts; if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + var asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (asteriskToken || token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (asteriskToken || token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } // check if it is short-hand property assignment or normal property assignment @@ -18455,12 +18478,12 @@ var ts; // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 /* CommaToken */ || token() === 17 /* CloseBraceToken */ || token() === 57 /* EqualsToken */); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 26 /* CommaToken */ || token() === 18 /* CloseBraceToken */ || token() === 58 /* EqualsToken */); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(261 /* ShorthandPropertyAssignment */, fullStart); + var shorthandDeclaration = createNode(262 /* ShorthandPropertyAssignment */, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(57 /* EqualsToken */); + var equalsToken = parseOptionalToken(58 /* EqualsToken */); if (equalsToken) { shorthandDeclaration.equalsToken = equalsToken; shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); @@ -18468,23 +18491,23 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(260 /* PropertyAssignment */, fullStart); + var propertyAssignment = createNode(261 /* PropertyAssignment */, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); return addJSDocComment(finishNode(propertyAssignment)); } } function parseObjectLiteralExpression() { - var node = createNode(177 /* ObjectLiteralExpression */); - parseExpected(16 /* OpenBraceToken */); + var node = createNode(178 /* ObjectLiteralExpression */); + parseExpected(17 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimiter*/ true); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseFunctionExpression() { @@ -18497,10 +18520,10 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(/*val*/ false); } - var node = createNode(185 /* FunctionExpression */); + var node = createNode(186 /* FunctionExpression */); node.modifiers = parseModifiers(); - parseExpected(88 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + parseExpected(89 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var isGenerator = !!node.asteriskToken; var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */); node.name = @@ -18508,7 +18531,7 @@ var ts; isGenerator ? doInYieldContext(parseOptionalIdentifier) : isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); if (saveDecoratorContext) { setDecoratorContext(/*val*/ true); @@ -18520,30 +18543,30 @@ var ts; } function parseNewExpression() { var fullStart = scanner.getStartPos(); - parseExpected(93 /* NewKeyword */); - if (parseOptional(22 /* DotToken */)) { - var node_1 = createNode(203 /* MetaProperty */, fullStart); - node_1.keywordToken = 93 /* NewKeyword */; + parseExpected(94 /* NewKeyword */); + if (parseOptional(23 /* DotToken */)) { + var node_1 = createNode(204 /* MetaProperty */, fullStart); + node_1.keywordToken = 94 /* NewKeyword */; node_1.name = parseIdentifierName(); return finishNode(node_1); } - var node = createNode(181 /* NewExpression */, fullStart); + var node = createNode(182 /* NewExpression */, fullStart); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token() === 18 /* OpenParenToken */) { + if (node.typeArguments || token() === 19 /* OpenParenToken */) { node.arguments = parseArgumentList(); } return finishNode(node); } // STATEMENTS function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(206 /* Block */); - if (parseExpected(16 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { + var node = createNode(207 /* Block */); + if (parseExpected(17 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.statements = createMissingList(); @@ -18570,52 +18593,52 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(208 /* EmptyStatement */); - parseExpected(24 /* SemicolonToken */); + var node = createNode(209 /* EmptyStatement */); + parseExpected(25 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(210 /* IfStatement */); - parseExpected(89 /* IfKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(211 /* IfStatement */); + parseExpected(90 /* IfKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(81 /* ElseKeyword */) ? parseStatement() : undefined; + node.elseStatement = parseOptional(82 /* ElseKeyword */) ? parseStatement() : undefined; return finishNode(node); } function parseDoStatement() { - var node = createNode(211 /* DoStatement */); - parseExpected(80 /* DoKeyword */); + var node = createNode(212 /* DoStatement */); + parseExpected(81 /* DoKeyword */); node.statement = parseStatement(); - parseExpected(105 /* WhileKeyword */); - parseExpected(18 /* OpenParenToken */); + parseExpected(106 /* WhileKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby // do;while(0)x will have a semicolon inserted before x. - parseOptional(24 /* SemicolonToken */); + parseOptional(25 /* SemicolonToken */); return finishNode(node); } function parseWhileStatement() { - var node = createNode(212 /* WhileStatement */); - parseExpected(105 /* WhileKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(213 /* WhileStatement */); + parseExpected(106 /* WhileKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.statement = parseStatement(); return finishNode(node); } function parseForOrForInOrForOfStatement() { var pos = getNodePos(); - parseExpected(87 /* ForKeyword */); - var awaitToken = parseOptionalToken(120 /* AwaitKeyword */); - parseExpected(18 /* OpenParenToken */); + parseExpected(88 /* ForKeyword */); + var awaitToken = parseOptionalToken(121 /* AwaitKeyword */); + parseExpected(19 /* OpenParenToken */); var initializer = undefined; - if (token() !== 24 /* SemicolonToken */) { - if (token() === 103 /* VarKeyword */ || token() === 109 /* LetKeyword */ || token() === 75 /* ConstKeyword */) { + if (token() !== 25 /* SemicolonToken */) { + if (token() === 104 /* VarKeyword */ || token() === 110 /* LetKeyword */ || token() === 76 /* ConstKeyword */) { initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } else { @@ -18623,33 +18646,33 @@ var ts; } } var forOrForInOrForOfStatement; - if (awaitToken ? parseExpected(141 /* OfKeyword */) : parseOptional(141 /* OfKeyword */)) { - var forOfStatement = createNode(215 /* ForOfStatement */, pos); + if (awaitToken ? parseExpected(142 /* OfKeyword */) : parseOptional(142 /* OfKeyword */)) { + var forOfStatement = createNode(216 /* ForOfStatement */, pos); forOfStatement.awaitModifier = awaitToken; forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forOfStatement; } - else if (parseOptional(91 /* InKeyword */)) { - var forInStatement = createNode(214 /* ForInStatement */, pos); + else if (parseOptional(92 /* InKeyword */)) { + var forInStatement = createNode(215 /* ForInStatement */, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forInStatement; } else { - var forStatement = createNode(213 /* ForStatement */, pos); + var forStatement = createNode(214 /* ForStatement */, pos); forStatement.initializer = initializer; - parseExpected(24 /* SemicolonToken */); - if (token() !== 24 /* SemicolonToken */ && token() !== 19 /* CloseParenToken */) { + parseExpected(25 /* SemicolonToken */); + if (token() !== 25 /* SemicolonToken */ && token() !== 20 /* CloseParenToken */) { forStatement.condition = allowInAnd(parseExpression); } - parseExpected(24 /* SemicolonToken */); - if (token() !== 19 /* CloseParenToken */) { + parseExpected(25 /* SemicolonToken */); + if (token() !== 20 /* CloseParenToken */) { forStatement.incrementor = allowInAnd(parseExpression); } - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forStatement; } forOrForInOrForOfStatement.statement = parseStatement(); @@ -18657,7 +18680,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 217 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */); + parseExpected(kind === 218 /* BreakStatement */ ? 72 /* BreakKeyword */ : 77 /* ContinueKeyword */); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -18665,8 +18688,8 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(218 /* ReturnStatement */); - parseExpected(95 /* ReturnKeyword */); + var node = createNode(219 /* ReturnStatement */); + parseExpected(96 /* ReturnKeyword */); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); } @@ -18674,42 +18697,42 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(219 /* WithStatement */); - parseExpected(106 /* WithKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(220 /* WithStatement */); + parseExpected(107 /* WithKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.statement = parseStatement(); return finishNode(node); } function parseCaseClause() { - var node = createNode(256 /* CaseClause */); - parseExpected(72 /* CaseKeyword */); + var node = createNode(257 /* CaseClause */); + parseExpected(73 /* CaseKeyword */); node.expression = allowInAnd(parseExpression); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(node); } function parseDefaultClause() { - var node = createNode(257 /* DefaultClause */); - parseExpected(78 /* DefaultKeyword */); - parseExpected(55 /* ColonToken */); + var node = createNode(258 /* DefaultClause */); + parseExpected(79 /* DefaultKeyword */); + parseExpected(56 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token() === 72 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 73 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(220 /* SwitchStatement */); - parseExpected(97 /* SwitchKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(221 /* SwitchStatement */); + parseExpected(98 /* SwitchKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); - var caseBlock = createNode(234 /* CaseBlock */, scanner.getStartPos()); - parseExpected(16 /* OpenBraceToken */); + parseExpected(20 /* CloseParenToken */); + var caseBlock = createNode(235 /* CaseBlock */, scanner.getStartPos()); + parseExpected(17 /* OpenBraceToken */); caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); node.caseBlock = finishNode(caseBlock); return finishNode(node); } @@ -18721,39 +18744,39 @@ var ts; // directly as that might consume an expression on the following line. // We just return 'undefined' in that case. The actual error will be reported in the // grammar walker. - var node = createNode(222 /* ThrowStatement */); - parseExpected(99 /* ThrowKeyword */); + var node = createNode(223 /* ThrowStatement */); + parseExpected(100 /* ThrowKeyword */); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } // TODO: Review for error recovery function parseTryStatement() { - var node = createNode(223 /* TryStatement */); - parseExpected(101 /* TryKeyword */); + var node = createNode(224 /* TryStatement */); + parseExpected(102 /* TryKeyword */); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - node.catchClause = token() === 73 /* CatchKeyword */ ? parseCatchClause() : undefined; + node.catchClause = token() === 74 /* CatchKeyword */ ? parseCatchClause() : undefined; // If we don't have a catch clause, then we must have a finally clause. Try to parse // one out no matter what. - if (!node.catchClause || token() === 86 /* FinallyKeyword */) { - parseExpected(86 /* FinallyKeyword */); + if (!node.catchClause || token() === 87 /* FinallyKeyword */) { + parseExpected(87 /* FinallyKeyword */); node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(259 /* CatchClause */); - parseExpected(73 /* CatchKeyword */); - if (parseExpected(18 /* OpenParenToken */)) { + var result = createNode(260 /* CatchClause */); + parseExpected(74 /* CatchKeyword */); + if (parseExpected(19 /* OpenParenToken */)) { result.variableDeclaration = parseVariableDeclaration(); } - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(224 /* DebuggerStatement */); - parseExpected(77 /* DebuggerKeyword */); + var node = createNode(225 /* DebuggerStatement */); + parseExpected(78 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); } @@ -18763,14 +18786,14 @@ var ts; // a colon. var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); - if (expression.kind === 70 /* Identifier */ && parseOptional(55 /* ColonToken */)) { - var labeledStatement = createNode(221 /* LabeledStatement */, fullStart); + if (expression.kind === 71 /* Identifier */ && parseOptional(56 /* ColonToken */)) { + var labeledStatement = createNode(222 /* LabeledStatement */, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(209 /* ExpressionStatement */, fullStart); + var expressionStatement = createNode(210 /* ExpressionStatement */, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -18782,11 +18805,11 @@ var ts; } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 74 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 75 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 88 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 89 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); @@ -18795,12 +18818,12 @@ var ts; function isDeclaration() { while (true) { switch (token()) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: return true; // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; // however, an identifier cannot be followed by another identifier on the same line. This is what we @@ -18823,41 +18846,41 @@ var ts; // I {} // // could be legal, it would add complexity for very little gain. - case 108 /* InterfaceKeyword */: - case 137 /* TypeKeyword */: + case 109 /* InterfaceKeyword */: + case 138 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 116 /* AbstractKeyword */: - case 119 /* AsyncKeyword */: - case 123 /* DeclareKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 113 /* PublicKeyword */: - case 130 /* ReadonlyKeyword */: + case 117 /* AbstractKeyword */: + case 120 /* AsyncKeyword */: + case 124 /* DeclareKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 131 /* ReadonlyKeyword */: nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 140 /* GlobalKeyword */: + case 141 /* GlobalKeyword */: nextToken(); - return token() === 16 /* OpenBraceToken */ || token() === 70 /* Identifier */ || token() === 83 /* ExportKeyword */; - case 90 /* ImportKeyword */: + return token() === 17 /* OpenBraceToken */ || token() === 71 /* Identifier */ || token() === 84 /* ExportKeyword */; + case 91 /* ImportKeyword */: nextToken(); - return token() === 9 /* StringLiteral */ || token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token()); - case 83 /* ExportKeyword */: + return token() === 9 /* StringLiteral */ || token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token()); + case 84 /* ExportKeyword */: nextToken(); - if (token() === 57 /* EqualsToken */ || token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */ || token() === 78 /* DefaultKeyword */ || - token() === 117 /* AsKeyword */) { + if (token() === 58 /* EqualsToken */ || token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */ || token() === 79 /* DefaultKeyword */ || + token() === 118 /* AsKeyword */) { return true; } continue; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: nextToken(); continue; default: @@ -18870,49 +18893,49 @@ var ts; } function isStartOfStatement() { switch (token()) { - case 56 /* AtToken */: - case 24 /* SemicolonToken */: - case 16 /* OpenBraceToken */: - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: - case 89 /* IfKeyword */: - case 80 /* DoKeyword */: - case 105 /* WhileKeyword */: - case 87 /* ForKeyword */: - case 76 /* ContinueKeyword */: - case 71 /* BreakKeyword */: - case 95 /* ReturnKeyword */: - case 106 /* WithKeyword */: - case 97 /* SwitchKeyword */: - case 99 /* ThrowKeyword */: - case 101 /* TryKeyword */: - case 77 /* DebuggerKeyword */: + case 57 /* AtToken */: + case 25 /* SemicolonToken */: + case 17 /* OpenBraceToken */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: + case 90 /* IfKeyword */: + case 81 /* DoKeyword */: + case 106 /* WhileKeyword */: + case 88 /* ForKeyword */: + case 77 /* ContinueKeyword */: + case 72 /* BreakKeyword */: + case 96 /* ReturnKeyword */: + case 107 /* WithKeyword */: + case 98 /* SwitchKeyword */: + case 100 /* ThrowKeyword */: + case 102 /* TryKeyword */: + case 78 /* DebuggerKeyword */: // 'catch' and 'finally' do not actually indicate that the code is part of a statement, // however, we say they are here so that we may gracefully parse them and error later. - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return true; - case 75 /* ConstKeyword */: - case 83 /* ExportKeyword */: - case 90 /* ImportKeyword */: + case 76 /* ConstKeyword */: + case 84 /* ExportKeyword */: + case 91 /* ImportKeyword */: return isStartOfDeclaration(); - case 119 /* AsyncKeyword */: - case 123 /* DeclareKeyword */: - case 108 /* InterfaceKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: - case 137 /* TypeKeyword */: - case 140 /* GlobalKeyword */: + case 120 /* AsyncKeyword */: + case 124 /* DeclareKeyword */: + case 109 /* InterfaceKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: + case 138 /* TypeKeyword */: + case 141 /* GlobalKeyword */: // When these don't start a declaration, they're an identifier in an expression statement return true; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: // When these don't start a declaration, they may be the start of a class member if an identifier // immediately follows. Otherwise they're an identifier in an expression statement. return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); @@ -18922,7 +18945,7 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token() === 16 /* OpenBraceToken */ || token() === 20 /* OpenBracketToken */; + return isIdentifier() || token() === 17 /* OpenBraceToken */ || token() === 21 /* OpenBracketToken */; } function isLetDeclaration() { // In ES6 'let' always starts a lexical declaration if followed by an identifier or { @@ -18931,67 +18954,67 @@ var ts; } function parseStatement() { switch (token()) { - case 24 /* SemicolonToken */: + case 25 /* SemicolonToken */: return parseEmptyStatement(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseBlock(/*ignoreMissingOpenBrace*/ false); - case 103 /* VarKeyword */: + case 104 /* VarKeyword */: return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 109 /* LetKeyword */: + case 110 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); } break; - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 89 /* IfKeyword */: + case 90 /* IfKeyword */: return parseIfStatement(); - case 80 /* DoKeyword */: + case 81 /* DoKeyword */: return parseDoStatement(); - case 105 /* WhileKeyword */: + case 106 /* WhileKeyword */: return parseWhileStatement(); - case 87 /* ForKeyword */: + case 88 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 76 /* ContinueKeyword */: - return parseBreakOrContinueStatement(216 /* ContinueStatement */); - case 71 /* BreakKeyword */: - return parseBreakOrContinueStatement(217 /* BreakStatement */); - case 95 /* ReturnKeyword */: + case 77 /* ContinueKeyword */: + return parseBreakOrContinueStatement(217 /* ContinueStatement */); + case 72 /* BreakKeyword */: + return parseBreakOrContinueStatement(218 /* BreakStatement */); + case 96 /* ReturnKeyword */: return parseReturnStatement(); - case 106 /* WithKeyword */: + case 107 /* WithKeyword */: return parseWithStatement(); - case 97 /* SwitchKeyword */: + case 98 /* SwitchKeyword */: return parseSwitchStatement(); - case 99 /* ThrowKeyword */: + case 100 /* ThrowKeyword */: return parseThrowStatement(); - case 101 /* TryKeyword */: + case 102 /* TryKeyword */: // Include 'catch' and 'finally' for error recovery. - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return parseTryStatement(); - case 77 /* DebuggerKeyword */: + case 78 /* DebuggerKeyword */: return parseDebuggerStatement(); - case 56 /* AtToken */: + case 57 /* AtToken */: return parseDeclaration(); - case 119 /* AsyncKeyword */: - case 108 /* InterfaceKeyword */: - case 137 /* TypeKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: - case 123 /* DeclareKeyword */: - case 75 /* ConstKeyword */: - case 82 /* EnumKeyword */: - case 83 /* ExportKeyword */: - case 90 /* ImportKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 113 /* PublicKeyword */: - case 116 /* AbstractKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: - case 140 /* GlobalKeyword */: + case 120 /* AsyncKeyword */: + case 109 /* InterfaceKeyword */: + case 138 /* TypeKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: + case 124 /* DeclareKeyword */: + case 76 /* ConstKeyword */: + case 83 /* EnumKeyword */: + case 84 /* ExportKeyword */: + case 91 /* ImportKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 117 /* AbstractKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: + case 141 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -19004,33 +19027,33 @@ var ts; var decorators = parseDecorators(); var modifiers = parseModifiers(); switch (token()) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: return parseVariableStatement(fullStart, decorators, modifiers); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassDeclaration(fullStart, decorators, modifiers); - case 108 /* InterfaceKeyword */: + case 109 /* InterfaceKeyword */: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 137 /* TypeKeyword */: + case 138 /* TypeKeyword */: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 82 /* EnumKeyword */: + case 83 /* EnumKeyword */: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 140 /* GlobalKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: + case 141 /* GlobalKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: return parseModuleDeclaration(fullStart, decorators, modifiers); - case 90 /* ImportKeyword */: + case 91 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: nextToken(); switch (token()) { - case 78 /* DefaultKeyword */: - case 57 /* EqualsToken */: + case 79 /* DefaultKeyword */: + case 58 /* EqualsToken */: return parseExportAssignment(fullStart, decorators, modifiers); - case 117 /* AsKeyword */: + case 118 /* AsKeyword */: return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); default: return parseExportDeclaration(fullStart, decorators, modifiers); @@ -19039,7 +19062,7 @@ var ts; if (decorators || modifiers) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(246 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(247 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; node.modifiers = modifiers; @@ -19052,7 +19075,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9 /* StringLiteral */); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token() !== 16 /* OpenBraceToken */ && canParseSemicolon()) { + if (token() !== 17 /* OpenBraceToken */ && canParseSemicolon()) { parseSemicolon(); return; } @@ -19060,25 +19083,25 @@ var ts; } // DECLARATIONS function parseArrayBindingElement() { - if (token() === 25 /* CommaToken */) { - return createNode(199 /* OmittedExpression */); + if (token() === 26 /* CommaToken */) { + return createNode(200 /* OmittedExpression */); } - var node = createNode(175 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(176 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(175 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(176 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token() !== 55 /* ColonToken */) { + if (tokenIsIdentifier && token() !== 56 /* ColonToken */) { node.name = propertyName; } else { - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } @@ -19086,33 +19109,33 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(173 /* ObjectBindingPattern */); - parseExpected(16 /* OpenBraceToken */); + var node = createNode(174 /* ObjectBindingPattern */); + parseExpected(17 /* OpenBraceToken */); node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(174 /* ArrayBindingPattern */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(175 /* ArrayBindingPattern */); + parseExpected(21 /* OpenBracketToken */); node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function isIdentifierOrPattern() { - return token() === 16 /* OpenBraceToken */ || token() === 20 /* OpenBracketToken */ || isIdentifier(); + return token() === 17 /* OpenBraceToken */ || token() === 21 /* OpenBracketToken */ || isIdentifier(); } function parseIdentifierOrPattern() { - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return parseArrayBindingPattern(); } - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(225 /* VariableDeclaration */); + var node = createNode(226 /* VariableDeclaration */); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token())) { @@ -19121,14 +19144,14 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(226 /* VariableDeclarationList */); + var node = createNode(227 /* VariableDeclarationList */); switch (token()) { - case 103 /* VarKeyword */: + case 104 /* VarKeyword */: break; - case 109 /* LetKeyword */: + case 110 /* LetKeyword */: node.flags |= 1 /* Let */; break; - case 75 /* ConstKeyword */: + case 76 /* ConstKeyword */: node.flags |= 2 /* Const */; break; default: @@ -19144,7 +19167,7 @@ var ts; // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - if (token() === 141 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 142 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -19156,10 +19179,10 @@ var ts; return finishNode(node); } function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 19 /* CloseParenToken */; + return nextTokenIsIdentifier() && nextToken() === 20 /* CloseParenToken */; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(207 /* VariableStatement */, fullStart); + var node = createNode(208 /* VariableStatement */, fullStart); node.decorators = decorators; node.modifiers = modifiers; node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); @@ -19167,29 +19190,29 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(227 /* FunctionDeclaration */, fullStart); + var node = createNode(228 /* FunctionDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(88 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + parseExpected(89 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); node.name = ts.hasModifier(node, 512 /* Default */) ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = ts.hasModifier(node, 256 /* Async */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(151 /* Constructor */, pos); + var node = createNode(152 /* Constructor */, pos); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(122 /* ConstructorKeyword */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + parseExpected(123 /* ConstructorKeyword */); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(150 /* MethodDeclaration */, fullStart); + var method = createNode(151 /* MethodDeclaration */, fullStart); method.decorators = decorators; method.modifiers = modifiers; method.asteriskToken = asteriskToken; @@ -19197,12 +19220,12 @@ var ts; method.questionToken = questionToken; var isGenerator = !!asteriskToken; var isAsync = ts.hasModifier(method, 256 /* Async */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(148 /* PropertyDeclaration */, fullStart); + var property = createNode(149 /* PropertyDeclaration */, fullStart); property.decorators = decorators; property.modifiers = modifiers; property.name = name; @@ -19224,12 +19247,12 @@ var ts; return addJSDocComment(finishNode(property)); } function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + var asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var name = parsePropertyName(); // Note: this is not legal as per the grammar. But we allow it in the parser and // report an error in the grammar checker. - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (asteriskToken || token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (asteriskToken || token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -19244,17 +19267,17 @@ var ts; node.decorators = decorators; node.modifiers = modifiers; node.name = parsePropertyName(); - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return addJSDocComment(finishNode(node)); } function isClassMemberModifier(idToken) { switch (idToken) { - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: return true; default: return false; @@ -19262,7 +19285,7 @@ var ts; } function isClassMemberStart() { var idToken; - if (token() === 56 /* AtToken */) { + if (token() === 57 /* AtToken */) { return true; } // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. @@ -19279,7 +19302,7 @@ var ts; } nextToken(); } - if (token() === 38 /* AsteriskToken */) { + if (token() === 39 /* AsteriskToken */) { return true; } // Try to get the first property-like token following all modifiers. @@ -19289,23 +19312,23 @@ var ts; nextToken(); } // Index signatures and computed properties are class members; we can parse. - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return true; } // If we were able to get any potential identifier... if (idToken !== undefined) { // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 134 /* SetKeyword */ || idToken === 124 /* GetKeyword */) { + if (!ts.isKeyword(idToken) || idToken === 135 /* SetKeyword */ || idToken === 125 /* GetKeyword */) { return true; } // If it *is* a keyword, but not an accessor, check a little farther along // to see if it should actually be parsed as a class member. switch (token()) { - case 18 /* OpenParenToken */: // Method declaration - case 26 /* LessThanToken */: // Generic Method declaration - case 55 /* ColonToken */: // Type Annotation for declaration - case 57 /* EqualsToken */: // Initializer for declaration - case 54 /* QuestionToken */: + case 19 /* OpenParenToken */: // Method declaration + case 27 /* LessThanToken */: // Generic Method declaration + case 56 /* ColonToken */: // Type Annotation for declaration + case 58 /* EqualsToken */: // Initializer for declaration + case 55 /* QuestionToken */: return true; default: // Covers @@ -19322,10 +19345,10 @@ var ts; var decorators; while (true) { var decoratorStart = getNodePos(); - if (!parseOptional(56 /* AtToken */)) { + if (!parseOptional(57 /* AtToken */)) { break; } - var decorator = createNode(146 /* Decorator */, decoratorStart); + var decorator = createNode(147 /* Decorator */, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); finishNode(decorator); if (!decorators) { @@ -19352,7 +19375,7 @@ var ts; while (true) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); - if (token() === 75 /* ConstKeyword */ && permitInvalidConstAsModifier) { + if (token() === 76 /* ConstKeyword */ && permitInvalidConstAsModifier) { // We need to ensure that any subsequent modifiers appear on the same line // so that when 'const' is a standalone declaration, we don't issue an error. if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { @@ -19379,7 +19402,7 @@ var ts; } function parseModifiersForArrowFunction() { var modifiers; - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); nextToken(); @@ -19390,8 +19413,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token() === 24 /* SemicolonToken */) { - var result = createNode(205 /* SemicolonClassElement */); + if (token() === 25 /* SemicolonToken */) { + var result = createNode(206 /* SemicolonClassElement */); nextToken(); return finishNode(result); } @@ -19402,7 +19425,7 @@ var ts; if (accessor) { return accessor; } - if (token() === 122 /* ConstructorKeyword */) { + if (token() === 123 /* ConstructorKeyword */) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -19413,13 +19436,13 @@ var ts; if (ts.tokenIsIdentifierOrKeyword(token()) || token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */ || - token() === 38 /* AsteriskToken */ || - token() === 20 /* OpenBracketToken */) { + token() === 39 /* AsteriskToken */ || + token() === 21 /* OpenBracketToken */) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { // treat this as a property declaration with a missing name. - var name = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var name = createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); return parsePropertyDeclaration(fullStart, decorators, modifiers, name, /*questionToken*/ undefined); } // 'isClassMemberStart' should have hinted not to attempt parsing. @@ -19429,24 +19452,24 @@ var ts; return parseClassDeclarationOrExpression( /*fullStart*/ scanner.getStartPos(), /*decorators*/ undefined, - /*modifiers*/ undefined, 198 /* ClassExpression */); + /*modifiers*/ undefined, 199 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 229 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(74 /* ClassKeyword */); + parseExpected(75 /* ClassKeyword */); node.name = parseNameOfClassDeclarationOrExpression(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { // ClassTail[Yield,Await] : (Modified) See 14.5 // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } node.members = parseClassMembers(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.members = createMissingList(); @@ -19464,7 +19487,7 @@ var ts; : undefined; } function isImplementsClause() { - return token() === 107 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 108 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { // ClassTail[Yield,Await] : (Modified) See 14.5 @@ -19476,8 +19499,8 @@ var ts; } function parseHeritageClause() { var tok = token(); - if (tok === 84 /* ExtendsKeyword */ || tok === 107 /* ImplementsKeyword */) { - var node = createNode(258 /* HeritageClause */); + if (tok === 85 /* ExtendsKeyword */ || tok === 108 /* ImplementsKeyword */) { + var node = createNode(259 /* HeritageClause */); node.token = tok; nextToken(); node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); @@ -19486,24 +19509,24 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(200 /* ExpressionWithTypeArguments */); + var node = createNode(201 /* ExpressionWithTypeArguments */); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token() === 26 /* LessThanToken */) { - node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (token() === 27 /* LessThanToken */) { + node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } return finishNode(node); } function isHeritageClause() { - return token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(229 /* InterfaceDeclaration */, fullStart); + var node = createNode(230 /* InterfaceDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(108 /* InterfaceKeyword */); + parseExpected(109 /* InterfaceKeyword */); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); @@ -19511,13 +19534,13 @@ var ts; return addJSDocComment(finishNode(node)); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230 /* TypeAliasDeclaration */, fullStart); + var node = createNode(231 /* TypeAliasDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(137 /* TypeKeyword */); + parseExpected(138 /* TypeKeyword */); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); node.type = parseType(); parseSemicolon(); return addJSDocComment(finishNode(node)); @@ -19527,20 +19550,20 @@ var ts; // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember() { - var node = createNode(263 /* EnumMember */, scanner.getStartPos()); + var node = createNode(264 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return addJSDocComment(finishNode(node)); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231 /* EnumDeclaration */, fullStart); + var node = createNode(232 /* EnumDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(82 /* EnumKeyword */); + parseExpected(83 /* EnumKeyword */); node.name = parseIdentifier(); - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.members = createMissingList(); @@ -19548,10 +19571,10 @@ var ts; return addJSDocComment(finishNode(node)); } function parseModuleBlock() { - var node = createNode(233 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(16 /* OpenBraceToken */)) { + var node = createNode(234 /* ModuleBlock */, scanner.getStartPos()); + if (parseExpected(17 /* OpenBraceToken */)) { node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.statements = createMissingList(); @@ -19559,7 +19582,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(232 /* ModuleDeclaration */, fullStart); + var node = createNode(233 /* ModuleDeclaration */, fullStart); // If we are parsing a dotted namespace name, we want to // propagate the 'Namespace' flag across the names if set. var namespaceFlag = flags & 16 /* Namespace */; @@ -19567,16 +19590,16 @@ var ts; node.modifiers = modifiers; node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(22 /* DotToken */) + node.body = parseOptional(23 /* DotToken */) ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 4 /* NestedNamespace */ | namespaceFlag) : parseModuleBlock(); return addJSDocComment(finishNode(node)); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(232 /* ModuleDeclaration */, fullStart); + var node = createNode(233 /* ModuleDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (token() === 140 /* GlobalKeyword */) { + if (token() === 141 /* GlobalKeyword */) { // parse 'global' as name of global scope augmentation node.name = parseIdentifier(); node.flags |= 512 /* GlobalAugmentation */; @@ -19584,7 +19607,7 @@ var ts; else { node.name = parseLiteralNode(/*internName*/ true); } - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { node.body = parseModuleBlock(); } else { @@ -19594,15 +19617,15 @@ var ts; } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = 0; - if (token() === 140 /* GlobalKeyword */) { + if (token() === 141 /* GlobalKeyword */) { // global augmentation return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } - else if (parseOptional(128 /* NamespaceKeyword */)) { + else if (parseOptional(129 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(127 /* ModuleKeyword */); + parseExpected(128 /* ModuleKeyword */); if (token() === 9 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } @@ -19610,58 +19633,58 @@ var ts; return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token() === 131 /* RequireKeyword */ && + return token() === 132 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { - return nextToken() === 18 /* OpenParenToken */; + return nextToken() === 19 /* OpenParenToken */; } function nextTokenIsSlash() { - return nextToken() === 40 /* SlashToken */; + return nextToken() === 41 /* SlashToken */; } function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { - var exportDeclaration = createNode(235 /* NamespaceExportDeclaration */, fullStart); + var exportDeclaration = createNode(236 /* NamespaceExportDeclaration */, fullStart); exportDeclaration.decorators = decorators; exportDeclaration.modifiers = modifiers; - parseExpected(117 /* AsKeyword */); - parseExpected(128 /* NamespaceKeyword */); + parseExpected(118 /* AsKeyword */); + parseExpected(129 /* NamespaceKeyword */); exportDeclaration.name = parseIdentifier(); parseSemicolon(); return finishNode(exportDeclaration); } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(90 /* ImportKeyword */); + parseExpected(91 /* ImportKeyword */); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token() !== 25 /* CommaToken */ && token() !== 139 /* FromKeyword */) { + if (token() !== 26 /* CommaToken */ && token() !== 140 /* FromKeyword */) { return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier); } } // Import statement - var importDeclaration = createNode(237 /* ImportDeclaration */, fullStart); + var importDeclaration = createNode(238 /* ImportDeclaration */, fullStart); importDeclaration.decorators = decorators; importDeclaration.modifiers = modifiers; // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; if (identifier || - token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */) { + token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(139 /* FromKeyword */); + parseExpected(140 /* FromKeyword */); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) { - var importEqualsDeclaration = createNode(236 /* ImportEqualsDeclaration */, fullStart); + var importEqualsDeclaration = createNode(237 /* ImportEqualsDeclaration */, fullStart); importEqualsDeclaration.decorators = decorators; importEqualsDeclaration.modifiers = modifiers; importEqualsDeclaration.name = identifier; - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); importEqualsDeclaration.moduleReference = parseModuleReference(); parseSemicolon(); return addJSDocComment(finishNode(importEqualsDeclaration)); @@ -19673,7 +19696,7 @@ var ts; // NamedImports // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(238 /* ImportClause */, fullStart); + var importClause = createNode(239 /* ImportClause */, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding @@ -19682,8 +19705,8 @@ var ts; // If there was no default import or if there is comma token after default import // parse namespace or named imports if (!importClause.name || - parseOptional(25 /* CommaToken */)) { - importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(240 /* NamedImports */); + parseOptional(26 /* CommaToken */)) { + importClause.namedBindings = token() === 39 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(241 /* NamedImports */); } return finishNode(importClause); } @@ -19693,11 +19716,11 @@ var ts; : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { - var node = createNode(247 /* ExternalModuleReference */); - parseExpected(131 /* RequireKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(248 /* ExternalModuleReference */); + parseExpected(132 /* RequireKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = parseModuleSpecifier(); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseModuleSpecifier() { @@ -19716,9 +19739,9 @@ var ts; function parseNamespaceImport() { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(239 /* NamespaceImport */); - parseExpected(38 /* AsteriskToken */); - parseExpected(117 /* AsKeyword */); + var namespaceImport = createNode(240 /* NamespaceImport */); + parseExpected(39 /* AsteriskToken */); + parseExpected(118 /* AsKeyword */); namespaceImport.name = parseIdentifier(); return finishNode(namespaceImport); } @@ -19731,14 +19754,14 @@ var ts; // ImportsList: // ImportSpecifier // ImportsList, ImportSpecifier - node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 240 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */); + node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 241 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 17 /* OpenBraceToken */, 18 /* CloseBraceToken */); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(245 /* ExportSpecifier */); + return parseImportOrExportSpecifier(246 /* ExportSpecifier */); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(241 /* ImportSpecifier */); + return parseImportOrExportSpecifier(242 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -19752,9 +19775,9 @@ var ts; var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token() === 117 /* AsKeyword */) { + if (token() === 118 /* AsKeyword */) { node.propertyName = identifierName; - parseExpected(117 /* AsKeyword */); + parseExpected(118 /* AsKeyword */); checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); @@ -19763,27 +19786,27 @@ var ts; else { node.name = identifierName; } - if (kind === 241 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 242 /* ImportSpecifier */ && checkIdentifierIsKeyword) { // Report error identifier expected parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(243 /* ExportDeclaration */, fullStart); + var node = createNode(244 /* ExportDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(38 /* AsteriskToken */)) { - parseExpected(139 /* FromKeyword */); + if (parseOptional(39 /* AsteriskToken */)) { + parseExpected(140 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(244 /* NamedExports */); + node.exportClause = parseNamedImportsOrExports(245 /* NamedExports */); // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. - if (token() === 139 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { - parseExpected(139 /* FromKeyword */); + if (token() === 140 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { + parseExpected(140 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -19791,14 +19814,14 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(242 /* ExportAssignment */, fullStart); + var node = createNode(243 /* ExportAssignment */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { node.isExportEquals = true; } else { - parseExpected(78 /* DefaultKeyword */); + parseExpected(79 /* DefaultKeyword */); } node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); @@ -19888,10 +19911,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return ts.hasModifier(node, 1 /* Export */) - || node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */ - || node.kind === 237 /* ImportDeclaration */ - || node.kind === 242 /* ExportAssignment */ - || node.kind === 243 /* ExportDeclaration */ + || node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 248 /* ExternalModuleReference */ + || node.kind === 238 /* ImportDeclaration */ + || node.kind === 243 /* ExportAssignment */ + || node.kind === 244 /* ExportDeclaration */ ? node : undefined; }); @@ -19937,16 +19960,16 @@ var ts; (function (JSDocParser) { function isJSDocType() { switch (token()) { - case 38 /* AsteriskToken */: - case 54 /* QuestionToken */: - case 18 /* OpenParenToken */: - case 20 /* OpenBracketToken */: - case 50 /* ExclamationToken */: - case 16 /* OpenBraceToken */: - case 88 /* FunctionKeyword */: - case 23 /* DotDotDotToken */: - case 93 /* NewKeyword */: - case 98 /* ThisKeyword */: + case 39 /* AsteriskToken */: + case 55 /* QuestionToken */: + case 19 /* OpenParenToken */: + case 21 /* OpenBracketToken */: + case 51 /* ExclamationToken */: + case 17 /* OpenBraceToken */: + case 89 /* FunctionKeyword */: + case 24 /* DotDotDotToken */: + case 94 /* NewKeyword */: + case 99 /* ThisKeyword */: return true; } return ts.tokenIsIdentifierOrKeyword(token()); @@ -19966,23 +19989,23 @@ var ts; // Parses out a JSDoc type expression. /* @internal */ function parseJSDocTypeExpression() { - var result = createNode(266 /* JSDocTypeExpression */, scanner.getTokenPos()); - parseExpected(16 /* OpenBraceToken */); + var result = createNode(267 /* JSDocTypeExpression */, scanner.getTokenPos()); + parseExpected(17 /* OpenBraceToken */); result.type = parseJSDocTopLevelType(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); fixupParentReferences(result); return finishNode(result); } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token() === 48 /* BarToken */) { - var unionType = createNode(270 /* JSDocUnionType */, type.pos); + if (token() === 49 /* BarToken */) { + var unionType = createNode(271 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token() === 57 /* EqualsToken */) { - var optionalType = createNode(277 /* JSDocOptionalType */, type.pos); + if (token() === 58 /* EqualsToken */) { + var optionalType = createNode(278 /* JSDocOptionalType */, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -19992,21 +20015,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token() === 20 /* OpenBracketToken */) { - var arrayType = createNode(269 /* JSDocArrayType */, type.pos); + if (token() === 21 /* OpenBracketToken */) { + var arrayType = createNode(270 /* JSDocArrayType */, type.pos); arrayType.elementType = type; nextToken(); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(arrayType); } - else if (token() === 54 /* QuestionToken */) { - var nullableType = createNode(272 /* JSDocNullableType */, type.pos); + else if (token() === 55 /* QuestionToken */) { + var nullableType = createNode(273 /* JSDocNullableType */, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token() === 50 /* ExclamationToken */) { - var nonNullableType = createNode(273 /* JSDocNonNullableType */, type.pos); + else if (token() === 51 /* ExclamationToken */) { + var nonNullableType = createNode(274 /* JSDocNonNullableType */, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -20019,96 +20042,96 @@ var ts; } function parseBasicTypeExpression() { switch (token()) { - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: return parseJSDocAllType(); - case 54 /* QuestionToken */: + case 55 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseJSDocUnionType(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseJSDocTupleType(); - case 50 /* ExclamationToken */: + case 51 /* ExclamationToken */: return parseJSDocNonNullableType(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseJSDocRecordType(); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseJSDocFunctionType(); - case 23 /* DotDotDotToken */: + case 24 /* DotDotDotToken */: return parseJSDocVariadicType(); - case 93 /* NewKeyword */: + case 94 /* NewKeyword */: return parseJSDocConstructorType(); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return parseJSDocThisType(); - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 94 /* NullKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 95 /* NullKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: return parseTokenNode(); case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseJSDocLiteralType(); } return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(281 /* JSDocThisType */); + var result = createNode(282 /* JSDocThisType */); nextToken(); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(280 /* JSDocConstructorType */); + var result = createNode(281 /* JSDocConstructorType */); nextToken(); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(279 /* JSDocVariadicType */); + var result = createNode(280 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(278 /* JSDocFunctionType */); + var result = createNode(279 /* JSDocFunctionType */); nextToken(); - parseExpected(18 /* OpenParenToken */); + parseExpected(19 /* OpenParenToken */); result.parameters = parseDelimitedList(23 /* JSDocFunctionParameters */, parseJSDocParameter); checkForTrailingComma(result.parameters); - parseExpected(19 /* CloseParenToken */); - if (token() === 55 /* ColonToken */) { + parseExpected(20 /* CloseParenToken */); + if (token() === 56 /* ColonToken */) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(145 /* Parameter */); + var parameter = createNode(146 /* Parameter */); parameter.type = parseJSDocType(); - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { // TODO(rbuckton): Can this be changed to SyntaxKind.QuestionToken? - parameter.questionToken = createNode(57 /* EqualsToken */); + parameter.questionToken = createNode(58 /* EqualsToken */); } return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(276 /* JSDocTypeReference */); + var result = createNode(277 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); } else { - while (parseOptional(22 /* DotToken */)) { - if (token() === 26 /* LessThanToken */) { + while (parseOptional(23 /* DotToken */)) { + if (token() === 27 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); break; } @@ -20125,7 +20148,7 @@ var ts; var typeArguments = parseDelimitedList(24 /* JSDocTypeArguments */, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); return typeArguments; } function checkForEmptyTypeArgumentList(typeArguments) { @@ -20136,28 +20159,28 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(142 /* QualifiedName */, left.pos); + var result = createNode(143 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(274 /* JSDocRecordType */); + var result = createNode(275 /* JSDocRecordType */); result.literal = parseTypeLiteral(); return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(273 /* JSDocNonNullableType */); + var result = createNode(274 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(271 /* JSDocTupleType */); + var result = createNode(272 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(26 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(result); } function checkForTrailingComma(list) { @@ -20167,28 +20190,28 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(270 /* JSDocUnionType */); + var result = createNode(271 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(result); } function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = createNodeArray([firstType], firstType.pos); - while (parseOptional(48 /* BarToken */)) { + while (parseOptional(49 /* BarToken */)) { types.push(parseJSDocType()); } types.end = scanner.getStartPos(); return types; } function parseJSDocAllType() { - var result = createNode(267 /* JSDocAllType */); + var result = createNode(268 /* JSDocAllType */); nextToken(); return finishNode(result); } function parseJSDocLiteralType() { - var result = createNode(292 /* JSDocLiteralType */); + var result = createNode(293 /* JSDocLiteralType */); result.literal = parseLiteralTypeNode(); return finishNode(result); } @@ -20205,17 +20228,17 @@ var ts; // Foo // Foo(?= // (?| - if (token() === 25 /* CommaToken */ || - token() === 17 /* CloseBraceToken */ || - token() === 19 /* CloseParenToken */ || - token() === 28 /* GreaterThanToken */ || - token() === 57 /* EqualsToken */ || - token() === 48 /* BarToken */) { - var result = createNode(268 /* JSDocUnknownType */, pos); + if (token() === 26 /* CommaToken */ || + token() === 18 /* CloseBraceToken */ || + token() === 20 /* CloseParenToken */ || + token() === 29 /* GreaterThanToken */ || + token() === 58 /* EqualsToken */ || + token() === 49 /* BarToken */) { + var result = createNode(269 /* JSDocUnknownType */, pos); return finishNode(result); } else { - var result = createNode(272 /* JSDocNullableType */, pos); + var result = createNode(273 /* JSDocNullableType */, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -20291,7 +20314,7 @@ var ts; } while (token() !== 1 /* EndOfFileToken */) { switch (token()) { - case 56 /* AtToken */: + case 57 /* AtToken */: if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { removeTrailingNewlines(comments); parseTag(indent); @@ -20312,7 +20335,7 @@ var ts; state = 0 /* BeginningOfLine */; indent = 0; break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: var asterisk = scanner.getTokenText(); if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { // If we've already seen an asterisk, then we can no longer parse a tag on this line @@ -20325,7 +20348,7 @@ var ts; indent += asterisk.length; } break; - case 70 /* Identifier */: + case 71 /* Identifier */: // Anything else is doc comment text. We just save it. Because it // wasn't a tag, we can no longer parse a tag on this line until we hit the next // line break. @@ -20380,7 +20403,7 @@ var ts; content.charCodeAt(start + 3) !== 42 /* asterisk */; } function createJSDocComment() { - var result = createNode(282 /* JSDocComment */, start); + var result = createNode(283 /* JSDocComment */, start); result.tags = tags; result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -20391,8 +20414,8 @@ var ts; } } function parseTag(indent) { - ts.Debug.assert(token() === 56 /* AtToken */); - var atToken = createNode(56 /* AtToken */, scanner.getTokenPos()); + ts.Debug.assert(token() === 57 /* AtToken */); + var atToken = createNode(57 /* AtToken */, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -20447,7 +20470,7 @@ var ts; comments.push(text); indent += text.length; } - while (token() !== 56 /* AtToken */ && token() !== 1 /* EndOfFileToken */) { + while (token() !== 57 /* AtToken */ && token() !== 1 /* EndOfFileToken */) { switch (token()) { case 4 /* NewLineTrivia */: if (state >= 1 /* SawAsterisk */) { @@ -20456,7 +20479,7 @@ var ts; } indent = 0; break; - case 56 /* AtToken */: + case 57 /* AtToken */: // Done break; case 5 /* WhitespaceTrivia */: @@ -20472,7 +20495,7 @@ var ts; indent += whitespace.length; } break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { // leading asterisks start recording on the *next* (non-whitespace) token state = 1 /* SawAsterisk */; @@ -20486,7 +20509,7 @@ var ts; pushComment(scanner.getTokenText()); break; } - if (token() === 56 /* AtToken */) { + if (token() === 57 /* AtToken */) { // Done break; } @@ -20497,7 +20520,7 @@ var ts; return comments; } function parseUnknownTag(atToken, tagName) { - var result = createNode(283 /* JSDocTag */, atToken.pos); + var result = createNode(284 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -20515,7 +20538,7 @@ var ts; function tryParseTypeExpression() { return tryParse(function () { skipWhitespace(); - if (token() !== 16 /* OpenBraceToken */) { + if (token() !== 17 /* OpenBraceToken */) { return undefined; } return parseJSDocTypeExpression(); @@ -20527,15 +20550,15 @@ var ts; var name; var isBracketed; // Looking for something like '[foo]' or 'foo' - if (parseOptionalToken(20 /* OpenBracketToken */)) { + if (parseOptionalToken(21 /* OpenBracketToken */)) { name = parseJSDocIdentifierName(); skipWhitespace(); isBracketed = true; // May have an optional default, e.g. '[foo = 42]' - if (parseOptionalToken(57 /* EqualsToken */)) { + if (parseOptionalToken(58 /* EqualsToken */)) { parseExpression(); } - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); } else if (ts.tokenIsIdentifierOrKeyword(token())) { name = parseJSDocIdentifierName(); @@ -20554,7 +20577,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(285 /* JSDocParameterTag */, atToken.pos); + var result = createNode(286 /* JSDocParameterTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -20565,20 +20588,20 @@ var ts; return finishNode(result); } function parseReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 286 /* JSDocReturnTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(286 /* JSDocReturnTag */, atToken.pos); + var result = createNode(287 /* JSDocReturnTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function parseTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocTypeTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(287 /* JSDocTypeTag */, atToken.pos); + var result = createNode(288 /* JSDocTypeTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); @@ -20593,7 +20616,7 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected); return undefined; } - var result = createNode(290 /* JSDocPropertyTag */, atToken.pos); + var result = createNode(291 /* JSDocPropertyTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.name = name; @@ -20602,7 +20625,7 @@ var ts; } function parseAugmentsTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); - var result = createNode(284 /* JSDocAugmentsTag */, atToken.pos); + var result = createNode(285 /* JSDocAugmentsTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = typeExpression; @@ -20611,17 +20634,17 @@ var ts; function parseTypedefTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); - var typedefTag = createNode(289 /* JSDocTypedefTag */, atToken.pos); + var typedefTag = createNode(290 /* JSDocTypedefTag */, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0); if (typedefTag.fullName) { var rightNode = typedefTag.fullName; while (true) { - if (rightNode.kind === 70 /* Identifier */ || !rightNode.body) { + if (rightNode.kind === 71 /* Identifier */ || !rightNode.body) { // if node is identifier - use it as name // otherwise use name of the rightmost part that we were able to parse - typedefTag.name = rightNode.kind === 70 /* Identifier */ ? rightNode : rightNode.name; + typedefTag.name = rightNode.kind === 71 /* Identifier */ ? rightNode : rightNode.name; break; } rightNode = rightNode.body; @@ -20630,9 +20653,9 @@ var ts; typedefTag.typeExpression = typeExpression; skipWhitespace(); if (typeExpression) { - if (typeExpression.type.kind === 276 /* JSDocTypeReference */) { + if (typeExpression.type.kind === 277 /* JSDocTypeReference */) { var jsDocTypeReference = typeExpression.type; - if (jsDocTypeReference.name.kind === 70 /* Identifier */) { + if (jsDocTypeReference.name.kind === 71 /* Identifier */) { var name = jsDocTypeReference.name; if (name.text === "Object") { typedefTag.jsDocTypeLiteral = scanChildTags(); @@ -20648,7 +20671,7 @@ var ts; } return finishNode(typedefTag); function scanChildTags() { - var jsDocTypeLiteral = createNode(291 /* JSDocTypeLiteral */, scanner.getStartPos()); + var jsDocTypeLiteral = createNode(292 /* JSDocTypeLiteral */, scanner.getStartPos()); var resumePos = scanner.getStartPos(); var canParseTag = true; var seenAsterisk = false; @@ -20656,7 +20679,7 @@ var ts; while (token() !== 1 /* EndOfFileToken */ && !parentTagTerminated) { nextJSDocToken(); switch (token()) { - case 56 /* AtToken */: + case 57 /* AtToken */: if (canParseTag) { parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); if (!parentTagTerminated) { @@ -20670,13 +20693,13 @@ var ts; canParseTag = true; seenAsterisk = false; break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: if (seenAsterisk) { canParseTag = false; } seenAsterisk = true; break; - case 70 /* Identifier */: + case 71 /* Identifier */: canParseTag = false; break; case 1 /* EndOfFileToken */: @@ -20689,8 +20712,8 @@ var ts; function parseJSDocTypeNameWithNamespace(flags) { var pos = scanner.getTokenPos(); var typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (typeNameOrNamespaceName && parseOptional(22 /* DotToken */)) { - var jsDocNamespaceNode = createNode(232 /* ModuleDeclaration */, pos); + if (typeNameOrNamespaceName && parseOptional(23 /* DotToken */)) { + var jsDocNamespaceNode = createNode(233 /* ModuleDeclaration */, pos); jsDocNamespaceNode.flags |= flags; jsDocNamespaceNode.name = typeNameOrNamespaceName; jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */); @@ -20703,8 +20726,8 @@ var ts; } } function tryParseChildTag(parentTag) { - ts.Debug.assert(token() === 56 /* AtToken */); - var atToken = createNode(56 /* AtToken */, scanner.getStartPos()); + ts.Debug.assert(token() === 57 /* AtToken */); + var atToken = createNode(57 /* AtToken */, scanner.getStartPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -20736,7 +20759,7 @@ var ts; return false; } function parseTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTemplateTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } // Type parameter list looks like '@template T,U,V' @@ -20748,11 +20771,11 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(144 /* TypeParameter */, name.pos); + var typeParameter = createNode(145 /* TypeParameter */, name.pos); typeParameter.name = name; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token() === 25 /* CommaToken */) { + if (token() === 26 /* CommaToken */) { nextJSDocToken(); skipWhitespace(); } @@ -20760,7 +20783,7 @@ var ts; break; } } - var result = createNode(288 /* JSDocTemplateTag */, atToken.pos); + var result = createNode(289 /* JSDocTemplateTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -20781,7 +20804,7 @@ var ts; } var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); - var result = createNode(70 /* Identifier */, pos); + var result = createNode(71 /* Identifier */, pos); result.text = content.substring(pos, end); finishNode(result, end); nextJSDocToken(); @@ -20909,7 +20932,7 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 70 /* Identifier */: + case 71 /* Identifier */: return true; } return false; @@ -21280,16 +21303,16 @@ var ts; function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations - if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 230 /* TypeAliasDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */ || node.kind === 231 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; } else if (ts.isConstEnumDeclaration(node)) { return 2 /* ConstEnumOnly */; } - else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) { + else if ((node.kind === 238 /* ImportDeclaration */ || node.kind === 237 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) { return 0 /* NonInstantiated */; } - else if (node.kind === 233 /* ModuleBlock */) { + else if (node.kind === 234 /* ModuleBlock */) { var state_1 = 0 /* NonInstantiated */; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -21308,11 +21331,11 @@ var ts; }); return state_1; } - else if (node.kind === 232 /* ModuleDeclaration */) { + else if (node.kind === 233 /* ModuleDeclaration */) { var body = node.body; return body ? getModuleInstanceState(body) : 1 /* Instantiated */; } - else if (node.kind === 70 /* Identifier */ && node.isInJSDocNamespace) { + else if (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace) { return 0 /* NonInstantiated */; } else { @@ -21449,7 +21472,7 @@ var ts; if (symbolFlags & 107455 /* Value */) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232 /* ModuleDeclaration */)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 233 /* ModuleDeclaration */)) { // other kinds of value declarations take precedence over modules symbol.valueDeclaration = node; } @@ -21462,7 +21485,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression)) { @@ -21474,21 +21497,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: return "__constructor"; - case 159 /* FunctionType */: - case 154 /* CallSignature */: + case 160 /* FunctionType */: + case 155 /* CallSignature */: return "__call"; - case 160 /* ConstructorType */: - case 155 /* ConstructSignature */: + case 161 /* ConstructorType */: + case 156 /* ConstructSignature */: return "__new"; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return "__index"; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return "__export"; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return node.isExportEquals ? "export=" : "default"; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2 /* ModuleExports */: // module.exports = ... @@ -21504,25 +21527,25 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 227 /* FunctionDeclaration */: - case 228 /* ClassDeclaration */: + case 228 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: return ts.hasModifier(node, 512 /* Default */) ? "default" : undefined; - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 145 /* Parameter */: + case 146 /* Parameter */: // Parameters with names are handled at the top of this function. Parameters // without names can only come from JSDocFunctionTypes. - ts.Debug.assert(node.parent.kind === 278 /* JSDocFunctionType */); + ts.Debug.assert(node.parent.kind === 279 /* JSDocFunctionType */); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "arg" + index; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: var parentNode = node.parent && node.parent.parent; var nameFromParentNode = void 0; - if (parentNode && parentNode.kind === 207 /* VariableStatement */) { + if (parentNode && parentNode.kind === 208 /* VariableStatement */) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70 /* Identifier */) { + if (nameIdentifier.kind === 71 /* Identifier */) { nameFromParentNode = nameIdentifier.text; } } @@ -21609,7 +21632,7 @@ var ts; // 1. multiple export default of class declaration or function declaration by checking NodeFlags.Default // 2. multiple export default of export assignment. This one doesn't have NodeFlags.Default on (as export default doesn't considered as modifiers) if (symbol.declarations && symbol.declarations.length && - (isDefaultExport || (node.kind === 242 /* ExportAssignment */ && !node.isExportEquals))) { + (isDefaultExport || (node.kind === 243 /* ExportAssignment */ && !node.isExportEquals))) { message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; } } @@ -21629,7 +21652,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedModifierFlags(node) & 1 /* Export */; if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 245 /* ExportSpecifier */ || (node.kind === 236 /* ImportEqualsDeclaration */ && hasExportModifier)) { + if (node.kind === 246 /* ExportSpecifier */ || (node.kind === 237 /* ImportEqualsDeclaration */ && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -21652,9 +21675,9 @@ var ts; // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. - var isJSDocTypedefInJSDocNamespace = node.kind === 289 /* JSDocTypedefTag */ && + var isJSDocTypedefInJSDocNamespace = node.kind === 290 /* JSDocTypedefTag */ && node.name && - node.name.kind === 70 /* Identifier */ && + node.name.kind === 71 /* Identifier */ && node.name.isInJSDocNamespace; if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32 /* ExportContext */)) || isJSDocTypedefInJSDocNamespace) { var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | @@ -21739,7 +21762,7 @@ var ts; if (hasExplicitReturn) node.flags |= 256 /* HasExplicitReturn */; } - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { node.flags |= emitFlags; } if (isIIFE) { @@ -21818,70 +21841,70 @@ var ts; return; } switch (node.kind) { - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: bindWhileStatement(node); break; - case 211 /* DoStatement */: + case 212 /* DoStatement */: bindDoStatement(node); break; - case 213 /* ForStatement */: + case 214 /* ForStatement */: bindForStatement(node); break; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 210 /* IfStatement */: + case 211 /* IfStatement */: bindIfStatement(node); break; - case 218 /* ReturnStatement */: - case 222 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 223 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 223 /* TryStatement */: + case 224 /* TryStatement */: bindTryStatement(node); break; - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: bindSwitchStatement(node); break; - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: bindCaseBlock(node); break; - case 256 /* CaseClause */: + case 257 /* CaseClause */: bindCaseClause(node); break; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: bindLabeledStatement(node); break; - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: bindBinaryExpressionFlow(node); break; - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 180 /* CallExpression */: + case 181 /* CallExpression */: bindCallExpressionFlow(node); break; - case 282 /* JSDocComment */: + case 283 /* JSDocComment */: bindJSDocComment(node); break; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: bindJSDocTypedefTag(node); break; default: @@ -21891,26 +21914,26 @@ var ts; } function isNarrowingExpression(expr) { switch (expr.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: + case 179 /* PropertyAccessExpression */: return isNarrowableReference(expr); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return hasNarrowableArgument(expr); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isNarrowingExpression(expr.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 191 /* PrefixUnaryExpression */: - return expr.operator === 50 /* ExclamationToken */ && isNarrowingExpression(expr.operand); + case 192 /* PrefixUnaryExpression */: + return expr.operator === 51 /* ExclamationToken */ && isNarrowingExpression(expr.operand); } return false; } function isNarrowableReference(expr) { - return expr.kind === 70 /* Identifier */ || - expr.kind === 98 /* ThisKeyword */ || - expr.kind === 96 /* SuperKeyword */ || - expr.kind === 178 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression); + return expr.kind === 71 /* Identifier */ || + expr.kind === 99 /* ThisKeyword */ || + expr.kind === 97 /* SuperKeyword */ || + expr.kind === 179 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -21921,41 +21944,41 @@ var ts; } } } - if (expr.expression.kind === 178 /* PropertyAccessExpression */ && + if (expr.expression.kind === 179 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression.expression)) { return true; } return false; } function isNarrowingTypeofOperands(expr1, expr2) { - return expr1.kind === 188 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */; + return expr1.kind === 189 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */; } function isNarrowingBinaryExpression(expr) { switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return isNarrowableReference(expr.left); - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return isNarrowingExpression(expr.right); } return false; } function isNarrowableOperand(expr) { switch (expr.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return isNarrowableOperand(expr.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return isNarrowableOperand(expr.right); } } @@ -21990,8 +22013,8 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 100 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 85 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { + if (expression.kind === 101 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 86 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -22046,34 +22069,34 @@ var ts; function isStatementCondition(node) { var parent = node.parent; switch (parent.kind) { - case 210 /* IfStatement */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: + case 211 /* IfStatement */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: return parent.expression === node; - case 213 /* ForStatement */: - case 194 /* ConditionalExpression */: + case 214 /* ForStatement */: + case 195 /* ConditionalExpression */: return parent.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 184 /* ParenthesizedExpression */) { + if (node.kind === 185 /* ParenthesizedExpression */) { node = node.expression; } - else if (node.kind === 191 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) { + else if (node.kind === 192 /* PrefixUnaryExpression */ && node.operator === 51 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 193 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ || - node.operatorToken.kind === 53 /* BarBarToken */); + return node.kind === 194 /* BinaryExpression */ && (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */ || + node.operatorToken.kind === 54 /* BarBarToken */); } } } function isTopLevelLogicalExpression(node) { - while (node.parent.kind === 184 /* ParenthesizedExpression */ || - node.parent.kind === 191 /* PrefixUnaryExpression */ && - node.parent.operator === 50 /* ExclamationToken */) { + while (node.parent.kind === 185 /* ParenthesizedExpression */ || + node.parent.kind === 192 /* PrefixUnaryExpression */ && + node.parent.operator === 51 /* ExclamationToken */) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent); @@ -22114,7 +22137,7 @@ var ts; } function bindDoStatement(node) { var preDoLabel = createLoopLabel(); - var enclosingLabeledStatement = node.parent.kind === 221 /* LabeledStatement */ + var enclosingLabeledStatement = node.parent.kind === 222 /* LabeledStatement */ ? ts.lastOrUndefined(activeLabels) : undefined; // if do statement is wrapped in labeled statement then target labels for break/continue with or without @@ -22148,13 +22171,13 @@ var ts; var postLoopLabel = createBranchLabel(); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 215 /* ForOfStatement */) { + if (node.kind === 216 /* ForOfStatement */) { bind(node.awaitModifier); } bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 226 /* VariableDeclarationList */) { + if (node.initializer.kind !== 227 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -22176,7 +22199,7 @@ var ts; } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 218 /* ReturnStatement */) { + if (node.kind === 219 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -22196,7 +22219,7 @@ var ts; return undefined; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - var flowLabel = node.kind === 217 /* BreakStatement */ ? breakTarget : continueTarget; + var flowLabel = node.kind === 218 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -22292,7 +22315,7 @@ var ts; preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257 /* DefaultClause */; }); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 258 /* DefaultClause */; }); // We mark a switch statement as possibly exhaustive if it has no default clause and if all // case clauses have unreachable end points (e.g. they all return). node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; @@ -22359,14 +22382,14 @@ var ts; if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); } - if (!node.statement || node.statement.kind !== 211 /* DoStatement */) { + if (!node.statement || node.statement.kind !== 212 /* DoStatement */) { // do statement sets current flow inside bindDoStatement addAntecedent(postStatementLabel, currentFlow); currentFlow = finishFlowLabel(postStatementLabel); } } function bindDestructuringTargetFlow(node) { - if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) { + if (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 58 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { @@ -22377,10 +22400,10 @@ var ts; if (isNarrowableReference(node)) { currentFlow = createFlowAssignment(currentFlow, node); } - else if (node.kind === 176 /* ArrayLiteralExpression */) { + else if (node.kind === 177 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { var e = _a[_i]; - if (e.kind === 197 /* SpreadElement */) { + if (e.kind === 198 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { @@ -22388,16 +22411,16 @@ var ts; } } } - else if (node.kind === 177 /* ObjectLiteralExpression */) { + else if (node.kind === 178 /* ObjectLiteralExpression */) { for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { var p = _c[_b]; - if (p.kind === 260 /* PropertyAssignment */) { + if (p.kind === 261 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); } - else if (p.kind === 261 /* ShorthandPropertyAssignment */) { + else if (p.kind === 262 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); } - else if (p.kind === 262 /* SpreadAssignment */) { + else if (p.kind === 263 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -22405,7 +22428,7 @@ var ts; } function bindLogicalExpression(node, trueTarget, falseTarget) { var preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */) { + if (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */) { bindCondition(node.left, preRightLabel, falseTarget); } else { @@ -22416,7 +22439,7 @@ var ts; bindCondition(node.right, trueTarget, falseTarget); } function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 50 /* ExclamationToken */) { + if (node.operator === 51 /* ExclamationToken */) { var saveTrueTarget = currentTrueTarget; currentTrueTarget = currentFalseTarget; currentFalseTarget = saveTrueTarget; @@ -22426,20 +22449,20 @@ var ts; } else { bindEachChild(node); - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { bindAssignmentTargetFlow(node.operand); } } } function bindPostfixUnaryExpressionFlow(node) { bindEachChild(node); - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { bindAssignmentTargetFlow(node.operand); } } function bindBinaryExpressionFlow(node) { var operator = node.operatorToken.kind; - if (operator === 52 /* AmpersandAmpersandToken */ || operator === 53 /* BarBarToken */) { + if (operator === 53 /* AmpersandAmpersandToken */ || operator === 54 /* BarBarToken */) { if (isTopLevelLogicalExpression(node)) { var postExpressionLabel = createBranchLabel(); bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); @@ -22453,7 +22476,7 @@ var ts; bindEachChild(node); if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 57 /* EqualsToken */ && node.left.kind === 179 /* ElementAccessExpression */) { + if (operator === 58 /* EqualsToken */ && node.left.kind === 180 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -22464,7 +22487,7 @@ var ts; } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 178 /* PropertyAccessExpression */) { + if (node.expression.kind === 179 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -22497,13 +22520,13 @@ var ts; } function bindVariableDeclarationFlow(node) { bindEachChild(node); - if (node.initializer || node.parent.parent.kind === 214 /* ForInStatement */ || node.parent.parent.kind === 215 /* ForOfStatement */) { + if (node.initializer || node.parent.parent.kind === 215 /* ForInStatement */ || node.parent.parent.kind === 216 /* ForOfStatement */) { bindInitializedVariableFlow(node); } } function bindJSDocComment(node) { ts.forEachChild(node, function (n) { - if (n.kind !== 289 /* JSDocTypedefTag */) { + if (n.kind !== 290 /* JSDocTypedefTag */) { bind(n); } }); @@ -22513,7 +22536,7 @@ var ts; // if the node has a fullName "A.B.C", that means symbol "C" was already bound // when we visit "fullName"; so when we visit the name "C" as the next child of // the jsDocTypedefTag, we should skip binding it. - if (node.fullName && n === node.name && node.fullName.kind !== 70 /* Identifier */) { + if (node.fullName && n === node.name && node.fullName.kind !== 71 /* Identifier */) { return; } bind(n); @@ -22524,10 +22547,10 @@ var ts; // an immediately invoked function expression (IIFE). Initialize the flowNode property to // the current control flow (which includes evaluation of the IIFE arguments). var expr = node.expression; - while (expr.kind === 184 /* ParenthesizedExpression */) { + while (expr.kind === 185 /* ParenthesizedExpression */) { expr = expr.expression; } - if (expr.kind === 185 /* FunctionExpression */ || expr.kind === 186 /* ArrowFunction */) { + if (expr.kind === 186 /* FunctionExpression */ || expr.kind === 187 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -22535,7 +22558,7 @@ var ts; else { bindEachChild(node); } - if (node.expression.kind === 178 /* PropertyAccessExpression */) { + if (node.expression.kind === 179 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -22544,54 +22567,54 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 162 /* TypeLiteral */: - case 291 /* JSDocTypeLiteral */: - case 274 /* JSDocRecordType */: - case 253 /* JsxAttributes */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 163 /* TypeLiteral */: + case 292 /* JSDocTypeLiteral */: + case 275 /* JSDocRecordType */: + case 254 /* JsxAttributes */: return 1 /* IsContainer */; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 278 /* JSDocFunctionType */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 171 /* MappedType */: + case 279 /* JSDocFunctionType */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 172 /* MappedType */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 264 /* SourceFile */: + case 265 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: if (ts.isObjectLiteralOrClassExpressionMethod(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethod */; } // falls through - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 259 /* CatchClause */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 234 /* CaseBlock */: + case 260 /* CatchClause */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 235 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 206 /* Block */: + case 207 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. // Locals that reside in this block should go to the function locals. Otherwise 'x' // would not appear to be a redeclaration of a block scoped local in the following @@ -22628,43 +22651,43 @@ var ts; // members are declared (for example, a member of a class will go into a specific // symbol table depending on if it is static or not). We defer to specialized // handlers to take care of declaring these child members. - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 162 /* TypeLiteral */: - case 177 /* ObjectLiteralExpression */: - case 229 /* InterfaceDeclaration */: - case 274 /* JSDocRecordType */: - case 291 /* JSDocTypeLiteral */: - case 253 /* JsxAttributes */: + case 163 /* TypeLiteral */: + case 178 /* ObjectLiteralExpression */: + case 230 /* InterfaceDeclaration */: + case 275 /* JSDocRecordType */: + case 292 /* JSDocTypeLiteral */: + case 254 /* JsxAttributes */: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the // object / type / interface declaring them). An exception is type parameters, // which are in scope without qualification (similar to 'locals'). return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 278 /* JSDocFunctionType */: - case 230 /* TypeAliasDeclaration */: - case 171 /* MappedType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 279 /* JSDocFunctionType */: + case 231 /* TypeAliasDeclaration */: + case 172 /* MappedType */: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, // they're only accessed 'lexically' (i.e. from code that exists underneath @@ -22685,11 +22708,11 @@ var ts; : declareSymbol(file.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 264 /* SourceFile */ ? node : node.body; - if (body && (body.kind === 264 /* SourceFile */ || body.kind === 233 /* ModuleBlock */)) { + var body = node.kind === 265 /* SourceFile */ ? node : node.body; + if (body && (body.kind === 265 /* SourceFile */ || body.kind === 234 /* ModuleBlock */)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 243 /* ExportDeclaration */ || stat.kind === 242 /* ExportAssignment */) { + if (stat.kind === 244 /* ExportDeclaration */ || stat.kind === 243 /* ExportAssignment */) { return true; } } @@ -22784,7 +22807,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) { + if (prop.kind === 263 /* SpreadAssignment */ || prop.name.kind !== 71 /* Identifier */) { continue; } var identifier = prop.name; @@ -22796,7 +22819,7 @@ var ts; // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */ || prop.kind === 150 /* MethodDeclaration */ + var currentKind = prop.kind === 261 /* PropertyAssignment */ || prop.kind === 262 /* ShorthandPropertyAssignment */ || prop.kind === 151 /* MethodDeclaration */ ? 1 /* Property */ : 2 /* Accessor */; var existingKind = seen.get(identifier.text); @@ -22824,10 +22847,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -22848,8 +22871,8 @@ var ts; // check for reserved words used as identifiers in strict mode code. function checkStrictModeIdentifier(node) { if (inStrictMode && - node.originalKeywordKind >= 107 /* FirstFutureReservedWord */ && - node.originalKeywordKind <= 115 /* LastFutureReservedWord */ && + node.originalKeywordKind >= 108 /* FirstFutureReservedWord */ && + node.originalKeywordKind <= 116 /* LastFutureReservedWord */ && !ts.isIdentifierName(node) && !ts.isInAmbientContext(node)) { // Report error only if there are no parse errors in file @@ -22885,7 +22908,7 @@ var ts; } function checkStrictModeDeleteExpression(node) { // Grammar checking - if (inStrictMode && node.expression.kind === 70 /* Identifier */) { + if (inStrictMode && node.expression.kind === 71 /* Identifier */) { // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its // UnaryExpression is a direct reference to a variable, function argument, or function name var span_2 = ts.getErrorSpanForNode(file, node.expression); @@ -22893,11 +22916,11 @@ var ts; } } function isEvalOrArgumentsIdentifier(node) { - return node.kind === 70 /* Identifier */ && + return node.kind === 71 /* Identifier */ && (node.text === "eval" || node.text === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 70 /* Identifier */) { + if (name && name.kind === 71 /* Identifier */) { var identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { // We check first if the name is inside class declaration or class expression; if so give explicit message @@ -22938,8 +22961,8 @@ var ts; function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { // Report error if function is not top level function declaration - if (blockScopeContainer.kind !== 264 /* SourceFile */ && - blockScopeContainer.kind !== 232 /* ModuleDeclaration */ && + if (blockScopeContainer.kind !== 265 /* SourceFile */ && + blockScopeContainer.kind !== 233 /* ModuleDeclaration */ && !ts.isFunctionLike(blockScopeContainer)) { // We check first if the name is inside class declaration or class expression; if so give explicit message // otherwise report generic error message. @@ -22965,7 +22988,7 @@ var ts; function checkStrictModePrefixUnaryExpression(node) { // Grammar checking if (inStrictMode) { - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { checkStrictModeEvalOrArguments(node, node.operand); } } @@ -23017,7 +23040,7 @@ var ts; // the current 'container' node when it changes. This helps us know which symbol table // a local should go into for example. Since terminal nodes are known not to have // children, as an optimization we don't process those. - if (node.kind > 141 /* LastToken */) { + if (node.kind > 142 /* LastToken */) { var saveParent = parent; parent = node; var containerFlags = getContainerFlags(node); @@ -23045,7 +23068,7 @@ var ts; } for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) { var tag = _c[_b]; - if (tag.kind === 289 /* JSDocTypedefTag */) { + if (tag.kind === 290 /* JSDocTypedefTag */) { var savedParent = parent; parent = jsDoc; bind(tag); @@ -23078,30 +23101,30 @@ var ts; function bindWorker(node) { switch (node.kind) { /* Strict mode checks */ - case 70 /* Identifier */: + case 71 /* Identifier */: // for typedef type names with namespaces, bind the new jsdoc type symbol here // because it requires all containing namespaces to be in effect, namely the // current "blockScopeContainer" needs to be set to its immediate namespace parent. if (node.isInJSDocNamespace) { var parentNode = node.parent; - while (parentNode && parentNode.kind !== 289 /* JSDocTypedefTag */) { + while (parentNode && parentNode.kind !== 290 /* JSDocTypedefTag */) { parentNode = parentNode.parent; } bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); break; } // falls through - case 98 /* ThisKeyword */: - if (currentFlow && (ts.isExpression(node) || parent.kind === 261 /* ShorthandPropertyAssignment */)) { + case 99 /* ThisKeyword */: + if (currentFlow && (ts.isExpression(node) || parent.kind === 262 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkStrictModeIdentifier(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: if (currentFlow && isNarrowableReference(node)) { node.flowNode = currentFlow; } break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -23126,49 +23149,49 @@ var ts; ts.Debug.fail("Unknown special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return checkStrictModeCatchClause(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return checkStrictModeWithStatement(node); - case 168 /* ThisType */: + case 169 /* ThisType */: seenThisKeyword = true; return; - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return checkTypePredicate(node); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530920 /* TypeParameterExcludes */); - case 145 /* Parameter */: + case 146 /* Parameter */: return bindParameter(node); - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: return bindVariableDeclarationOrBindingElement(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 275 /* JSDocRecordMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 276 /* JSDocRecordMember */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); - case 290 /* JSDocPropertyTag */: + case 291 /* JSDocPropertyTag */: return bindJSDocProperty(node); - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 262 /* SpreadAssignment */: - case 254 /* JsxSpreadAttribute */: + case 263 /* SpreadAssignment */: + case 255 /* JsxSpreadAttribute */: var root = container; var hasRest = false; while (root.parent) { - if (root.kind === 177 /* ObjectLiteralExpression */ && - root.parent.kind === 193 /* BinaryExpression */ && - root.parent.operatorToken.kind === 57 /* EqualsToken */ && + if (root.kind === 178 /* ObjectLiteralExpression */ && + root.parent.kind === 194 /* BinaryExpression */ && + root.parent.operatorToken.kind === 58 /* EqualsToken */ && root.parent.left === root) { hasRest = true; break; @@ -23176,100 +23199,100 @@ var ts; root = root.parent; } return; - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: // If this is an ObjectLiteralExpression method, then it sits in the same space // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 279 /* JSDocFunctionType */: return bindFunctionOrConstructorType(node); - case 162 /* TypeLiteral */: - case 171 /* MappedType */: - case 291 /* JSDocTypeLiteral */: - case 274 /* JSDocRecordType */: + case 163 /* TypeLiteral */: + case 172 /* MappedType */: + case 292 /* JSDocTypeLiteral */: + case 275 /* JSDocRecordType */: return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return bindFunctionExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; // Members of classes, interfaces, and modules - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: // All classes are automatically in strict mode in ES6. inStrictMode = true; return bindClassLikeDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */); - case 289 /* JSDocTypedefTag */: - if (!node.fullName || node.fullName.kind === 70 /* Identifier */) { + case 290 /* JSDocTypedefTag */: + if (!node.fullName || node.fullName.kind === 71 /* Identifier */) { return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); } break; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return bindModuleDeclaration(node); // Jsx-attributes - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return bindJsxAttributes(node); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); // Imports and exports - case 236 /* ImportEqualsDeclaration */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return bindImportClause(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return bindExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return bindExportAssignment(node); - case 264 /* SourceFile */: + case 265 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 206 /* Block */: + case 207 /* Block */: if (!ts.isFunctionLike(node.parent)) { return; } // falls through - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { var parameterName = node.parameterName, type = node.type; - if (parameterName && parameterName.kind === 70 /* Identifier */) { + if (parameterName && parameterName.kind === 71 /* Identifier */) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 168 /* ThisType */) { + if (parameterName && parameterName.kind === 169 /* ThisType */) { seenThisKeyword = true; } bind(type); @@ -23292,7 +23315,7 @@ var ts; // An export default clause with an expression exports a value // We want to exclude both class and function here, this is necessary to issue an error when there are both // default export-assignment and default export function and class declaration. - var flags = node.kind === 242 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) + var flags = node.kind === 243 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) ? 8388608 /* Alias */ : 4 /* Property */; declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 /* Property */ | 8388608 /* AliasExcludes */ | 32 /* Class */ | 16 /* Function */); @@ -23302,7 +23325,7 @@ var ts; if (node.modifiers && node.modifiers.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); } - if (node.parent.kind !== 264 /* SourceFile */) { + if (node.parent.kind !== 265 /* SourceFile */) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); return; } @@ -23355,9 +23378,9 @@ var ts; isNameOfExportsOrModuleExportsAliasDeclaration(node); } function isNameOfExportsOrModuleExportsAliasDeclaration(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = lookupSymbolForName(node.text); - if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225 /* VariableDeclaration */) { + if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 226 /* VariableDeclaration */) { var declaration = symbol.valueDeclaration; if (declaration.initializer) { return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer); @@ -23389,18 +23412,18 @@ var ts; ts.Debug.assert(ts.isInJavaScriptFile(node)); var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); switch (container.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: // Declare a 'member' if the container is an ES5 class or ES6 constructor container.symbol.members = container.symbol.members || ts.createMap(); // It's acceptable for multiple 'this' assignments of the same identifier to occur declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */); break; - case 151 /* Constructor */: - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 152 /* Constructor */: + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // this.foo assignment in a JavaScript class // Bind this property to the containing class var containingClass = container.parent; @@ -23470,7 +23493,7 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); } else { @@ -23607,13 +23630,13 @@ var ts; if (currentFlow === unreachableFlow) { var reportError = // report error on all statements except empty ones - (ts.isStatementButNotDeclaration(node) && node.kind !== 208 /* EmptyStatement */) || + (ts.isStatementButNotDeclaration(node) && node.kind !== 209 /* EmptyStatement */) || // report error on class declarations - node.kind === 228 /* ClassDeclaration */ || + node.kind === 229 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 232 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 233 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 231 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + (node.kind === 232 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentFlow = reportedUnreachableFlow; // unreachable code is reported if @@ -23627,7 +23650,7 @@ var ts; // On the other side we do want to report errors on non-initialized 'lets' because of TDZ var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 207 /* VariableStatement */ || + (node.kind !== 208 /* VariableStatement */ || ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */ || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -23647,56 +23670,56 @@ var ts; function computeTransformFlagsForNode(node, subtreeFlags) { var kind = node.kind; switch (kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return computeCallExpression(node, subtreeFlags); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return computeNewExpression(node, subtreeFlags); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return computeModuleDeclaration(node, subtreeFlags); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return computeParenthesizedExpression(node, subtreeFlags); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return computeBinaryExpression(node, subtreeFlags); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return computeExpressionStatement(node, subtreeFlags); - case 145 /* Parameter */: + case 146 /* Parameter */: return computeParameter(node, subtreeFlags); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return computeArrowFunction(node, subtreeFlags); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return computeFunctionExpression(node, subtreeFlags); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return computeFunctionDeclaration(node, subtreeFlags); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return computeVariableDeclaration(node, subtreeFlags); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return computeVariableDeclarationList(node, subtreeFlags); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return computeVariableStatement(node, subtreeFlags); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return computeLabeledStatement(node, subtreeFlags); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return computeClassDeclaration(node, subtreeFlags); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return computeClassExpression(node, subtreeFlags); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return computeHeritageClause(node, subtreeFlags); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return computeCatchClause(node, subtreeFlags); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return computeExpressionWithTypeArguments(node, subtreeFlags); - case 151 /* Constructor */: + case 152 /* Constructor */: return computeConstructor(node, subtreeFlags); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return computePropertyDeclaration(node, subtreeFlags); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return computeMethod(node, subtreeFlags); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return computeAccessor(node, subtreeFlags); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return computeImportEquals(node, subtreeFlags); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return computePropertyAccess(node, subtreeFlags); default: return computeOther(node, kind, subtreeFlags); @@ -23721,13 +23744,13 @@ var ts; } function isSuperOrSuperProperty(node, kind) { switch (kind) { - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return true; - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: var expression = node.expression; var expressionKind = expression.kind; - return expressionKind === 96 /* SuperKeyword */; + return expressionKind === 97 /* SuperKeyword */; } return false; } @@ -23748,17 +23771,17 @@ var ts; var transformFlags = subtreeFlags; var operatorTokenKind = node.operatorToken.kind; var leftKind = node.left.kind; - if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 177 /* ObjectLiteralExpression */) { + if (operatorTokenKind === 58 /* EqualsToken */ && leftKind === 178 /* ObjectLiteralExpression */) { // Destructuring object assignments with are ES2015 syntax // and possibly ESNext if they contain rest transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */; } - else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ArrayLiteralExpression */) { + else if (operatorTokenKind === 58 /* EqualsToken */ && leftKind === 177 /* ArrayLiteralExpression */) { // Destructuring assignments are ES2015 syntax. transformFlags |= 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */; } - else if (operatorTokenKind === 39 /* AsteriskAsteriskToken */ - || operatorTokenKind === 61 /* AsteriskAsteriskEqualsToken */) { + else if (operatorTokenKind === 40 /* AsteriskAsteriskToken */ + || operatorTokenKind === 62 /* AsteriskAsteriskEqualsToken */) { // Exponentiation is ES2016 syntax. transformFlags |= 32 /* AssertES2016 */; } @@ -23803,8 +23826,8 @@ var ts; // If the node is synthesized, it means the emitter put the parentheses there, // not the user. If we didn't want them, the emitter would not have put them // there. - if (expressionKind === 201 /* AsExpression */ - || expressionKind === 183 /* TypeAssertionExpression */) { + if (expressionKind === 202 /* AsExpression */ + || expressionKind === 184 /* TypeAssertionExpression */) { transformFlags |= 3 /* AssertTypeScript */; } // If the expression of a ParenthesizedExpression is a destructuring assignment, @@ -23862,11 +23885,11 @@ var ts; function computeHeritageClause(node, subtreeFlags) { var transformFlags = subtreeFlags; switch (node.token) { - case 84 /* ExtendsKeyword */: + case 85 /* ExtendsKeyword */: // An `extends` HeritageClause is ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; - case 107 /* ImplementsKeyword */: + case 108 /* ImplementsKeyword */: // An `implements` HeritageClause is TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */; break; @@ -24072,7 +24095,7 @@ var ts; var expressionKind = expression.kind; // If a PropertyAccessExpression starts with a super keyword, then it is // ES6 syntax, and requires a lexical `this` binding. - if (expressionKind === 96 /* SuperKeyword */) { + if (expressionKind === 97 /* SuperKeyword */) { transformFlags |= 16384 /* ContainsLexicalThis */; } node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */; @@ -24165,47 +24188,47 @@ var ts; var transformFlags = subtreeFlags; var excludeFlags = 536872257 /* NodeExcludes */; switch (kind) { - case 119 /* AsyncKeyword */: - case 190 /* AwaitExpression */: + case 120 /* AsyncKeyword */: + case 191 /* AwaitExpression */: // async/await is ES2017 syntax, but may be ESNext syntax (for async generators) transformFlags |= 8 /* AssertESNext */ | 16 /* AssertES2017 */; break; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 116 /* AbstractKeyword */: - case 123 /* DeclareKeyword */: - case 75 /* ConstKeyword */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: - case 202 /* NonNullExpression */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 117 /* AbstractKeyword */: + case 124 /* DeclareKeyword */: + case 76 /* ConstKeyword */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: + case 203 /* NonNullExpression */: + case 131 /* ReadonlyKeyword */: // These nodes are TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */; break; - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: case 10 /* JsxText */: - case 251 /* JsxClosingElement */: - case 252 /* JsxAttribute */: - case 253 /* JsxAttributes */: - case 254 /* JsxSpreadAttribute */: - case 255 /* JsxExpression */: + case 252 /* JsxClosingElement */: + case 253 /* JsxAttribute */: + case 254 /* JsxAttributes */: + case 255 /* JsxSpreadAttribute */: + case 256 /* JsxExpression */: // These nodes are Jsx syntax. transformFlags |= 4 /* AssertJsx */; break; - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: - case 195 /* TemplateExpression */: - case 182 /* TaggedTemplateExpression */: - case 261 /* ShorthandPropertyAssignment */: - case 114 /* StaticKeyword */: - case 203 /* MetaProperty */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: + case 196 /* TemplateExpression */: + case 183 /* TaggedTemplateExpression */: + case 262 /* ShorthandPropertyAssignment */: + case 115 /* StaticKeyword */: + case 204 /* MetaProperty */: // These nodes are ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; @@ -24219,55 +24242,55 @@ var ts; transformFlags |= 192 /* AssertES2015 */; } break; - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: // This node is either ES2015 syntax or ES2017 syntax (if it is a for-await-of). if (node.awaitModifier) { transformFlags |= 8 /* AssertESNext */; } transformFlags |= 192 /* AssertES2015 */; break; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: // This node is either ES2015 syntax (in a generator) or ES2017 syntax (in an async // generator). transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 16777216 /* ContainsYield */; break; - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: - case 135 /* StringKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 144 /* TypeParameter */: - case 147 /* PropertySignature */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 157 /* TypePredicate */: - case 158 /* TypeReference */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 161 /* TypeQuery */: - case 162 /* TypeLiteral */: - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 168 /* ThisType */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: + case 136 /* StringKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 145 /* TypeParameter */: + case 148 /* PropertySignature */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 158 /* TypePredicate */: + case 159 /* TypeReference */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 162 /* TypeQuery */: + case 163 /* TypeLiteral */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 169 /* ThisType */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 173 /* LiteralType */: // Types and signatures are TypeScript syntax, and exclude all other facts. transformFlags = 3 /* AssertTypeScript */; excludeFlags = -3 /* TypeExcludes */; break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: // Even though computed property names are ES6, we don't treat them as such. // This is so that they can flow through PropertyName transforms unaffected. // Instead, we mark the container as ES6, so that it can properly handle the transform. @@ -24284,42 +24307,42 @@ var ts; transformFlags |= 65536 /* ContainsLexicalThisInComputedPropertyName */; } break; - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: transformFlags |= 192 /* AssertES2015 */ | 524288 /* ContainsSpread */; break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectSpread */; break; - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: // This node is ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: // Mark this node and its ancestors as containing a lexical `this` keyword. transformFlags |= 16384 /* ContainsLexicalThis */; break; - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */; if (subtreeFlags & 524288 /* ContainsRest */) { transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectRest */; } excludeFlags = 537396545 /* BindingPatternExcludes */; break; - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */; excludeFlags = 537396545 /* BindingPatternExcludes */; break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: transformFlags |= 192 /* AssertES2015 */; if (node.dotDotDotToken) { transformFlags |= 524288 /* ContainsRest */; } break; - case 146 /* Decorator */: + case 147 /* Decorator */: // This node is TypeScript syntax, and marks its container as also being TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */ | 4096 /* ContainsDecorators */; break; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: excludeFlags = 540087617 /* ObjectLiteralExcludes */; if (subtreeFlags & 2097152 /* ContainsComputedPropertyName */) { // If an ObjectLiteralExpression contains a ComputedPropertyName, then it @@ -24337,8 +24360,8 @@ var ts; transformFlags |= 8 /* AssertESNext */; } break; - case 176 /* ArrayLiteralExpression */: - case 181 /* NewExpression */: + case 177 /* ArrayLiteralExpression */: + case 182 /* NewExpression */: excludeFlags = 537396545 /* ArrayLiteralOrCallOrNewExcludes */; if (subtreeFlags & 524288 /* ContainsSpread */) { // If the this node contains a SpreadExpression, then it is an ES6 @@ -24346,23 +24369,23 @@ var ts; transformFlags |= 192 /* AssertES2015 */; } break; - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: // A loop containing a block scoped binding *may* need to be transformed from ES6. if (subtreeFlags & 4194304 /* ContainsBlockScopedBinding */) { transformFlags |= 192 /* AssertES2015 */; } break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (subtreeFlags & 32768 /* ContainsCapturedLexicalThis */) { transformFlags |= 192 /* AssertES2015 */; } break; - case 218 /* ReturnStatement */: - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 219 /* ReturnStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: transformFlags |= 33554432 /* ContainsHoistedDeclarationOrCompletion */; break; } @@ -24378,57 +24401,57 @@ var ts; */ /* @internal */ function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) { + if (kind >= 158 /* FirstTypeNode */ && kind <= 173 /* LastTypeNode */) { return -3 /* TypeExcludes */; } switch (kind) { - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 176 /* ArrayLiteralExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 177 /* ArrayLiteralExpression */: return 537396545 /* ArrayLiteralOrCallOrNewExcludes */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return 574674241 /* ModuleExcludes */; - case 145 /* Parameter */: + case 146 /* Parameter */: return 536872257 /* ParameterExcludes */; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return 601249089 /* ArrowFunctionExcludes */; - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: return 601281857 /* FunctionExcludes */; - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return 546309441 /* VariableDeclarationListExcludes */; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return 539358529 /* ClassExcludes */; - case 151 /* Constructor */: + case 152 /* Constructor */: return 601015617 /* ConstructorExcludes */; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return 601015617 /* MethodOrAccessorExcludes */; - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 135 /* StringKeyword */: - case 133 /* ObjectKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 144 /* TypeParameter */: - case 147 /* PropertySignature */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 136 /* StringKeyword */: + case 134 /* ObjectKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 145 /* TypeParameter */: + case 148 /* PropertySignature */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: return -3 /* TypeExcludes */; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return 540087617 /* ObjectLiteralExcludes */; - case 259 /* CatchClause */: + case 260 /* CatchClause */: return 537920833 /* CatchClauseExcludes */; - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return 537396545 /* BindingPatternExcludes */; default: return 536872257 /* NodeExcludes */; @@ -25752,6 +25775,10 @@ var ts; var typeofType = createTypeofType(); var _jsxNamespace; var _jsxFactoryEntity; + var _jsxElementPropertiesName; + var _hasComputedJsxElementPropertiesName = false; + var _jsxElementChildrenPropertyName; + var _hasComputedJsxElementChildrenPropertyName = false; /** Things we lazy load from the JSX namespace */ var jsxTypes = ts.createMap(); var JsxNames = { @@ -25759,6 +25786,7 @@ var ts; IntrinsicElements: "IntrinsicElements", ElementClass: "ElementClass", ElementAttributesPropertyNameContainer: "ElementAttributesProperty", + ElementChildrenAttributeNameContainer: "ElementChildrenAttribute", Element: "Element", IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" @@ -25788,7 +25816,7 @@ var ts; initializeTypeChecker(); return checker; function getJsxNamespace() { - if (_jsxNamespace === undefined) { + if (!_jsxNamespace) { _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); @@ -25890,7 +25918,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 232 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 232 /* ModuleDeclaration */))) { + (target.valueDeclaration.kind === 233 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 233 /* ModuleDeclaration */))) { // other kinds of value declarations take precedence over modules target.valueDeclaration = source.valueDeclaration; } @@ -26003,7 +26031,7 @@ var ts; return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0; } function isGlobalSourceFile(node) { - return node.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); + return node.kind === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -26059,17 +26087,17 @@ var ts; } if (declaration.pos <= usage.pos) { // declaration is before usage - if (declaration.kind === 175 /* BindingElement */) { + if (declaration.kind === 176 /* BindingElement */) { // still might be illegal if declaration and usage are both binding elements (eg var [a = b, b = b] = [1, 2]) - var errorBindingElement = ts.getAncestor(usage, 175 /* BindingElement */); + var errorBindingElement = ts.getAncestor(usage, 176 /* BindingElement */); if (errorBindingElement) { return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) || declaration.pos < errorBindingElement.pos; } // or it might be illegal if usage happens before parent variable is declared (eg var [a] = a) - return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225 /* VariableDeclaration */), usage); + return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 226 /* VariableDeclaration */), usage); } - else if (declaration.kind === 225 /* VariableDeclaration */) { + else if (declaration.kind === 226 /* VariableDeclaration */) { // still might be illegal if usage is in the initializer of the variable declaration (eg var a = a) return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } @@ -26082,7 +26110,7 @@ var ts; // 4. inside a static property initializer, a reference to a static method in the same class // or if usage is in a type context: // 1. inside a type query (typeof in type position) - if (usage.parent.kind === 245 /* ExportSpecifier */) { + if (usage.parent.kind === 246 /* ExportSpecifier */) { // export specifiers do not use the variable, they only make it available for use return true; } @@ -26091,9 +26119,9 @@ var ts; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { - case 207 /* VariableStatement */: - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 208 /* VariableStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: // variable statement/for/for-of statement case, // use site should not be inside variable declaration (initializer of declaration or binding element) if (isSameScopeDescendentOf(usage, declaration, container)) { @@ -26102,8 +26130,8 @@ var ts; break; } switch (declaration.parent.parent.kind) { - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: // ForIn/ForOf case - use site should not be used in expression part if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { return true; @@ -26120,16 +26148,16 @@ var ts; return true; } var initializerOfProperty = current.parent && - current.parent.kind === 148 /* PropertyDeclaration */ && + current.parent.kind === 149 /* PropertyDeclaration */ && current.parent.initializer === current; if (initializerOfProperty) { if (ts.getModifierFlags(current.parent) & 32 /* Static */) { - if (declaration.kind === 150 /* MethodDeclaration */) { + if (declaration.kind === 151 /* MethodDeclaration */) { return true; } } else { - var isDeclarationInstanceProperty = declaration.kind === 148 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */); + var isDeclarationInstanceProperty = declaration.kind === 149 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */); if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) { return true; } @@ -26160,11 +26188,11 @@ var ts; // - parameters are only in the scope of function body // This restriction does not apply to JSDoc comment types because they are parented // at a higher level than type parameters would normally be - if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 282 /* JSDocComment */) { + if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 283 /* JSDocComment */) { useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || - lastLocation.kind === 145 /* Parameter */ || - lastLocation.kind === 144 /* TypeParameter */ + lastLocation.kind === 146 /* Parameter */ || + lastLocation.kind === 145 /* TypeParameter */ : false; } if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) { @@ -26173,9 +26201,9 @@ var ts; // however it is detected separately when checking initializers of parameters // to make sure that they reference no variables declared after them. useResult = - lastLocation.kind === 145 /* Parameter */ || + lastLocation.kind === 146 /* Parameter */ || (lastLocation === location.type && - result.valueDeclaration.kind === 145 /* Parameter */); + result.valueDeclaration.kind === 146 /* Parameter */); } } if (useResult) { @@ -26187,14 +26215,14 @@ var ts; } } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) break; isInExternalModule = true; // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 264 /* SourceFile */ || ts.isAmbientModule(location)) { + if (location.kind === 265 /* SourceFile */ || ts.isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. if (result = moduleExports.get("default")) { @@ -26218,7 +26246,7 @@ var ts; var moduleExport = moduleExports.get(name); if (moduleExport && moduleExport.flags === 8388608 /* Alias */ && - ts.getDeclarationOfKind(moduleExport, 245 /* ExportSpecifier */)) { + ts.getDeclarationOfKind(moduleExport, 246 /* ExportSpecifier */)) { break; } } @@ -26226,13 +26254,13 @@ var ts; break loop; } break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: // TypeScript 1.0 spec (April 2014): 8.4.1 // Initializer expressions for instance member variables are evaluated in the scope // of the class constructor body but are not permitted to reference parameters or @@ -26249,9 +26277,9 @@ var ts; } } break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { // ignore type parameters not declared in this container @@ -26267,7 +26295,7 @@ var ts; } break loop; } - if (location.kind === 198 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 199 /* ClassExpression */ && meaning & 32 /* Class */) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -26283,9 +26311,9 @@ var ts; // [foo()]() { } // <-- Reference to T from class's own computed property // } // - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 229 /* InterfaceDeclaration */) { + if (ts.isClassLike(grandparent) || grandparent.kind === 230 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -26293,19 +26321,19 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -26318,7 +26346,7 @@ var ts; } } break; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // @@ -26327,7 +26355,7 @@ var ts; // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. // } // - if (location.parent && location.parent.kind === 145 /* Parameter */) { + if (location.parent && location.parent.kind === 146 /* Parameter */) { location = location.parent; } // @@ -26393,7 +26421,7 @@ var ts; // If we're in an external module, we can't reference value symbols created from UMD export declarations if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) { var decls = result.declarations; - if (decls && decls.length === 1 && decls[0].kind === 235 /* NamespaceExportDeclaration */) { + if (decls && decls.length === 1 && decls[0].kind === 236 /* NamespaceExportDeclaration */) { error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name); } } @@ -26403,14 +26431,14 @@ var ts; function isTypeParameterSymbolDeclaredInContainer(symbol, container) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - if (decl.kind === 144 /* TypeParameter */ && decl.parent === container) { + if (decl.kind === 145 /* TypeParameter */ && decl.parent === container) { return true; } } return false; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if ((errorLocation.kind === 70 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 71 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, /*includeArrowFunctions*/ true); @@ -26455,10 +26483,10 @@ var ts; */ function getEntityNameForExtendingInterface(node) { switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: ts.Debug.assert(ts.isEntityNameExpression(node.expression)); return node.expression; default: @@ -26505,7 +26533,7 @@ var ts; function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */)); // Block-scoped variables cannot be used before their definition - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231 /* EnumDeclaration */) ? d : undefined; }); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 232 /* EnumDeclaration */) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined"); if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { if (result.flags & 2 /* BlockScopedVariable */) { @@ -26528,17 +26556,17 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } - return ts.findAncestor(node, function (n) { return n.kind === 237 /* ImportDeclaration */; }); + return ts.findAncestor(node, function (n) { return n.kind === 238 /* ImportDeclaration */; }); } } function getDeclarationOfAliasSymbol(symbol) { return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - if (node.moduleReference.kind === 247 /* ExternalModuleReference */) { + if (node.moduleReference.kind === 248 /* ExternalModuleReference */) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); @@ -26665,19 +26693,19 @@ var ts; } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, dontRecursivelyResolve); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); } } @@ -26725,11 +26753,11 @@ var ts; links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); ts.Debug.assert(!!node); - if (node.kind === 242 /* ExportAssignment */) { + if (node.kind === 243 /* ExportAssignment */) { // export default checkExpressionCached(node.expression); } - else if (node.kind === 245 /* ExportSpecifier */) { + else if (node.kind === 246 /* ExportSpecifier */) { // export { } or export { as foo } checkExpressionCached(node.propertyName || node.name); } @@ -26747,17 +26775,17 @@ var ts; // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (entityName.kind === 70 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { + if (entityName.kind === 71 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } // Check for case 1 and 3 in the above example - if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 142 /* QualifiedName */) { + if (entityName.kind === 71 /* Identifier */ || entityName.parent.kind === 143 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 236 /* ImportEqualsDeclaration */); + ts.Debug.assert(entityName.parent.kind === 237 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } } @@ -26772,20 +26800,20 @@ var ts; return undefined; } var symbol; - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { var message = meaning === 1920 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(location || name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 142 /* QualifiedName */ || name.kind === 178 /* PropertyAccessExpression */) { + else if (name.kind === 143 /* QualifiedName */ || name.kind === 179 /* PropertyAccessExpression */) { var left = void 0; - if (name.kind === 142 /* QualifiedName */) { + if (name.kind === 143 /* QualifiedName */) { left = name.left; } - else if (name.kind === 178 /* PropertyAccessExpression */ && - (name.expression.kind === 184 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) { + else if (name.kind === 179 /* PropertyAccessExpression */ && + (name.expression.kind === 185 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) { left = name.expression; } else { @@ -26795,7 +26823,7 @@ var ts; // i.e class C extends foo()./*do language service operation here*/B {} return undefined; } - var right = name.kind === 142 /* QualifiedName */ ? name.right : name.name; + var right = name.kind === 143 /* QualifiedName */ ? name.right : name.name; var namespace = resolveEntityName(left, 1920 /* Namespace */, ignoreErrors, /*dontResolveAlias*/ false, location); if (!namespace || ts.nodeIsMissing(right)) { return undefined; @@ -26811,7 +26839,7 @@ var ts; return undefined; } } - else if (name.kind === 184 /* ParenthesizedExpression */) { + else if (name.kind === 185 /* ParenthesizedExpression */) { // If the expression in parenthesizedExpression is not an entity-name (e.g. it is a call expression), it won't be able to successfully resolve the name. // This is the case when we are trying to do any language service operation in heritage clauses. // By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression will attempt to checkPropertyAccessExpression to resolve symbol. @@ -26831,7 +26859,7 @@ var ts; } function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) { if (isForAugmentation === void 0) { isForAugmentation = false; } - if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 12 /* NoSubstitutionTemplateLiteral */) { + if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 13 /* NoSubstitutionTemplateLiteral */) { return; } var moduleReferenceLiteral = moduleReferenceExpression; @@ -27033,7 +27061,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 151 /* Constructor */ && ts.nodeIsPresent(member.body)) { + if (member.kind === 152 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } } @@ -27111,12 +27139,12 @@ var ts; } } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location).exports)) { return result; } @@ -27168,7 +27196,7 @@ var ts; return ts.forEachEntry(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246 /* ExportSpecifier */)) { if (!useOnlyExternalAliasing || // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { @@ -27208,7 +27236,7 @@ var ts; return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -27223,10 +27251,10 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: continue; default: return false; @@ -27304,7 +27332,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; @@ -27345,12 +27373,12 @@ var ts; function isEntityNameVisible(entityName, enclosingDeclaration) { // get symbol of the first identifier of the entityName var meaning; - if (entityName.parent.kind === 161 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { + if (entityName.parent.kind === 162 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { // Typeof value meaning = 107455 /* Value */ | 1048576 /* ExportValue */; } - else if (entityName.kind === 142 /* QualifiedName */ || entityName.kind === 178 /* PropertyAccessExpression */ || - entityName.parent.kind === 236 /* ImportEqualsDeclaration */) { + else if (entityName.kind === 143 /* QualifiedName */ || entityName.kind === 179 /* PropertyAccessExpression */ || + entityName.parent.kind === 237 /* ImportEqualsDeclaration */) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration meaning = 1920 /* Namespace */; @@ -27441,16 +27469,16 @@ var ts; return undefined; } if (type.flags & 1 /* Any */) { - return ts.createKeywordTypeNode(118 /* AnyKeyword */); + return ts.createKeywordTypeNode(119 /* AnyKeyword */); } if (type.flags & 2 /* String */) { - return ts.createKeywordTypeNode(135 /* StringKeyword */); + return ts.createKeywordTypeNode(136 /* StringKeyword */); } if (type.flags & 4 /* Number */) { - return ts.createKeywordTypeNode(132 /* NumberKeyword */); + return ts.createKeywordTypeNode(133 /* NumberKeyword */); } if (type.flags & 8 /* Boolean */) { - return ts.createKeywordTypeNode(121 /* BooleanKeyword */); + return ts.createKeywordTypeNode(122 /* BooleanKeyword */); } if (type.flags & 16 /* Enum */) { var name = symbolToName(type.symbol, /*expectsIdentifier*/ false); @@ -27470,22 +27498,22 @@ var ts; return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined); } if (type.flags & 1024 /* Void */) { - return ts.createKeywordTypeNode(104 /* VoidKeyword */); + return ts.createKeywordTypeNode(105 /* VoidKeyword */); } if (type.flags & 2048 /* Undefined */) { - return ts.createKeywordTypeNode(138 /* UndefinedKeyword */); + return ts.createKeywordTypeNode(139 /* UndefinedKeyword */); } if (type.flags & 4096 /* Null */) { - return ts.createKeywordTypeNode(94 /* NullKeyword */); + return ts.createKeywordTypeNode(95 /* NullKeyword */); } if (type.flags & 8192 /* Never */) { - return ts.createKeywordTypeNode(129 /* NeverKeyword */); + return ts.createKeywordTypeNode(130 /* NeverKeyword */); } if (type.flags & 512 /* ESSymbol */) { - return ts.createKeywordTypeNode(136 /* SymbolKeyword */); + return ts.createKeywordTypeNode(137 /* SymbolKeyword */); } if (type.flags & 16777216 /* NonPrimitive */) { - return ts.createKeywordTypeNode(133 /* ObjectKeyword */); + return ts.createKeywordTypeNode(134 /* ObjectKeyword */); } if (type.flags & 16384 /* TypeParameter */ && type.isThisType) { if (context.inObjectTypeLiteral) { @@ -27521,7 +27549,7 @@ var ts; var formattedUnionTypes = formatUnionTypes(type.types); var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes); if (unionTypeNodes && unionTypeNodes.length > 0) { - return ts.createUnionOrIntersectionTypeNode(165 /* UnionType */, unionTypeNodes); + return ts.createUnionOrIntersectionTypeNode(166 /* UnionType */, unionTypeNodes); } else { if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) { @@ -27531,7 +27559,7 @@ var ts; } } if (type.flags & 131072 /* Intersection */) { - return ts.createUnionOrIntersectionTypeNode(166 /* IntersectionType */, mapToTypeNodeArray(type.types)); + return ts.createUnionOrIntersectionTypeNode(167 /* IntersectionType */, mapToTypeNodeArray(type.types)); } if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) { ts.Debug.assert(!!(type.flags & 32768 /* Object */)); @@ -27566,8 +27594,8 @@ var ts; var typeParameterNode = typeParameterToDeclaration(typeParameter); var templateType = getTemplateTypeFromMappedType(type); var templateTypeNode = typeToTypeNodeHelper(templateType); - var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130 /* ReadonlyKeyword */) : undefined; - var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54 /* QuestionToken */) : undefined; + var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(131 /* ReadonlyKeyword */) : undefined; + var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55 /* QuestionToken */) : undefined; return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); } function createAnonymousTypeNode(type) { @@ -27588,7 +27616,7 @@ var ts; return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined); } else { - return ts.createKeywordTypeNode(118 /* AnyKeyword */); + return ts.createKeywordTypeNode(119 /* AnyKeyword */); } } else { @@ -27613,7 +27641,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */; + return declaration.parent.kind === 265 /* SourceFile */ || declaration.parent.kind === 234 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -27634,11 +27662,11 @@ var ts; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var signature = resolved.callSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 159 /* FunctionType */); + return signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */); } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { var signature = resolved.constructSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 160 /* ConstructorType */); + return signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */); } } var saveInObjectTypeLiteral = context.inObjectTypeLiteral; @@ -27716,11 +27744,11 @@ var ts; var typeElements = []; for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 154 /* CallSignature */)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */)); } for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* ConstructSignature */)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */)); } if (resolvedType.stringIndexInfo) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */)); @@ -27740,12 +27768,12 @@ var ts; return; } var propertyName = oldDeclaration.name; - var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(54 /* QuestionToken */) : undefined; + var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(55 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length) { var signatures = getSignaturesOfType(propertyType, 0 /* Call */); for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) { var signature = signatures_1[_e]; - var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149 /* MethodSignature */); + var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150 /* MethodSignature */); methodDeclaration.name = propertyName; methodDeclaration.questionToken = optionalToken; typeElements.push(methodDeclaration); @@ -27753,7 +27781,7 @@ var ts; } else { // TODO(aozgaa): should we create a node with explicit or implict any? - var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118 /* AnyKeyword */); + var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119 /* AnyKeyword */); typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, /*initializer*/ undefined)); } @@ -27762,7 +27790,7 @@ var ts; } } function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) { - var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 135 /* StringKeyword */ : 132 /* NumberKeyword */); + var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 136 /* StringKeyword */ : 133 /* NumberKeyword */); var name = ts.getNameFromIndexInfo(indexInfo); var indexingParameter = ts.createParameter( /*decorators*/ undefined, @@ -27772,7 +27800,7 @@ var ts; /*initializer*/ undefined); var typeNode = typeToTypeNodeHelper(indexInfo.type); return ts.createIndexSignatureDeclaration( - /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(130 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode); + /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(131 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode); } function signatureToSignatureDeclarationHelper(signature, kind) { var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); }); @@ -27788,7 +27816,7 @@ var ts; var returnType = getReturnTypeOfSignature(signature); returnTypeNode = returnType && typeToTypeNodeHelper(returnType); } - var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 /* AnyKeyword */ ? returnTypeNode : undefined; + var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 /* AnyKeyword */ ? returnTypeNode : undefined; return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny); } function typeParameterToDeclaration(type) { @@ -27800,13 +27828,13 @@ var ts; return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode); } function symbolToParameterDeclaration(parameterSymbol) { - var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145 /* Parameter */); + var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146 /* Parameter */); var parameterType = getTypeOfSymbol(parameterSymbol); var parameterTypeNode = typeToTypeNodeHelper(parameterType); // TODO(aozgaa): In the future, check initializer accessibility. - var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23 /* DotDotDotToken */), + var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24 /* DotDotDotToken */), // Clone name to remove trivia. - ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer); + ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer); return parameterNode; } function symbolToName(symbol, expectsIdentifier) { @@ -27894,17 +27922,17 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(declaration.parent.name); } if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) { context.encounteredError = true; } switch (declaration.kind) { - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return "(Anonymous class)"; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -27955,8 +27983,8 @@ var ts; } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { - var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167 /* ParenthesizedType */; }); - if (node.kind === 230 /* TypeAliasDeclaration */) { + var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 168 /* ParenthesizedType */; }); + if (node.kind === 231 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } @@ -27964,7 +27992,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 233 /* ModuleBlock */ && + node.parent.kind === 234 /* ModuleBlock */ && ts.isExternalModuleAugmentation(node.parent.parent); } function literalTypeToString(type) { @@ -27976,14 +28004,14 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return "(Anonymous class)"; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -28007,17 +28035,17 @@ var ts; var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); if (ts.isSingleOrDoubleQuote(firstChar)) { writer.writeStringLiteral(symbolName); } else { writer.writeSymbol(symbolName, symbol); } - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); writer.writeSymbol(symbolName, symbol); } } @@ -28116,7 +28144,7 @@ var ts; } else if (type.flags & 256 /* EnumLiteral */) { buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags); - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); appendSymbolNameOnly(type.symbol, writer); } else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (16 /* Enum */ | 16384 /* TypeParameter */)) { @@ -28144,30 +28172,30 @@ var ts; } else if (type.flags & 524288 /* IndexedAccess */) { writeType(type.objectType, 64 /* InElementType */); - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); writeType(type.indexType, 0 /* None */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { // Should never get here // { ... } - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writeSpace(writer); - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); writeSpace(writer); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } } function writeTypeList(types, delimiter) { for (var i = 0; i < types.length; i++) { if (i > 0) { - if (delimiter !== 25 /* CommaToken */) { + if (delimiter !== 26 /* CommaToken */) { writeSpace(writer); } writePunctuation(writer, delimiter); writeSpace(writer); } - writeType(types[i], delimiter === 25 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */); + writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */); } } function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { @@ -28176,29 +28204,29 @@ var ts; buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, flags); } if (pos < end) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); writeType(typeArguments[pos], 256 /* InFirstTypeArgument */); pos++; while (pos < end) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); writeType(typeArguments[pos], 0 /* None */); pos++; } - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function writeTypeReference(type, flags) { var typeArguments = type.typeArguments || emptyArray; if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) { writeType(typeArguments[0], 64 /* InElementType */); - writePunctuation(writer, 20 /* OpenBracketToken */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else if (type.target.objectFlags & 8 /* Tuple */) { - writePunctuation(writer, 20 /* OpenBracketToken */); - writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 25 /* CommaToken */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26 /* CommaToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { // Write the type reference in the format f.g.C where A and B are type arguments @@ -28219,7 +28247,7 @@ var ts; // the default outer type arguments), we don't show the group. if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { writeSymbolTypeReference(parent, typeArguments, start, i, flags); - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); } } } @@ -28229,16 +28257,16 @@ var ts; } function writeUnionOrIntersectionType(type, flags) { if (flags & 64 /* InElementType */) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } if (type.flags & 65536 /* Union */) { - writeTypeList(formatUnionTypes(type.types), 48 /* BarToken */); + writeTypeList(formatUnionTypes(type.types), 49 /* BarToken */); } else { - writeTypeList(type.types, 47 /* AmpersandToken */); + writeTypeList(type.types, 48 /* AmpersandToken */); } if (flags & 64 /* InElementType */) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } } function writeAnonymousType(type, flags) { @@ -28261,7 +28289,7 @@ var ts; } else { // Recursive usage, use any - writeKeyword(writer, 118 /* AnyKeyword */); + writeKeyword(writer, 119 /* AnyKeyword */); } } else { @@ -28285,7 +28313,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */; + return declaration.parent.kind === 265 /* SourceFile */ || declaration.parent.kind === 234 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -28295,18 +28323,18 @@ var ts; } } function writeTypeOfSymbol(type, typeFormatFlags) { - writeKeyword(writer, 102 /* TypeOfKeyword */); + writeKeyword(writer, 103 /* TypeOfKeyword */); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags); } function writePropertyWithModifiers(prop) { if (isReadonlySymbol(prop)) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } buildSymbolDisplay(prop, writer); if (prop.flags & 67108864 /* Optional */) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } } function shouldAddParenthesisAroundFunctionType(callSignature, flags) { @@ -28331,55 +28359,55 @@ var ts; var resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 16 /* OpenBraceToken */); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); if (parenthesizeSignature) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack); if (parenthesizeSignature) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } return; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { if (flags & 64 /* InElementType */) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } - writeKeyword(writer, 93 /* NewKeyword */); + writeKeyword(writer, 94 /* NewKeyword */); writeSpace(writer); buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack); if (flags & 64 /* InElementType */) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } return; } } var saveInObjectTypeLiteral = inObjectTypeLiteral; inObjectTypeLiteral = true; - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writer.writeLine(); writer.increaseIndent(); writeObjectLiteralType(resolved); writer.decreaseIndent(); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); inObjectTypeLiteral = saveInObjectTypeLiteral; } function writeObjectLiteralType(resolved) { for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, 1 /* Construct */, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0 /* String */, enclosingDeclaration, globalFlags, symbolStack); @@ -28393,45 +28421,45 @@ var ts; var signature = signatures_2[_f]; writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } else { writePropertyWithModifiers(p); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); writeType(t, 0 /* None */); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } } function writeMappedType(type) { - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writer.writeLine(); writer.increaseIndent(); if (type.declaration.readonlyToken) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); appendSymbolNameOnly(getTypeParameterFromMappedType(type).symbol, writer); writeSpace(writer); - writeKeyword(writer, 91 /* InKeyword */); + writeKeyword(writer, 92 /* InKeyword */); writeSpace(writer); writeType(getConstraintTypeFromMappedType(type), 0 /* None */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); if (type.declaration.questionToken) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); writeType(getTemplateTypeFromMappedType(type), 0 /* None */); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); writer.decreaseIndent(); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } } function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration, flags) { @@ -28445,14 +28473,14 @@ var ts; var constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); - writeKeyword(writer, 84 /* ExtendsKeyword */); + writeKeyword(writer, 85 /* ExtendsKeyword */); writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } var defaultType = getDefaultFromTypeParameter(tp); if (defaultType) { writeSpace(writer); - writePunctuation(writer, 57 /* EqualsToken */); + writePunctuation(writer, 58 /* EqualsToken */); writeSpace(writer); buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); } @@ -28460,7 +28488,7 @@ var ts; function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { var parameterNode = p.valueDeclaration; if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); } if (parameterNode && ts.isBindingPattern(parameterNode.name)) { buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); @@ -28469,9 +28497,9 @@ var ts; appendSymbolNameOnly(p, writer); } if (parameterNode && isOptionalParameter(parameterNode)) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); var type = getTypeOfSymbol(p); if (parameterNode && isRequiredInitializedParameter(parameterNode)) { @@ -28481,29 +28509,29 @@ var ts; } function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { // We have to explicitly emit square bracket and bracket because these tokens are not stored inside the node. - if (bindingPattern.kind === 173 /* ObjectBindingPattern */) { - writePunctuation(writer, 16 /* OpenBraceToken */); + if (bindingPattern.kind === 174 /* ObjectBindingPattern */) { + writePunctuation(writer, 17 /* OpenBraceToken */); buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } - else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) { - writePunctuation(writer, 20 /* OpenBracketToken */); + else if (bindingPattern.kind === 175 /* ArrayBindingPattern */) { + writePunctuation(writer, 21 /* OpenBracketToken */); var elements = bindingPattern.elements; buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); if (elements && elements.hasTrailingComma) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); } - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } } function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isOmittedExpression(bindingElement)) { return; } - ts.Debug.assert(bindingElement.kind === 175 /* BindingElement */); + ts.Debug.assert(bindingElement.kind === 176 /* BindingElement */); if (bindingElement.propertyName) { writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName)); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); } if (ts.isBindingPattern(bindingElement.name)) { @@ -28511,22 +28539,22 @@ var ts; } else { if (bindingElement.dotDotDotToken) { - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); } appendSymbolNameOnly(bindingElement.symbol, writer); } } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function buildDisplayForCommaSeparatedList(list, writer, action) { for (var i = 0; i < list.length; i++) { if (i > 0) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); } action(list[i]); @@ -28534,42 +28562,42 @@ var ts; } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); var flags = 256 /* InFirstTypeArgument */; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); flags = 0 /* None */; } buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags); } - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); if (thisParameter) { buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); } for (var i = 0; i < parameters.length; i++) { if (i > 0 || thisParameter) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); } buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); } - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } function buildTypePredicateDisplay(predicate, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isIdentifierTypePredicate(predicate)) { writer.writeParameter(predicate.parameterName); } else { - writeKeyword(writer, 98 /* ThisKeyword */); + writeKeyword(writer, 99 /* ThisKeyword */); } writeSpace(writer); - writeKeyword(writer, 125 /* IsKeyword */); + writeKeyword(writer, 126 /* IsKeyword */); writeSpace(writer); buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack); } @@ -28580,10 +28608,10 @@ var ts; } if (flags & 8 /* WriteArrowStyleSignature */) { writeSpace(writer); - writePunctuation(writer, 35 /* EqualsGreaterThanToken */); + writePunctuation(writer, 36 /* EqualsGreaterThanToken */); } else { - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); } writeSpace(writer); if (signature.typePredicate) { @@ -28595,7 +28623,7 @@ var ts; } function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, kind, symbolStack) { if (kind === 1 /* Construct */) { - writeKeyword(writer, 93 /* NewKeyword */); + writeKeyword(writer, 94 /* NewKeyword */); writeSpace(writer); } if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) { @@ -28612,26 +28640,26 @@ var ts; function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) { if (info) { if (info.isReadonly) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); switch (kind) { case 1 /* Number */: - writeKeyword(writer, 132 /* NumberKeyword */); + writeKeyword(writer, 133 /* NumberKeyword */); break; case 0 /* String */: - writeKeyword(writer, 135 /* StringKeyword */); + writeKeyword(writer, 136 /* StringKeyword */); break; } - writePunctuation(writer, 21 /* CloseBracketToken */); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } @@ -28660,22 +28688,22 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 175 /* BindingElement */: + case 176 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { // If the binding pattern is empty, this variable declaration is not visible return false; } // falls through - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 227 /* FunctionDeclaration */: - case 231 /* EnumDeclaration */: - case 236 /* ImportEqualsDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + case 232 /* EnumDeclaration */: + case 237 /* ImportEqualsDeclaration */: // external module augmentation is always visible if (ts.isExternalModuleAugmentation(node)) { return true; @@ -28683,53 +28711,53 @@ var ts; var parent = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(ts.getCombinedModifierFlags(node) & 1 /* Export */) && - !(node.kind !== 236 /* ImportEqualsDeclaration */ && parent.kind !== 264 /* SourceFile */ && ts.isInAmbientContext(parent))) { + !(node.kind !== 237 /* ImportEqualsDeclaration */ && parent.kind !== 265 /* SourceFile */ && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible return isDeclarationVisible(parent); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.getModifierFlags(node) & (8 /* Private */ | 16 /* Protected */)) { // Private/protected properties/methods are not visible return false; } // Public properties/methods are visible if its parents are visible, so: // falls through - case 151 /* Constructor */: - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 156 /* IndexSignature */: - case 145 /* Parameter */: - case 233 /* ModuleBlock */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 162 /* TypeLiteral */: - case 158 /* TypeReference */: - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: + case 152 /* Constructor */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 157 /* IndexSignature */: + case 146 /* Parameter */: + case 234 /* ModuleBlock */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 163 /* TypeLiteral */: + case 159 /* TypeReference */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: return isDeclarationVisible(node.parent); // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: return false; // Type parameters are always visible - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: // Source file and namespace export are always visible - case 264 /* SourceFile */: - case 235 /* NamespaceExportDeclaration */: + case 265 /* SourceFile */: + case 236 /* NamespaceExportDeclaration */: return true; // Export assignments do not create name bindings outside the module - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return false; default: return false; @@ -28738,10 +28766,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 242 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 243 /* ExportAssignment */) { exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 245 /* ExportSpecifier */) { + else if (node.parent.kind === 246 /* ExportSpecifier */) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -28833,12 +28861,12 @@ var ts; function getDeclarationContainer(node) { node = ts.findAncestor(ts.getRootDeclaration(node), function (node) { switch (node.kind) { - case 225 /* VariableDeclaration */: - case 226 /* VariableDeclarationList */: - case 241 /* ImportSpecifier */: - case 240 /* NamedImports */: - case 239 /* NamespaceImport */: - case 238 /* ImportClause */: + case 226 /* VariableDeclaration */: + case 227 /* VariableDeclarationList */: + case 242 /* ImportSpecifier */: + case 241 /* NamedImports */: + case 240 /* NamespaceImport */: + case 239 /* ImportClause */: return false; default: return true; @@ -28869,7 +28897,7 @@ var ts; return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false); } function isComputedNonLiteralName(name) { - return name.kind === 143 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression); + return name.kind === 144 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression); } function getRestType(source, properties, symbol) { source = filterType(source, function (t) { return !(t.flags & 6144 /* Nullable */); }); @@ -28916,7 +28944,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 173 /* ObjectBindingPattern */) { + if (pattern.kind === 174 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { if (!isValidSpreadType(parentType)) { error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types); @@ -28997,11 +29025,11 @@ var ts; } function isNullOrUndefined(node) { var expr = ts.skipParentheses(node); - return expr.kind === 94 /* NullKeyword */ || expr.kind === 70 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 95 /* NullKeyword */ || expr.kind === 71 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral(node) { var expr = ts.skipParentheses(node); - return expr.kind === 176 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 177 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, optional) { return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type; @@ -29019,11 +29047,11 @@ var ts; } // A variable declared in a for..in statement is of type string, or of type keyof T when the // right hand expression is of a type parameter type. - if (declaration.parent.parent.kind === 214 /* ForInStatement */) { + if (declaration.parent.parent.kind === 215 /* ForInStatement */) { var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression)); return indexType.flags & (16384 /* TypeParameter */ | 262144 /* Index */) ? indexType : stringType; } - if (declaration.parent.parent.kind === 215 /* ForOfStatement */) { + if (declaration.parent.parent.kind === 216 /* ForOfStatement */) { // checkRightHandSideOfForOf will return undefined if the for-of expression type was // missing properties/signatures required to get its iteratedType (like // [Symbol.iterator] or next). This may be because we accessed properties from anyType, @@ -29040,7 +29068,7 @@ var ts; return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality); } if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) && - declaration.kind === 225 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) && + declaration.kind === 226 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) && !(ts.getCombinedModifierFlags(declaration) & 1 /* Export */) && !ts.isInAmbientContext(declaration)) { // If --noImplicitAny is on or the declaration is in a Javascript file, // use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no @@ -29054,11 +29082,11 @@ var ts; return autoArrayType; } } - if (declaration.kind === 145 /* Parameter */) { + if (declaration.kind === 146 /* Parameter */) { var func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 153 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152 /* GetAccessor */); + if (func.kind === 154 /* SetAccessor */ && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 153 /* GetAccessor */); if (getter) { var getterSignature = getSignatureFromDeclaration(getter); var thisParameter = getAccessorThisParameter(func); @@ -29093,7 +29121,7 @@ var ts; return trueType; } // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 261 /* ShorthandPropertyAssignment */) { + if (declaration.kind === 262 /* ShorthandPropertyAssignment */) { return checkIdentifier(declaration.name); } // If the declaration specifies a binding pattern, use the type implied by the binding pattern @@ -29109,14 +29137,14 @@ var ts; var definedInMethod = false; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - var expression = declaration.kind === 193 /* BinaryExpression */ ? declaration : - declaration.kind === 178 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 193 /* BinaryExpression */) : + var expression = declaration.kind === 194 /* BinaryExpression */ ? declaration : + declaration.kind === 179 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 194 /* BinaryExpression */) : undefined; if (!expression) { return unknownType; } - if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98 /* ThisKeyword */) { - if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 151 /* Constructor */) { + if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 99 /* ThisKeyword */) { + if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 152 /* Constructor */) { definedInConstructor = true; } else { @@ -29206,7 +29234,7 @@ var ts; // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of // the parameter. function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { - return pattern.kind === 173 /* ObjectBindingPattern */ + return pattern.kind === 174 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } @@ -29228,7 +29256,7 @@ var ts; // During a normal type check we'll never get to here with a property assignment (the check of the containing // object literal uses a different path). We exclude widening only so that language services and type verification // tools see the actual type. - if (declaration.kind === 260 /* PropertyAssignment */) { + if (declaration.kind === 261 /* PropertyAssignment */) { return type; } return getWidenedType(type); @@ -29245,7 +29273,7 @@ var ts; } function declarationBelongsToPrivateAmbientMember(declaration) { var root = ts.getRootDeclaration(declaration); - var memberDeclaration = root.kind === 145 /* Parameter */ ? root.parent : root; + var memberDeclaration = root.kind === 146 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -29261,10 +29289,10 @@ var ts; return links.type = anyType; } // Handle export default expressions - if (declaration.kind === 242 /* ExportAssignment */) { + if (declaration.kind === 243 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } - if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 290 /* JSDocPropertyTag */ && declaration.typeExpression) { + if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 291 /* JSDocPropertyTag */ && declaration.typeExpression) { return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } // Handle variable, parameter or property @@ -29277,8 +29305,8 @@ var ts; // * exports.p = expr // * this.p = expr // * className.prototype.method = expr - if (declaration.kind === 193 /* BinaryExpression */ || - declaration.kind === 178 /* PropertyAccessExpression */ && declaration.parent.kind === 193 /* BinaryExpression */) { + if (declaration.kind === 194 /* BinaryExpression */ || + declaration.kind === 179 /* PropertyAccessExpression */ && declaration.parent.kind === 194 /* BinaryExpression */) { type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol); } else { @@ -29293,7 +29321,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 152 /* GetAccessor */) { + if (accessor.kind === 153 /* GetAccessor */) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -29313,8 +29341,8 @@ var ts; function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - var getter = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 153 /* SetAccessor */); + var getter = ts.getDeclarationOfKind(symbol, 153 /* GetAccessor */); + var setter = ts.getDeclarationOfKind(symbol, 154 /* SetAccessor */); if (getter && getter.flags & 65536 /* JavaScriptFile */) { var jsDocType = getTypeForDeclarationFromJSDocComment(getter); if (jsDocType) { @@ -29358,7 +29386,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */); + var getter_1 = ts.getDeclarationOfKind(symbol, 153 /* GetAccessor */); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -29512,9 +29540,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */ || - node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */ || - node.kind === 150 /* MethodDeclaration */ || node.kind === 186 /* ArrowFunction */) { + if (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */ || + node.kind === 228 /* FunctionDeclaration */ || node.kind === 186 /* FunctionExpression */ || + node.kind === 151 /* MethodDeclaration */ || node.kind === 187 /* ArrowFunction */) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -29524,7 +29552,7 @@ var ts; } // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */); + var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 230 /* InterfaceDeclaration */); return appendOuterTypeParameters(/*typeParameters*/ undefined, declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -29533,8 +29561,8 @@ var ts; var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 228 /* ClassDeclaration */ || - node.kind === 198 /* ClassExpression */ || node.kind === 230 /* TypeAliasDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */ || node.kind === 229 /* ClassDeclaration */ || + node.kind === 199 /* ClassExpression */ || node.kind === 231 /* TypeAliasDeclaration */) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -29715,7 +29743,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 230 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -29747,7 +29775,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 /* InterfaceDeclaration */) { + if (declaration.kind === 230 /* InterfaceDeclaration */) { if (declaration.flags & 64 /* ContainsThis */) { return false; } @@ -29804,7 +29832,7 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 289 /* JSDocTypedefTag */); + var declaration = ts.getDeclarationOfKind(symbol, 290 /* JSDocTypedefTag */); var type = void 0; if (declaration) { if (declaration.jsDocTypeLiteral) { @@ -29815,7 +29843,7 @@ var ts; } } else { - declaration = ts.getDeclarationOfKind(symbol, 230 /* TypeAliasDeclaration */); + declaration = ts.getDeclarationOfKind(symbol, 231 /* TypeAliasDeclaration */); type = getTypeFromTypeNode(declaration.type); } if (popTypeResolution()) { @@ -29842,14 +29870,14 @@ var ts; return !ts.isInAmbientContext(member); } return expr.kind === 8 /* NumericLiteral */ || - expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ && + expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */ || - expr.kind === 70 /* Identifier */ && !!symbol.exports.get(expr.text); + expr.kind === 71 /* Identifier */ && !!symbol.exports.get(expr.text); } function enumHasLiteralMembers(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231 /* EnumDeclaration */) { + if (declaration.kind === 232 /* EnumDeclaration */) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; if (!isLiteralEnumMember(symbol, member)) { @@ -29877,7 +29905,7 @@ var ts; var memberTypes = []; for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231 /* EnumDeclaration */) { + if (declaration.kind === 232 /* EnumDeclaration */) { computeEnumMemberValues(declaration); for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; @@ -29964,21 +29992,21 @@ var ts; // considered independent. function isIndependentType(node) { switch (node.kind) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 133 /* ObjectKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 134 /* ObjectKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: + case 173 /* LiteralType */: return true; - case 163 /* ArrayType */: + case 164 /* ArrayType */: return isIndependentType(node.elementType); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return isIndependentTypeReference(node); } return false; @@ -29991,7 +30019,7 @@ var ts; // A function-like declaration is considered independent (free of this references) if it has a return type // annotation that is considered independent and if each parameter is considered independent. function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 151 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 152 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -30012,12 +30040,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return isIndependentVariableLikeDeclaration(declaration); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -30386,7 +30414,7 @@ var ts; var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); // The 'T' in 'keyof T' var templateReadonly = !!type.declaration.readonlyToken; var templateOptional = !!type.declaration.questionToken; - if (type.declaration.typeParameter.constraint.kind === 169 /* TypeOperator */) { + if (type.declaration.typeParameter.constraint.kind === 170 /* TypeOperator */) { // We have a { [P in keyof T]: X } for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) { var propertySymbol = _a[_i]; @@ -30448,7 +30476,7 @@ var ts; function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { var constraintDeclaration = type.declaration.typeParameter.constraint; - if (constraintDeclaration.kind === 169 /* TypeOperator */) { + if (constraintDeclaration.kind === 170 /* TypeOperator */) { // If the constraint declaration is a 'keyof T' node, the modifiers type is T. We check // AST nodes here because, when T is a non-generic type, the logic below eagerly resolves // 'keyof T' to a literal union type and we can't recover T from that type. @@ -30869,7 +30897,7 @@ var ts; } function isJSDocOptionalParameter(node) { if (node.flags & 65536 /* JavaScriptFile */) { - if (node.type && node.type.kind === 277 /* JSDocOptionalType */) { + if (node.type && node.type.kind === 278 /* JSDocOptionalType */) { return true; } var paramTags = ts.getJSDocParameterTags(node); @@ -30880,7 +30908,7 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 277 /* JSDocOptionalType */; + return paramTag.typeExpression.type.kind === 278 /* JSDocOptionalType */; } } } @@ -30914,7 +30942,7 @@ var ts; return false; } function createTypePredicateFromTypePredicateNode(node) { - if (node.parameterName.kind === 70 /* Identifier */) { + if (node.parameterName.kind === 71 /* Identifier */) { var parameterName = node.parameterName; return { kind: 1 /* Identifier */, @@ -31006,7 +31034,7 @@ var ts; else { parameters.push(paramSymbol); } - if (param.type && param.type.kind === 172 /* LiteralType */) { + if (param.type && param.type.kind === 173 /* LiteralType */) { hasLiteralTypes = true; } // Record a new minimum argument count if this is not an optional parameter @@ -31019,23 +31047,23 @@ var ts; } } // If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation - if ((declaration.kind === 152 /* GetAccessor */ || declaration.kind === 153 /* SetAccessor */) && + if ((declaration.kind === 153 /* GetAccessor */ || declaration.kind === 154 /* SetAccessor */) && !ts.hasDynamicName(declaration) && (!hasThisParameter || !thisParameter)) { - var otherKind = declaration.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */; + var otherKind = declaration.kind === 153 /* GetAccessor */ ? 154 /* SetAccessor */ : 153 /* GetAccessor */; var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - var classType = declaration.kind === 151 /* Constructor */ ? + var classType = declaration.kind === 152 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : getTypeParametersFromJSDocTemplate(declaration); var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType); - var typePredicate = declaration.type && declaration.type.kind === 157 /* TypePredicate */ ? + var typePredicate = declaration.type && declaration.type.kind === 158 /* TypePredicate */ ? createTypePredicateFromTypePredicateNode(declaration.type) : undefined; links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); @@ -31060,8 +31088,8 @@ var ts; } // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 152 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 153 /* SetAccessor */); + if (declaration.kind === 153 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 154 /* SetAccessor */); return getAnnotatedAccessorType(setter); } if (ts.nodeIsMissing(declaration.body)) { @@ -31083,13 +31111,13 @@ var ts; if (!node) return false; switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node.text === "arguments" && ts.isPartOfExpression(node); - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - return node.name.kind === 143 /* ComputedPropertyName */ + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + return node.name.kind === 144 /* ComputedPropertyName */ && traverse(node.name); default: return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse); @@ -31103,20 +31131,20 @@ var ts; for (var i = 0; i < symbol.declarations.length; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 279 /* JSDocFunctionType */: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -31213,7 +31241,7 @@ var ts; // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 151 /* Constructor */ || signature.declaration.kind === 155 /* ConstructSignature */; + var isConstructor = signature.declaration.kind === 152 /* Constructor */ || signature.declaration.kind === 156 /* ConstructSignature */; var type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -31227,7 +31255,7 @@ var ts; return symbol.members.get("__index"); } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 135 /* StringKeyword */; + var syntaxKind = kind === 1 /* Number */ ? 133 /* NumberKeyword */ : 136 /* StringKeyword */; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -31254,7 +31282,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 144 /* TypeParameter */).constraint; + return ts.getDeclarationOfKind(type.symbol, 145 /* TypeParameter */).constraint; } function getConstraintFromTypeParameter(typeParameter) { if (!typeParameter.constraint) { @@ -31270,7 +31298,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144 /* TypeParameter */).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 145 /* TypeParameter */).parent); } function getTypeListId(types) { var result = ""; @@ -31402,11 +31430,11 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 158 /* TypeReference */: + case 159 /* TypeReference */: return node.typeName; - case 276 /* JSDocTypeReference */: + case 277 /* JSDocTypeReference */: return node.name; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: // We only support expressions that are simple qualified names. For other // expressions this produces undefined. var expr = node.expression; @@ -31432,7 +31460,7 @@ var ts; if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 /* Value */ && node.kind === 276 /* JSDocTypeReference */) { + if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* JSDocTypeReference */) { // A JSDocTypeReference may have resolved to a value (as opposed to a type). In // that case, the type of this reference is just the type of the value we resolved // to. @@ -31477,7 +31505,7 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 276 /* JSDocTypeReference */) { + if (node.kind === 277 /* JSDocTypeReference */) { type = getPrimitiveTypeFromJSDocTypeReference(node); if (!type) { var typeReferenceName = getTypeReferenceName(node); @@ -31487,7 +31515,7 @@ var ts; } else { // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 158 /* TypeReference */ + var typeNameOrExpression = node.kind === 159 /* TypeReference */ ? node.typeName : ts.isEntityNameExpression(node.expression) ? node.expression @@ -31522,9 +31550,9 @@ var ts; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var declaration = declarations_4[_i]; switch (declaration.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: return declaration; } } @@ -31989,7 +32017,7 @@ var ts; return type; } function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) { - var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined; var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ? indexType.text : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ? @@ -32037,7 +32065,7 @@ var ts; } } if (accessNode) { - var indexNode = accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType; + var indexNode = accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType; if (indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */)) { error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType)); } @@ -32052,7 +32080,7 @@ var ts; return anyType; } function getIndexedAccessForMappedType(type, indexType, accessNode) { - var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined; if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) { error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type)); return unknownType; @@ -32069,7 +32097,7 @@ var ts; // preserve backwards compatibility. For example, an element access 'this["foo"]' has always been resolved // eagerly using the constraint type of 'this' at the given location. if (maybeTypeOfKind(indexType, 540672 /* TypeVariable */ | 262144 /* Index */) || - maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 179 /* ElementAccessExpression */) || + maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 180 /* ElementAccessExpression */) || isGenericMappedType(objectType)) { if (objectType.flags & 1 /* Any */) { return objectType; @@ -32143,7 +32171,7 @@ var ts; return links.resolvedType; } function getAliasSymbolForTypeNode(node) { - return node.parent.kind === 230 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined; + return node.parent.kind === 231 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined; } function getAliasTypeArgumentsForTypeNode(node) { var symbol = getAliasSymbolForTypeNode(node); @@ -32293,9 +32321,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 229 /* InterfaceDeclaration */)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 230 /* InterfaceDeclaration */)) { if (!(ts.getModifierFlags(container) & 32 /* Static */) && - (container.kind !== 151 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) { + (container.kind !== 152 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -32311,85 +32339,85 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 118 /* AnyKeyword */: - case 267 /* JSDocAllType */: - case 268 /* JSDocUnknownType */: + case 119 /* AnyKeyword */: + case 268 /* JSDocAllType */: + case 269 /* JSDocUnknownType */: return anyType; - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: return stringType; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: return numberType; - case 121 /* BooleanKeyword */: + case 122 /* BooleanKeyword */: return booleanType; - case 136 /* SymbolKeyword */: + case 137 /* SymbolKeyword */: return esSymbolType; - case 104 /* VoidKeyword */: + case 105 /* VoidKeyword */: return voidType; - case 138 /* UndefinedKeyword */: + case 139 /* UndefinedKeyword */: return undefinedType; - case 94 /* NullKeyword */: + case 95 /* NullKeyword */: return nullType; - case 129 /* NeverKeyword */: + case 130 /* NeverKeyword */: return neverType; - case 133 /* ObjectKeyword */: + case 134 /* ObjectKeyword */: return nonPrimitiveType; - case 168 /* ThisType */: - case 98 /* ThisKeyword */: + case 169 /* ThisType */: + case 99 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 292 /* JSDocLiteralType */: + case 293 /* JSDocLiteralType */: return getTypeFromLiteralTypeNode(node.literal); - case 158 /* TypeReference */: - case 276 /* JSDocTypeReference */: + case 159 /* TypeReference */: + case 277 /* JSDocTypeReference */: return getTypeFromTypeReference(node); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return booleanType; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 163 /* ArrayType */: - case 269 /* JSDocArrayType */: + case 164 /* ArrayType */: + case 270 /* JSDocArrayType */: return getTypeFromArrayTypeNode(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 165 /* UnionType */: - case 270 /* JSDocUnionType */: + case 166 /* UnionType */: + case 271 /* JSDocUnionType */: return getTypeFromUnionTypeNode(node); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 272 /* JSDocNullableType */: + case 273 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 167 /* ParenthesizedType */: - case 273 /* JSDocNonNullableType */: - case 280 /* JSDocConstructorType */: - case 281 /* JSDocThisType */: - case 277 /* JSDocOptionalType */: + case 168 /* ParenthesizedType */: + case 274 /* JSDocNonNullableType */: + case 281 /* JSDocConstructorType */: + case 282 /* JSDocThisType */: + case 278 /* JSDocOptionalType */: return getTypeFromTypeNode(node.type); - case 274 /* JSDocRecordType */: + case 275 /* JSDocRecordType */: return getTypeFromTypeNode(node.literal); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 162 /* TypeLiteral */: - case 291 /* JSDocTypeLiteral */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 163 /* TypeLiteral */: + case 292 /* JSDocTypeLiteral */: + case 279 /* JSDocFunctionType */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return getTypeFromMappedTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode - case 70 /* Identifier */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 143 /* QualifiedName */: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 271 /* JSDocTupleType */: + case 272 /* JSDocTupleType */: return getTypeFromJSDocTupleType(node); - case 279 /* JSDocVariadicType */: + case 280 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -32599,27 +32627,27 @@ var ts; // the type parameters introduced by enclosing declarations. We just pick the first // declaration since multiple declarations will all have the same parent anyway. return !!ts.findAncestor(symbol.declarations[0], function (node) { - if (node.kind === 232 /* ModuleDeclaration */ || node.kind === 264 /* SourceFile */) { + if (node.kind === 233 /* ModuleDeclaration */ || node.kind === 265 /* SourceFile */) { return "quit"; } switch (node.kind) { - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: var declaration = node; if (declaration.typeParameters) { for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { @@ -32629,19 +32657,19 @@ var ts; } } } - if (ts.isClassLike(node) || node.kind === 229 /* InterfaceDeclaration */) { + if (ts.isClassLike(node) || node.kind === 230 /* InterfaceDeclaration */) { var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; if (thisType && ts.contains(mappedTypes, thisType)) { return true; } } break; - case 171 /* MappedType */: + case 172 /* MappedType */: if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) { return true; } break; - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: var func = node; for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) { var p = _c[_b]; @@ -32656,7 +32684,7 @@ var ts; function isTopLevelTypeAlias(symbol) { if (symbol.declarations && symbol.declarations.length) { var parentKind = symbol.declarations[0].parent.kind; - return parentKind === 264 /* SourceFile */ || parentKind === 233 /* ModuleBlock */; + return parentKind === 265 /* SourceFile */ || parentKind === 234 /* ModuleBlock */; } return false; } @@ -32733,34 +32761,34 @@ var ts; // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return isContextSensitiveFunctionLikeDeclaration(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return ts.forEach(node.properties, isContextSensitive); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return ts.forEach(node.elements, isContextSensitive); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 193 /* BinaryExpression */: - return node.operatorToken.kind === 53 /* BarBarToken */ && + case 194 /* BinaryExpression */: + return node.operatorToken.kind === 54 /* BarBarToken */ && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return isContextSensitiveFunctionLikeDeclaration(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return ts.forEach(node.properties, isContextSensitive); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: // If there is no initializer, JSX attribute has a boolean value of true which is not context sensitive. return node.initializer && isContextSensitive(node.initializer); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: // It is possible to that node.expression is undefined (e.g
) return node.expression && isContextSensitive(node.expression); } @@ -32776,7 +32804,7 @@ var ts; return true; } // For arrow functions we now know we're not context sensitive. - if (node.kind === 186 /* ArrowFunction */) { + if (node.kind === 187 /* ArrowFunction */) { return false; } // If the first parameter is not an explicit 'this' parameter, then the function has @@ -33350,7 +33378,7 @@ var ts; // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. ts.Debug.assert(!!errorNode); - if (ts.isJsxAttributes(errorNode)) { + if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode)) { // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); @@ -34443,25 +34471,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 145 /* Parameter */: + case 146 /* Parameter */: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; break; - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -34947,21 +34975,21 @@ var ts; // TypeScript 1.0 spec (April 2014): 3.6.3 // A type query consists of the keyword typeof followed by an expression. // The expression is restricted to a single identifier or a sequence of identifiers separated by periods - return !!ts.findAncestor(node, function (n) { return n.kind === 161 /* TypeQuery */ ? true : n.kind === 70 /* Identifier */ || n.kind === 142 /* QualifiedName */ ? false : "quit"; }); + return !!ts.findAncestor(node, function (n) { return n.kind === 162 /* TypeQuery */ ? true : n.kind === 71 /* Identifier */ || n.kind === 143 /* QualifiedName */ ? false : "quit"; }); } // Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers // separated by dots). The key consists of the id of the symbol referenced by the // leftmost identifier followed by zero or more property names separated by dots. // The result is undefined if the reference isn't a dotted name. function getFlowCacheKey(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; } - if (node.kind === 98 /* ThisKeyword */) { + if (node.kind === 99 /* ThisKeyword */) { return "0"; } - if (node.kind === 178 /* PropertyAccessExpression */) { + if (node.kind === 179 /* PropertyAccessExpression */) { var key = getFlowCacheKey(node.expression); return key && key + "." + node.name.text; } @@ -34969,33 +34997,33 @@ var ts; } function getLeftmostIdentifierOrThis(node) { switch (node.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: return node; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return getLeftmostIdentifierOrThis(node.expression); } return undefined; } function isMatchingReference(source, target) { switch (source.kind) { - case 70 /* Identifier */: - return target.kind === 70 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || - (target.kind === 225 /* VariableDeclaration */ || target.kind === 175 /* BindingElement */) && + case 71 /* Identifier */: + return target.kind === 71 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 226 /* VariableDeclaration */ || target.kind === 176 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); - case 98 /* ThisKeyword */: - return target.kind === 98 /* ThisKeyword */; - case 96 /* SuperKeyword */: - return target.kind === 96 /* SuperKeyword */; - case 178 /* PropertyAccessExpression */: - return target.kind === 178 /* PropertyAccessExpression */ && + case 99 /* ThisKeyword */: + return target.kind === 99 /* ThisKeyword */; + case 97 /* SuperKeyword */: + return target.kind === 97 /* SuperKeyword */; + case 179 /* PropertyAccessExpression */: + return target.kind === 179 /* PropertyAccessExpression */ && source.name.text === target.name.text && isMatchingReference(source.expression, target.expression); } return false; } function containsMatchingReference(source, target) { - while (source.kind === 178 /* PropertyAccessExpression */) { + while (source.kind === 179 /* PropertyAccessExpression */) { source = source.expression; if (isMatchingReference(source, target)) { return true; @@ -35008,15 +35036,15 @@ var ts; // a possible discriminant if its type differs in the constituents of containing union type, and if every // choice is a unit type or a union of unit types. function containsMatchingReferenceDiscriminant(source, target) { - return target.kind === 178 /* PropertyAccessExpression */ && + return target.kind === 179 /* PropertyAccessExpression */ && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); } function getDeclaredTypeOfReference(expr) { - if (expr.kind === 70 /* Identifier */) { + if (expr.kind === 71 /* Identifier */) { return getTypeOfSymbol(getResolvedSymbol(expr)); } - if (expr.kind === 178 /* PropertyAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */) { var type = getDeclaredTypeOfReference(expr.expression); return type && getTypeOfPropertyOfType(type, expr.name.text); } @@ -35046,7 +35074,7 @@ var ts; } } } - if (callExpression.expression.kind === 178 /* PropertyAccessExpression */ && + if (callExpression.expression.kind === 179 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, callExpression.expression.expression)) { return true; } @@ -35179,15 +35207,15 @@ var ts; return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType); } function getAssignedTypeOfBinaryExpression(node) { - var isDestructuringDefaultAssignment = node.parent.kind === 176 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || - node.parent.kind === 260 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + var isDestructuringDefaultAssignment = node.parent.kind === 177 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || + node.parent.kind === 261 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 193 /* BinaryExpression */ && parent.parent.left === parent || - parent.parent.kind === 215 /* ForOfStatement */ && parent.parent.initializer === parent; + return parent.parent.kind === 194 /* BinaryExpression */ && parent.parent.left === parent || + parent.parent.kind === 216 /* ForOfStatement */ && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); @@ -35204,21 +35232,21 @@ var ts; function getAssignedType(node) { var parent = node.parent; switch (parent.kind) { - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return stringType; - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return undefinedType; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return unknownType; @@ -35226,7 +35254,7 @@ var ts; function getInitialTypeOfBindingElement(node) { var pattern = node.parent; var parentType = getInitialType(pattern.parent); - var type = pattern.kind === 173 /* ObjectBindingPattern */ ? + var type = pattern.kind === 174 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : @@ -35244,39 +35272,39 @@ var ts; if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 214 /* ForInStatement */) { + if (node.parent.parent.kind === 215 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 215 /* ForOfStatement */) { + if (node.parent.parent.kind === 216 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType; } return unknownType; } function getInitialType(node) { - return node.kind === 225 /* VariableDeclaration */ ? + return node.kind === 226 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function getInitialOrAssignedType(node) { - return node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */ ? + return node.kind === 226 /* VariableDeclaration */ || node.kind === 176 /* BindingElement */ ? getInitialType(node) : getAssignedType(node); } function isEmptyArrayAssignment(node) { - return node.kind === 225 /* VariableDeclaration */ && node.initializer && + return node.kind === 226 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral(node.initializer) || - node.kind !== 175 /* BindingElement */ && node.parent.kind === 193 /* BinaryExpression */ && + node.kind !== 176 /* BindingElement */ && node.parent.kind === 194 /* BinaryExpression */ && isEmptyArrayLiteral(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (node.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return getReferenceCandidate(node.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return getReferenceCandidate(node.right); } } @@ -35284,13 +35312,13 @@ var ts; } function getReferenceRoot(node) { var parent = node.parent; - return parent.kind === 184 /* ParenthesizedExpression */ || - parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node || - parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ? + return parent.kind === 185 /* ParenthesizedExpression */ || + parent.kind === 194 /* BinaryExpression */ && parent.operatorToken.kind === 58 /* EqualsToken */ && parent.left === node || + parent.kind === 194 /* BinaryExpression */ && parent.operatorToken.kind === 26 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 256 /* CaseClause */) { + if (clause.kind === 257 /* CaseClause */) { var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); return isUnitType(caseType) ? caseType : undefined; } @@ -35453,12 +35481,12 @@ var ts; function isEvolvingArrayOperationTarget(node) { var root = getReferenceRoot(node); var parent = root.parent; - var isLengthPushOrUnshift = parent.kind === 178 /* PropertyAccessExpression */ && (parent.name.text === "length" || - parent.parent.kind === 180 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name)); - var isElementAssignment = parent.kind === 179 /* ElementAccessExpression */ && + var isLengthPushOrUnshift = parent.kind === 179 /* PropertyAccessExpression */ && (parent.name.text === "length" || + parent.parent.kind === 181 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name)); + var isElementAssignment = parent.kind === 180 /* ElementAccessExpression */ && parent.expression === root && - parent.parent.kind === 193 /* BinaryExpression */ && - parent.parent.operatorToken.kind === 57 /* EqualsToken */ && + parent.parent.kind === 194 /* BinaryExpression */ && + parent.parent.operatorToken.kind === 58 /* EqualsToken */ && parent.parent.left === parent && !ts.isAssignmentTarget(parent.parent) && isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 /* NumberLike */ | 2048 /* Undefined */); @@ -35472,7 +35500,7 @@ var ts; return links.maybeTypePredicate; } function getMaybeTypePredicate(node) { - if (node.expression.kind !== 96 /* SuperKeyword */) { + if (node.expression.kind !== 97 /* SuperKeyword */) { var funcType = checkNonNullExpression(node.expression); if (funcType !== silentNeverType) { var apparentType = getApparentType(funcType); @@ -35498,7 +35526,7 @@ var ts; // on empty arrays are possible without implicit any errors and new element types can be inferred without // type mismatch errors. var resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType); - if (reference.parent.kind === 202 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) { + if (reference.parent.kind === 203 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) { return declaredType; } return resultType; @@ -35559,7 +35587,7 @@ var ts; else if (flow.flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.container; - if (container && container !== flowContainer && reference.kind !== 178 /* PropertyAccessExpression */ && reference.kind !== 98 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 179 /* PropertyAccessExpression */ && reference.kind !== 99 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -35613,7 +35641,7 @@ var ts; } function getTypeAtFlowArrayMutation(flow) { var node = flow.node; - var expr = node.kind === 180 /* CallExpression */ ? + var expr = node.kind === 181 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { @@ -35621,7 +35649,7 @@ var ts; var type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { var evolvedType_1 = type; - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) { var arg = _a[_i]; evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg); @@ -35785,7 +35813,7 @@ var ts; return result; } function isMatchingReferenceDiscriminant(expr) { - return expr.kind === 178 /* PropertyAccessExpression */ && + return expr.kind === 179 /* PropertyAccessExpression */ && declaredType.flags & 65536 /* Union */ && isMatchingReference(reference, expr.expression) && isDiscriminantProperty(declaredType, expr.name.text); @@ -35810,19 +35838,19 @@ var ts; } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return narrowTypeByTruthiness(type, expr.left, assumeTrue); - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: var operator_1 = expr.operatorToken.kind; var left_1 = getReferenceCandidate(expr.left); var right_1 = getReferenceCandidate(expr.right); - if (left_1.kind === 188 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) { + if (left_1.kind === 189 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) { return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); } - if (right_1.kind === 188 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) { + if (right_1.kind === 189 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) { return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); } if (isMatchingReference(reference, left_1)) { @@ -35841,9 +35869,9 @@ var ts; return declaredType; } break; - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return narrowType(type, expr.right, assumeTrue); } return type; @@ -35852,7 +35880,7 @@ var ts; if (type.flags & 1 /* Any */) { return type; } - if (operator === 32 /* ExclamationEqualsToken */ || operator === 34 /* ExclamationEqualsEqualsToken */) { + if (operator === 33 /* ExclamationEqualsToken */ || operator === 35 /* ExclamationEqualsEqualsToken */) { assumeTrue = !assumeTrue; } var valueType = getTypeOfExpression(value); @@ -35860,10 +35888,10 @@ var ts; if (!strictNullChecks) { return type; } - var doubleEquals = operator === 31 /* EqualsEqualsToken */ || operator === 32 /* ExclamationEqualsToken */; + var doubleEquals = operator === 32 /* EqualsEqualsToken */ || operator === 33 /* ExclamationEqualsToken */; var facts = doubleEquals ? assumeTrue ? 65536 /* EQUndefinedOrNull */ : 524288 /* NEUndefinedOrNull */ : - value.kind === 94 /* NullKeyword */ ? + value.kind === 95 /* NullKeyword */ ? assumeTrue ? 32768 /* EQNull */ : 262144 /* NENull */ : assumeTrue ? 16384 /* EQUndefined */ : 131072 /* NEUndefined */; return getTypeWithFacts(type, facts); @@ -35892,7 +35920,7 @@ var ts; } return type; } - if (operator === 32 /* ExclamationEqualsToken */ || operator === 34 /* ExclamationEqualsEqualsToken */) { + if (operator === 33 /* ExclamationEqualsToken */ || operator === 35 /* ExclamationEqualsEqualsToken */) { assumeTrue = !assumeTrue; } if (assumeTrue && !(type.flags & 65536 /* Union */)) { @@ -36016,7 +36044,7 @@ var ts; return type; } if (ts.isIdentifierTypePredicate(predicate)) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + var predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)]; if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); @@ -36028,7 +36056,7 @@ var ts; } else { var invokedExpression = ts.skipParentheses(callExpression.expression); - if (invokedExpression.kind === 179 /* ElementAccessExpression */ || invokedExpression.kind === 178 /* PropertyAccessExpression */) { + if (invokedExpression.kind === 180 /* ElementAccessExpression */ || invokedExpression.kind === 179 /* PropertyAccessExpression */) { var accessExpression = invokedExpression; var possibleReference = ts.skipParentheses(accessExpression.expression); if (isMatchingReference(reference, possibleReference)) { @@ -36045,19 +36073,19 @@ var ts; // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 179 /* PropertyAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return narrowType(type, expr.expression, assumeTrue); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 191 /* PrefixUnaryExpression */: - if (expr.operator === 50 /* ExclamationToken */) { + case 192 /* PrefixUnaryExpression */: + if (expr.operator === 51 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } break; @@ -36070,7 +36098,7 @@ var ts; // an dotted name expression, and if the location is not an assignment target, obtain the type // of the expression (which will reflect control flow analysis). If the expression indeed // resolved to the given symbol, return the narrowed type. - if (location.kind === 70 /* Identifier */) { + if (location.kind === 71 /* Identifier */) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { location = location.parent; } @@ -36091,9 +36119,9 @@ var ts; function getControlFlowContainer(node) { return ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || - node.kind === 233 /* ModuleBlock */ || - node.kind === 264 /* SourceFile */ || - node.kind === 148 /* PropertyDeclaration */; + node.kind === 234 /* ModuleBlock */ || + node.kind === 265 /* SourceFile */ || + node.kind === 149 /* PropertyDeclaration */; }); } // Check if a parameter is assigned anywhere within its declaring function. @@ -36112,10 +36140,10 @@ var ts; return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */); }); } function markParameterAssignments(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { if (ts.isAssignmentTarget(node)) { var symbol = getResolvedSymbol(node); - if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145 /* Parameter */) { + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 146 /* Parameter */) { symbol.isAssigned = true; } } @@ -36130,7 +36158,7 @@ var ts; /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 145 /* Parameter */ && + declaration.kind === 146 /* Parameter */ && declaration.initializer && getFalsyFlags(declaredType) & 2048 /* Undefined */ && !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */); @@ -36150,7 +36178,7 @@ var ts; if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 186 /* ArrowFunction */) { + if (container.kind === 187 /* ArrowFunction */) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (ts.hasModifier(container, 256 /* Async */)) { @@ -36169,7 +36197,7 @@ var ts; // Due to the emit for class decorators, any reference to the class from inside of the class body // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind // behavior of class names in ES6. - if (declaration_1.kind === 228 /* ClassDeclaration */ + if (declaration_1.kind === 229 /* ClassDeclaration */ && ts.nodeIsDecorated(declaration_1)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -36181,14 +36209,14 @@ var ts; container = ts.getContainingClass(container); } } - else if (declaration_1.kind === 198 /* ClassExpression */) { + else if (declaration_1.kind === 199 /* ClassExpression */) { // When we emit a class expression with static members that contain a reference // to the constructor in the initializer, we will need to substitute that // binding with an alias as the class name is not in scope. var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); while (container !== undefined) { if (container.parent === declaration_1) { - if (container.kind === 148 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) { + if (container.kind === 149 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) { getNodeLinks(declaration_1).flags |= 8388608 /* ClassWithConstructorReference */; getNodeLinks(node).flags |= 16777216 /* ConstructorReferenceInClass */; } @@ -36223,15 +36251,15 @@ var ts; // The declaration container is the innermost function that encloses the declaration of the variable // or parameter. The flow container is the innermost function starting with which we analyze the control // flow graph to determine the control flow based type. - var isParameter = ts.getRootDeclaration(declaration).kind === 145 /* Parameter */; + var isParameter = ts.getRootDeclaration(declaration).kind === 146 /* Parameter */; var declarationContainer = getControlFlowContainer(declaration); var flowContainer = getControlFlowContainer(node); var isOuterVariable = flowContainer !== declarationContainer; // When the control flow originates in a function expression or arrow function and we are referencing // a const variable or parameter from an outer function, we extend the origin of the control flow // analysis to include the immediately enclosing function. - while (flowContainer !== declarationContainer && (flowContainer.kind === 185 /* FunctionExpression */ || - flowContainer.kind === 186 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && + while (flowContainer !== declarationContainer && (flowContainer.kind === 186 /* FunctionExpression */ || + flowContainer.kind === 187 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } @@ -36239,7 +36267,7 @@ var ts; // the entire control flow graph from the variable's declaration (i.e. when the flow container and // declaration container are the same). var assumeInitialized = isParameter || isOuterVariable || - type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node)) || + type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node) || node.parent.kind === 246 /* ExportSpecifier */) || ts.isInAmbientContext(declaration); var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) : type === autoType || type === autoArrayType ? undefinedType : @@ -36270,7 +36298,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || - symbol.valueDeclaration.parent.kind === 259 /* CatchClause */) { + symbol.valueDeclaration.parent.kind === 260 /* CatchClause */) { return; } // 1. walk from the use site up to the declaration and check @@ -36295,8 +36323,8 @@ var ts; } // mark variables that are declared in loop initializer and reassigned inside the body of ForStatement. // if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back. - if (container.kind === 213 /* ForStatement */ && - ts.getAncestor(symbol.valueDeclaration, 226 /* VariableDeclarationList */).parent === container && + if (container.kind === 214 /* ForStatement */ && + ts.getAncestor(symbol.valueDeclaration, 227 /* VariableDeclarationList */).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152 /* NeedsLoopOutParameter */; } @@ -36310,7 +36338,7 @@ var ts; function isAssignedInBodyOfForStatement(node, container) { // skip parenthesized nodes var current = node; - while (current.parent.kind === 184 /* ParenthesizedExpression */) { + while (current.parent.kind === 185 /* ParenthesizedExpression */) { current = current.parent; } // check if node is used as LHS in some assignment expression @@ -36318,9 +36346,9 @@ var ts; if (ts.isAssignmentTarget(current)) { isAssigned = true; } - else if ((current.parent.kind === 191 /* PrefixUnaryExpression */ || current.parent.kind === 192 /* PostfixUnaryExpression */)) { + else if ((current.parent.kind === 192 /* PrefixUnaryExpression */ || current.parent.kind === 193 /* PostfixUnaryExpression */)) { var expr = current.parent; - isAssigned = expr.operator === 42 /* PlusPlusToken */ || expr.operator === 43 /* MinusMinusToken */; + isAssigned = expr.operator === 43 /* PlusPlusToken */ || expr.operator === 44 /* MinusMinusToken */; } if (!isAssigned) { return false; @@ -36331,7 +36359,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 148 /* PropertyDeclaration */ || container.kind === 151 /* Constructor */) { + if (container.kind === 149 /* PropertyDeclaration */ || container.kind === 152 /* Constructor */) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } @@ -36399,38 +36427,38 @@ var ts; // tell whether 'this' needs to be captured. var container = ts.getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; - if (container.kind === 151 /* Constructor */) { + if (container.kind === 152 /* Constructor */) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 186 /* ArrowFunction */) { + if (container.kind === 187 /* ArrowFunction */) { container = ts.getThisContainer(container, /* includeArrowFunctions */ false); // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < 2 /* ES2015 */); } switch (container.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 151 /* Constructor */: + case 152 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: if (ts.getModifierFlags(container) & 32 /* Static */) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -36442,8 +36470,8 @@ var ts; // Note: a parameter initializer should refer to class-this unless function-this is explicitly annotated. // If this is a function in a JS file, it might be a class method. Check if it's the RHS // of a x.prototype.y = function [name]() { .... } - if (container.kind === 185 /* FunctionExpression */ && - container.parent.kind === 193 /* BinaryExpression */ && + if (container.kind === 186 /* FunctionExpression */ && + container.parent.kind === 194 /* BinaryExpression */ && ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') var className = container.parent // x.prototype.y = f @@ -36479,23 +36507,23 @@ var ts; } function getTypeForThisExpressionFromJSDoc(node) { var jsdocType = ts.getJSDocType(node); - if (jsdocType && jsdocType.kind === 278 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 279 /* JSDocFunctionType */) { var jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281 /* JSDocThisType */) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 282 /* JSDocThisType */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145 /* Parameter */; }); + return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 146 /* Parameter */; }); } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 180 /* CallExpression */ && node.parent.expression === node; + var isCallExpression = node.parent.kind === 181 /* CallExpression */ && node.parent.expression === node; var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true); var needToCaptureLexicalThis = false; // adjust the container reference in case if super is used inside arrow functions with arbitrarily deep nesting if (!isCallExpression) { - while (container && container.kind === 186 /* ArrowFunction */) { + while (container && container.kind === 187 /* ArrowFunction */) { container = ts.getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; } @@ -36508,14 +36536,14 @@ var ts; // class B { // [super.foo()]() {} // } - var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143 /* ComputedPropertyName */; }); - if (current && current.kind === 143 /* ComputedPropertyName */) { + var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 144 /* ComputedPropertyName */; }); + if (current && current.kind === 144 /* ComputedPropertyName */) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 178 /* ObjectLiteralExpression */)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -36523,7 +36551,7 @@ var ts; } return unknownType; } - if (!isCallExpression && container.kind === 151 /* Constructor */) { + if (!isCallExpression && container.kind === 152 /* Constructor */) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if ((ts.getModifierFlags(container) & 32 /* Static */) || isCallExpression) { @@ -36589,7 +36617,7 @@ var ts; // This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set. // This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment // while a property access can. - if (container.kind === 150 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) { + if (container.kind === 151 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) { if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* AsyncMethodWithSuperBinding */; } @@ -36603,7 +36631,7 @@ var ts; // in this case they should also use correct lexical this captureLexicalThis(node.parent, container); } - if (container.parent.kind === 177 /* ObjectLiteralExpression */) { + if (container.parent.kind === 178 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -36623,7 +36651,7 @@ var ts; } return unknownType; } - if (container.kind === 151 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 152 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; @@ -36638,7 +36666,7 @@ var ts; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes - return container.kind === 151 /* Constructor */; + return container.kind === 152 /* Constructor */; } else { // TS 1.0 SPEC (April 2014) @@ -36646,21 +36674,21 @@ var ts; // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance // - In a static member function or static member accessor // topmost container must be something that is directly nested in the class declaration\object literal expression - if (ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */) { + if (ts.isClassLike(container.parent) || container.parent.kind === 178 /* ObjectLiteralExpression */) { if (ts.getModifierFlags(container) & 32 /* Static */) { - return container.kind === 150 /* MethodDeclaration */ || - container.kind === 149 /* MethodSignature */ || - container.kind === 152 /* GetAccessor */ || - container.kind === 153 /* SetAccessor */; + return container.kind === 151 /* MethodDeclaration */ || + container.kind === 150 /* MethodSignature */ || + container.kind === 153 /* GetAccessor */ || + container.kind === 154 /* SetAccessor */; } else { - return container.kind === 150 /* MethodDeclaration */ || - container.kind === 149 /* MethodSignature */ || - container.kind === 152 /* GetAccessor */ || - container.kind === 153 /* SetAccessor */ || - container.kind === 148 /* PropertyDeclaration */ || - container.kind === 147 /* PropertySignature */ || - container.kind === 151 /* Constructor */; + return container.kind === 151 /* MethodDeclaration */ || + container.kind === 150 /* MethodSignature */ || + container.kind === 153 /* GetAccessor */ || + container.kind === 154 /* SetAccessor */ || + container.kind === 149 /* PropertyDeclaration */ || + container.kind === 148 /* PropertySignature */ || + container.kind === 152 /* Constructor */; } } } @@ -36668,10 +36696,10 @@ var ts; } } function getContainingObjectLiteral(func) { - return (func.kind === 150 /* MethodDeclaration */ || - func.kind === 152 /* GetAccessor */ || - func.kind === 153 /* SetAccessor */) && func.parent.kind === 177 /* ObjectLiteralExpression */ ? func.parent : - func.kind === 185 /* FunctionExpression */ && func.parent.kind === 260 /* PropertyAssignment */ ? func.parent.parent : + return (func.kind === 151 /* MethodDeclaration */ || + func.kind === 153 /* GetAccessor */ || + func.kind === 154 /* SetAccessor */) && func.parent.kind === 178 /* ObjectLiteralExpression */ ? func.parent : + func.kind === 186 /* FunctionExpression */ && func.parent.kind === 261 /* PropertyAssignment */ ? func.parent.parent : undefined; } function getThisTypeArgument(type) { @@ -36683,7 +36711,7 @@ var ts; }); } function getContextualThisParameterType(func) { - if (func.kind === 186 /* ArrowFunction */) { + if (func.kind === 187 /* ArrowFunction */) { return undefined; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -36709,7 +36737,7 @@ var ts; if (thisType) { return instantiateType(thisType, getContextualMapper(containingLiteral)); } - if (literal.parent.kind !== 260 /* PropertyAssignment */) { + if (literal.parent.kind !== 261 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -36722,9 +36750,9 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - if (func.parent.kind === 193 /* BinaryExpression */ && func.parent.operatorToken.kind === 57 /* EqualsToken */) { + if (func.parent.kind === 194 /* BinaryExpression */ && func.parent.operatorToken.kind === 58 /* EqualsToken */) { var target = func.parent.left; - if (target.kind === 178 /* PropertyAccessExpression */ || target.kind === 179 /* ElementAccessExpression */) { + if (target.kind === 179 /* PropertyAccessExpression */ || target.kind === 180 /* ElementAccessExpression */) { return checkExpressionCached(target.expression); } } @@ -36786,7 +36814,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 145 /* Parameter */) { + if (declaration.kind === 146 /* Parameter */) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -36798,7 +36826,7 @@ var ts; if (ts.isBindingPattern(declaration.parent)) { var parentDeclaration = declaration.parent.parent; var name = declaration.propertyName || declaration.name; - if (parentDeclaration.kind !== 175 /* BindingElement */ && + if (parentDeclaration.kind !== 176 /* BindingElement */ && parentDeclaration.type && !ts.isBindingPattern(name)) { var text = ts.getTextOfPropertyName(name); @@ -36839,7 +36867,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 145 /* Parameter */ && node.parent.initializer === node) { + if (node.parent.kind === 146 /* Parameter */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -36850,8 +36878,8 @@ var ts; // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed if (functionDecl.type || - functionDecl.kind === 151 /* Constructor */ || - functionDecl.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153 /* SetAccessor */))) { + functionDecl.kind === 152 /* Constructor */ || + functionDecl.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154 /* SetAccessor */))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature @@ -36873,7 +36901,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 182 /* TaggedTemplateExpression */) { + if (template.parent.kind === 183 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -36881,7 +36909,7 @@ var ts; function getContextualTypeForBinaryOperand(node) { var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; - if (operator >= 57 /* FirstAssignment */ && operator <= 69 /* LastAssignment */) { + if (operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) { // Don't do this for special property assignments to avoid circularity if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0 /* None */) { return undefined; @@ -36891,7 +36919,7 @@ var ts; return getTypeOfExpression(binaryExpression.left); } } - else if (operator === 53 /* BarBarToken */) { + else if (operator === 54 /* BarBarToken */) { // When an || expression has a contextual type, the operands are contextually typed by that type. When an || // expression has no contextual type, the right operand is contextually typed by the type of the left operand. var type = getContextualType(binaryExpression); @@ -36900,7 +36928,7 @@ var ts; } return type; } - else if (operator === 52 /* AmpersandAmpersandToken */ || operator === 25 /* CommaToken */) { + else if (operator === 53 /* AmpersandAmpersandToken */ || operator === 26 /* CommaToken */) { if (node === binaryExpression.right) { return getContextualType(binaryExpression); } @@ -36970,6 +36998,32 @@ var ts; var conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } + function getContextualTypeForJsxExpression(node) { + // JSX expression can appear in two position : JSX Element's children or JSX attribute + var jsxAttributes = ts.isJsxAttributeLike(node.parent) ? + node.parent.parent : + node.parent.openingElement.attributes; // node.parent is JsxElement + // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type + // which is a type of the parameter of the signature we are trying out. + // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName + var attributesType = getContextualType(jsxAttributes); + if (!attributesType || isTypeAny(attributesType)) { + return undefined; + } + if (ts.isJsxAttribute(node.parent)) { + // JSX expression is in JSX attribute + return getTypeOfPropertyOfType(attributesType, node.parent.name.text); + } + else if (node.parent.kind === 249 /* JsxElement */) { + // JSX expression is in children of JSX Element, we will look for an "children" atttribute (we get the name from JSX.ElementAttributesProperty) + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + return jsxChildrenPropertyName && jsxChildrenPropertyName !== "" ? getTypeOfPropertyOfType(attributesType, jsxChildrenPropertyName) : anyType; + } + else { + // JSX expression is in JSX spread attribute + return attributesType; + } + } function getContextualTypeForJsxAttribute(attribute) { // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type // which is a type of the parameter of the signature we are trying out. @@ -37018,44 +37072,44 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 176 /* BindingElement */: return getContextualTypeForInitializerExpression(node); - case 186 /* ArrowFunction */: - case 218 /* ReturnStatement */: + case 187 /* ArrowFunction */: + case 219 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return getContextualTypeForYieldOperand(parent); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return getTypeFromTypeNode(parent.type); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return getContextualTypeForElementExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); - case 204 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 195 /* TemplateExpression */); + case 205 /* TemplateSpan */: + ts.Debug.assert(parent.parent.kind === 196 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 184 /* ParenthesizedExpression */: - return getContextualType(parent); - case 255 /* JsxExpression */: + case 185 /* ParenthesizedExpression */: return getContextualType(parent); - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: + case 256 /* JsxExpression */: + return getContextualTypeForJsxExpression(parent); + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent); - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: return getAttributesTypeFromJsxOpeningLikeElement(parent); } return undefined; @@ -37091,7 +37145,7 @@ var ts; return sourceLength < targetParameterCount; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */; + return node.kind === 186 /* FunctionExpression */ || node.kind === 187 /* ArrowFunction */; } function getContextualSignatureForFunctionLikeDeclaration(node) { // Only function expressions, arrow functions, and object literal methods are contextually typed. @@ -37110,7 +37164,7 @@ var ts; // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; @@ -37156,8 +37210,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false); } function hasDefaultValue(node) { - return (node.kind === 175 /* BindingElement */ && !!node.initializer) || - (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */); + return (node.kind === 176 /* BindingElement */ && !!node.initializer) || + (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 58 /* EqualsToken */); } function checkArrayLiteral(node, checkMode) { var elements = node.elements; @@ -37166,7 +37220,7 @@ var ts; var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 197 /* SpreadElement */) { + if (inDestructuringPattern && e.kind === 198 /* SpreadElement */) { // Given the following situation: // var c: {}; // [...c] = ["", 0]; @@ -37190,7 +37244,7 @@ var ts; var type = checkExpressionForMutableLocation(e, checkMode); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 197 /* SpreadElement */; + hasSpreadElement = hasSpreadElement || e.kind === 198 /* SpreadElement */; } if (!hasSpreadElement) { // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such @@ -37205,7 +37259,7 @@ var ts; var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (pattern && (pattern.kind === 174 /* ArrayBindingPattern */ || pattern.kind === 176 /* ArrayLiteralExpression */)) { + if (pattern && (pattern.kind === 175 /* ArrayBindingPattern */ || pattern.kind === 177 /* ArrayLiteralExpression */)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -37213,7 +37267,7 @@ var ts; elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 199 /* OmittedExpression */) { + if (patternElement.kind !== 200 /* OmittedExpression */) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -37230,7 +37284,7 @@ var ts; strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 143 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 144 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { // It seems odd to consider an expression of type Any to result in a numeric name, @@ -37302,7 +37356,7 @@ var ts; var propagatedFlags = 0; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 173 /* ObjectBindingPattern */ || contextualType.pattern.kind === 177 /* ObjectLiteralExpression */); + (contextualType.pattern.kind === 174 /* ObjectBindingPattern */ || contextualType.pattern.kind === 178 /* ObjectLiteralExpression */); var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node); var typeFlags = 0; var patternWithComputedProperties = false; @@ -37312,18 +37366,18 @@ var ts; for (var i = 0; i < node.properties.length; i++) { var memberDecl = node.properties[i]; var member = memberDecl.symbol; - if (memberDecl.kind === 260 /* PropertyAssignment */ || - memberDecl.kind === 261 /* ShorthandPropertyAssignment */ || + if (memberDecl.kind === 261 /* PropertyAssignment */ || + memberDecl.kind === 262 /* ShorthandPropertyAssignment */ || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 260 /* PropertyAssignment */) { + if (memberDecl.kind === 261 /* PropertyAssignment */) { type = checkPropertyAssignment(memberDecl, checkMode); } - else if (memberDecl.kind === 150 /* MethodDeclaration */) { + else if (memberDecl.kind === 151 /* MethodDeclaration */) { type = checkObjectLiteralMethod(memberDecl, checkMode); } else { - ts.Debug.assert(memberDecl.kind === 261 /* ShorthandPropertyAssignment */); + ts.Debug.assert(memberDecl.kind === 262 /* ShorthandPropertyAssignment */); type = checkExpressionForMutableLocation(memberDecl.name, checkMode); } typeFlags |= type.flags; @@ -37331,8 +37385,8 @@ var ts; if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - var isOptional = (memberDecl.kind === 260 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 261 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 261 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 262 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 67108864 /* Optional */; } @@ -37360,7 +37414,7 @@ var ts; prop.target = member; member = prop; } - else if (memberDecl.kind === 262 /* SpreadAssignment */) { + else if (memberDecl.kind === 263 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -37387,7 +37441,7 @@ var ts; // an ordinary function declaration(section 6.1) with no parameters. // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 152 /* GetAccessor */ || memberDecl.kind === 153 /* SetAccessor */); + ts.Debug.assert(memberDecl.kind === 153 /* GetAccessor */ || memberDecl.kind === 154 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (ts.hasDynamicName(memberDecl)) { @@ -37467,21 +37521,6 @@ var ts; else { checkExpression(node.closingElement.tagName); } - // Check children - for (var _i = 0, _a = node.children; _i < _a.length; _i++) { - var child = _a[_i]; - switch (child.kind) { - case 255 /* JsxExpression */: - checkJsxExpression(child); - break; - case 248 /* JsxElement */: - checkJsxElement(child); - break; - case 249 /* JsxSelfClosingElement */: - checkJsxSelfClosingElement(child); - break; - } - } return getJsxGlobalElementType() || anyType; } /** @@ -37496,7 +37535,7 @@ var ts; */ function isJsxIntrinsicIdentifier(tagName) { // TODO (yuisu): comment - if (tagName.kind === 178 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) { + if (tagName.kind === 179 /* PropertyAccessExpression */ || tagName.kind === 99 /* ThisKeyword */) { return false; } else { @@ -37536,7 +37575,7 @@ var ts; attributesArray.push(attributeSymbol); } else { - ts.Debug.assert(attributeDecl.kind === 254 /* JsxSpreadAttribute */); + ts.Debug.assert(attributeDecl.kind === 255 /* JsxSpreadAttribute */); if (attributesArray.length > 0) { spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); attributesArray = []; @@ -37569,6 +37608,39 @@ var ts; } }); } + // Handle children attribute + var parent = openingLikeElement.parent.kind === 249 /* JsxElement */ ? openingLikeElement.parent : undefined; + // We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement + if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + var childrenTypes = []; + for (var _b = 0, _c = parent.children; _b < _c.length; _b++) { + var child = _c[_b]; + // In React, JSX text that contains only whitespaces will be ignored so we don't want to type-check that + // because then type of children property will have constituent of string type. + if (child.kind === 10 /* JsxText */) { + if (!child.containsOnlyWhiteSpaces) { + childrenTypes.push(stringType); + } + } + else { + childrenTypes.push(checkExpression(child, checkMode)); + } + } + // Error if there is a attribute named "children" and children element. + // This is because children element will overwrite the value from attributes + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { + if (attributesTable.has(jsxChildrenPropertyName)) { + error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName); + } + // If there are children in the body of JSX element, create dummy attribute "children" with anyType so that it will pass the attribute checking process + var childrenPropSymbol = createSymbol(4 /* Property */ | 134217728 /* Transient */, jsxChildrenPropertyName); + childrenPropSymbol.type = childrenTypes.length === 1 ? + childrenTypes[0] : + createArrayType(getUnionType(childrenTypes, /*subtypeReduction*/ false)); + attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol); + } + } return createJsxAttributesType(attributes.symbol, attributesTable); /** * Create anonymous type from given attributes symbol table. @@ -37658,37 +37730,55 @@ var ts; } return getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true); } - /// e.g. "props" for React.d.ts, - /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all - /// non-intrinsic elements' attributes type is 'any'), - /// or '' if it has 0 properties (which means every - /// non-intrinsic elements' attributes type is the element instance type) - function getJsxElementPropertiesName() { + /** + * Look into JSX namespace and then look for container with matching name as nameOfAttribPropContainer. + * Get a single property from that container if existed. Report an error if there are more than one property. + * + * @param nameOfAttribPropContainer a string of value JsxNames.ElementAttributesPropertyNameContainer or JsxNames.ElementChildrenAttributeNameContainer + * if other string is given or the container doesn't exist, return undefined. + */ + function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) { // JSX var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920 /* Namespace */, /*diagnosticMessage*/ undefined); - // JSX.ElementAttributesProperty [symbol] - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064 /* Type */); - // JSX.ElementAttributesProperty [type] - var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - // The properties of JSX.ElementAttributesProperty - var attribProperties = attribPropType && getPropertiesOfType(attribPropType); - if (attribProperties) { + // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [symbol] + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 793064 /* Type */); + // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [type] + var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); + // The properties of JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute + var propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); + if (propertiesOfJsxElementAttribPropInterface) { // Element Attributes has zero properties, so the element attributes type will be the class instance type - if (attribProperties.length === 0) { + if (propertiesOfJsxElementAttribPropInterface.length === 0) { return ""; } - else if (attribProperties.length === 1) { - return attribProperties[0].name; + else if (propertiesOfJsxElementAttribPropInterface.length === 1) { + return propertiesOfJsxElementAttribPropInterface[0].name; } - else { - error(attribsPropTypeSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, JsxNames.ElementAttributesPropertyNameContainer); - return undefined; + else if (propertiesOfJsxElementAttribPropInterface.length > 1) { + // More than one property on ElementAttributesProperty is an error + error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, nameOfAttribPropContainer); } } - else { - // No interface exists, so the element attributes type will be an implicit any - return undefined; + return undefined; + } + /// e.g. "props" for React.d.ts, + /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all + /// non-intrinsic elements' attributes type is 'any'), + /// or '' if it has 0 properties (which means every + /// non-intrinsic elements' attributes type is the element instance type) + function getJsxElementPropertiesName() { + if (!_hasComputedJsxElementPropertiesName) { + _hasComputedJsxElementPropertiesName = true; + _jsxElementPropertiesName = getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer); + } + return _jsxElementPropertiesName; + } + function getJsxElementChildrenPropertyname() { + if (!_hasComputedJsxElementChildrenPropertyName) { + _hasComputedJsxElementChildrenPropertyName = true; + _jsxElementChildrenPropertyName = getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer); } + return _jsxElementChildrenPropertyName; } /** * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component. @@ -38068,7 +38158,7 @@ var ts; // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized // '.prototype' property as well as synthesized tuple index properties. function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 148 /* PropertyDeclaration */; + return s.valueDeclaration ? s.valueDeclaration.kind : 149 /* PropertyDeclaration */; } function getDeclarationModifierFlagsFromSymbol(s) { if (s.valueDeclaration) { @@ -38104,7 +38194,7 @@ var ts; */ function checkPropertyAccessibility(node, left, type, prop) { var flags = getDeclarationModifierFlagsFromSymbol(prop); - var errorNode = node.kind === 178 /* PropertyAccessExpression */ || node.kind === 225 /* VariableDeclaration */ ? + var errorNode = node.kind === 179 /* PropertyAccessExpression */ || node.kind === 226 /* VariableDeclaration */ ? node.name : node.right; if (getCheckFlags(prop) & 256 /* ContainsPrivate */) { @@ -38112,7 +38202,7 @@ var ts; error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type)); return false; } - if (left.kind === 96 /* SuperKeyword */) { + if (left.kind === 97 /* SuperKeyword */) { // TS 1.0 spec (April 2014): 4.8.2 // - In a constructor, instance member function, instance member accessor, or // instance member variable initializer where this references a derived class instance, @@ -38123,7 +38213,7 @@ var ts; if (languageVersion < 2 /* ES2015 */) { var hasNonMethodDeclaration = forEachProperty(prop, function (p) { var propKind = getDeclarationKindFromSymbol(p); - return propKind !== 150 /* MethodDeclaration */ && propKind !== 149 /* MethodSignature */; + return propKind !== 151 /* MethodDeclaration */ && propKind !== 150 /* MethodSignature */; }); if (hasNonMethodDeclaration) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -38155,7 +38245,7 @@ var ts; } // Property is known to be protected at this point // All protected properties of a supertype are accessible in a super access - if (left.kind === 96 /* SuperKeyword */) { + if (left.kind === 97 /* SuperKeyword */) { return true; } // Find the first enclosing class that has the declaring classes of the protected constituents @@ -38234,7 +38324,7 @@ var ts; } function isInPropertyInitializer(node) { while (node) { - if (node.parent && node.parent.kind === 148 /* PropertyDeclaration */ && node.parent.initializer === node) { + if (node.parent && node.parent.kind === 149 /* PropertyDeclaration */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -38267,8 +38357,8 @@ var ts; !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text); } - if (prop.valueDeclaration.kind === 228 /* ClassDeclaration */ && - node.parent && node.parent.kind !== 158 /* TypeReference */ && + if (prop.valueDeclaration.kind === 229 /* ClassDeclaration */ && + node.parent && node.parent.kind !== 159 /* TypeReference */ && !ts.isInAmbientContext(prop.valueDeclaration) && !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text); @@ -38288,7 +38378,7 @@ var ts; // Only compute control flow type if this is a property access expression that isn't an // assignment target, and the referenced property was declared as a variable, property, // accessor, or optional method. - if (node.kind !== 178 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ || + if (node.kind !== 179 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ || !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && !(prop.flags & 8192 /* Method */ && propType.flags & 65536 /* Union */)) { return propType; @@ -38297,7 +38387,7 @@ var ts; return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 178 /* PropertyAccessExpression */ + var left = node.kind === 179 /* PropertyAccessExpression */ ? node.expression : node.left; var type = checkExpression(left); @@ -38314,13 +38404,13 @@ var ts; */ function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 226 /* VariableDeclarationList */) { + if (initializer.kind === 227 /* VariableDeclarationList */) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); } } - else if (initializer.kind === 70 /* Identifier */) { + else if (initializer.kind === 71 /* Identifier */) { return getResolvedSymbol(initializer); } return undefined; @@ -38337,13 +38427,13 @@ var ts; */ function isForInVariableForNumericPropertyNames(expr) { var e = ts.skipParentheses(expr); - if (e.kind === 70 /* Identifier */) { + if (e.kind === 71 /* Identifier */) { var symbol = getResolvedSymbol(e); if (symbol.flags & 3 /* Variable */) { var child = expr; var node = expr.parent; while (node) { - if (node.kind === 214 /* ForInStatement */ && + if (node.kind === 215 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { @@ -38361,7 +38451,7 @@ var ts; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 181 /* NewExpression */ && node.parent.expression === node) { + if (node.parent.kind === 182 /* NewExpression */ && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -38419,10 +38509,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { checkExpression(node.template); } - else if (node.kind !== 146 /* Decorator */) { + else if (node.kind !== 147 /* Decorator */) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -38488,7 +38578,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 197 /* SpreadElement */) { + if (arg && arg.kind === 198 /* SpreadElement */) { return i; } } @@ -38505,13 +38595,13 @@ var ts; // The arity check will be done in "checkApplicableSignatureForJsxOpeningLikeElement". return true; } - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { var tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 195 /* TemplateExpression */) { + if (tagExpression.template.kind === 196 /* TemplateExpression */) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. var templateExpression = tagExpression.template; @@ -38524,11 +38614,11 @@ var ts; // then this might actually turn out to be a TemplateHead in the future; // so we consider the call to be incomplete. var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 12 /* NoSubstitutionTemplateLiteral */); + ts.Debug.assert(templateLiteral.kind === 13 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 146 /* Decorator */) { + else if (node.kind === 147 /* Decorator */) { isDecorator = true; typeArguments = undefined; argCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); @@ -38537,7 +38627,7 @@ var ts; var callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 181 /* NewExpression */); + ts.Debug.assert(callExpression.kind === 182 /* NewExpression */); return signature.minArgumentCount === 0; } argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -38623,7 +38713,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 200 /* OmittedExpression */) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); // If the effective argument type is 'undefined', there is no synthetic type @@ -38715,7 +38805,7 @@ var ts; return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation); } var thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 181 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 182 /* NewExpression */) { // If the called expression is not of the form `x.f` or `x["f"]`, then sourceType = voidType // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. @@ -38732,7 +38822,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 200 /* OmittedExpression */) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); @@ -38754,12 +38844,12 @@ var ts; * Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise. */ function getThisArgumentOfCall(node) { - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { var callee = node.expression; - if (callee.kind === 178 /* PropertyAccessExpression */) { + if (callee.kind === 179 /* PropertyAccessExpression */) { return callee.expression; } - else if (callee.kind === 179 /* ElementAccessExpression */) { + else if (callee.kind === 180 /* ElementAccessExpression */) { return callee.expression; } } @@ -38775,16 +38865,16 @@ var ts; */ function getEffectiveCallArguments(node) { var args; - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { var template = node.template; args = [undefined]; - if (template.kind === 195 /* TemplateExpression */) { + if (template.kind === 196 /* TemplateExpression */) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 146 /* Decorator */) { + else if (node.kind === 147 /* Decorator */) { // For a decorator, we return undefined as we will determine // the number and types of arguments for a decorator using // `getEffectiveArgumentCount` and `getEffectiveArgumentType` below. @@ -38812,19 +38902,19 @@ var ts; * Otherwise, the argument count is the length of the 'args' array. */ function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { switch (node.parent.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: // A class decorator will have one argument (see `ClassDecorator` in core.d.ts) return 1; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // A property declaration decorator will have two arguments (see // `PropertyDecorator` in core.d.ts) return 2; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) // If we are emitting decorators for ES3, we will only pass two arguments. @@ -38834,7 +38924,7 @@ var ts; // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; - case 145 /* Parameter */: + case 146 /* Parameter */: // A parameter declaration decorator will have three arguments (see // `ParameterDecorator` in core.d.ts) return 3; @@ -38858,25 +38948,25 @@ var ts; */ function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" side of the class) var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { // For a parameter decorator, the `target` is the parent type of the // parameter's containing method. node = node.parent; - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // For a property or method decorator, the `target` is the // "static"-side type of the parent of the member if the member is // declared "static"; otherwise, it is the "instance"-side type of the @@ -38903,34 +38993,34 @@ var ts; */ function getEffectiveDecoratorSecondArgumentType(node) { // The second argument to a decorator is its `propertyKey` - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { node = node.parent; - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { // For a constructor parameter decorator, the `propertyKey` will be `undefined`. return anyType; } // For a non-constructor parameter decorator, the `propertyKey` will be either // a string or a symbol, based on the name of the parameter's containing method. } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // The `propertyKey` for a property or method decorator will be a // string literal type if the member name is an identifier, number, or string; // otherwise, if the member name is a computed property name it will // be either string or symbol. var element = node; switch (element.name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return getLiteralTypeForText(32 /* StringLiteral */, element.name.text); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: var nameType = checkComputedPropertyName(element.name); if (isTypeOfKind(nameType, 512 /* ESSymbol */)) { return nameType; @@ -38956,21 +39046,21 @@ var ts; function getEffectiveDecoratorThirdArgumentType(node) { // The third argument to a decorator is either its `descriptor` for a method decorator // or its `parameterIndex` for a parameter decorator - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { // The `parameterIndex` for a parameter decorator is always a number return numberType; } - if (node.kind === 148 /* PropertyDeclaration */) { + if (node.kind === 149 /* PropertyDeclaration */) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // The `descriptor` for a method decorator will be a `TypedPropertyDescriptor` // for the type of the member. var propertyType = getTypeOfNode(node); @@ -39002,10 +39092,10 @@ var ts; // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */) { return getGlobalTemplateStringsArrayType(); } // This is not a synthetic argument, so we return 'undefined' @@ -39017,8 +39107,8 @@ var ts; */ function getEffectiveArgument(node, args, argIndex) { // For a decorator or the first argument of a tagged template expression we return undefined. - if (node.kind === 146 /* Decorator */ || - (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */)) { + if (node.kind === 147 /* Decorator */ || + (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */)) { return undefined; } return args[argIndex]; @@ -39027,11 +39117,11 @@ var ts; * Gets the error node to use when reporting errors for an effective argument. */ function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { // For a decorator, we use the expression of the decorator for error reporting. return node.expression; } - else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */) { // For a the first argument of a tagged template expression, we use the template of the tag for error reporting. return node.template; } @@ -39040,14 +39130,14 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 182 /* TaggedTemplateExpression */; - var isDecorator = node.kind === 146 /* Decorator */; + var isTaggedTemplate = node.kind === 183 /* TaggedTemplateExpression */; + var isDecorator = node.kind === 147 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); var typeArguments; if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) { typeArguments = node.typeArguments; // We already perform checking on the type arguments on the class declaration itself. - if (node.expression.kind !== 96 /* SuperKeyword */) { + if (node.expression.kind !== 97 /* SuperKeyword */) { ts.forEach(typeArguments, checkSourceElement); } } @@ -39127,7 +39217,7 @@ var ts; var result; // If we are in signature help, a trailing comma indicates that we intend to provide another argument, // so we will only accept overloads with arity at least 1 higher than the current number of provided arguments. - var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 /* CallExpression */ && node.arguments.hasTrailingComma; + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 /* CallExpression */ && node.arguments.hasTrailingComma; // Section 4.12.1: // if the candidate list contains one or more signatures for which the type of each argument // expression is a subtype of each corresponding parameter type, the return type of the first @@ -39277,7 +39367,7 @@ var ts; } } function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { var superType = checkSuperExpression(node.expression); if (superType !== unknownType) { // In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated @@ -39480,16 +39570,16 @@ var ts; */ function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 145 /* Parameter */: + case 146 /* Parameter */: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -39562,16 +39652,16 @@ var ts; } function resolveSignature(node, candidatesOutArray) { switch (node.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray); - case 146 /* Decorator */: + case 147 /* Decorator */: return resolveDecorator(node, candidatesOutArray); - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: // This code-path is called by language service return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray); } @@ -39623,22 +39713,22 @@ var ts; // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return voidType; } - if (node.kind === 181 /* NewExpression */) { + if (node.kind === 182 /* NewExpression */) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 151 /* Constructor */ && - declaration.kind !== 155 /* ConstructSignature */ && - declaration.kind !== 160 /* ConstructorType */ && + declaration.kind !== 152 /* Constructor */ && + declaration.kind !== 156 /* ConstructSignature */ && + declaration.kind !== 161 /* ConstructorType */ && !ts.isJSDocConstructSignature(declaration)) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations // in a JS file // Note:JS inferred classes might come from a variable declaration instead of a function declaration. // In this case, using getResolvedSymbol directly is required to avoid losing the members from the declaration. - var funcSymbol = node.expression.kind === 70 /* Identifier */ ? + var funcSymbol = node.expression.kind === 71 /* Identifier */ ? getResolvedSymbol(node.expression) : checkExpression(node.expression).symbol; if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) { @@ -39674,9 +39764,9 @@ var ts; return false; } var targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ - ? 227 /* FunctionDeclaration */ + ? 228 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ - ? 225 /* VariableDeclaration */ + ? 226 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind); @@ -39710,7 +39800,7 @@ var ts; error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return unknownType; } - else if (container.kind === 151 /* Constructor */) { + else if (container.kind === 152 /* Constructor */) { var symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } @@ -39778,7 +39868,7 @@ var ts; for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; if (!ts.isOmittedExpression(element)) { - if (element.name.kind === 70 /* Identifier */) { + if (element.name.kind === 71 /* Identifier */) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } assignBindingElementTypes(element); @@ -39792,8 +39882,8 @@ var ts; links.type = instantiateType(contextualType, mapper); // if inference didn't come up with anything but {}, fall back to the binding pattern if present. if (links.type === emptyObjectType && - (parameter.valueDeclaration.name.kind === 173 /* ObjectBindingPattern */ || - parameter.valueDeclaration.name.kind === 174 /* ArrayBindingPattern */)) { + (parameter.valueDeclaration.name.kind === 174 /* ObjectBindingPattern */ || + parameter.valueDeclaration.name.kind === 175 /* ArrayBindingPattern */)) { links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); } assignBindingElementTypes(parameter.valueDeclaration); @@ -39866,7 +39956,7 @@ var ts; } var functionFlags = ts.getFunctionFlags(func); var type; - if (func.body.kind !== 206 /* Block */) { + if (func.body.kind !== 207 /* Block */) { type = checkExpressionCached(func.body, checkMode); if (functionFlags & 2 /* Async */) { // From within an async function you can return either a non-promise value or a promise. Any @@ -39971,7 +40061,7 @@ var ts; return false; } var lastStatement = ts.lastOrUndefined(func.body.statements); - if (lastStatement && lastStatement.kind === 220 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) { + if (lastStatement && lastStatement.kind === 221 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) { return false; } return true; @@ -40004,7 +40094,7 @@ var ts; } }); if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || - func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */)) { + func.kind === 186 /* FunctionExpression */ || func.kind === 187 /* ArrowFunction */)) { return undefined; } if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { @@ -40033,7 +40123,7 @@ var ts; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw - if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 /* Block */ || !functionHasImplicitReturn(func)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 207 /* Block */ || !functionHasImplicitReturn(func)) { return; } var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */; @@ -40066,10 +40156,10 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); // Grammar checking var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 185 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 186 /* FunctionExpression */) { checkGrammarForGenerator(node); } // The identityMapper object is used to indicate that function expressions are wildcards @@ -40110,7 +40200,7 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 150 /* MethodDeclaration */) { + if (produceDiagnostics && node.kind !== 151 /* MethodDeclaration */) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithCapturedNewTargetVariable(node, node.name); @@ -40118,7 +40208,7 @@ var ts; return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); var returnOrPromisedType = node.type && ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ? @@ -40137,7 +40227,7 @@ var ts; // checkFunctionExpressionBodies). So it must be done now. getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 206 /* Block */) { + if (node.body.kind === 207 /* Block */) { checkSourceElement(node.body); } else { @@ -40184,11 +40274,11 @@ var ts; if (isReadonlySymbol(symbol)) { // Allow assignments to readonly properties within constructors of the same class declaration. if (symbol.flags & 4 /* Property */ && - (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) && - expr.expression.kind === 98 /* ThisKeyword */) { + (expr.kind === 179 /* PropertyAccessExpression */ || expr.kind === 180 /* ElementAccessExpression */) && + expr.expression.kind === 99 /* ThisKeyword */) { // Look for if this is the constructor for the class that `symbol` is a property of. var func = ts.getContainingFunction(expr); - if (!(func && func.kind === 151 /* Constructor */)) + if (!(func && func.kind === 152 /* Constructor */)) return true; // If func.parent is a class and symbol is a (readonly) property of that class, or // if func is a constructor and symbol is a (readonly) parameter property declared in it, @@ -40200,13 +40290,13 @@ var ts; return false; } function isReferenceThroughNamespaceImport(expr) { - if (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */ || expr.kind === 180 /* ElementAccessExpression */) { var node = ts.skipParentheses(expr.expression); - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol.flags & 8388608 /* Alias */) { var declaration = getDeclarationOfAliasSymbol(symbol); - return declaration && declaration.kind === 239 /* NamespaceImport */; + return declaration && declaration.kind === 240 /* NamespaceImport */; } } } @@ -40215,7 +40305,7 @@ var ts; function checkReferenceExpression(expr, invalidReferenceMessage) { // References are combinations of identifiers, parentheses, and property accesses. var node = ts.skipParentheses(expr); - if (node.kind !== 70 /* Identifier */ && node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) { + if (node.kind !== 71 /* Identifier */ && node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) { error(expr, invalidReferenceMessage); return false; } @@ -40224,7 +40314,7 @@ var ts; function checkDeleteExpression(node) { checkExpression(node.expression); var expr = ts.skipParentheses(node.expression); - if (expr.kind !== 178 /* PropertyAccessExpression */ && expr.kind !== 179 /* ElementAccessExpression */) { + if (expr.kind !== 179 /* PropertyAccessExpression */ && expr.kind !== 180 /* ElementAccessExpression */) { error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } @@ -40261,25 +40351,25 @@ var ts; if (operandType === silentNeverType) { return silentNeverType; } - if (node.operator === 37 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) { + if (node.operator === 38 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) { return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, "" + -node.operand.text)); } switch (node.operator) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: checkNonNullType(operandType, node.operand); if (maybeTypeOfKind(operandType, 512 /* ESSymbol */)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; - case 50 /* ExclamationToken */: + case 51 /* ExclamationToken */: var facts = getTypeFacts(operandType) & (1048576 /* Truthy */ | 2097152 /* Falsy */); return facts === 1048576 /* Truthy */ ? falseType : facts === 2097152 /* Falsy */ ? trueType : booleanType; - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors @@ -40401,9 +40491,9 @@ var ts; } /** Note: If property cannot be a SpreadAssignment, then allProperties does not need to be provided */ function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) { - if (property.kind === 260 /* PropertyAssignment */ || property.kind === 261 /* ShorthandPropertyAssignment */) { + if (property.kind === 261 /* PropertyAssignment */ || property.kind === 262 /* ShorthandPropertyAssignment */) { var name = property.name; - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(name); } if (isComputedNonLiteralName(name)) { @@ -40416,7 +40506,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1 /* Number */) || getIndexTypeOfType(objectLiteralType, 0 /* String */); if (type) { - if (property.kind === 261 /* ShorthandPropertyAssignment */) { + if (property.kind === 262 /* ShorthandPropertyAssignment */) { return checkDestructuringAssignment(property, type); } else { @@ -40428,7 +40518,7 @@ var ts; error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name)); } } - else if (property.kind === 262 /* SpreadAssignment */) { + else if (property.kind === 263 /* SpreadAssignment */) { if (languageVersion < 5 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); } @@ -40462,8 +40552,8 @@ var ts; function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { var elements = node.elements; var element = elements[elementIndex]; - if (element.kind !== 199 /* OmittedExpression */) { - if (element.kind !== 197 /* SpreadElement */) { + if (element.kind !== 200 /* OmittedExpression */) { + if (element.kind !== 198 /* SpreadElement */) { var propName = "" + elementIndex; var type = isTypeAny(sourceType) ? sourceType @@ -40491,7 +40581,7 @@ var ts; } else { var restExpression = element.expression; - if (restExpression.kind === 193 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) { + if (restExpression.kind === 194 /* BinaryExpression */ && restExpression.operatorToken.kind === 58 /* EqualsToken */) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -40504,7 +40594,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) { var target; - if (exprOrAssignment.kind === 261 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 262 /* ShorthandPropertyAssignment */) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { // In strict null checking mode, if a default value of a non-undefined type is specified, remove @@ -40520,21 +40610,21 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 193 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) { + if (target.kind === 194 /* BinaryExpression */ && target.operatorToken.kind === 58 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; } - if (target.kind === 177 /* ObjectLiteralExpression */) { + if (target.kind === 178 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType); } - if (target.kind === 176 /* ArrayLiteralExpression */) { + if (target.kind === 177 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { var targetType = checkExpression(target, checkMode); - var error = target.parent.kind === 262 /* SpreadAssignment */ ? + var error = target.parent.kind === 263 /* SpreadAssignment */ ? ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; if (checkReferenceExpression(target, error)) { @@ -40553,52 +40643,52 @@ var ts; function isSideEffectFree(node) { node = ts.skipParentheses(node); switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: case 9 /* StringLiteral */: - case 11 /* RegularExpressionLiteral */: - case 182 /* TaggedTemplateExpression */: - case 195 /* TemplateExpression */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 12 /* RegularExpressionLiteral */: + case 183 /* TaggedTemplateExpression */: + case 196 /* TemplateExpression */: + case 13 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 94 /* NullKeyword */: - case 138 /* UndefinedKeyword */: - case 185 /* FunctionExpression */: - case 198 /* ClassExpression */: - case 186 /* ArrowFunction */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 188 /* TypeOfExpression */: - case 202 /* NonNullExpression */: - case 249 /* JsxSelfClosingElement */: - case 248 /* JsxElement */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 95 /* NullKeyword */: + case 139 /* UndefinedKeyword */: + case 186 /* FunctionExpression */: + case 199 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 189 /* TypeOfExpression */: + case 203 /* NonNullExpression */: + case 250 /* JsxSelfClosingElement */: + case 249 /* JsxElement */: return true; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: if (ts.isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: // Unary operators ~, !, +, and - have no side effects. // The rest do. switch (node.operator) { - case 50 /* ExclamationToken */: - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: + case 51 /* ExclamationToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: return true; } return false; // Some forms listed here for clarity - case 189 /* VoidExpression */: // Explicit opt-out - case 183 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings - case 201 /* AsExpression */: // Not SEF, but can produce useful type warnings + case 190 /* VoidExpression */: // Explicit opt-out + case 184 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings + case 202 /* AsExpression */: // Not SEF, but can produce useful type warnings default: return false; } @@ -40618,34 +40708,34 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; - if (operator === 57 /* EqualsToken */ && (left.kind === 177 /* ObjectLiteralExpression */ || left.kind === 176 /* ArrayLiteralExpression */)) { + if (operator === 58 /* EqualsToken */ && (left.kind === 178 /* ObjectLiteralExpression */ || left.kind === 177 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode); } var leftType = checkExpression(left, checkMode); var rightType = checkExpression(right, checkMode); switch (operator) { - case 38 /* AsteriskToken */: - case 39 /* AsteriskAsteriskToken */: - case 60 /* AsteriskEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - case 41 /* PercentToken */: - case 63 /* PercentEqualsToken */: - case 37 /* MinusToken */: - case 59 /* MinusEqualsToken */: - case 44 /* LessThanLessThanToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 48 /* BarToken */: - case 68 /* BarEqualsToken */: - case 49 /* CaretToken */: - case 69 /* CaretEqualsToken */: - case 47 /* AmpersandToken */: - case 67 /* AmpersandEqualsToken */: + case 39 /* AsteriskToken */: + case 40 /* AsteriskAsteriskToken */: + case 61 /* AsteriskEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + case 42 /* PercentToken */: + case 64 /* PercentEqualsToken */: + case 38 /* MinusToken */: + case 60 /* MinusEqualsToken */: + case 45 /* LessThanLessThanToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 49 /* BarToken */: + case 69 /* BarEqualsToken */: + case 50 /* CaretToken */: + case 70 /* CaretEqualsToken */: + case 48 /* AmpersandToken */: + case 68 /* AmpersandEqualsToken */: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -40668,8 +40758,8 @@ var ts; } } return numberType; - case 36 /* PlusToken */: - case 58 /* PlusEqualsToken */: + case 37 /* PlusToken */: + case 59 /* PlusEqualsToken */: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -40702,14 +40792,14 @@ var ts; reportOperatorError(); return anyType; } - if (operator === 58 /* PlusEqualsToken */) { + if (operator === 59 /* PlusEqualsToken */) { checkAssignmentOperator(resultType); } return resultType; - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); @@ -40718,10 +40808,10 @@ var ts; } } return booleanType; - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: var leftIsLiteral = isLiteralType(leftType); var rightIsLiteral = isLiteralType(rightType); if (!leftIsLiteral || !rightIsLiteral) { @@ -40732,29 +40822,29 @@ var ts; reportOperatorError(); } return booleanType; - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 91 /* InKeyword */: + case 92 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return getTypeFacts(leftType) & 1048576 /* Truthy */ ? includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) : leftType; - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return getTypeFacts(leftType) & 2097152 /* Falsy */ ? getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : leftType; - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); - case 25 /* CommaToken */: + case 26 /* CommaToken */: if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } function isEvalNode(node) { - return node.kind === 70 /* Identifier */ && node.text === "eval"; + return node.kind === 71 /* Identifier */ && node.text === "eval"; } // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator) { @@ -40769,21 +40859,21 @@ var ts; } function getSuggestedBooleanOperator(operator) { switch (operator) { - case 48 /* BarToken */: - case 68 /* BarEqualsToken */: - return 53 /* BarBarToken */; - case 49 /* CaretToken */: - case 69 /* CaretEqualsToken */: - return 34 /* ExclamationEqualsEqualsToken */; - case 47 /* AmpersandToken */: - case 67 /* AmpersandEqualsToken */: - return 52 /* AmpersandAmpersandToken */; + case 49 /* BarToken */: + case 69 /* BarEqualsToken */: + return 54 /* BarBarToken */; + case 50 /* CaretToken */: + case 70 /* CaretEqualsToken */: + return 35 /* ExclamationEqualsEqualsToken */; + case 48 /* AmpersandToken */: + case 68 /* AmpersandEqualsToken */: + return 53 /* AmpersandAmpersandToken */; default: return undefined; } } function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 57 /* FirstAssignment */ && operator <= 69 /* LastAssignment */) { + if (produceDiagnostics && operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) { // TypeScript 1.0 spec (April 2014): 4.17 // An assignment of the form // VarExpr = ValueExpr @@ -40885,9 +40975,9 @@ var ts; return getFreshTypeOfLiteralType(getLiteralTypeForText(32 /* StringLiteral */, node.text)); case 8 /* NumericLiteral */: return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, node.text)); - case 100 /* TrueKeyword */: + case 101 /* TrueKeyword */: return trueType; - case 85 /* FalseKeyword */: + case 86 /* FalseKeyword */: return falseType; } } @@ -40929,7 +41019,7 @@ var ts; } function isTypeAssertion(node) { node = ts.skipParentheses(node); - return node.kind === 183 /* TypeAssertionExpression */ || node.kind === 201 /* AsExpression */; + return node.kind === 184 /* TypeAssertionExpression */ || node.kind === 202 /* AsExpression */; } function checkDeclarationInitializer(declaration) { var type = getTypeOfExpression(declaration.initializer, /*cache*/ true); @@ -40961,7 +41051,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); @@ -40972,7 +41062,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -41002,7 +41092,7 @@ var ts; function getTypeOfExpression(node, cache) { // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. - if (node.kind === 180 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { + if (node.kind === 181 /* CallExpression */ && node.expression.kind !== 97 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { var funcType = checkNonNullExpression(node.expression); var signature = getSingleCallSignature(funcType); if (signature && !signature.typeParameters) { @@ -41037,7 +41127,7 @@ var ts; // contextually typed function and arrow expressions in the initial phase. function checkExpression(node, checkMode) { var type; - if (node.kind === 142 /* QualifiedName */) { + if (node.kind === 143 /* QualifiedName */) { type = checkQualifiedName(node); } else { @@ -41049,9 +41139,9 @@ var ts; // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.expression === node) || + (node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.expression === node) || + ((node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -41060,83 +41150,83 @@ var ts; } function checkExpressionWorker(node, checkMode) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return checkIdentifier(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return checkThisExpression(node); - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return checkSuperExpression(node); - case 94 /* NullKeyword */: + case 95 /* NullKeyword */: return nullWideningType; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return checkLiteralExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return checkTemplateExpression(node); - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return stringType; - case 11 /* RegularExpressionLiteral */: + case 12 /* RegularExpressionLiteral */: return globalRegExpType; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return checkIndexedAccess(node); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return checkCallExpression(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return checkExpression(node.expression, checkMode); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return checkClassExpression(node); - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return checkAssertion(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return checkNonNullAssertion(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return checkMetaProperty(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return checkDeleteExpression(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return checkVoidExpression(node); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return checkAwaitExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 199 /* OmittedExpression */: + case 200 /* OmittedExpression */: return undefinedWideningType; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return checkYieldExpression(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return checkJsxElement(node); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -41173,7 +41263,7 @@ var ts; var func = ts.getContainingFunction(node); if (ts.getModifierFlags(node) & 92 /* ParameterPropertyModifier */) { func = ts.getContainingFunction(node); - if (!(func.kind === 151 /* Constructor */ && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 152 /* Constructor */ && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -41184,7 +41274,7 @@ var ts; if (ts.indexOf(func.parameters, node) !== 0) { error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); } - if (func.kind === 151 /* Constructor */ || func.kind === 155 /* ConstructSignature */ || func.kind === 160 /* ConstructorType */) { + if (func.kind === 152 /* Constructor */ || func.kind === 156 /* ConstructSignature */ || func.kind === 161 /* ConstructorType */) { error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); } } @@ -41198,7 +41288,7 @@ var ts; if (parameterList) { for (var i = 0; i < parameterList.length; i++) { var param = parameterList[i]; - if (param.name.kind === 70 /* Identifier */ && + if (param.name.kind === 71 /* Identifier */ && param.name.text === parameter.text) { return i; } @@ -41250,13 +41340,13 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 186 /* ArrowFunction */: - case 154 /* CallSignature */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 159 /* FunctionType */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 187 /* ArrowFunction */: + case 155 /* CallSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 160 /* FunctionType */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: var parent = node.parent; if (node === parent.type) { return parent; @@ -41270,13 +41360,13 @@ var ts; continue; } var name = element.name; - if (name.kind === 70 /* Identifier */ && + if (name.kind === 71 /* Identifier */ && name.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name.kind === 174 /* ArrayBindingPattern */ || - name.kind === 173 /* ObjectBindingPattern */) { + else if (name.kind === 175 /* ArrayBindingPattern */ || + name.kind === 174 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) { return true; } @@ -41285,12 +41375,12 @@ var ts; } function checkSignatureDeclaration(node) { // Grammar checking - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { checkGrammarIndexSignature(node); } - else if (node.kind === 159 /* FunctionType */ || node.kind === 227 /* FunctionDeclaration */ || node.kind === 160 /* ConstructorType */ || - node.kind === 154 /* CallSignature */ || node.kind === 151 /* Constructor */ || - node.kind === 155 /* ConstructSignature */) { + else if (node.kind === 160 /* FunctionType */ || node.kind === 228 /* FunctionDeclaration */ || node.kind === 161 /* ConstructorType */ || + node.kind === 155 /* CallSignature */ || node.kind === 152 /* Constructor */ || + node.kind === 156 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } var functionFlags = ts.getFunctionFlags(node); @@ -41317,10 +41407,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (noImplicitAny && !node.type) { switch (node.kind) { - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -41367,7 +41457,7 @@ var ts; var staticNames = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151 /* Constructor */) { + if (member.kind === 152 /* Constructor */) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; if (ts.isParameterPropertyDeclaration(param)) { @@ -41381,16 +41471,16 @@ var ts; var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); if (memberName) { switch (member.kind) { - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: addName(names, member.name, memberName, 1 /* Getter */); break; - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: addName(names, member.name, memberName, 2 /* Setter */); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: addName(names, member.name, memberName, 3 /* Property */); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: addName(names, member.name, memberName, 4 /* Method */); break; } @@ -41453,12 +41543,12 @@ var ts; var names = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 147 /* PropertySignature */) { + if (member.kind === 148 /* PropertySignature */) { var memberName = void 0; switch (member.name.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 70 /* Identifier */: + case 71 /* Identifier */: memberName = member.name.text; break; default: @@ -41475,7 +41565,7 @@ var ts; } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 229 /* InterfaceDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind @@ -41495,7 +41585,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -41503,7 +41593,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -41568,15 +41658,15 @@ var ts; return ts.forEachChild(n, containsSuperCall); } function markThisReferencesAsErrors(n) { - if (n.kind === 98 /* ThisKeyword */) { + if (n.kind === 99 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 185 /* FunctionExpression */ && n.kind !== 227 /* FunctionDeclaration */) { + else if (n.kind !== 186 /* FunctionExpression */ && n.kind !== 228 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 148 /* PropertyDeclaration */ && + return n.kind === 149 /* PropertyDeclaration */ && !(ts.getModifierFlags(n) & 32 /* Static */) && !!n.initializer; } @@ -41606,7 +41696,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) { var statement = statements_3[_i]; - if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { superCallStatement = statement; break; } @@ -41630,7 +41720,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 152 /* GetAccessor */) { + if (node.kind === 153 /* GetAccessor */) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128 /* HasImplicitReturn */)) { if (!(node.flags & 256 /* HasExplicitReturn */)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); @@ -41640,13 +41730,13 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */; + var otherKind = node.kind === 153 /* GetAccessor */ ? 154 /* SetAccessor */ : 153 /* GetAccessor */; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if ((ts.getModifierFlags(node) & 28 /* AccessibilityModifier */) !== (ts.getModifierFlags(otherAccessor) & 28 /* AccessibilityModifier */)) { @@ -41662,7 +41752,7 @@ var ts; } } var returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 152 /* GetAccessor */) { + if (node.kind === 153 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -41779,9 +41869,9 @@ var ts; var flags = ts.getCombinedModifierFlags(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. - if (n.parent.kind !== 229 /* InterfaceDeclaration */ && - n.parent.kind !== 228 /* ClassDeclaration */ && - n.parent.kind !== 198 /* ClassExpression */ && + if (n.parent.kind !== 230 /* InterfaceDeclaration */ && + n.parent.kind !== 229 /* ClassDeclaration */ && + n.parent.kind !== 199 /* ClassExpression */ && ts.isInAmbientContext(n)) { if (!(flags & 2 /* Ambient */)) { // It is nested in an ambient context, which means it is automatically exported @@ -41869,7 +41959,7 @@ var ts; var errorNode_1 = subsequentNode.name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */) && + var reportError = (node.kind === 151 /* MethodDeclaration */ || node.kind === 150 /* MethodSignature */) && (ts.getModifierFlags(node) & 32 /* Static */) !== (ts.getModifierFlags(subsequentNode) & 32 /* Static */); // we can get here in two cases // 1. mixed static and instance class members @@ -41908,7 +41998,7 @@ var ts; var current = declarations_5[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 229 /* InterfaceDeclaration */ || node.parent.kind === 162 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 230 /* InterfaceDeclaration */ || node.parent.kind === 163 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -41919,7 +42009,7 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } - if (node.kind === 227 /* FunctionDeclaration */ || node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */ || node.kind === 151 /* Constructor */) { + if (node.kind === 228 /* FunctionDeclaration */ || node.kind === 151 /* MethodDeclaration */ || node.kind === 150 /* MethodSignature */ || node.kind === 152 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -42041,16 +42131,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return 2097152 /* ExportType */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ : 4194304 /* ExportNamespace */; - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: var result_3 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); }); @@ -42282,7 +42372,7 @@ var ts; var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; if (promiseConstructorType === unknownType) { - if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { + if (promiseConstructorName.kind === 71 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { @@ -42322,22 +42412,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 145 /* Parameter */: + case 146 /* Parameter */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -42352,7 +42442,7 @@ var ts; function markTypeNodeAsReferenced(node) { var typeName = node && ts.getEntityNameFromTypeNode(node); var rootName = typeName && getFirstIdentifier(typeName); - var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 70 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); if (rootSymbol && rootSymbol.flags & 8388608 /* Alias */ && symbolIsValue(rootSymbol) @@ -42378,14 +42468,14 @@ var ts; } var firstDecorator = node.decorators[0]; checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) { @@ -42394,19 +42484,19 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markTypeNodeAsReferenced(node.type); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); break; - case 145 /* Parameter */: + case 146 /* Parameter */: markTypeNodeAsReferenced(node.type); break; } @@ -42430,7 +42520,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name && node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 144 /* ComputedPropertyName */) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -42492,43 +42582,43 @@ var ts; for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { var node = deferredUnusedIdentifierNodes_1[_i]; switch (node.kind) { - case 264 /* SourceFile */: - case 232 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 233 /* ModuleDeclaration */: checkUnusedModuleMembers(node); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: checkUnusedClassMembers(node); checkUnusedTypeParameters(node); break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: checkUnusedTypeParameters(node); break; - case 206 /* Block */: - case 234 /* CaseBlock */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: checkUnusedLocalsAndParameters(node); break; - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node); } checkUnusedTypeParameters(node); break; - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: checkUnusedTypeParameters(node); break; } @@ -42536,10 +42626,10 @@ var ts; } } function checkUnusedLocalsAndParameters(node) { - if (node.parent.kind !== 229 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + if (node.parent.kind !== 230 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { node.locals.forEach(function (local) { if (!local.isReferenced) { - if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145 /* Parameter */) { + if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146 /* Parameter */) { var parameter = ts.getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !ts.isParameterPropertyDeclaration(parameter) && @@ -42565,13 +42655,13 @@ var ts; function errorUnusedLocal(node, name) { if (isIdentifierThatStartsWithUnderScore(node)) { var declaration = ts.getRootDeclaration(node.parent); - if (declaration.kind === 225 /* VariableDeclaration */ && - (declaration.parent.parent.kind === 214 /* ForInStatement */ || - declaration.parent.parent.kind === 215 /* ForOfStatement */)) { + if (declaration.kind === 226 /* VariableDeclaration */ && + (declaration.parent.parent.kind === 215 /* ForInStatement */ || + declaration.parent.parent.kind === 216 /* ForOfStatement */)) { return; } } - if (!isRemovedPropertyFromObjectSpread(node.kind === 70 /* Identifier */ ? node.parent : node)) { + if (!isRemovedPropertyFromObjectSpread(node.kind === 71 /* Identifier */ ? node.parent : node)) { error(node, ts.Diagnostics._0_is_declared_but_never_used, name); } } @@ -42579,19 +42669,19 @@ var ts; return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node) { - return node.kind === 70 /* Identifier */ && node.text.charCodeAt(0) === 95 /* _ */; + return node.kind === 71 /* Identifier */ && node.text.charCodeAt(0) === 95 /* _ */; } function checkUnusedClassMembers(node) { if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { if (node.members) { for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 150 /* MethodDeclaration */ || member.kind === 148 /* PropertyDeclaration */) { + if (member.kind === 151 /* MethodDeclaration */ || member.kind === 149 /* PropertyDeclaration */) { if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8 /* Private */) { error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); } } - else if (member.kind === 151 /* Constructor */) { + else if (member.kind === 152 /* Constructor */) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8 /* Private */) { @@ -42638,7 +42728,7 @@ var ts; } function checkBlock(node) { // Grammar checking for SyntaxKind.Block - if (node.kind === 206 /* Block */) { + if (node.kind === 207 /* Block */) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -42661,12 +42751,12 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 147 /* PropertySignature */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 149 /* MethodSignature */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 148 /* PropertySignature */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 150 /* MethodSignature */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // it is ok to have member named '_super' or '_this' - member access is always qualified return false; } @@ -42675,7 +42765,7 @@ var ts; return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 145 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 146 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { // just an overload - no codegen impact return false; } @@ -42695,7 +42785,7 @@ var ts; function checkIfThisIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { - var isDeclaration_1 = node.kind !== 70 /* Identifier */; + var isDeclaration_1 = node.kind !== 71 /* Identifier */; if (isDeclaration_1) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -42709,7 +42799,7 @@ var ts; function checkIfNewTargetIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { - var isDeclaration_2 = node.kind !== 70 /* Identifier */; + var isDeclaration_2 = node.kind !== 71 /* Identifier */; if (isDeclaration_2) { error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } @@ -42731,7 +42821,7 @@ var ts; return; } if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_3 = node.kind !== 70 /* Identifier */; + var isDeclaration_3 = node.kind !== 71 /* Identifier */; if (isDeclaration_3) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -42749,12 +42839,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -42764,12 +42854,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) { + if (parent.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) { // If the declaration happens to be in external module, report error that Promise is a reserved identifier. error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -42804,7 +42894,7 @@ var ts; // skip variable declarations that don't have initializers // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern // so we'll always treat binding elements as initialized - if (node.kind === 225 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 226 /* VariableDeclaration */ && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -42814,17 +42904,17 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 207 /* VariableStatement */ && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 227 /* VariableDeclarationList */); + var container = varDeclList.parent.kind === 208 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; // names of block-scoped and function scoped variables can collide only // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) var namesShareScope = container && - (container.kind === 206 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 233 /* ModuleBlock */ || - container.kind === 232 /* ModuleDeclaration */ || - container.kind === 264 /* SourceFile */); + (container.kind === 207 /* Block */ && ts.isFunctionLike(container.parent) || + container.kind === 234 /* ModuleBlock */ || + container.kind === 233 /* ModuleDeclaration */ || + container.kind === 265 /* SourceFile */); // here we know that function scoped variable is shadowed by block scoped one // if they are defined in the same scope - binder has already reported redeclaration error // otherwise if variable has an initializer - show error that initialization will fail @@ -42839,7 +42929,7 @@ var ts; } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 145 /* Parameter */) { + if (ts.getRootDeclaration(node).kind !== 146 /* Parameter */) { return; } var func = ts.getContainingFunction(node); @@ -42850,11 +42940,11 @@ var ts; // skip declaration names (i.e. in object literal expressions) return; } - if (n.kind === 178 /* PropertyAccessExpression */) { + if (n.kind === 179 /* PropertyAccessExpression */) { // skip property names in property access expression return visit(n.expression); } - else if (n.kind === 70 /* Identifier */) { + else if (n.kind === 71 /* Identifier */) { // check FunctionLikeDeclaration.locals (stores parameters\function local variable) // if it contains entry with a specified name var symbol = resolveName(n, n.text, 107455 /* Value */ | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); @@ -42869,8 +42959,8 @@ var ts; // so we need to do a bit of extra work to check if reference is legal var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (enclosingContainer === func) { - if (symbol.valueDeclaration.kind === 145 /* Parameter */ || - symbol.valueDeclaration.kind === 175 /* BindingElement */) { + if (symbol.valueDeclaration.kind === 146 /* Parameter */ || + symbol.valueDeclaration.kind === 176 /* BindingElement */) { // it is ok to reference parameter in initializer if either // - parameter is located strictly on the left of current parameter declaration if (symbol.valueDeclaration.pos < node.pos) { @@ -42884,7 +42974,7 @@ var ts; return ts.isFunctionLike(current.parent) || // computed property names/initializers in instance property declaration of class like entities // are executed in constructor and thus deferred - (current.parent.kind === 148 /* PropertyDeclaration */ && + (current.parent.kind === 149 /* PropertyDeclaration */ && !(ts.hasModifier(current.parent, 32 /* Static */)) && ts.isClassLike(current.parent.parent)); })) { @@ -42911,18 +43001,18 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 175 /* BindingElement */) { - if (node.parent.kind === 173 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) { + if (node.kind === 176 /* BindingElement */) { + if (node.parent.kind === 174 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) { checkExternalEmitHelpers(node, 4 /* Rest */); } // check computed properties inside property names of binding elements - if (node.propertyName && node.propertyName.kind === 143 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } // check private/protected variable access @@ -42937,20 +43027,20 @@ var ts; } // For a binding pattern, check contained binding elements if (ts.isBindingPattern(node.name)) { - if (node.name.kind === 174 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 175 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } ts.forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 145 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 146 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } // For a binding pattern, validate the initializer and exit if (ts.isBindingPattern(node.name)) { // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 215 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -42961,7 +43051,7 @@ var ts; if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 215 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -42981,10 +43071,10 @@ var ts; error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); } } - if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */) { + if (node.kind !== 149 /* PropertyDeclaration */ && node.kind !== 148 /* PropertySignature */) { // We know we don't have a binding pattern or computed name here checkExportsOnMergedDeclarations(node); - if (node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */) { + if (node.kind === 226 /* VariableDeclaration */ || node.kind === 176 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -42995,8 +43085,8 @@ var ts; } } function areDeclarationFlagsIdentical(left, right) { - if ((left.kind === 145 /* Parameter */ && right.kind === 225 /* VariableDeclaration */) || - (left.kind === 225 /* VariableDeclaration */ && right.kind === 145 /* Parameter */)) { + if ((left.kind === 146 /* Parameter */ && right.kind === 226 /* VariableDeclaration */) || + (left.kind === 226 /* VariableDeclaration */ && right.kind === 146 /* Parameter */)) { // Differences in optionality between parameters and variables are allowed. return true; } @@ -43026,7 +43116,7 @@ var ts; } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { // We only disallow modifier on a method declaration if it is a property of object-literal-expression - if (node.modifiers && node.parent.kind === 177 /* ObjectLiteralExpression */) { + if (node.modifiers && node.parent.kind === 178 /* ObjectLiteralExpression */) { if (ts.getFunctionFlags(node) & 2 /* Async */) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -43047,7 +43137,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 208 /* EmptyStatement */) { + if (node.thenStatement.kind === 209 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -43067,12 +43157,12 @@ var ts; function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 227 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -43090,7 +43180,7 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.kind === 215 /* ForOfStatement */) { + if (node.kind === 216 /* ForOfStatement */) { if (node.awaitModifier) { if (languageVersion < 4 /* ES2017 */) { checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */); @@ -43105,14 +43195,14 @@ var ts; // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier); // There may be a destructuring assignment on the left side - if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) { + if (varExpr.kind === 177 /* ArrayLiteralExpression */ || varExpr.kind === 178 /* ObjectLiteralExpression */) { // iteratedType may be undefined. In this case, we still want to check the structure of // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like // to short circuit the type relation checking as much as possible, so we pass the unknownType. @@ -43144,7 +43234,7 @@ var ts; // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -43158,7 +43248,7 @@ var ts; // and Expr must be an expression of type Any, an object type, or a type parameter type. var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) { + if (varExpr.kind === 177 /* ArrayLiteralExpression */ || varExpr.kind === 178 /* ObjectLiteralExpression */) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { @@ -43476,7 +43566,7 @@ var ts; // TODO: Check that target label is valid } function isGetAccessorWithAnnotatedSetAccessor(node) { - return !!(node.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153 /* SetAccessor */))); + return !!(node.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */))); } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ @@ -43506,12 +43596,12 @@ var ts; // for generators. return; } - if (func.kind === 153 /* SetAccessor */) { + if (func.kind === 154 /* SetAccessor */) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } } - else if (func.kind === 151 /* Constructor */) { + else if (func.kind === 152 /* Constructor */) { if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) { error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -43532,7 +43622,7 @@ var ts; } } } - else if (func.kind !== 151 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + else if (func.kind !== 152 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { // The function has a return type, but the return statement doesn't have an expression. error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } @@ -43562,7 +43652,7 @@ var ts; var expressionIsLiteral = isLiteralType(expressionType); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 257 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 258 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -43574,7 +43664,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 256 /* CaseClause */) { + if (produceDiagnostics && clause.kind === 257 /* CaseClause */) { var caseClause = clause; // TypeScript 1.0 spec (April 2014): 5.9 // In a 'switch' statement, each 'case' expression must be of a type that is comparable @@ -43604,7 +43694,7 @@ var ts; if (ts.isFunctionLike(current)) { return "quit"; } - if (current.kind === 221 /* LabeledStatement */ && current.label.text === node.label.text) { + if (current.kind === 222 /* LabeledStatement */ && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); return true; @@ -43707,7 +43797,7 @@ var ts; // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class var errorNode; - if (propDeclaration && (propDeclaration.name.kind === 143 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) { + if (propDeclaration && (propDeclaration.name.kind === 144 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) { errorNode = propDeclaration; } else if (indexDeclaration) { @@ -43953,7 +44043,7 @@ var ts; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { return ts.filter(symbol.declarations, function (d) { - return d.kind === 228 /* ClassDeclaration */ || d.kind === 229 /* InterfaceDeclaration */; + return d.kind === 229 /* ClassDeclaration */ || d.kind === 230 /* InterfaceDeclaration */; }); } function checkKindsOfPropertyMemberOverrides(type, baseType) { @@ -43992,7 +44082,7 @@ var ts; // If there is no declaration for the derived class (as in the case of class expressions), // then the class cannot be declared abstract. if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128 /* Abstract */))) { - if (derivedClassDecl.kind === 198 /* ClassExpression */) { + if (derivedClassDecl.kind === 199 /* ClassExpression */) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -44036,7 +44126,7 @@ var ts; } } function isAccessor(kind) { - return kind === 152 /* GetAccessor */ || kind === 153 /* SetAccessor */; + return kind === 153 /* GetAccessor */ || kind === 154 /* SetAccessor */; } function checkInheritedPropertiesAreIdentical(type, typeNode) { var baseTypes = getBaseTypes(type); @@ -44080,7 +44170,7 @@ var ts; var symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); // Only check this symbol once - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 230 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -44187,18 +44277,18 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; } switch (e.operator) { - case 36 /* PlusToken */: return value_1; - case 37 /* MinusToken */: return -value_1; - case 51 /* TildeToken */: return ~value_1; + case 37 /* PlusToken */: return value_1; + case 38 /* MinusToken */: return -value_1; + case 52 /* TildeToken */: return ~value_1; } return undefined; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -44208,32 +44298,32 @@ var ts; return undefined; } switch (e.operatorToken.kind) { - case 48 /* BarToken */: return left | right; - case 47 /* AmpersandToken */: return left & right; - case 45 /* GreaterThanGreaterThanToken */: return left >> right; - case 46 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; - case 44 /* LessThanLessThanToken */: return left << right; - case 49 /* CaretToken */: return left ^ right; - case 38 /* AsteriskToken */: return left * right; - case 40 /* SlashToken */: return left / right; - case 36 /* PlusToken */: return left + right; - case 37 /* MinusToken */: return left - right; - case 41 /* PercentToken */: return left % right; + case 49 /* BarToken */: return left | right; + case 48 /* AmpersandToken */: return left & right; + case 46 /* GreaterThanGreaterThanToken */: return left >> right; + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; + case 45 /* LessThanLessThanToken */: return left << right; + case 50 /* CaretToken */: return left ^ right; + case 39 /* AsteriskToken */: return left * right; + case 41 /* SlashToken */: return left / right; + case 37 /* PlusToken */: return left + right; + case 38 /* MinusToken */: return left - right; + case 42 /* PercentToken */: return left % right; } return undefined; case 8 /* NumericLiteral */: checkGrammarNumericLiteral(e); return +e.text; - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return evalConstant(e.expression); - case 70 /* Identifier */: - case 179 /* ElementAccessExpression */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 180 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; var propertyName = void 0; - if (e.kind === 70 /* Identifier */) { + if (e.kind === 71 /* Identifier */) { // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work. // instead pick current enum type and later try to fetch member from the type enumType_1 = currentType; @@ -44241,7 +44331,7 @@ var ts; } else { var expression = void 0; - if (e.kind === 179 /* ElementAccessExpression */) { + if (e.kind === 180 /* ElementAccessExpression */) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9 /* StringLiteral */) { return undefined; @@ -44256,10 +44346,10 @@ var ts; // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName var current = expression; while (current) { - if (current.kind === 70 /* Identifier */) { + if (current.kind === 71 /* Identifier */) { break; } - else if (current.kind === 178 /* PropertyAccessExpression */) { + else if (current.kind === 179 /* PropertyAccessExpression */) { current = current.expression; } else { @@ -44332,7 +44422,7 @@ var ts; var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 231 /* EnumDeclaration */) { + if (declaration.kind !== 232 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -44355,8 +44445,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { var declaration = declarations_8[_i]; - if ((declaration.kind === 228 /* ClassDeclaration */ || - (declaration.kind === 227 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 229 /* ClassDeclaration */ || + (declaration.kind === 228 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -44420,7 +44510,7 @@ var ts; } // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 228 /* ClassDeclaration */); + var mergedClass = ts.getDeclarationOfKind(symbol, 229 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; @@ -44471,23 +44561,23 @@ var ts; } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // error each individual name in variable statement instead of marking the entire variable statement for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 242 /* ExportAssignment */: - case 243 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 244 /* ExportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 236 /* ImportEqualsDeclaration */: - case 237 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 238 /* ImportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 175 /* BindingElement */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 226 /* VariableDeclaration */: var name = node.name; if (ts.isBindingPattern(name)) { for (var _b = 0, _c = name.elements; _b < _c.length; _b++) { @@ -44498,12 +44588,12 @@ var ts; break; } // falls through - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 227 /* FunctionDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 228 /* FunctionDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -44524,17 +44614,17 @@ var ts; } function getFirstIdentifier(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: do { node = node.left; - } while (node.kind !== 70 /* Identifier */); + } while (node.kind !== 71 /* Identifier */); return node; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: do { node = node.expression; - } while (node.kind !== 70 /* Identifier */); + } while (node.kind !== 71 /* Identifier */); return node; } } @@ -44544,9 +44634,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 243 /* ExportDeclaration */ ? + var inAmbientExternalModule = node.parent.kind === 234 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 265 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 244 /* ExportDeclaration */ ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -44579,7 +44669,7 @@ var ts; (symbol.flags & 793064 /* Type */ ? 793064 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 245 /* ExportSpecifier */ ? + var message = node.kind === 246 /* ExportSpecifier */ ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -44607,7 +44697,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 240 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); } else { @@ -44664,10 +44754,10 @@ var ts; // export { x, y } // export { x, y } from "foo" ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ && + var inAmbientExternalModule = node.parent.kind === 234 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 234 /* ModuleBlock */ && !node.moduleSpecifier && ts.isInAmbientContext(node); - if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + if (node.parent.kind !== 265 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -44681,7 +44771,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - var isInAppropriateContext = node.parent.kind === 264 /* SourceFile */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 232 /* ModuleDeclaration */; + var isInAppropriateContext = node.parent.kind === 265 /* SourceFile */ || node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 233 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -44707,8 +44797,8 @@ var ts; // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. return; } - var container = node.parent.kind === 264 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 232 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 265 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 233 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { if (node.isExportEquals) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } @@ -44721,7 +44811,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { markExportAsReferenced(node); } else { @@ -44783,7 +44873,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return (declaration.kind !== 227 /* FunctionDeclaration */ && declaration.kind !== 150 /* MethodDeclaration */) || + return (declaration.kind !== 228 /* FunctionDeclaration */ && declaration.kind !== 151 /* MethodDeclaration */) || !!declaration.body; } } @@ -44796,123 +44886,123 @@ var ts; // Only bother checking on a few construct kinds. We don't want to be excessively // hitting the cancellation token on every node we check. switch (kind) { - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return checkTypeParameter(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return checkParameter(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return checkPropertyDeclaration(node); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: return checkSignatureDeclaration(node); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return checkSignatureDeclaration(node); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return checkMethodDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return checkConstructorDeclaration(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return checkAccessorDeclaration(node); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return checkTypeReferenceNode(node); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return checkTypePredicate(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return checkTypeQuery(node); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return checkTypeLiteral(node); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return checkArrayType(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return checkTupleType(node); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 167 /* ParenthesizedType */: - case 169 /* TypeOperator */: + case 168 /* ParenthesizedType */: + case 170 /* TypeOperator */: return checkSourceElement(node.type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return checkMappedType(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 206 /* Block */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return checkBlock(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return checkVariableStatement(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return checkExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return checkIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return checkDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return checkWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return checkForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return checkForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return checkForOfStatement(node); - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return checkReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return checkWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return checkSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return checkLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return checkThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return checkTryStatement(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return checkBindingElement(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return checkClassDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return checkImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return checkExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return checkExportAssignment(node); - case 208 /* EmptyStatement */: + case 209 /* EmptyStatement */: checkGrammarStatementInAmbientContext(node); return; - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -44934,17 +45024,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: checkClassExpressionDeferred(node); break; } @@ -45050,7 +45140,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 219 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 220 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -45073,18 +45163,18 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: var className = location.name; if (className) { copySymbol(location.symbol, meaning); @@ -45092,8 +45182,8 @@ var ts; // falls through // this fall-through is necessary because we would like to handle // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: // If we didn't come from static member of class or interface, // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. @@ -45102,7 +45192,7 @@ var ts; copySymbols(getSymbolOfNode(location).members, meaning & 793064 /* Type */); } break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -45144,34 +45234,34 @@ var ts; } } function isTypeDeclarationName(name) { - return name.kind === 70 /* Identifier */ && + return name.kind === 71 /* Identifier */ && isTypeDeclaration(name.parent) && name.parent.name === name; } function isTypeDeclaration(node) { switch (node.kind) { - case 144 /* TypeParameter */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: + case 145 /* TypeParameter */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: return true; } } // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 142 /* QualifiedName */) { + while (node.parent && node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } - return node.parent && (node.parent.kind === 158 /* TypeReference */ || node.parent.kind === 276 /* JSDocTypeReference */); + return node.parent && (node.parent.kind === 159 /* TypeReference */ || node.parent.kind === 277 /* JSDocTypeReference */); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 178 /* PropertyAccessExpression */) { + while (node.parent && node.parent.kind === 179 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent && node.parent.kind === 200 /* ExpressionWithTypeArguments */; + return node.parent && node.parent.kind === 201 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { var result; @@ -45188,13 +45278,13 @@ var ts; return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 142 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 143 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 236 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 237 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 242 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 243 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -45219,7 +45309,7 @@ var ts; return getSymbolOfNode(entityName.parent); } if (ts.isInJavaScriptFile(entityName) && - entityName.parent.kind === 178 /* PropertyAccessExpression */ && + entityName.parent.kind === 179 /* PropertyAccessExpression */ && entityName.parent === entityName.parent.parent.left) { // Check if this is a special property assignment var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); @@ -45227,13 +45317,13 @@ var ts; return specialPropertyAssignmentSymbol; } } - if (entityName.parent.kind === 242 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { + if (entityName.parent.kind === 243 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */); } - if (entityName.kind !== 178 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) { + if (entityName.kind !== 179 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) { // Since we already checked for ExportAssignment, this really could only be an Import - var importEqualsDeclaration = ts.getAncestor(entityName, 236 /* ImportEqualsDeclaration */); + var importEqualsDeclaration = ts.getAncestor(entityName, 237 /* ImportEqualsDeclaration */); ts.Debug.assert(importEqualsDeclaration !== undefined); return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, /*dontResolveAlias*/ true); } @@ -45243,7 +45333,7 @@ var ts; if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. - if (entityName.parent.kind === 200 /* ExpressionWithTypeArguments */) { + if (entityName.parent.kind === 201 /* ExpressionWithTypeArguments */) { meaning = 793064 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { @@ -45264,20 +45354,20 @@ var ts; // Missing entity name. return undefined; } - if (entityName.kind === 70 /* Identifier */) { + if (entityName.kind === 71 /* Identifier */) { if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { return getIntrinsicTagSymbol(entityName.parent); } return resolveEntityName(entityName, 107455 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.kind === 178 /* PropertyAccessExpression */) { + else if (entityName.kind === 179 /* PropertyAccessExpression */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 142 /* QualifiedName */) { + else if (entityName.kind === 143 /* QualifiedName */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -45286,20 +45376,20 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = (entityName.parent.kind === 158 /* TypeReference */ || entityName.parent.kind === 276 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */; + var meaning = (entityName.parent.kind === 159 /* TypeReference */ || entityName.parent.kind === 277 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */; return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.parent.kind === 252 /* JsxAttribute */) { + else if (entityName.parent.kind === 253 /* JsxAttribute */) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 157 /* TypePredicate */) { + if (entityName.parent.kind === 158 /* TypePredicate */) { return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */); } // Do we want to return undefined here? return undefined; } function getSymbolAtLocation(node) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } if (isInsideWithStatementBody(node)) { @@ -45313,12 +45403,12 @@ var ts; else if (ts.isLiteralComputedPropertyDeclarationName(node)) { return getSymbolOfNode(node.parent.parent); } - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 175 /* BindingElement */ && - node.parent.parent.kind === 173 /* ObjectBindingPattern */ && + else if (node.parent.kind === 176 /* BindingElement */ && + node.parent.parent.kind === 174 /* ObjectBindingPattern */ && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -45328,11 +45418,11 @@ var ts; } } switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); if (ts.isFunctionLike(container)) { var sig = getSignatureFromDeclaration(container); @@ -45341,15 +45431,15 @@ var ts; } } // falls through - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 168 /* ThisType */: + case 169 /* ThisType */: return getTypeFromTypeNode(node).symbol; - case 122 /* ConstructorKeyword */: + case 123 /* ConstructorKeyword */: // constructor keyword for an overload, should take us to the definition if it exist var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 151 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 152 /* Constructor */) { return constructorDeclaration.parent.symbol; } return undefined; @@ -45357,7 +45447,7 @@ var ts; // External module name in an import declaration if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 237 /* ImportDeclaration */ || node.parent.kind === 243 /* ExportDeclaration */) && + ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } @@ -45367,7 +45457,7 @@ var ts; // falls through case 8 /* NumericLiteral */: // index access - if (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { + if (node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { var objectType = getTypeOfExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -45384,7 +45474,7 @@ var ts; // The function returns a value symbol of an identifier in the short-hand property assignment. // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. - if (location && location.kind === 261 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 262 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */); } return undefined; @@ -45455,28 +45545,28 @@ var ts; // [ a ] from // [a] = [ some array ...] function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { - ts.Debug.assert(expr.kind === 177 /* ObjectLiteralExpression */ || expr.kind === 176 /* ArrayLiteralExpression */); + ts.Debug.assert(expr.kind === 178 /* ObjectLiteralExpression */ || expr.kind === 177 /* ArrayLiteralExpression */); // If this is from "for of" // for ( { a } of elems) { // } - if (expr.parent.kind === 215 /* ForOfStatement */) { + if (expr.parent.kind === 216 /* ForOfStatement */) { var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier); return checkDestructuringAssignment(expr, iteratedType || unknownType); } // If this is from "for" initializer // for ({a } = elems[0];.....) { } - if (expr.parent.kind === 193 /* BinaryExpression */) { + if (expr.parent.kind === 194 /* BinaryExpression */) { var iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || unknownType); } // If this is from nested object binding pattern // for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { - if (expr.parent.kind === 260 /* PropertyAssignment */) { + if (expr.parent.kind === 261 /* PropertyAssignment */) { var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); } // Array literal assignment - array destructuring pattern - ts.Debug.assert(expr.parent.kind === 176 /* ArrayLiteralExpression */); + ts.Debug.assert(expr.parent.kind === 177 /* ArrayLiteralExpression */); // [{ property1: p1, property2 }] = elems; var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType; @@ -45559,7 +45649,7 @@ var ts; if (!ts.isGeneratedIdentifier(node)) { node = ts.getParseTreeNode(node, ts.isIdentifier); if (node) { - var isPropertyName_1 = node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node; + var isPropertyName_1 = node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node; return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol; } } @@ -45616,7 +45706,7 @@ var ts; } var parentSymbol_1 = getParentOfSymbol(symbol); if (parentSymbol_1) { - if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 264 /* SourceFile */) { + if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 265 /* SourceFile */) { var symbolFile = parentSymbol_1.valueDeclaration; var referenceFile = ts.getSourceFileOfNode(node); // If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined. @@ -45669,7 +45759,7 @@ var ts; // they will not collide with anything var isDeclaredInLoop = nodeLinks_1.flags & 262144 /* BlockScopedBindingInLoop */; var inLoopInitializer = ts.isIterationStatement(container, /*lookInLabeledStatements*/ false); - var inLoopBodyBlock = container.kind === 206 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); + var inLoopBodyBlock = container.kind === 207 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { @@ -45710,18 +45800,18 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return node.expression - && node.expression.kind === 70 /* Identifier */ + && node.expression.kind === 71 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) : true; } @@ -45729,7 +45819,7 @@ var ts; } function isTopLevelValueImportEqualsWithEntityName(node) { node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration); - if (node === undefined || node.parent.kind !== 264 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node === undefined || node.parent.kind !== 265 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { // parent is not source file or it is not reference to internal module return false; } @@ -45796,15 +45886,15 @@ var ts; } function canHaveConstantValue(node) { switch (node.kind) { - case 263 /* EnumMember */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 264 /* EnumMember */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: return true; } return false; } function getConstantValue(node) { - if (node.kind === 263 /* EnumMember */) { + if (node.kind === 264 /* EnumMember */) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -46015,7 +46105,7 @@ var ts; // property access can only be used as values // qualified names can only be used as types\namespaces // identifiers are treated as values only if they appear in type queries - var meaning = (node.kind === 178 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node)) + var meaning = (node.kind === 179 /* PropertyAccessExpression */) || (node.kind === 71 /* Identifier */ && isInTypeQuery(node)) ? 107455 /* Value */ | 1048576 /* ExportValue */ : 793064 /* Type */ | 1920 /* Namespace */; var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true); @@ -46066,7 +46156,7 @@ var ts; break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 264 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 265 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } // check that at least one declaration of top level symbol originates from type declaration file @@ -46086,7 +46176,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 264 /* SourceFile */); + return ts.getDeclarationOfKind(moduleSymbol, 265 /* SourceFile */); } function initializeTypeChecker() { // Bind all source files and propagate errors @@ -46199,14 +46289,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 150 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { + if (node.kind === 151 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */) { + else if (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -46223,28 +46313,28 @@ var ts; var flags = 0 /* None */; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 130 /* ReadonlyKeyword */) { - if (node.kind === 147 /* PropertySignature */ || node.kind === 149 /* MethodSignature */) { + if (modifier.kind !== 131 /* ReadonlyKeyword */) { + if (node.kind === 148 /* PropertySignature */ || node.kind === 150 /* MethodSignature */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); } - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 75 /* ConstKeyword */: - if (node.kind !== 231 /* EnumDeclaration */ && node.parent.kind === 228 /* ClassDeclaration */) { - return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75 /* ConstKeyword */)); + case 76 /* ConstKeyword */: + if (node.kind !== 232 /* EnumDeclaration */ && node.parent.kind === 229 /* ClassDeclaration */) { + return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(76 /* ConstKeyword */)); } break; - case 113 /* PublicKeyword */: - case 112 /* ProtectedKeyword */: - case 111 /* PrivateKeyword */: + case 114 /* PublicKeyword */: + case 113 /* ProtectedKeyword */: + case 112 /* PrivateKeyword */: var text = visibilityToString(ts.modifierToFlag(modifier.kind)); - if (modifier.kind === 112 /* ProtectedKeyword */) { + if (modifier.kind === 113 /* ProtectedKeyword */) { lastProtected = modifier; } - else if (modifier.kind === 111 /* PrivateKeyword */) { + else if (modifier.kind === 112 /* PrivateKeyword */) { lastPrivate = modifier; } if (flags & 28 /* AccessibilityModifier */) { @@ -46259,11 +46349,11 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + else if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128 /* Abstract */) { - if (modifier.kind === 111 /* PrivateKeyword */) { + if (modifier.kind === 112 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -46272,7 +46362,7 @@ var ts; } flags |= ts.modifierToFlag(modifier.kind); break; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } @@ -46282,10 +46372,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + else if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128 /* Abstract */) { @@ -46294,18 +46384,18 @@ var ts; flags |= 32 /* Static */; lastStatic = modifier; break; - case 130 /* ReadonlyKeyword */: + case 131 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); } - else if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */ && node.kind !== 156 /* IndexSignature */ && node.kind !== 145 /* Parameter */) { + else if (node.kind !== 149 /* PropertyDeclaration */ && node.kind !== 148 /* PropertySignature */ && node.kind !== 157 /* IndexSignature */ && node.kind !== 146 /* Parameter */) { // If node.kind === SyntaxKind.Parameter, checkParameter report an error if it's not a parameter property. return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; lastReadonly = modifier; break; - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: if (flags & 1 /* Export */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } @@ -46318,45 +46408,45 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 123 /* DeclareKeyword */: + case 124 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233 /* ModuleBlock */) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 234 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 116 /* AbstractKeyword */: + case 117 /* AbstractKeyword */: if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 228 /* ClassDeclaration */) { - if (node.kind !== 150 /* MethodDeclaration */ && - node.kind !== 148 /* PropertyDeclaration */ && - node.kind !== 152 /* GetAccessor */ && - node.kind !== 153 /* SetAccessor */) { + if (node.kind !== 229 /* ClassDeclaration */) { + if (node.kind !== 151 /* MethodDeclaration */ && + node.kind !== 149 /* PropertyDeclaration */ && + node.kind !== 153 /* GetAccessor */ && + node.kind !== 154 /* SetAccessor */) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 228 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) { + if (!(node.parent.kind === 229 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -46368,14 +46458,14 @@ var ts; } flags |= 128 /* Abstract */; break; - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256 /* Async */; @@ -46383,7 +46473,7 @@ var ts; break; } } - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -46398,13 +46488,13 @@ var ts; } return; } - else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + else if ((node.kind === 238 /* ImportDeclaration */ || node.kind === 237 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) { + else if (node.kind === 146 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); } - else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { + else if (node.kind === 146 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256 /* Async */) { @@ -46424,38 +46514,38 @@ var ts; } function shouldReportBadModifier(node) { switch (node.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 156 /* IndexSignature */: - case 232 /* ModuleDeclaration */: - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: - case 242 /* ExportAssignment */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 145 /* Parameter */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 157 /* IndexSignature */: + case 233 /* ModuleDeclaration */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 146 /* Parameter */: return false; default: - if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return false; } switch (node.kind) { - case 227 /* FunctionDeclaration */: - return nodeHasAnyModifiersExcept(node, 119 /* AsyncKeyword */); - case 228 /* ClassDeclaration */: - return nodeHasAnyModifiersExcept(node, 116 /* AbstractKeyword */); - case 229 /* InterfaceDeclaration */: - case 207 /* VariableStatement */: - case 230 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + return nodeHasAnyModifiersExcept(node, 120 /* AsyncKeyword */); + case 229 /* ClassDeclaration */: + return nodeHasAnyModifiersExcept(node, 117 /* AbstractKeyword */); + case 230 /* InterfaceDeclaration */: + case 208 /* VariableStatement */: + case 231 /* TypeAliasDeclaration */: return true; - case 231 /* EnumDeclaration */: - return nodeHasAnyModifiersExcept(node, 75 /* ConstKeyword */); + case 232 /* EnumDeclaration */: + return nodeHasAnyModifiersExcept(node, 76 /* ConstKeyword */); default: ts.Debug.fail(); return false; @@ -46467,10 +46557,10 @@ var ts; } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 150 /* MethodDeclaration */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -46534,7 +46624,7 @@ var ts; return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 186 /* ArrowFunction */) { + if (node.kind === 187 /* ArrowFunction */) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -46569,7 +46659,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 135 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) { + if (parameter.type.kind !== 136 /* StringKeyword */ && parameter.type.kind !== 133 /* NumberKeyword */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -46597,7 +46687,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_4 = args; _i < args_4.length; _i++) { var arg = args_4[_i]; - if (arg.kind === 199 /* OmittedExpression */) { + if (arg.kind === 200 /* OmittedExpression */) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -46623,7 +46713,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84 /* ExtendsKeyword */) { + if (heritageClause.token === 85 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } @@ -46636,7 +46726,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107 /* ImplementsKeyword */); + ts.Debug.assert(heritageClause.token === 108 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -46652,14 +46742,14 @@ var ts; if (node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84 /* ExtendsKeyword */) { + if (heritageClause.token === 85 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107 /* ImplementsKeyword */); + ts.Debug.assert(heritageClause.token === 108 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } // Grammar checking heritageClause inside class declaration @@ -46670,19 +46760,19 @@ var ts; } function checkGrammarComputedPropertyName(node) { // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 143 /* ComputedPropertyName */) { + if (node.kind !== 144 /* ComputedPropertyName */) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 193 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) { + if (computedPropertyName.expression.kind === 194 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 26 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 227 /* FunctionDeclaration */ || - node.kind === 185 /* FunctionExpression */ || - node.kind === 150 /* MethodDeclaration */); + ts.Debug.assert(node.kind === 228 /* FunctionDeclaration */ || + node.kind === 186 /* FunctionExpression */ || + node.kind === 151 /* MethodDeclaration */); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -46704,15 +46794,15 @@ var ts; var GetOrSetAccessor = GetAccessor | SetAccessor; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 /* SpreadAssignment */) { + if (prop.kind === 263 /* SpreadAssignment */) { continue; } var name = prop.name; - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { // If the name is not a ComputedPropertyName, the grammar checking will skip it checkGrammarComputedPropertyName(name); } - if (prop.kind === 261 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 262 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); @@ -46721,7 +46811,7 @@ var ts; if (prop.modifiers) { for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { var mod = _c[_b]; - if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 150 /* MethodDeclaration */) { + if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 151 /* MethodDeclaration */) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } } @@ -46735,7 +46825,7 @@ var ts; // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields var currentKind = void 0; - if (prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */) { + if (prop.kind === 261 /* PropertyAssignment */ || prop.kind === 262 /* ShorthandPropertyAssignment */) { // Grammar checking for computedPropertyName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -46743,13 +46833,13 @@ var ts; } currentKind = Property; } - else if (prop.kind === 150 /* MethodDeclaration */) { + else if (prop.kind === 151 /* MethodDeclaration */) { currentKind = Property; } - else if (prop.kind === 152 /* GetAccessor */) { + else if (prop.kind === 153 /* GetAccessor */) { currentKind = GetAccessor; } - else if (prop.kind === 153 /* SetAccessor */) { + else if (prop.kind === 154 /* SetAccessor */) { currentKind = SetAccessor; } else { @@ -46785,7 +46875,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 254 /* JsxSpreadAttribute */) { + if (attr.kind === 255 /* JsxSpreadAttribute */) { continue; } var jsxAttr = attr; @@ -46797,7 +46887,7 @@ var ts; return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 255 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 256 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -46806,12 +46896,12 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 215 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 216 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & 16384 /* AwaitContext */) === 0 /* None */) { return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); } } - if (forInOrOfStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 227 /* VariableDeclarationList */) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -46826,20 +46916,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -46866,11 +46956,11 @@ var ts; return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 152 /* GetAccessor */ ? + return grammarErrorOnNode(accessor.name, kind === 153 /* GetAccessor */ ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 153 /* SetAccessor */) { + else if (kind === 154 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -46893,10 +46983,10 @@ var ts; * A set accessor has one parameter or a `this` parameter and one more parameter. */ function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 153 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 153 /* GetAccessor */ ? 1 : 2)) { return ts.getThisParameter(accessor); } } @@ -46911,7 +47001,7 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 177 /* ObjectLiteralExpression */) { + if (node.parent.kind === 178 /* ObjectLiteralExpression */) { if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } @@ -46932,10 +47022,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 229 /* InterfaceDeclaration */) { + else if (node.parent.kind === 230 /* InterfaceDeclaration */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 162 /* TypeLiteral */) { + else if (node.parent.kind === 163 /* TypeLiteral */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -46946,11 +47036,11 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: if (node.label && current.label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 216 /* ContinueStatement */ + var isMisplacedContinueLabel = node.kind === 217 /* ContinueStatement */ && !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -46958,8 +47048,8 @@ var ts; return false; } break; - case 220 /* SwitchStatement */: - if (node.kind === 217 /* BreakStatement */ && !node.label) { + case 221 /* SwitchStatement */: + if (node.kind === 218 /* BreakStatement */ && !node.label) { // unlabeled break within switch statement - ok return false; } @@ -46974,13 +47064,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 217 /* BreakStatement */ + var message = node.kind === 218 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 217 /* BreakStatement */ + var message = node.kind === 218 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -46992,7 +47082,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } - if (node.name.kind === 174 /* ArrayBindingPattern */ || node.name.kind === 173 /* ObjectBindingPattern */) { + if (node.name.kind === 175 /* ArrayBindingPattern */ || node.name.kind === 174 /* ObjectBindingPattern */) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -47003,11 +47093,11 @@ var ts; } function isStringOrNumberLiteralExpression(expr) { return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ || - expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ && + expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 214 /* ForInStatement */ && node.parent.parent.kind !== 215 /* ForOfStatement */) { + if (node.parent.parent.kind !== 215 /* ForInStatement */ && node.parent.parent.kind !== 216 /* ForOfStatement */) { if (ts.isInAmbientContext(node)) { if (node.initializer) { if (ts.isConst(node) && !node.type) { @@ -47050,7 +47140,7 @@ var ts; return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { if (ts.unescapeIdentifier(name.text) === "__esModule") { return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); } @@ -47066,8 +47156,8 @@ var ts; } } function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 70 /* Identifier */) { - if (name.originalKeywordKind === 109 /* LetKeyword */) { + if (name.kind === 71 /* Identifier */) { + if (name.originalKeywordKind === 110 /* LetKeyword */) { return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); } } @@ -47092,15 +47182,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 219 /* WithStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return false; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -47116,7 +47206,7 @@ var ts; } } function checkGrammarMetaProperty(node) { - if (node.keywordToken === 93 /* NewKeyword */) { + if (node.keywordToken === 94 /* NewKeyword */) { if (node.name.text !== "target") { return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target"); } @@ -47162,7 +47252,7 @@ var ts; return true; } } - else if (node.parent.kind === 229 /* InterfaceDeclaration */) { + else if (node.parent.kind === 230 /* InterfaceDeclaration */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -47170,7 +47260,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 162 /* TypeLiteral */) { + else if (node.parent.kind === 163 /* TypeLiteral */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -47195,13 +47285,13 @@ var ts; // export_opt AmbientDeclaration // // TODO: The spec needs to be amended to reflect this grammar. - if (node.kind === 229 /* InterfaceDeclaration */ || - node.kind === 230 /* TypeAliasDeclaration */ || - node.kind === 237 /* ImportDeclaration */ || - node.kind === 236 /* ImportEqualsDeclaration */ || - node.kind === 243 /* ExportDeclaration */ || - node.kind === 242 /* ExportAssignment */ || - node.kind === 235 /* NamespaceExportDeclaration */ || + if (node.kind === 230 /* InterfaceDeclaration */ || + node.kind === 231 /* TypeAliasDeclaration */ || + node.kind === 238 /* ImportDeclaration */ || + node.kind === 237 /* ImportEqualsDeclaration */ || + node.kind === 244 /* ExportDeclaration */ || + node.kind === 243 /* ExportAssignment */ || + node.kind === 236 /* NamespaceExportDeclaration */ || ts.getModifierFlags(node) & (2 /* Ambient */ | 1 /* Export */ | 512 /* Default */)) { return false; } @@ -47210,7 +47300,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 207 /* VariableStatement */) { + if (ts.isDeclaration(decl) || decl.kind === 208 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -47236,7 +47326,7 @@ var ts; // to prevent noisiness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // - if (node.parent.kind === 206 /* Block */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 207 /* Block */ || node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links_1.hasReportedStatementInAmbientContext) { @@ -47257,14 +47347,14 @@ var ts; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 172 /* LiteralType */)) { + else if (ts.isChildOfNodeWithKind(node, 173 /* LiteralType */)) { diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 263 /* EnumMember */)) { + else if (ts.isChildOfNodeWithKind(node, 264 /* EnumMember */)) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { - var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37 /* MinusToken */; + var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 38 /* MinusToken */; var literal = (withMinus ? "-" : "") + "0o" + node.text; return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal); } @@ -47423,260 +47513,260 @@ var ts; } var kind = node.kind; // No need to visit nodes with no children. - if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */) || kind === 168 /* ThisType */) { + if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */) || kind === 169 /* ThisType */) { return node; } switch (node.kind) { - case 205 /* SemicolonClassElement */: - case 208 /* EmptyStatement */: - case 199 /* OmittedExpression */: - case 224 /* DebuggerStatement */: - case 297 /* EndOfDeclarationMarker */: - case 246 /* MissingDeclaration */: + case 206 /* SemicolonClassElement */: + case 209 /* EmptyStatement */: + case 200 /* OmittedExpression */: + case 225 /* DebuggerStatement */: + case 298 /* EndOfDeclarationMarker */: + case 247 /* MissingDeclaration */: // No need to visit nodes with no children. return node; // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression)); // Signatures and Signature Elements - case 159 /* FunctionType */: + case 160 /* FunctionType */: return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 160 /* ConstructorType */: + case 161 /* ConstructorType */: return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 154 /* CallSignature */: + case 155 /* CallSignature */: return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 149 /* MethodSignature */: + case 150 /* MethodSignature */: return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken)); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 145 /* Parameter */: + case 146 /* Parameter */: return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 146 /* Decorator */: + case 147 /* Decorator */: return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression)); // Types - case 158 /* TypeReference */: + case 159 /* TypeReference */: return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode)); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); - case 164 /* TupleType */: + case 165 /* TupleType */: return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: throw ts.Debug.fail("not implemented."); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); - case 171 /* MappedType */: + case 172 /* MappedType */: return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression)); // Type Declarations - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode)); // Type members - case 147 /* PropertySignature */: + case 148 /* PropertySignature */: return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 151 /* Constructor */: + case 152 /* Constructor */: return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); // Binding patterns - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); // Expression - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression)); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); - case 201 /* AsExpression */: + case 202 /* AsExpression */: return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression)); // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail)); // Element - case 206 /* Block */: + case 207 /* Block */: return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList)); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock)); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause)); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); - case 240 /* NamedImports */: + case 241 /* NamedImports */: return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); - case 244 /* NamedExports */: + case 245 /* NamedExports */: return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement)); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike)); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression)); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); // Top-level nodes - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); default: return node; @@ -47717,51 +47807,51 @@ var ts; var cbNodes = cbNodeArray || cbNode; var kind = node.kind; // No need to visit nodes with no children. - if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */)) { + if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */)) { return initial; } // We do not yet support types. - if ((kind >= 157 /* TypePredicate */ && kind <= 172 /* LiteralType */)) { + if ((kind >= 158 /* TypePredicate */ && kind <= 173 /* LiteralType */)) { return initial; } var result = initial; switch (node.kind) { // Leaf nodes - case 205 /* SemicolonClassElement */: - case 208 /* EmptyStatement */: - case 199 /* OmittedExpression */: - case 224 /* DebuggerStatement */: - case 294 /* NotEmittedStatement */: + case 206 /* SemicolonClassElement */: + case 209 /* EmptyStatement */: + case 200 /* OmittedExpression */: + case 225 /* DebuggerStatement */: + case 295 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: result = reduceNode(node.expression, cbNode, result); break; // Signature elements - case 145 /* Parameter */: + case 146 /* Parameter */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 146 /* Decorator */: + case 147 /* Decorator */: result = reduceNode(node.expression, cbNode, result); break; // Type member - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47770,12 +47860,12 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 151 /* Constructor */: + case 152 /* Constructor */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47783,7 +47873,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47791,49 +47881,49 @@ var ts; result = reduceNode(node.body, cbNode, result); break; // Binding patterns - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: result = reduceNodes(node.elements, cbNodes, result); break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; // Expression - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: result = reduceNodes(node.elements, cbNodes, result); break; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: result = reduceNodes(node.properties, cbNodes, result); break; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.argumentExpression, cbNode, result); break; - case 180 /* CallExpression */: + case 181 /* CallExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 181 /* NewExpression */: + case 182 /* NewExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: result = reduceNode(node.tag, cbNode, result); result = reduceNode(node.template, cbNode, result); break; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: result = reduceNode(node.type, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); @@ -47841,126 +47931,126 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 184 /* ParenthesizedExpression */: - case 187 /* DeleteExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 190 /* AwaitExpression */: - case 196 /* YieldExpression */: - case 197 /* SpreadElement */: - case 202 /* NonNullExpression */: + case 185 /* ParenthesizedExpression */: + case 188 /* DeleteExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 191 /* AwaitExpression */: + case 197 /* YieldExpression */: + case 198 /* SpreadElement */: + case 203 /* NonNullExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: result = reduceNode(node.operand, cbNode, result); break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.whenTrue, cbNode, result); result = reduceNode(node.whenFalse, cbNode, result); break; - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: result = reduceNode(node.head, cbNode, result); result = reduceNodes(node.templateSpans, cbNodes, result); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); break; - case 201 /* AsExpression */: + case 202 /* AsExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.type, cbNode, result); break; - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: result = reduceNode(node.expression, cbNode, result); break; // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.literal, cbNode, result); break; // Element - case 206 /* Block */: + case 207 /* Block */: result = reduceNodes(node.statements, cbNodes, result); break; - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.declarationList, cbNode, result); break; - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: result = reduceNode(node.expression, cbNode, result); break; - case 210 /* IfStatement */: + case 211 /* IfStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.thenStatement, cbNode, result); result = reduceNode(node.elseStatement, cbNode, result); break; - case 211 /* DoStatement */: + case 212 /* DoStatement */: result = reduceNode(node.statement, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 212 /* WhileStatement */: - case 219 /* WithStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 213 /* ForStatement */: + case 214 /* ForStatement */: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.incrementor, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 218 /* ReturnStatement */: - case 222 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 223 /* ThrowStatement */: result = reduceNode(node.expression, cbNode, result); break; - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.caseBlock, cbNode, result); break; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: result = reduceNode(node.label, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 223 /* TryStatement */: + case 224 /* TryStatement */: result = reduceNode(node.tryBlock, cbNode, result); result = reduceNode(node.catchClause, cbNode, result); result = reduceNode(node.finallyBlock, cbNode, result); break; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: result = reduceNodes(node.declarations, cbNodes, result); break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47969,7 +48059,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47977,131 +48067,131 @@ var ts; result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.members, cbNodes, result); break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: result = reduceNodes(node.statements, cbNodes, result); break; - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: result = reduceNodes(node.clauses, cbNodes, result); break; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.moduleReference, cbNode, result); break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.importClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 238 /* ImportClause */: + case 239 /* ImportClause */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.namedBindings, cbNode, result); break; - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: result = reduceNode(node.name, cbNode, result); break; - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: result = reduceNodes(node.elements, cbNodes, result); break; - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.exportClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: result = reduceNode(node.expression, cbNode, result); break; // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: result = reduceNode(node.openingElement, cbNode, result); result = ts.reduceLeft(node.children, cbNode, result); result = reduceNode(node.closingElement, cbNode, result); break; - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: result = reduceNode(node.tagName, cbNode, result); result = reduceNode(node.attributes, cbNode, result); break; - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: result = reduceNodes(node.properties, cbNodes, result); break; - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: result = reduceNode(node.tagName, cbNode, result); break; - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: result = reduceNode(node.expression, cbNode, result); break; - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: result = reduceNode(node.expression, cbNode, result); break; // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: result = reduceNode(node.expression, cbNode, result); // falls through - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: result = reduceNodes(node.statements, cbNodes, result); break; - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: result = reduceNodes(node.types, cbNodes, result); break; - case 259 /* CatchClause */: + case 260 /* CatchClause */: result = reduceNode(node.variableDeclaration, cbNode, result); result = reduceNode(node.block, cbNode, result); break; // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.objectAssignmentInitializer, cbNode, result); break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: result = reduceNode(node.expression, cbNode, result); break; // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; // Top-level nodes - case 264 /* SourceFile */: + case 265 /* SourceFile */: result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; default: @@ -48174,7 +48264,7 @@ var ts; function aggregateTransformFlagsForSubtree(node) { // We do not transform ambient declarations or types, so there is no need to // recursively aggregate transform flags. - if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 200 /* ExpressionWithTypeArguments */)) { + if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 201 /* ExpressionWithTypeArguments */)) { return 0 /* None */; } // Aggregate the transform flags of each child. @@ -48696,8 +48786,8 @@ var ts; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; // Enable substitution for property/element access to emit const enum values. - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // These variables contain state that changes as we descend into the tree. var currentSourceFile; var currentNamespace; @@ -48761,15 +48851,15 @@ var ts; */ function onBeforeVisitNode(node) { switch (node.kind) { - case 264 /* SourceFile */: - case 234 /* CaseBlock */: - case 233 /* ModuleBlock */: - case 206 /* Block */: + case 265 /* SourceFile */: + case 235 /* CaseBlock */: + case 234 /* ModuleBlock */: + case 207 /* Block */: currentScope = node; currentScopeFirstDeclarationsOfName = undefined; break; - case 228 /* ClassDeclaration */: - case 227 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 228 /* FunctionDeclaration */: if (ts.hasModifier(node, 2 /* Ambient */)) { break; } @@ -48816,13 +48906,13 @@ var ts; */ function sourceElementVisitorWorker(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitExportDeclaration(node); default: return visitorWorker(node); @@ -48842,11 +48932,11 @@ var ts; * @param node The node to visit. */ function namespaceElementVisitorWorker(node) { - if (node.kind === 243 /* ExportDeclaration */ || - node.kind === 237 /* ImportDeclaration */ || - node.kind === 238 /* ImportClause */ || - (node.kind === 236 /* ImportEqualsDeclaration */ && - node.moduleReference.kind === 247 /* ExternalModuleReference */)) { + if (node.kind === 244 /* ExportDeclaration */ || + node.kind === 238 /* ImportDeclaration */ || + node.kind === 239 /* ImportClause */ || + (node.kind === 237 /* ImportEqualsDeclaration */ && + node.moduleReference.kind === 248 /* ExternalModuleReference */)) { // do not emit ES6 imports and exports since they are illegal inside a namespace return undefined; } @@ -48876,19 +48966,19 @@ var ts; */ function classElementVisitorWorker(node) { switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: // TypeScript constructors are transformed in `visitClassDeclaration`. // We elide them here as `visitorWorker` checks transform flags, which could // erronously include an ES6 constructor without TypeScript syntax. return undefined; - case 148 /* PropertyDeclaration */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: + case 149 /* PropertyDeclaration */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: // Fallback to the default visit behavior. return visitorWorker(node); - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: return node; default: ts.Debug.failBadSyntaxKind(node); @@ -48899,7 +48989,7 @@ var ts; if (ts.modifierToFlag(node.kind) & 2270 /* TypeScriptModifier */) { return undefined; } - else if (currentNamespace && node.kind === 83 /* ExportKeyword */) { + else if (currentNamespace && node.kind === 84 /* ExportKeyword */) { return undefined; } return node; @@ -48916,59 +49006,59 @@ var ts; return ts.createNotEmittedStatement(node); } switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: // ES6 export and default modifiers are elided when inside a namespace. return currentNamespace ? undefined : node; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 116 /* AbstractKeyword */: - case 75 /* ConstKeyword */: - case 123 /* DeclareKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 117 /* AbstractKeyword */: + case 76 /* ConstKeyword */: + case 124 /* DeclareKeyword */: + case 131 /* ReadonlyKeyword */: // TypeScript accessibility and readonly modifiers are elided. - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 162 /* TypeLiteral */: - case 157 /* TypePredicate */: - case 144 /* TypeParameter */: - case 118 /* AnyKeyword */: - case 121 /* BooleanKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 104 /* VoidKeyword */: - case 136 /* SymbolKeyword */: - case 160 /* ConstructorType */: - case 159 /* FunctionType */: - case 161 /* TypeQuery */: - case 158 /* TypeReference */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: - case 168 /* ThisType */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 172 /* LiteralType */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 163 /* TypeLiteral */: + case 158 /* TypePredicate */: + case 145 /* TypeParameter */: + case 119 /* AnyKeyword */: + case 122 /* BooleanKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 105 /* VoidKeyword */: + case 137 /* SymbolKeyword */: + case 161 /* ConstructorType */: + case 160 /* FunctionType */: + case 162 /* TypeQuery */: + case 159 /* TypeReference */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: + case 169 /* ThisType */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 173 /* LiteralType */: // TypeScript type nodes are elided. - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // TypeScript index signatures are elided. - case 146 /* Decorator */: + case 147 /* Decorator */: // TypeScript decorators are elided. They will be emitted as part of visitClassDeclaration. - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: // TypeScript type-only declarations are elided. - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // TypeScript property declarations are elided. return undefined; - case 151 /* Constructor */: + case 152 /* Constructor */: return visitConstructor(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: // TypeScript interfaces are elided, but some comments may be preserved. // See the implementation of `getLeadingComments` in comments.ts for more details. return ts.createNotEmittedStatement(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: // This is a class declaration with TypeScript syntax extensions. // // TypeScript class syntax extensions include: @@ -48979,7 +49069,7 @@ var ts; // - index signatures // - method overload signatures return visitClassDeclaration(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: // This is a class expression with TypeScript syntax extensions. // // TypeScript class syntax extensions include: @@ -48990,35 +49080,35 @@ var ts; // - index signatures // - method overload signatures return visitClassExpression(node); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: // This is a heritage clause with TypeScript syntax extensions. // // TypeScript heritage clause extensions include: // - `implements` clause return visitHeritageClause(node); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: // TypeScript supports type arguments on an expression in an `extends` heritage clause. return visitExpressionWithTypeArguments(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: // TypeScript method declarations may have decorators, modifiers // or type annotations. return visitMethodDeclaration(node); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: // Get Accessors can have TypeScript modifiers, decorators, and type annotations. return visitGetAccessor(node); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: // Set Accessors can have TypeScript modifiers and type annotations. return visitSetAccessor(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: // Typescript function declarations can have modifiers, decorators, and type annotations. return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: // TypeScript function expressions can have modifiers and type annotations. return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: // TypeScript arrow functions can have modifiers and type annotations. return visitArrowFunction(node); - case 145 /* Parameter */: + case 146 /* Parameter */: // This is a parameter declaration with TypeScript syntax extensions. // // TypeScript parameter declaration syntax extensions include: @@ -49028,33 +49118,33 @@ var ts; // - type annotations // - this parameters return visitParameter(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: // ParenthesizedExpressions are TypeScript if their expression is a // TypeAssertion or AsExpression return visitParenthesizedExpression(node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: // TypeScript type assertions are removed, but their subtrees are preserved. return visitAssertionExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: // TypeScript non-null expressions are removed, but their subtrees are preserved. return visitNonNullExpression(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: // TypeScript enum declarations do not exist in ES6 and must be rewritten. return visitEnumDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // TypeScript namespace exports for variable statements must be transformed. return visitVariableStatement(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // TypeScript namespace declarations must be transformed. return visitModuleDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // TypeScript namespace or external module import. return visitImportEqualsDeclaration(node); default: @@ -49303,7 +49393,7 @@ var ts; function visitClassExpression(node) { var staticProperties = getInitializedProperties(node, /*isStatic*/ true); var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84 /* ExtendsKeyword */; })); + var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 85 /* ExtendsKeyword */; })); var classExpression = ts.createClassExpression( /*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, heritageClauses, members); @@ -49471,7 +49561,7 @@ var ts; return index; } var statement = statements[index]; - if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { result.push(ts.visitNode(statement, visitor, ts.isStatement)); return index + 1; } @@ -49542,7 +49632,7 @@ var ts; * @param isStatic A value indicating whether the member should be a static or instance member. */ function isInitializedProperty(member, isStatic) { - return member.kind === 148 /* PropertyDeclaration */ + return member.kind === 149 /* PropertyDeclaration */ && isStatic === ts.hasModifier(member, 32 /* Static */) && member.initializer !== undefined; } @@ -49677,12 +49767,12 @@ var ts; */ function getAllDecoratorsOfClassElement(node, member) { switch (member.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return getAllDecoratorsOfAccessors(node, member); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return undefined; @@ -49835,7 +49925,7 @@ var ts; var prefix = getClassMemberPrefix(node, member); var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true); var descriptor = languageVersion > 0 /* ES3 */ - ? member.kind === 148 /* PropertyDeclaration */ + ? member.kind === 149 /* PropertyDeclaration */ ? ts.createVoidZero() : ts.createNull() : undefined; @@ -49932,13 +50022,13 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { var properties = void 0; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node)))); } if (properties) { decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*multiLine*/ true))); @@ -49954,10 +50044,10 @@ var ts; */ function shouldAddTypeMetadata(node) { var kind = node.kind; - return kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 148 /* PropertyDeclaration */; + return kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 149 /* PropertyDeclaration */; } /** * Determines whether to emit the "design:returntype" metadata based on the node's kind. @@ -49967,7 +50057,7 @@ var ts; * @param node The node to test. */ function shouldAddReturnTypeMetadata(node) { - return node.kind === 150 /* MethodDeclaration */; + return node.kind === 151 /* MethodDeclaration */; } /** * Determines whether to emit the "design:paramtypes" metadata based on the node's kind. @@ -49978,12 +50068,12 @@ var ts; */ function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.getFirstConstructorWithBody(node) !== undefined; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return true; } return false; @@ -49995,15 +50085,15 @@ var ts; */ function serializeTypeOfNode(node) { switch (node.kind) { - case 148 /* PropertyDeclaration */: - case 145 /* Parameter */: - case 152 /* GetAccessor */: + case 149 /* PropertyDeclaration */: + case 146 /* Parameter */: + case 153 /* GetAccessor */: return serializeTypeNode(node.type); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 150 /* MethodDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 151 /* MethodDeclaration */: return ts.createIdentifier("Function"); default: return ts.createVoidZero(); @@ -50040,7 +50130,7 @@ var ts; return ts.createArrayLiteral(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 152 /* GetAccessor */) { + if (container && node.kind === 153 /* GetAccessor */) { var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor; if (setAccessor) { return setAccessor.parameters; @@ -50085,58 +50175,58 @@ var ts; return ts.createIdentifier("Object"); } switch (node.kind) { - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: return ts.createVoidZero(); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return serializeTypeNode(node.type); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return ts.createIdentifier("Function"); - case 163 /* ArrayType */: - case 164 /* TupleType */: + case 164 /* ArrayType */: + case 165 /* TupleType */: return ts.createIdentifier("Array"); - case 157 /* TypePredicate */: - case 121 /* BooleanKeyword */: + case 158 /* TypePredicate */: + case 122 /* BooleanKeyword */: return ts.createIdentifier("Boolean"); - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: return ts.createIdentifier("String"); - case 133 /* ObjectKeyword */: + case 134 /* ObjectKeyword */: return ts.createIdentifier("Object"); - case 172 /* LiteralType */: + case 173 /* LiteralType */: switch (node.literal.kind) { case 9 /* StringLiteral */: return ts.createIdentifier("String"); case 8 /* NumericLiteral */: return ts.createIdentifier("Number"); - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return ts.createIdentifier("Boolean"); default: ts.Debug.failBadSyntaxKind(node.literal); break; } break; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: return ts.createIdentifier("Number"); - case 136 /* SymbolKeyword */: + case 137 /* SymbolKeyword */: return languageVersion < 2 /* ES2015 */ ? getGlobalSymbolNameWithFallback() : ts.createIdentifier("Symbol"); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return serializeTypeReferenceNode(node); - case 166 /* IntersectionType */: - case 165 /* UnionType */: + case 167 /* IntersectionType */: + case 166 /* UnionType */: return serializeUnionOrIntersectionType(node); - case 161 /* TypeQuery */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 162 /* TypeLiteral */: - case 118 /* AnyKeyword */: - case 168 /* ThisType */: + case 162 /* TypeQuery */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 163 /* TypeLiteral */: + case 119 /* AnyKeyword */: + case 169 /* ThisType */: break; default: ts.Debug.failBadSyntaxKind(node); @@ -50221,7 +50311,7 @@ var ts; */ function serializeEntityNameAsExpression(node, useFallback) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: // Create a clone of the name with a new parent, and treat it as if it were // a source tree node for the purposes of the checker. var name = ts.getMutableClone(node); @@ -50232,7 +50322,7 @@ var ts; return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name); } return name; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return serializeQualifiedNameAsExpression(node, useFallback); } } @@ -50245,7 +50335,7 @@ var ts; */ function serializeQualifiedNameAsExpression(node, useFallback) { var left; - if (node.left.kind === 70 /* Identifier */) { + if (node.left.kind === 71 /* Identifier */) { left = serializeEntityNameAsExpression(node.left, useFallback); } else if (useFallback) { @@ -50316,9 +50406,9 @@ var ts; * @param node The HeritageClause to transform. */ function visitHeritageClause(node) { - if (node.token === 84 /* ExtendsKeyword */) { + if (node.token === 85 /* ExtendsKeyword */) { var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1); - return ts.setTextRange(ts.createHeritageClause(84 /* ExtendsKeyword */, types), node); + return ts.setTextRange(ts.createHeritageClause(85 /* ExtendsKeyword */, types), node); } return undefined; } @@ -50772,7 +50862,7 @@ var ts; recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { // Adjust the source map emit to match the old emitter. - if (node.kind === 231 /* EnumDeclaration */) { + if (node.kind === 232 /* EnumDeclaration */) { ts.setSourceMapRange(statement.declarationList, node); } else { @@ -50891,7 +50981,7 @@ var ts; var statementsLocation; var blockLocation; var body = node.body; - if (body.kind === 233 /* ModuleBlock */) { + if (body.kind === 234 /* ModuleBlock */) { saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); }); statementsLocation = body.statements; blockLocation = body; @@ -50937,13 +51027,13 @@ var ts; // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); // We only want to emit comment on the namespace which contains block body itself, not the containing namespaces. - if (body.kind !== 233 /* ModuleBlock */) { + if (body.kind !== 234 /* ModuleBlock */) { ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 233 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -50984,7 +51074,7 @@ var ts; * @param node The named import bindings node. */ function visitNamedImportBindings(node) { - if (node.kind === 239 /* NamespaceImport */) { + if (node.kind === 240 /* NamespaceImport */) { // Elide a namespace import if it is not referenced. return resolver.isReferencedAliasDeclaration(node) ? node : undefined; } @@ -51197,7 +51287,7 @@ var ts; function enableSubstitutionForNonQualifiedEnumMembers() { if ((enabledSubstitutions & 8 /* NonQualifiedEnumMembers */) === 0) { enabledSubstitutions |= 8 /* NonQualifiedEnumMembers */; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } } function enableSubstitutionForClassAliases() { @@ -51205,7 +51295,7 @@ var ts; enabledSubstitutions |= 1 /* ClassAliases */; // We need to enable substitutions for identifiers. This allows us to // substitute class names inside of a class declaration. - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); // Keep track of class aliases. classAliases = []; } @@ -51215,17 +51305,17 @@ var ts; enabledSubstitutions |= 2 /* NamespaceExports */; // We need to enable substitutions for identifiers and shorthand property assignments. This allows us to // substitute the names of exported members of a namespace. - context.enableSubstitution(70 /* Identifier */); - context.enableSubstitution(261 /* ShorthandPropertyAssignment */); + context.enableSubstitution(71 /* Identifier */); + context.enableSubstitution(262 /* ShorthandPropertyAssignment */); // We need to be notified when entering and exiting namespaces. - context.enableEmitNotification(232 /* ModuleDeclaration */); + context.enableEmitNotification(233 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return ts.getOriginalNode(node).kind === 232 /* ModuleDeclaration */; + return ts.getOriginalNode(node).kind === 233 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return ts.getOriginalNode(node).kind === 231 /* EnumDeclaration */; + return ts.getOriginalNode(node).kind === 232 /* EnumDeclaration */; } /** * Hook for node emit. @@ -51284,11 +51374,11 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -51326,9 +51416,9 @@ var ts; // If we are nested within a namespace declaration, we may need to qualifiy // an identifier that is exported from a merged namespace. var container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false); - if (container && container.kind !== 264 /* SourceFile */) { - var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 232 /* ModuleDeclaration */) || - (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 231 /* EnumDeclaration */); + if (container && container.kind !== 265 /* SourceFile */) { + var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 233 /* ModuleDeclaration */) || + (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 232 /* EnumDeclaration */); if (substitute) { return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), /*location*/ node); @@ -51467,18 +51557,18 @@ var ts; return node; } switch (node.kind) { - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: // ES2017 async modifier should be elided for targets < ES2017 return undefined; - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitAwaitExpression(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); default: return ts.visitEachChild(node, visitor, context); @@ -51563,7 +51653,7 @@ var ts; var original = ts.getOriginalNode(node, ts.isFunctionLike); var nodeType = original.type; var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined; - var isArrowFunction = node.kind === 186 /* ArrowFunction */; + var isArrowFunction = node.kind === 187 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current @@ -51628,15 +51718,15 @@ var ts; enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; // We need to enable substitutions for call, property access, and element access // if we need to rewrite super calls. - context.enableSubstitution(180 /* CallExpression */); - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(181 /* CallExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // We need to be notified when entering and exiting declarations that bind super. - context.enableEmitNotification(228 /* ClassDeclaration */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(151 /* Constructor */); + context.enableEmitNotification(229 /* ClassDeclaration */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(152 /* Constructor */); } } /** @@ -51676,23 +51766,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -51712,11 +51802,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 /* ClassDeclaration */ - || kind === 151 /* Constructor */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */; + return kind === 229 /* ClassDeclaration */ + || kind === 152 /* Constructor */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) { @@ -51739,7 +51829,7 @@ var ts; function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(awaiterHelper); var generatorFunc = ts.createFunctionExpression( - /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), + /*modifiers*/ undefined, ts.createToken(39 /* AsteriskToken */), /*name*/ undefined, /*typeParameters*/ undefined, /*parameters*/ [], @@ -51804,7 +51894,7 @@ var ts; return visitorWorker(node, /*noDestructuringValue*/ true); } function visitorNoAsyncModifier(node) { - if (node.kind === 119 /* AsyncKeyword */) { + if (node.kind === 120 /* AsyncKeyword */) { return undefined; } return node; @@ -51814,43 +51904,43 @@ var ts; return node; } switch (node.kind) { - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitAwaitExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node, noDestructuringValue); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return visitVoidExpression(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return visitConstructorDeclaration(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return visitParameter(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitExpressionStatement(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); default: return ts.visitEachChild(node, visitor, context); @@ -51879,7 +51969,7 @@ var ts; function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { var statement = ts.unwrapInnermostStatementOfLabel(node); - if (statement.kind === 215 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 216 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node); @@ -51891,7 +51981,7 @@ var ts; var objects = []; for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) { var e = elements_4[_i]; - if (e.kind === 262 /* SpreadAssignment */) { + if (e.kind === 263 /* SpreadAssignment */) { if (chunkObject) { objects.push(ts.createObjectLiteral(chunkObject)); chunkObject = undefined; @@ -51903,7 +51993,7 @@ var ts; if (!chunkObject) { chunkObject = []; } - if (e.kind === 260 /* PropertyAssignment */) { + if (e.kind === 261 /* PropertyAssignment */) { var p = e; chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression))); } @@ -51925,7 +52015,7 @@ var ts; // If the first element is a spread element, then the first argument to __assign is {}: // { ...o, a, b, ...o2 } => __assign({}, o, {a, b}, o2) var objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 177 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 178 /* ObjectLiteralExpression */) { objects.unshift(ts.createObjectLiteral()); } return createAssignHelper(context, objects); @@ -51947,7 +52037,7 @@ var ts; if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 1048576 /* ContainsObjectRest */) { return ts.flattenDestructuringAssignment(node, visitor, context, 1 /* ObjectRest */, !noDestructuringValue); } - else if (node.operatorToken.kind === 25 /* CommaToken */) { + else if (node.operatorToken.kind === 26 /* CommaToken */) { return ts.updateBinary(node, ts.visitNode(node.left, visitorNoDestructuringValue, ts.isExpression), ts.visitNode(node.right, noDestructuringValue ? visitorNoDestructuringValue : visitor, ts.isExpression)); } return ts.visitEachChild(node, visitor, context); @@ -52170,7 +52260,7 @@ var ts; var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor); appendObjectRestAssignmentsIfNeeded(statements, node); statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression( - /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name), + /*modifiers*/ undefined, ts.createToken(39 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name), /*typeParameters*/ undefined, /*parameters*/ [], /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); @@ -52231,15 +52321,15 @@ var ts; enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; // We need to enable substitutions for call, property access, and element access // if we need to rewrite super calls. - context.enableSubstitution(180 /* CallExpression */); - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(181 /* CallExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // We need to be notified when entering and exiting declarations that bind super. - context.enableEmitNotification(228 /* ClassDeclaration */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(151 /* Constructor */); + context.enableEmitNotification(229 /* ClassDeclaration */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(152 /* Constructor */); } } /** @@ -52279,23 +52369,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -52315,11 +52405,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 /* ClassDeclaration */ - || kind === 151 /* Constructor */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */; + return kind === 229 /* ClassDeclaration */ + || kind === 152 /* Constructor */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) { @@ -52419,11 +52509,11 @@ var ts; } function visitorWorker(node) { switch (node.kind) { - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitJsxElement(node, /*isChild*/ false); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, /*isChild*/ false); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitJsxExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -52433,11 +52523,11 @@ var ts; switch (node.kind) { case 10 /* JsxText */: return visitJsxText(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitJsxExpression(node); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitJsxElement(node, /*isChild*/ true); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, /*isChild*/ true); default: ts.Debug.failBadSyntaxKind(node); @@ -52498,7 +52588,7 @@ var ts; var decoded = tryDecodeEntities(node.text); return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node; } - else if (node.kind === 255 /* JsxExpression */) { + else if (node.kind === 256 /* JsxExpression */) { if (node.expression === undefined) { return ts.createTrue(); } @@ -52590,7 +52680,7 @@ var ts; return decoded === text ? undefined : decoded; } function getTagName(node) { - if (node.kind === 248 /* JsxElement */) { + if (node.kind === 249 /* JsxElement */) { return getTagName(node.openingElement); } else { @@ -52897,7 +52987,7 @@ var ts; return node; } switch (node.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -52905,9 +52995,9 @@ var ts; } function visitBinaryExpression(node) { switch (node.operatorToken.kind) { - case 61 /* AsteriskAsteriskEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: return visitExponentiationAssignmentExpression(node); - case 39 /* AsteriskAsteriskToken */: + case 40 /* AsteriskAsteriskToken */: return visitExponentiationExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -53128,7 +53218,7 @@ var ts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { return hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ - && node.kind === 218 /* ReturnStatement */ + && node.kind === 219 /* ReturnStatement */ && !node.expression; } function shouldVisitNode(node) { @@ -53152,104 +53242,104 @@ var ts; return node; } function callExpressionVisitor(node) { - if (node.kind === 96 /* SuperKeyword */) { + if (node.kind === 97 /* SuperKeyword */) { return visitSuperKeyword(/*isExpressionOfCall*/ true); } return visitor(node); } function visitJavaScript(node) { switch (node.kind) { - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: return undefined; // elide static keyword - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return visitClassExpression(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return visitParameter(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 70 /* Identifier */: + case 71 /* Identifier */: return visitIdentifier(node); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitCaseBlock(node); - case 206 /* Block */: + case 207 /* Block */: return visitBlock(node, /*isFunctionBody*/ false); - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return visitDoOrWhileStatement(node, /*outermostLabeledStatement*/ undefined); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node, /*outermostLabeledStatement*/ undefined); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node, /*outermostLabeledStatement*/ undefined); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitExpressionStatement(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitCatchClause(node); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, /*needsDestructuringValue*/ true); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node, /*needsDestructuringValue*/ true); - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: return visitTemplateLiteral(node); case 9 /* StringLiteral */: return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return visitTemplateExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return visitSpreadElement(node); - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return visitSuperKeyword(/*isExpressionOfCall*/ false); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return visitThisKeyword(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return visitMetaProperty(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return visitAccessorDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitReturnStatement(node); default: return ts.visitEachChild(node, visitor, context); @@ -53333,13 +53423,13 @@ var ts; // it is possible if either // - break/continue is labeled and label is located inside the converted loop // - break/continue is non-labeled and located in non-converted loop/switch statement - var jump = node.kind === 217 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + var jump = node.kind === 218 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { var labelMarker = void 0; if (!node.label) { - if (node.kind === 217 /* BreakStatement */) { + if (node.kind === 218 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } @@ -53350,7 +53440,7 @@ var ts; } } else { - if (node.kind === 217 /* BreakStatement */) { + if (node.kind === 218 /* BreakStatement */) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } @@ -53369,10 +53459,10 @@ var ts; expr = copyExpr; } else { - expr = ts.createBinary(expr, 25 /* CommaToken */, copyExpr); + expr = ts.createBinary(expr, 26 /* CommaToken */, copyExpr); } } - returnExpression = ts.createBinary(expr, 25 /* CommaToken */, returnExpression); + returnExpression = ts.createBinary(expr, 26 /* CommaToken */, returnExpression); } return ts.createReturn(returnExpression); } @@ -53506,7 +53596,7 @@ var ts; addConstructor(statements, node, extendsClauseElement); addClassMembers(statements, node); // Create a synthetic text range for the return statement. - var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 17 /* CloseBraceToken */); + var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18 /* CloseBraceToken */); var localName = ts.getLocalName(node); // The following partially-emitted expression exists purely to align our sourcemap // emit with the original emitter. @@ -53611,7 +53701,7 @@ var ts; } // determine whether the class is known syntactically to be a derived class (e.g. a // class that extends a value that is not syntactically known to be `null`). - var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94 /* NullKeyword */; + var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 95 /* NullKeyword */; var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); // The last statement expression was replaced. Skip it. if (superCaptureStatus === 1 /* ReplaceSuperCapture */ || superCaptureStatus === 2 /* ReplaceWithReturn */) { @@ -53650,17 +53740,17 @@ var ts; */ function isSufficientlyCoveredByReturnStatements(statement) { // A return statement is considered covered. - if (statement.kind === 218 /* ReturnStatement */) { + if (statement.kind === 219 /* ReturnStatement */) { return true; } - else if (statement.kind === 210 /* IfStatement */) { + else if (statement.kind === 211 /* IfStatement */) { var ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } } - else if (statement.kind === 206 /* Block */) { + else if (statement.kind === 207 /* Block */) { var lastStatement = ts.lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -53718,7 +53808,7 @@ var ts; var ctorStatements = ctor.body.statements; if (statementOffset < ctorStatements.length) { firstStatement = ctorStatements[statementOffset]; - if (firstStatement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) { + if (firstStatement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) { superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -53728,8 +53818,8 @@ var ts; && statementOffset === ctorStatements.length - 1 && !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) { var returnStatement = ts.createReturn(superCallExpression); - if (superCallExpression.kind !== 193 /* BinaryExpression */ - || superCallExpression.left.kind !== 180 /* CallExpression */) { + if (superCallExpression.kind !== 194 /* BinaryExpression */ + || superCallExpression.left.kind !== 181 /* CallExpression */) { ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'."); } // Shift comments from the original super call to the return statement. @@ -53874,7 +53964,7 @@ var ts; * synthesized call to `super` */ function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return node && node.dotDotDotToken && node.name.kind === 70 /* Identifier */ && !inConstructorWithSynthesizedSuper; + return node && node.dotDotDotToken && node.name.kind === 71 /* Identifier */ && !inConstructorWithSynthesizedSuper; } /** * Adds statements to the body of a function-like node if it contains a rest parameter. @@ -53926,7 +54016,7 @@ var ts; * @param node A node. */ function addCaptureThisForNodeIfNeeded(statements, node) { - if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 186 /* ArrowFunction */) { + if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 187 /* ArrowFunction */) { captureThisForNode(statements, node, ts.createThis()); } } @@ -53946,25 +54036,25 @@ var ts; if (hierarchyFacts & 16384 /* NewTarget */) { var newTarget = void 0; switch (node.kind) { - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return statements; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // Methods and accessors cannot be constructors, so 'new.target' will // always return 'undefined'. newTarget = ts.createVoidZero(); break; - case 151 /* Constructor */: + case 152 /* Constructor */: // Class constructors can only be called with `new`, so `this.constructor` // should be relatively safe to use. newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"); break; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: // Functions can be called or constructed, and may have a `this` due to // being a member or when calling an imported function via `other_1.f()`. - newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 92 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero()); + newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 93 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero()); break; default: ts.Debug.failBadSyntaxKind(node); @@ -53993,20 +54083,20 @@ var ts; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; switch (member.kind) { - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 151 /* Constructor */: + case 152 /* Constructor */: // Constructors are handled in visitClassExpression/visitClassDeclaration break; default: @@ -54198,7 +54288,7 @@ var ts; : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */); var parameters = ts.visitParameterList(node.parameters, visitor, context); var body = transformFunctionBody(node); - if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */)) { + if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 228 /* FunctionDeclaration */ || node.kind === 186 /* FunctionExpression */)) { name = ts.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */); @@ -54246,7 +54336,7 @@ var ts; } } else { - ts.Debug.assert(node.kind === 186 /* ArrowFunction */); + ts.Debug.assert(node.kind === 187 /* ArrowFunction */); // To align with the old emitter, we use a synthetic end position on the location // for the statement list we synthesize when we down-level an arrow function with // an expression function body. This prevents both comments and source maps from @@ -54283,7 +54373,7 @@ var ts; ts.setEmitFlags(block, 1 /* SingleLine */); } if (closeBraceLocation) { - ts.setTokenSourceMapRange(block, 17 /* CloseBraceToken */, closeBraceLocation); + ts.setTokenSourceMapRange(block, 18 /* CloseBraceToken */, closeBraceLocation); } ts.setOriginalNode(block, node.body); return block; @@ -54313,9 +54403,9 @@ var ts; function visitExpressionStatement(node) { // If we are here it is most likely because our expression is a destructuring assignment. switch (node.expression.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateStatement(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateStatement(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false)); } return ts.visitEachChild(node, visitor, context); @@ -54334,9 +54424,9 @@ var ts; // expression. If we are in a state where we do not need the destructuring value, // we pass that information along to the children that care about it. switch (node.expression.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateParen(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateParen(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false)); } } @@ -54371,13 +54461,13 @@ var ts; assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0 /* All */); } else { - assignment = ts.createBinary(decl.name, 57 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression)); + assignment = ts.createBinary(decl.name, 58 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression)); } assignments = ts.append(assignments, assignment); } } if (assignments) { - updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); })), node); + updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26 /* CommaToken */, acc); })), node); } else { // none of declarations has initializer - the entire variable statement can be deleted @@ -54536,14 +54626,14 @@ var ts; } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -54731,7 +54821,7 @@ var ts; && i < numInitialPropertiesWithoutYield) { numInitialPropertiesWithoutYield = i; } - if (property.name.kind === 143 /* ComputedPropertyName */) { + if (property.name.kind === 144 /* ComputedPropertyName */) { numInitialProperties = i; break; } @@ -54770,7 +54860,7 @@ var ts; } visit(node.name); function visit(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { state.hoistedLocalVariables.push(node); } else { @@ -54803,11 +54893,11 @@ var ts; var functionName = ts.createUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: var initializer = node.initializer; - if (initializer && initializer.kind === 226 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 227 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -54875,7 +54965,7 @@ var ts; /*modifiers*/ undefined, ts.setEmitFlags(ts.createVariableDeclarationList([ ts.createVariableDeclaration(functionName, /*type*/ undefined, ts.setEmitFlags(ts.createFunctionExpression( - /*modifiers*/ undefined, containsYield ? ts.createToken(38 /* AsteriskToken */) : undefined, + /*modifiers*/ undefined, containsYield ? ts.createToken(39 /* AsteriskToken */) : undefined, /*name*/ undefined, /*typeParameters*/ undefined, loopParameters, /*type*/ undefined, loopBody), loopBodyFlags)) @@ -54966,7 +55056,7 @@ var ts; function copyOutParameter(outParam, copyDirection) { var source = copyDirection === 0 /* ToOriginal */ ? outParam.outParamName : outParam.originalName; var target = copyDirection === 0 /* ToOriginal */ ? outParam.originalName : outParam.outParamName; - return ts.createBinary(target, 57 /* EqualsToken */, source); + return ts.createBinary(target, 58 /* EqualsToken */, source); } function copyOutParameters(outParams, copyDirection, statements) { for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) { @@ -54985,7 +55075,7 @@ var ts; !state.labeledNonLocalContinues; var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; })); var callResult = isAsyncBlockContainingAwait - ? ts.createYield(ts.createToken(38 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */)) + ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */)) : call; if (isSimpleLoop) { statements.push(ts.createStatement(callResult)); @@ -55006,10 +55096,10 @@ var ts; else { returnStatement = ts.createReturn(ts.createPropertyAccess(loopResultName, "value")); } - statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 33 /* EqualsEqualsEqualsToken */, ts.createLiteral("object")), returnStatement)); + statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 34 /* EqualsEqualsEqualsToken */, ts.createLiteral("object")), returnStatement)); } if (state.nonLocalJumps & 2 /* Break */) { - statements.push(ts.createIf(ts.createBinary(loopResultName, 33 /* EqualsEqualsEqualsToken */, ts.createLiteral("break")), ts.createBreak())); + statements.push(ts.createIf(ts.createBinary(loopResultName, 34 /* EqualsEqualsEqualsToken */, ts.createLiteral("break")), ts.createBreak())); } if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { var caseClauses = []; @@ -55087,20 +55177,20 @@ var ts; for (var i = start; i < numProperties; i++) { var property = properties[i]; switch (property.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine)); } break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -55265,7 +55355,7 @@ var ts; // We are here either because SuperKeyword was used somewhere in the expression, or // because we contain a SpreadElementExpression. var _a = ts.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { ts.setEmitFlags(thisArg, 4 /* NoSubstitution */); } var resultingCall; @@ -55298,7 +55388,7 @@ var ts; resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), /*location*/ node); } - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { var actualThis = ts.createThis(); ts.setEmitFlags(actualThis, 4 /* NoSubstitution */); var initializer = ts.createLogicalOr(resultingCall, actualThis); @@ -55361,7 +55451,7 @@ var ts; else { if (segments.length === 1) { var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 /* ArrayLiteralExpression */ + return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */ ? ts.createArraySlice(segments[0]) : segments[0]; } @@ -55473,7 +55563,7 @@ var ts; // thus we need to remove those characters. // First template piece starts with "`", others with "}" // Last template piece ends with "`", others with "${" - var isLast = node.kind === 12 /* NoSubstitutionTemplateLiteral */ || node.kind === 15 /* TemplateTail */; + var isLast = node.kind === 13 /* NoSubstitutionTemplateLiteral */ || node.kind === 16 /* TemplateTail */; text = text.substring(1, text.length - (isLast ? 1 : 2)); // Newline normalization: // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's @@ -55571,7 +55661,7 @@ var ts; : ts.createIdentifier("_super"); } function visitMetaProperty(node) { - if (node.keywordToken === 93 /* NewKeyword */ && node.name.text === "target") { + if (node.keywordToken === 94 /* NewKeyword */ && node.name.text === "target") { if (hierarchyFacts & 8192 /* ComputedPropertyName */) { hierarchyFacts |= 32768 /* NewTargetInComputedPropertyName */; } @@ -55608,7 +55698,7 @@ var ts; function enableSubstitutionsForBlockScopedBindings() { if ((enabledSubstitutions & 2 /* BlockScopedBindings */) === 0) { enabledSubstitutions |= 2 /* BlockScopedBindings */; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } } /** @@ -55618,14 +55708,14 @@ var ts; function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(98 /* ThisKeyword */); - context.enableEmitNotification(151 /* Constructor */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(186 /* ArrowFunction */); - context.enableEmitNotification(185 /* FunctionExpression */); - context.enableEmitNotification(227 /* FunctionDeclaration */); + context.enableSubstitution(99 /* ThisKeyword */); + context.enableEmitNotification(152 /* Constructor */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(187 /* ArrowFunction */); + context.enableEmitNotification(186 /* FunctionExpression */); + context.enableEmitNotification(228 /* FunctionDeclaration */); } } /** @@ -55667,10 +55757,10 @@ var ts; function isNameOfDeclarationWithCollidingName(node) { var parent = node.parent; switch (parent.kind) { - case 175 /* BindingElement */: - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 226 /* VariableDeclaration */: return parent.name === node && resolver.isDeclarationWithCollidingName(parent); } @@ -55683,9 +55773,9 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -55728,19 +55818,19 @@ var ts; return false; } var statement = ts.firstOrUndefined(constructor.body.statements); - if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209 /* ExpressionStatement */) { + if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 210 /* ExpressionStatement */) { return false; } var statementExpression = statement.expression; - if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180 /* CallExpression */) { + if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 181 /* CallExpression */) { return false; } var callTarget = statementExpression.expression; - if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 96 /* SuperKeyword */) { + if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 97 /* SuperKeyword */) { return false; } var callArgument = ts.singleOrUndefined(statementExpression.arguments); - if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197 /* SpreadElement */) { + if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 198 /* SpreadElement */) { return false; } var expression = callArgument.expression; @@ -55781,15 +55871,15 @@ var ts; if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(250 /* JsxOpeningElement */); - context.enableEmitNotification(251 /* JsxClosingElement */); - context.enableEmitNotification(249 /* JsxSelfClosingElement */); + context.enableEmitNotification(251 /* JsxOpeningElement */); + context.enableEmitNotification(252 /* JsxClosingElement */); + context.enableEmitNotification(250 /* JsxSelfClosingElement */); noSubstitution = []; } var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(260 /* PropertyAssignment */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(261 /* PropertyAssignment */); return transformSourceFile; /** * Transforms an ES5 source file to ES3. @@ -55808,9 +55898,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 250 /* JsxOpeningElement */: - case 251 /* JsxClosingElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 252 /* JsxClosingElement */: + case 250 /* JsxSelfClosingElement */: var tagName = node.tagName; noSubstitution[ts.getOriginalNodeId(tagName)] = true; break; @@ -55867,7 +55957,7 @@ var ts; */ function trySubstituteReservedName(name) { var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined); - if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) { + if (token >= 72 /* FirstReservedWord */ && token <= 107 /* LastReservedWord */) { return ts.setTextRange(ts.createLiteral(name), name); } return undefined; @@ -56147,13 +56237,13 @@ var ts; */ function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitWhileStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -56166,24 +56256,24 @@ var ts; */ function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return visitAccessorDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return visitBreakStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return visitContinueStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 16777216 /* ContainsYield */) { @@ -56204,21 +56294,21 @@ var ts; */ function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return visitConditionalExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -56231,9 +56321,9 @@ var ts; */ function visitGenerator(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); default: ts.Debug.failBadSyntaxKind(node); @@ -56432,23 +56522,23 @@ var ts; } } function isCompoundAssignment(kind) { - return kind >= 58 /* FirstCompoundAssignment */ - && kind <= 69 /* LastCompoundAssignment */; + return kind >= 59 /* FirstCompoundAssignment */ + && kind <= 70 /* LastCompoundAssignment */; } function getOperatorForCompoundAssignment(kind) { switch (kind) { - case 58 /* PlusEqualsToken */: return 36 /* PlusToken */; - case 59 /* MinusEqualsToken */: return 37 /* MinusToken */; - case 60 /* AsteriskEqualsToken */: return 38 /* AsteriskToken */; - case 61 /* AsteriskAsteriskEqualsToken */: return 39 /* AsteriskAsteriskToken */; - case 62 /* SlashEqualsToken */: return 40 /* SlashToken */; - case 63 /* PercentEqualsToken */: return 41 /* PercentToken */; - case 64 /* LessThanLessThanEqualsToken */: return 44 /* LessThanLessThanToken */; - case 65 /* GreaterThanGreaterThanEqualsToken */: return 45 /* GreaterThanGreaterThanToken */; - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 46 /* GreaterThanGreaterThanGreaterThanToken */; - case 67 /* AmpersandEqualsToken */: return 47 /* AmpersandToken */; - case 68 /* BarEqualsToken */: return 48 /* BarToken */; - case 69 /* CaretEqualsToken */: return 49 /* CaretToken */; + case 59 /* PlusEqualsToken */: return 37 /* PlusToken */; + case 60 /* MinusEqualsToken */: return 38 /* MinusToken */; + case 61 /* AsteriskEqualsToken */: return 39 /* AsteriskToken */; + case 62 /* AsteriskAsteriskEqualsToken */: return 40 /* AsteriskAsteriskToken */; + case 63 /* SlashEqualsToken */: return 41 /* SlashToken */; + case 64 /* PercentEqualsToken */: return 42 /* PercentToken */; + case 65 /* LessThanLessThanEqualsToken */: return 45 /* LessThanLessThanToken */; + case 66 /* GreaterThanGreaterThanEqualsToken */: return 46 /* GreaterThanGreaterThanToken */; + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 47 /* GreaterThanGreaterThanGreaterThanToken */; + case 68 /* AmpersandEqualsToken */: return 48 /* AmpersandToken */; + case 69 /* BarEqualsToken */: return 49 /* BarToken */; + case 70 /* CaretEqualsToken */: return 50 /* CaretToken */; } } /** @@ -56461,7 +56551,7 @@ var ts; if (containsYield(right)) { var target = void 0; switch (left.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: // [source] // a.b = yield; // @@ -56473,7 +56563,7 @@ var ts; // _a.b = %sent%; target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name); break; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: // [source] // a[b] = yield; // @@ -56505,7 +56595,7 @@ var ts; if (ts.isLogicalOperator(node.operatorToken.kind)) { return visitLogicalBinaryExpression(node); } - else if (node.operatorToken.kind === 25 /* CommaToken */) { + else if (node.operatorToken.kind === 26 /* CommaToken */) { return visitCommaExpression(node); } // [source] @@ -56560,7 +56650,7 @@ var ts; var resultLabel = defineLabel(); var resultLocal = declareLocal(); emitAssignment(resultLocal, ts.visitNode(node.left, visitor, ts.isExpression), /*location*/ node.left); - if (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */) { + if (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */) { // Logical `&&` shortcuts when the left-hand operand is falsey. emitBreakWhenFalse(resultLabel, resultLocal, /*location*/ node.left); } @@ -56591,7 +56681,7 @@ var ts; visit(node.right); return ts.inlineExpressions(pendingExpressions); function visit(node) { - if (ts.isBinaryExpression(node) && node.operatorToken.kind === 25 /* CommaToken */) { + if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26 /* CommaToken */) { visit(node.left); visit(node.right); } @@ -56849,35 +56939,35 @@ var ts; } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 206 /* Block */: + case 207 /* Block */: return transformAndEmitBlock(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return transformAndEmitIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return transformAndEmitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return transformAndEmitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return transformAndEmitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(ts.visitNode(node, visitor, ts.isStatement)); @@ -57297,7 +57387,7 @@ var ts; for (var i = 0; i < numClauses; i++) { var clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 257 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 258 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -57310,7 +57400,7 @@ var ts; var defaultClausesSkipped = 0; for (var i = clausesWritten; i < numClauses; i++) { var clause = caseBlock.clauses[i]; - if (clause.kind === 256 /* CaseClause */) { + if (clause.kind === 257 /* CaseClause */) { var caseClause = clause; if (containsYield(caseClause.expression) && pendingClauses.length > 0) { break; @@ -57625,7 +57715,7 @@ var ts; if (!renamedCatchVariables) { renamedCatchVariables = ts.createMap(); renamedCatchVariableDeclarations = []; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } renamedCatchVariables.set(text, true); renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name; @@ -58543,12 +58633,12 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols. - context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols. - context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(261 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols. - context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file. + context.enableSubstitution(71 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols. + context.enableSubstitution(194 /* BinaryExpression */); // Substitutes assignments to exported symbols. + context.enableSubstitution(192 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(193 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(262 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols. + context.enableEmitNotification(265 /* SourceFile */); // Restore state when substituting nodes in a file. var moduleInfoMap = []; // The ExternalModuleInfo for each file. var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found. var currentSourceFile; // The current file. @@ -58842,23 +58932,23 @@ var ts; */ function sourceElementVisitor(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 296 /* MergeDeclarationMarker */: + case 297 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 297 /* EndOfDeclarationMarker */: + case 298 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: // This visitor does not descend into the tree, as export/import statements @@ -59160,7 +59250,7 @@ var ts; // // To balance the declaration, add the exports of the elided variable // statement. - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208 /* VariableStatement */) { var id = ts.getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -59215,10 +59305,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240 /* NamedImports */: + case 241 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -59400,8 +59490,8 @@ var ts; function modifierVisitor(node) { // Elide module-specific modifiers. switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: return undefined; } return node; @@ -59417,7 +59507,7 @@ var ts; * @param emit A callback used to emit the node in the printer. */ function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)]; noSubstitution = []; @@ -59479,12 +59569,12 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return substituteBinaryExpression(node); - case 192 /* PostfixUnaryExpression */: - case 191 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return substituteUnaryExpression(node); } return node; @@ -59505,7 +59595,7 @@ var ts; } if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node)); - if (exportContainer && exportContainer.kind === 264 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 265 /* SourceFile */) { return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), /*location*/ node); } @@ -59573,15 +59663,15 @@ var ts; // - We do not substitute identifiers that were originally the name of an enum or // namespace due to how they are transformed in TypeScript. // - We only substitute identifiers that are exported at the top level. - if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) + if ((node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 /* PostfixUnaryExpression */ - ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1)), + var expression = node.kind === 193 /* PostfixUnaryExpression */ + ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 43 /* PlusPlusToken */ ? 59 /* PlusEqualsToken */ : 60 /* MinusEqualsToken */), ts.createLiteral(1)), /*location*/ node) : node; for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) { @@ -59634,11 +59724,11 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers for imported symbols. - context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols. - context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file. + context.enableSubstitution(71 /* Identifier */); // Substitutes expression identifiers for imported symbols. + context.enableSubstitution(194 /* BinaryExpression */); // Substitutes assignments to exported symbols. + context.enableSubstitution(192 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(193 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableEmitNotification(265 /* SourceFile */); // Restore state when substituting nodes in a file. var moduleInfoMap = []; // The ExternalModuleInfo for each file. var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found. var exportFunctionsMap = []; // The export function associated with a source file. @@ -59861,7 +59951,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) { var externalImport = _a[_i]; - if (externalImport.kind === 243 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 244 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -59886,7 +59976,7 @@ var ts; } for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) { var externalImport = _e[_d]; - if (externalImport.kind !== 243 /* ExportDeclaration */) { + if (externalImport.kind !== 244 /* ExportDeclaration */) { continue; } var exportDecl = externalImport; @@ -59965,19 +60055,19 @@ var ts; var entry = _b[_a]; var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile); switch (entry.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: if (!entry.importClause) { // 'import "..."' case // module is imported only for side-effects, no emit required break; } // falls through - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: ts.Debug.assert(importVariableName !== undefined); // save import into the local statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName))); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: ts.Debug.assert(importVariableName !== undefined); if (entry.exportClause) { // export {a, b as c} from 'foo' @@ -60027,15 +60117,15 @@ var ts; */ function sourceElementVisitor(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // ExportDeclarations are elided as they are handled via // `appendExportsOfDeclaration`. return undefined; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); default: return nestedElementVisitor(node); @@ -60211,7 +60301,7 @@ var ts; function shouldHoistVariableDeclarationList(node) { // hoist only non-block scoped declarations or block scoped declarations parented by source file return (ts.getEmitFlags(node) & 1048576 /* NoHoisting */) === 0 - && (enclosingBlockScopedContainer.kind === 264 /* SourceFile */ + && (enclosingBlockScopedContainer.kind === 265 /* SourceFile */ || (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } /** @@ -60275,7 +60365,7 @@ var ts; // // To balance the declaration, we defer the exports of the elided variable // statement until we visit this declaration's `EndOfDeclarationMarker`. - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208 /* VariableStatement */) { var id = ts.getOriginalNodeId(node); var isExportedDeclaration = ts.hasModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -60331,10 +60421,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240 /* NamedImports */: + case 241 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -60513,43 +60603,43 @@ var ts; */ function nestedElementVisitor(node) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitWhileStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return visitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitCaseBlock(node); - case 256 /* CaseClause */: + case 257 /* CaseClause */: return visitCaseClause(node); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return visitDefaultClause(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return visitTryStatement(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitCatchClause(node); - case 206 /* Block */: + case 207 /* Block */: return visitBlock(node); - case 296 /* MergeDeclarationMarker */: + case 297 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 297 /* EndOfDeclarationMarker */: + case 298 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringVisitor(node); @@ -60732,7 +60822,7 @@ var ts; */ function destructuringVisitor(node) { if (node.transformFlags & 1024 /* DestructuringAssignment */ - && node.kind === 193 /* BinaryExpression */) { + && node.kind === 194 /* BinaryExpression */) { return visitDestructuringAssignment(node); } else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) { @@ -60780,7 +60870,7 @@ var ts; } else if (ts.isIdentifier(node)) { var container = resolver.getReferencedExportContainer(node); - return container !== undefined && container.kind === 264 /* SourceFile */; + return container !== undefined && container.kind === 265 /* SourceFile */; } else { return false; @@ -60796,8 +60886,8 @@ var ts; */ function modifierVisitor(node) { switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: return undefined; } return node; @@ -60813,7 +60903,7 @@ var ts; * @param emitCallback A callback used to emit the node in the printer. */ function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { var id = ts.getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -60858,12 +60948,12 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return substituteBinaryExpression(node); - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return substituteUnaryExpression(node); } return node; @@ -60949,22 +61039,22 @@ var ts; // - We do not substitute identifiers that were originally the name of an enum or // namespace due to how they are transformed in TypeScript. // - We only substitute identifiers that are exported at the top level. - if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) + if ((node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 /* PostfixUnaryExpression */ + var expression = node.kind === 193 /* PostfixUnaryExpression */ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node) : node; for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) { var exportName = exportedNames_4[_i]; expression = createExportExpression(exportName, preventSubstitution(expression)); } - if (node.kind === 192 /* PostfixUnaryExpression */) { - expression = node.operator === 42 /* PlusPlusToken */ + if (node.kind === 193 /* PostfixUnaryExpression */) { + expression = node.operator === 43 /* PlusPlusToken */ ? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1)) : ts.createAdd(preventSubstitution(expression), ts.createLiteral(1)); } @@ -60985,7 +61075,7 @@ var ts; || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { var exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false); - if (exportContainer && exportContainer.kind === 264 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 265 /* SourceFile */) { exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration)); } exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]); @@ -61026,8 +61116,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(264 /* SourceFile */); - context.enableSubstitution(70 /* Identifier */); + context.enableEmitNotification(265 /* SourceFile */); + context.enableSubstitution(71 /* Identifier */); var currentSourceFile; return transformSourceFile; function transformSourceFile(node) { @@ -61053,10 +61143,10 @@ var ts; } function visitor(node) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // Elide `import=` as it is not legal with --module ES6 return undefined; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); } return node; @@ -61194,7 +61284,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(298 /* Count */); + var enabledSyntaxKindFeatures = new Array(299 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -61528,7 +61618,7 @@ var ts; } if (compilerOptions.mapRoot) { sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (sourceFileOrBundle.kind === 264 /* SourceFile */) { + if (sourceFileOrBundle.kind === 265 /* SourceFile */) { // For modules or multiple emit files the mapRoot will have directory structure like the sources // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir)); @@ -61666,7 +61756,7 @@ var ts; var emitNode = node.emitNode; var emitFlags = emitNode && emitNode.flags; var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end; - if (node.kind !== 294 /* NotEmittedStatement */ + if (node.kind !== 295 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitPos(ts.skipTrivia(currentSourceText, pos)); @@ -61679,7 +61769,7 @@ var ts; else { emitCallback(hint, node); } - if (node.kind !== 294 /* NotEmittedStatement */ + if (node.kind !== 295 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitPos(end); @@ -61854,7 +61944,7 @@ var ts; if (extendedDiagnostics) { ts.performance.mark("preEmitNodeWithComment"); } - var isEmittedNode = node.kind !== 294 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 295 /* NotEmittedStatement */; var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0; var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0; // Emit leading comments if the position is not synthesized and the node @@ -61873,7 +61963,7 @@ var ts; containerEnd = end; // To avoid invalid comment emit in a down-level binding pattern, we // keep track of the last declaration list container's end - if (node.kind === 226 /* VariableDeclarationList */) { + if (node.kind === 227 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -62187,8 +62277,8 @@ var ts; } ts.getDeclarationDiagnostics = getDeclarationDiagnostics; function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) { - var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; - var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */; + var sourceFiles = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var isBundledEmit = sourceFileOrBundle.kind === 266 /* Bundle */; var newLine = host.getNewLine(); var compilerOptions = host.getCompilerOptions(); var write; @@ -62262,7 +62352,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 237 /* ImportDeclaration */); + ts.Debug.assert(aliasEmitInfo.node.kind === 238 /* ImportDeclaration */); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -62338,10 +62428,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 225 /* VariableDeclaration */) { + if (declaration.kind === 226 /* VariableDeclaration */) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 240 /* NamedImports */ || declaration.kind === 241 /* ImportSpecifier */ || declaration.kind === 238 /* ImportClause */) { + else if (declaration.kind === 241 /* NamedImports */ || declaration.kind === 242 /* ImportSpecifier */ || declaration.kind === 239 /* ImportClause */) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -62359,7 +62449,7 @@ var ts; // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 237 /* ImportDeclaration */) { + if (moduleElementEmitInfo.node.kind === 238 /* ImportDeclaration */) { // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; @@ -62369,12 +62459,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 232 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 233 /* ModuleDeclaration */) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 232 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 233 /* ModuleDeclaration */) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -62440,7 +62530,7 @@ var ts; write(": "); // use the checker's type, not the declared type, // for non-optional initialized parameters that aren't a parameter property - var shouldUseResolverType = declaration.kind === 145 /* Parameter */ && + var shouldUseResolverType = declaration.kind === 146 /* Parameter */ && resolver.isRequiredInitializedParameter(declaration); if (type && !shouldUseResolverType) { // Write the type @@ -62503,60 +62593,60 @@ var ts; } function emitType(type) { switch (type.kind) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 133 /* ObjectKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: - case 168 /* ThisType */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 134 /* ObjectKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: + case 169 /* ThisType */: + case 173 /* LiteralType */: return writeTextOfNode(currentText, type); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return emitTypeReference(type); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return emitTypeQuery(type); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return emitArrayType(type); - case 164 /* TupleType */: + case 165 /* TupleType */: return emitTupleType(type); - case 165 /* UnionType */: + case 166 /* UnionType */: return emitUnionType(type); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return emitIntersectionType(type); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return emitParenType(type); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return emitTypeOperator(type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return emitIndexedAccessType(type); - case 171 /* MappedType */: + case 172 /* MappedType */: return emitMappedType(type); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return emitSignatureDeclarationWithJsDocComments(type); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return emitTypeLiteral(type); - case 70 /* Identifier */: + case 71 /* Identifier */: return emitEntityName(type); - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return emitEntityName(type); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return emitTypePredicate(type); } function writeEntityName(entityName) { - if (entityName.kind === 70 /* Identifier */) { + if (entityName.kind === 71 /* Identifier */) { writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 142 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 142 /* QualifiedName */ ? entityName.right : entityName.name; + var left = entityName.kind === 143 /* QualifiedName */ ? entityName.left : entityName.expression; + var right = entityName.kind === 143 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); @@ -62565,14 +62655,14 @@ var ts; function emitEntityName(entityName) { var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 236 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); + entityName.parent.kind === 237 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isEntityNameExpression(node.expression)) { - ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 178 /* PropertyAccessExpression */); + ts.Debug.assert(node.expression.kind === 71 /* Identifier */ || node.expression.kind === 179 /* PropertyAccessExpression */); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -62694,7 +62784,7 @@ var ts; } } function emitExportAssignment(node) { - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { write(node.isExportEquals ? "export = " : "export default "); writeTextOfNode(currentText, node.expression); } @@ -62717,7 +62807,7 @@ var ts; write(";"); writeLine(); // Make all the declarations visible for the export name - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { var nodes = resolver.collectLinkedAliases(node.expression); // write each of these declarations asynchronously writeAsynchronousModuleElements(nodes); @@ -62736,10 +62826,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 236 /* ImportEqualsDeclaration */ || - (node.parent.kind === 264 /* SourceFile */ && isCurrentFileExternalModule)) { + else if (node.kind === 237 /* ImportEqualsDeclaration */ || + (node.parent.kind === 265 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264 /* SourceFile */) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 265 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot asynchronousSubModuleDeclarationEmitInfo.push({ node: node, @@ -62749,7 +62839,7 @@ var ts; }); } else { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -62767,23 +62857,23 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return writeFunctionDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return writeVariableStatement(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return writeInterfaceDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return writeClassDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return writeTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return writeEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return writeModuleDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return writeImportEqualsDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); @@ -62791,7 +62881,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 265 /* SourceFile */) { var modifiers = ts.getModifierFlags(node); // If the node is exported if (modifiers & 1 /* Export */) { @@ -62800,7 +62890,7 @@ var ts; if (modifiers & 512 /* Default */) { write("default "); } - else if (node.kind !== 229 /* InterfaceDeclaration */ && !noDeclare) { + else if (node.kind !== 230 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -62852,7 +62942,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings.kind === 240 /* NamespaceImport */) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -62876,7 +62966,7 @@ var ts; // If the default binding was emitted, write the separated write(", "); } - if (node.importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 240 /* NamespaceImport */) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -62897,13 +62987,13 @@ var ts; // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered // external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' // so compiler will treat them as external modules. - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232 /* ModuleDeclaration */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 233 /* ModuleDeclaration */; var moduleSpecifier; - if (parent.kind === 236 /* ImportEqualsDeclaration */) { + if (parent.kind === 237 /* ImportEqualsDeclaration */) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 232 /* ModuleDeclaration */) { + else if (parent.kind === 233 /* ModuleDeclaration */) { moduleSpecifier = parent.name; } else { @@ -62973,7 +63063,7 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body && node.body.kind !== 233 /* ModuleBlock */) { + while (node.body && node.body.kind !== 234 /* ModuleBlock */) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -63043,7 +63133,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 150 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */); + return node.parent.kind === 151 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -63054,15 +63144,15 @@ var ts; // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ || - node.parent.kind === 149 /* MethodSignature */ || - node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.kind === 154 /* CallSignature */ || - node.parent.kind === 155 /* ConstructSignature */); + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 163 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 151 /* MethodDeclaration */ || + node.parent.kind === 150 /* MethodSignature */ || + node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.kind === 155 /* CallSignature */ || + node.parent.kind === 156 /* ConstructSignature */); emitType(node.constraint); } else { @@ -63071,15 +63161,15 @@ var ts; } if (node.default && !isPrivateMethodTypeParameter(node)) { write(" = "); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ || - node.parent.kind === 149 /* MethodSignature */ || - node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.kind === 154 /* CallSignature */ || - node.parent.kind === 155 /* ConstructSignature */); + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 163 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 151 /* MethodDeclaration */ || + node.parent.kind === 150 /* MethodSignature */ || + node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.kind === 155 /* CallSignature */ || + node.parent.kind === 156 /* ConstructSignature */); emitType(node.default); } else { @@ -63090,34 +63180,34 @@ var ts; // Type parameter constraints are named by user so we should always be able to name it var diagnosticMessage; switch (node.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node.parent, 32 /* Static */)) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 229 /* ClassDeclaration */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -63145,7 +63235,7 @@ var ts; if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } - else if (!isImplementsList && node.expression.kind === 94 /* NullKeyword */) { + else if (!isImplementsList && node.expression.kind === 95 /* NullKeyword */) { write("null"); } else { @@ -63157,7 +63247,7 @@ var ts; function getHeritageClauseVisibilityError() { var diagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + if (node.parent.parent.kind === 229 /* ClassDeclaration */) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : @@ -63245,7 +63335,7 @@ var ts; function emitVariableDeclaration(node) { // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible - if (node.kind !== 225 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 226 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } @@ -63256,11 +63346,11 @@ var ts; writeTextOfNode(currentText, node.name); // If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor // we don't want to emit property declaration with "?" - if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */ || - (node.kind === 145 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { + if ((node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */ || + (node.kind === 146 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) && node.parent.kind === 162 /* TypeLiteral */) { + if ((node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) && node.parent.kind === 163 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (resolver.isLiteralConstDeclaration(node)) { @@ -63273,14 +63363,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) { + else if (node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) { // TODO(jfreeman): Deal with computed properties in error reporting. if (ts.hasModifier(node, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? @@ -63289,7 +63379,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63321,7 +63411,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 199 /* OmittedExpression */) { + if (element.kind !== 200 /* OmittedExpression */) { elements.push(element); } } @@ -63391,7 +63481,7 @@ var ts; var type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 152 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 153 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -63404,7 +63494,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 152 /* GetAccessor */ + return accessor.kind === 153 /* GetAccessor */ ? accessor.type // Getter - return type : accessor.parameters.length > 0 ? accessor.parameters[0].type // Setter parameter type @@ -63413,7 +63503,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 153 /* SetAccessor */) { + if (accessorWithTypeAnnotation.kind === 154 /* SetAccessor */) { // Setters have to have type named and cannot infer it so, the type should always be named if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32 /* Static */)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? @@ -63463,17 +63553,17 @@ var ts; // so no need to verify if the declaration is visible if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 227 /* FunctionDeclaration */) { + if (node.kind === 228 /* FunctionDeclaration */) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 150 /* MethodDeclaration */ || node.kind === 151 /* Constructor */) { + else if (node.kind === 151 /* MethodDeclaration */ || node.kind === 152 /* Constructor */) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); } - if (node.kind === 227 /* FunctionDeclaration */) { + if (node.kind === 228 /* FunctionDeclaration */) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 151 /* Constructor */) { + else if (node.kind === 152 /* Constructor */) { write("constructor"); } else { @@ -63493,17 +63583,17 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; var closeParenthesizedFunctionType = false; - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { // Index signature can have readonly modifier emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); write("["); } else { // Construct signature or constructor type write new Signature - if (node.kind === 155 /* ConstructSignature */ || node.kind === 160 /* ConstructorType */) { + if (node.kind === 156 /* ConstructSignature */ || node.kind === 161 /* ConstructorType */) { write("new "); } - else if (node.kind === 159 /* FunctionType */) { + else if (node.kind === 160 /* FunctionType */) { var currentOutput = writer.getText(); // Do not generate incorrect type when function type with type parameters is type argument // This could happen if user used space between two '<' making it error free @@ -63518,22 +63608,22 @@ var ts; } // Parameters emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { write("]"); } else { write(")"); } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 159 /* FunctionType */ || node.kind === 160 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 162 /* TypeLiteral */) { + var isFunctionTypeOrConstructorType = node.kind === 160 /* FunctionType */ || node.kind === 161 /* ConstructorType */; + if (isFunctionTypeOrConstructorType || node.parent.kind === 163 /* TypeLiteral */) { // Emit type literal signature return type only if specified if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 151 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) { + else if (node.kind !== 152 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -63547,26 +63637,26 @@ var ts; function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node, 32 /* Static */)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -63574,7 +63664,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -63588,7 +63678,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -63623,9 +63713,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.parent.kind === 162 /* TypeLiteral */) { + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.parent.kind === 163 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!ts.hasModifier(node.parent, 8 /* Private */)) { @@ -63641,29 +63731,29 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 154 /* CallSignature */: + case 155 /* CallSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node.parent, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -63671,7 +63761,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 229 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63684,7 +63774,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63696,12 +63786,12 @@ var ts; } function emitBindingPattern(bindingPattern) { // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 173 /* ObjectBindingPattern */) { + if (bindingPattern.kind === 174 /* ObjectBindingPattern */) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) { + else if (bindingPattern.kind === 175 /* ArrayBindingPattern */) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -63712,7 +63802,7 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 199 /* OmittedExpression */) { + if (bindingElement.kind === 200 /* OmittedExpression */) { // If bindingElement is an omittedExpression (i.e. containing elision), // we will emit blank space (although this may differ from users' original code, // it allows emitSeparatedList to write separator appropriately) @@ -63721,7 +63811,7 @@ var ts; // emit : function foo([ , x, , ]) {} write(" "); } - else if (bindingElement.kind === 175 /* BindingElement */) { + else if (bindingElement.kind === 176 /* BindingElement */) { if (bindingElement.propertyName) { // bindingElement has propertyName property in the following case: // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" @@ -63744,7 +63834,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - ts.Debug.assert(bindingElement.name.kind === 70 /* Identifier */); + ts.Debug.assert(bindingElement.name.kind === 71 /* Identifier */); // If the node is just an identifier, we will simply emit the text associated with the node's name // Example: // original: function foo({y = 10, x}) {} @@ -63760,40 +63850,40 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 232 /* ModuleDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 229 /* InterfaceDeclaration */: - case 228 /* ClassDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: + case 228 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 230 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: return emitModuleElement(node, isModuleElementVisible(node)); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return emitModuleElement(node, isVariableStatementVisible(node)); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // Import declaration without import clause is visible, otherwise it is not visible return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return emitExportDeclaration(node); - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return writeFunctionDeclaration(node); - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 156 /* IndexSignature */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 157 /* IndexSignature */: return emitSignatureDeclarationWithJsDocComments(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return emitAccessorDeclaration(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return emitPropertyDeclaration(node); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return emitExportAssignment(node); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return emitSourceFile(node); } } @@ -63821,7 +63911,7 @@ var ts; return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFileOrBundle) { // Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path - var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */; + var isBundledEmit = sourceFileOrBundle.kind === 266 /* Bundle */; if (isBundledEmit && !addBundledFileReference) { return; } @@ -63836,7 +63926,7 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var sourceFiles = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); @@ -63940,8 +64030,8 @@ var ts; } } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) { - var bundle = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle : undefined; - var sourceFile = sourceFileOrBundle.kind === 264 /* SourceFile */ ? sourceFileOrBundle : undefined; + var bundle = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle : undefined; + var sourceFile = sourceFileOrBundle.kind === 265 /* SourceFile */ ? sourceFileOrBundle : undefined; var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle); if (bundle) { @@ -63981,7 +64071,7 @@ var ts; } function emitHelpers(node, writeLines) { var helpersEmitted = false; - var bundle = node.kind === 265 /* Bundle */ ? node : undefined; + var bundle = node.kind === 266 /* Bundle */ ? node : undefined; if (bundle && moduleKind === ts.ModuleKind.None) { return; } @@ -64062,8 +64152,8 @@ var ts; break; } switch (node.kind) { - case 264 /* SourceFile */: return printFile(node); - case 265 /* Bundle */: return printBundle(node); + case 265 /* SourceFile */: return printFile(node); + case 266 /* Bundle */: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); return endPrint(); @@ -64198,211 +64288,211 @@ var ts; } switch (kind) { // Pseudo-literals - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: return emitLiteral(node); // Identifiers - case 70 /* Identifier */: + case 71 /* Identifier */: return emitIdentifier(node); // Parse tree nodes // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return emitQualifiedName(node); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return emitComputedPropertyName(node); // Signature elements - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return emitTypeParameter(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return emitParameter(node); - case 146 /* Decorator */: + case 147 /* Decorator */: return emitDecorator(node); // Type members - case 147 /* PropertySignature */: + case 148 /* PropertySignature */: return emitPropertySignature(node); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 149 /* MethodSignature */: + case 150 /* MethodSignature */: return emitMethodSignature(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return emitConstructor(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return emitAccessorDeclaration(node); - case 154 /* CallSignature */: + case 155 /* CallSignature */: return emitCallSignature(node); - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return emitConstructSignature(node); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return emitIndexSignature(node); // Types - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return emitTypePredicate(node); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return emitTypeReference(node); - case 159 /* FunctionType */: + case 160 /* FunctionType */: return emitFunctionType(node); - case 160 /* ConstructorType */: + case 161 /* ConstructorType */: return emitConstructorType(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return emitTypeQuery(node); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return emitTypeLiteral(node); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return emitArrayType(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return emitTupleType(node); - case 165 /* UnionType */: + case 166 /* UnionType */: return emitUnionType(node); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return emitIntersectionType(node); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return emitParenthesizedType(node); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 168 /* ThisType */: + case 169 /* ThisType */: return emitThisType(); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return emitTypeOperator(node); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return emitMappedType(node); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return emitLiteralType(node); // Binding patterns - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return emitBindingElement(node); // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return emitTemplateSpan(node); - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: return emitSemicolonClassElement(); // Statements - case 206 /* Block */: + case 207 /* Block */: return emitBlock(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return emitVariableStatement(node); - case 208 /* EmptyStatement */: + case 209 /* EmptyStatement */: return emitEmptyStatement(); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return emitExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return emitIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return emitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return emitWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return emitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return emitForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return emitForOfStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return emitContinueStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return emitBreakStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return emitReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return emitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return emitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return emitLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return emitThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return emitTryStatement(node); - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: return emitDebuggerStatement(node); // Declarations - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return emitClassDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return emitModuleBlock(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return emitCaseBlock(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return emitImportDeclaration(node); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return emitImportClause(node); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return emitNamespaceImport(node); - case 240 /* NamedImports */: + case 241 /* NamedImports */: return emitNamedImports(node); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return emitImportSpecifier(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return emitExportAssignment(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return emitExportDeclaration(node); - case 244 /* NamedExports */: + case 245 /* NamedExports */: return emitNamedExports(node); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return emitExportSpecifier(node); - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return; // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return emitExternalModuleReference(node); // JSX (non-expression) case 10 /* JsxText */: return emitJsxText(node); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: return emitJsxOpeningElement(node); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return emitJsxClosingElement(node); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return emitJsxAttribute(node); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return emitJsxAttributes(node); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return emitJsxExpression(node); // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: return emitCaseClause(node); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return emitDefaultClause(node); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return emitHeritageClause(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return emitCatchClause(node); // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return emitSpreadAssignment(node); // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: return emitEnumMember(node); } // If the node is an expression, try to emit it as an expression with @@ -64422,82 +64512,82 @@ var ts; case 8 /* NumericLiteral */: return emitNumericLiteral(node); case 9 /* StringLiteral */: - case 11 /* RegularExpressionLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 12 /* RegularExpressionLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return emitLiteral(node); // Identifiers - case 70 /* Identifier */: + case 71 /* Identifier */: return emitIdentifier(node); // Reserved words - case 85 /* FalseKeyword */: - case 94 /* NullKeyword */: - case 96 /* SuperKeyword */: - case 100 /* TrueKeyword */: - case 98 /* ThisKeyword */: + case 86 /* FalseKeyword */: + case 95 /* NullKeyword */: + case 97 /* SuperKeyword */: + case 101 /* TrueKeyword */: + case 99 /* ThisKeyword */: writeTokenText(kind); return; // Expressions - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return emitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return emitNewExpression(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return emitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return emitArrowFunction(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return emitDeleteExpression(node); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return emitVoidExpression(node); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return emitAwaitExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return emitBinaryExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return emitConditionalExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return emitTemplateExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return emitYieldExpression(node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return emitSpreadExpression(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return emitClassExpression(node); - case 199 /* OmittedExpression */: + case 200 /* OmittedExpression */: return; - case 201 /* AsExpression */: + case 202 /* AsExpression */: return emitAsExpression(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return emitNonNullExpression(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return emitMetaProperty(node); // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: return emitJsxElement(node); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); } } @@ -64547,7 +64637,7 @@ var ts; emit(node.right); } function emitEntityName(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -64623,7 +64713,7 @@ var ts; function emitAccessorDeclaration(node) { emitDecorators(node, node.decorators); emitModifiers(node, node.modifiers); - write(node.kind === 152 /* GetAccessor */ ? "get " : "set "); + write(node.kind === 153 /* GetAccessor */ ? "get " : "set "); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); } @@ -64811,7 +64901,7 @@ var ts; if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) { var dotRangeStart = node.expression.end; var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1; - var dotToken = { kind: 22 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd }; + var dotToken = { kind: 23 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd }; indentBeforeDot = needsIndentation(node, node.expression, dotToken); indentAfterDot = needsIndentation(node, dotToken, node.name); } @@ -64831,7 +64921,7 @@ var ts; // check if numeric literal is a decimal literal that was originally written with a dot var text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0; + && text.indexOf(ts.tokenToString(23 /* DotToken */)) < 0; } else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) { // check if constant enum value is integer @@ -64926,16 +65016,16 @@ var ts; // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. var operand = node.operand; - return operand.kind === 191 /* PrefixUnaryExpression */ - && ((node.operator === 36 /* PlusToken */ && (operand.operator === 36 /* PlusToken */ || operand.operator === 42 /* PlusPlusToken */)) - || (node.operator === 37 /* MinusToken */ && (operand.operator === 37 /* MinusToken */ || operand.operator === 43 /* MinusMinusToken */))); + return operand.kind === 192 /* PrefixUnaryExpression */ + && ((node.operator === 37 /* PlusToken */ && (operand.operator === 37 /* PlusToken */ || operand.operator === 43 /* PlusPlusToken */)) + || (node.operator === 38 /* MinusToken */ && (operand.operator === 38 /* MinusToken */ || operand.operator === 44 /* MinusMinusToken */))); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand); writeTokenText(node.operator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 25 /* CommaToken */; + var isCommaOperator = node.operatorToken.kind !== 26 /* CommaToken */; var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); emitExpression(node.left); @@ -65009,18 +65099,18 @@ var ts; // function emitBlock(node) { if (isSingleLineEmptyBlock(node)) { - writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node); + writeToken(17 /* OpenBraceToken */, node.pos, /*contextNode*/ node); write(" "); - writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); + writeToken(18 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); } else { - writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node); + writeToken(17 /* OpenBraceToken */, node.pos, /*contextNode*/ node); emitBlockStatements(node); // We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted increaseIndent(); emitLeadingCommentsOfPosition(node.statements.end); decreaseIndent(); - writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); + writeToken(18 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); } } function emitBlockStatements(node) { @@ -65044,16 +65134,16 @@ var ts; write(";"); } function emitIfStatement(node) { - var openParenPos = writeToken(89 /* IfKeyword */, node.pos, node); + var openParenPos = writeToken(90 /* IfKeyword */, node.pos, node); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos, node); + writeToken(19 /* OpenParenToken */, openParenPos, node); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end, node); + writeToken(20 /* CloseParenToken */, node.expression.end, node); emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node); - writeToken(81 /* ElseKeyword */, node.thenStatement.end, node); - if (node.elseStatement.kind === 210 /* IfStatement */) { + writeToken(82 /* ElseKeyword */, node.thenStatement.end, node); + if (node.elseStatement.kind === 211 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -65082,9 +65172,9 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos, /*contextNode*/ node); + writeToken(19 /* OpenParenToken */, openParenPos, /*contextNode*/ node); emitForBinding(node.initializer); write(";"); emitExpressionWithPrefix(" ", node.condition); @@ -65094,29 +65184,29 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitForBinding(node.initializer); write(" in "); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); emitWithSuffix(node.awaitModifier, " "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitForBinding(node.initializer); write(" of "); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForBinding(node) { if (node !== undefined) { - if (node.kind === 226 /* VariableDeclarationList */) { + if (node.kind === 227 /* VariableDeclarationList */) { emit(node); } else { @@ -65125,17 +65215,17 @@ var ts; } } function emitContinueStatement(node) { - writeToken(76 /* ContinueKeyword */, node.pos); + writeToken(77 /* ContinueKeyword */, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitBreakStatement(node) { - writeToken(71 /* BreakKeyword */, node.pos); + writeToken(72 /* BreakKeyword */, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitReturnStatement(node) { - writeToken(95 /* ReturnKeyword */, node.pos, /*contextNode*/ node); + writeToken(96 /* ReturnKeyword */, node.pos, /*contextNode*/ node); emitExpressionWithPrefix(" ", node.expression); write(";"); } @@ -65146,11 +65236,11 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - var openParenPos = writeToken(97 /* SwitchKeyword */, node.pos); + var openParenPos = writeToken(98 /* SwitchKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); write(" "); emit(node.caseBlock); } @@ -65178,7 +65268,7 @@ var ts; } } function emitDebuggerStatement(node) { - writeToken(77 /* DebuggerKeyword */, node.pos); + writeToken(78 /* DebuggerKeyword */, node.pos); write(";"); } // @@ -65297,7 +65387,7 @@ var ts; emitBlockFunctionBody(body); } decreaseIndent(); - writeToken(17 /* CloseBraceToken */, body.statements.end, body); + writeToken(18 /* CloseBraceToken */, body.statements.end, body); } function emitBlockFunctionBodyOnSingleLine(body) { emitBlockFunctionBodyWorker(body, /*emitBlockFunctionBodyOnSingleLine*/ true); @@ -65375,7 +65465,7 @@ var ts; write(node.flags & 16 /* Namespace */ ? "namespace " : "module "); emit(node.name); var body = node.body; - while (body.kind === 232 /* ModuleDeclaration */) { + while (body.kind === 233 /* ModuleDeclaration */) { write("."); emit(body.name); body = body.body; @@ -65396,9 +65486,9 @@ var ts; } } function emitCaseBlock(node) { - writeToken(16 /* OpenBraceToken */, node.pos); + writeToken(17 /* OpenBraceToken */, node.pos); emitList(node, node.clauses, 65 /* CaseBlockClauses */); - writeToken(17 /* CloseBraceToken */, node.clauses.end); + writeToken(18 /* CloseBraceToken */, node.clauses.end); } function emitImportEqualsDeclaration(node) { emitModifiers(node, node.modifiers); @@ -65409,7 +65499,7 @@ var ts; write(";"); } function emitModuleReference(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -65547,7 +65637,7 @@ var ts; } } function emitJsxTagName(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -65589,11 +65679,11 @@ var ts; emitList(node, node.types, 272 /* HeritageClauseTypes */); } function emitCatchClause(node) { - var openParenPos = writeToken(73 /* CatchKeyword */, node.pos); + var openParenPos = writeToken(74 /* CatchKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emit(node.variableDeclaration); - writeToken(19 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); + writeToken(20 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); write(" "); emit(node.block); } @@ -65979,7 +66069,7 @@ var ts; for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) { var line = lines_1[_a]; for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { - if (!ts.isWhiteSpace(line.charCodeAt(i))) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { if (indentation === undefined || i < indentation) { indentation = i; break; @@ -66107,7 +66197,7 @@ var ts; && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile); } function skipSynthesizedParentheses(node) { - while (node.kind === 184 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) { + while (node.kind === 185 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -66285,23 +66375,23 @@ var ts; */ function generateNameForNode(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return makeUniqueName(getTextOfNode(node)); - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: return generateNameForModuleOrEnum(node); - case 237 /* ImportDeclaration */: - case 243 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: + case 244 /* ExportDeclaration */: return generateNameForImportOrExportDeclaration(node); - case 227 /* FunctionDeclaration */: - case 228 /* ClassDeclaration */: - case 242 /* ExportAssignment */: + case 228 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 243 /* ExportAssignment */: return generateNameForExportDefault(); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return generateNameForClassExpression(); - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return generateNameForMethodOrAccessor(node); default: return makeTempVariableName(0 /* Auto */); @@ -67258,23 +67348,23 @@ var ts; // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); return; } // falls through - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 225 /* VariableDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 226 /* VariableDeclaration */: // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); @@ -67282,35 +67372,35 @@ var ts; } } switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return; } break; - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: var heritageClause = node; - if (heritageClause.token === 107 /* ImplementsKeyword */) { + if (heritageClause.token === 108 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return; } break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: var typeAssertionExpression = node; diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return; @@ -67325,50 +67415,50 @@ var ts; diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } switch (parent.kind) { - case 228 /* ClassDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return; } // falls through - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(nodes, parent.kind === 207 /* VariableStatement */); + return checkModifiers(nodes, parent.kind === 208 /* VariableStatement */); } break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // Check modifiers of property declaration if (nodes === parent.modifiers) { for (var _i = 0, _a = nodes; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 114 /* StaticKeyword */) { + if (modifier.kind !== 115 /* StaticKeyword */) { diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); } } return; } break; - case 145 /* Parameter */: + case 146 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return; } break; - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 200 /* ExpressionWithTypeArguments */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 201 /* ExpressionWithTypeArguments */: // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); @@ -67385,24 +67475,24 @@ var ts; for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { var modifier = modifiers_1[_i]; switch (modifier.kind) { - case 75 /* ConstKeyword */: + case 76 /* ConstKeyword */: if (isConstValid) { continue; } // to report error, // falls through - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 130 /* ReadonlyKeyword */: - case 123 /* DeclareKeyword */: - case 116 /* AbstractKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 131 /* ReadonlyKeyword */: + case 124 /* DeclareKeyword */: + case 117 /* AbstractKeyword */: diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); break; // These are all legal modifiers. - case 114 /* StaticKeyword */: - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 115 /* StaticKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: } } } @@ -67507,9 +67597,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { break; @@ -67524,7 +67614,7 @@ var ts; (imports || (imports = [])).push(moduleNameExpr); } break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) { var moduleName = node.name; // Ambient module declarations can be interpreted as augmentations for some existing external modules. @@ -69870,34 +69960,34 @@ var ts; })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {})); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 145 /* Parameter */: - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: - case 263 /* EnumMember */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 259 /* CatchClause */: - case 252 /* JsxAttribute */: + case 146 /* Parameter */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: + case 264 /* EnumMember */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 260 /* CatchClause */: + case 253 /* JsxAttribute */: return 1 /* Value */; - case 144 /* TypeParameter */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 162 /* TypeLiteral */: + case 145 /* TypeParameter */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 163 /* TypeLiteral */: return 2 /* Type */; - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } @@ -69907,25 +69997,25 @@ var ts; else { return 4 /* Namespace */; } - case 240 /* NamedImports */: - case 241 /* ImportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 237 /* ImportDeclaration */: - case 242 /* ExportAssignment */: - case 243 /* ExportDeclaration */: + case 241 /* NamedImports */: + case 242 /* ImportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 238 /* ImportDeclaration */: + case 243 /* ExportAssignment */: + case 244 /* ExportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; // An external module can be a Value - case 264 /* SourceFile */: + case 265 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return 1 /* Value */; } - else if (node.parent.kind === 242 /* ExportAssignment */) { + else if (node.parent.kind === 243 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -69946,19 +70036,19 @@ var ts; } ts.getMeaningFromLocation = getMeaningFromLocation; function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 70 /* Identifier */); + ts.Debug.assert(node.kind === 71 /* Identifier */); // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (node.parent.kind === 142 /* QualifiedName */ && + if (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node && - node.parent.parent.kind === 236 /* ImportEqualsDeclaration */) { + node.parent.parent.kind === 237 /* ImportEqualsDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function isInRightSideOfImport(node) { - while (node.parent.kind === 142 /* QualifiedName */) { + while (node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -69969,27 +70059,27 @@ var ts; function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 142 /* QualifiedName */) { - while (root.parent && root.parent.kind === 142 /* QualifiedName */) { + if (root.parent.kind === 143 /* QualifiedName */) { + while (root.parent && root.parent.kind === 143 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 158 /* TypeReference */ && !isLastClause; + return root.parent.kind === 159 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 178 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 178 /* PropertyAccessExpression */) { + if (root.parent.kind === 179 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 179 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 200 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 258 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 201 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 259 /* HeritageClause */) { var decl = root.parent.parent.parent; - return (decl.kind === 228 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) || - (decl.kind === 229 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */); + return (decl.kind === 229 /* ClassDeclaration */ && root.parent.parent.token === 108 /* ImplementsKeyword */) || + (decl.kind === 230 /* InterfaceDeclaration */ && root.parent.parent.token === 85 /* ExtendsKeyword */); } return false; } @@ -69997,17 +70087,17 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 158 /* TypeReference */ || - (node.parent.kind === 200 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || - (node.kind === 98 /* ThisKeyword */ && !ts.isPartOfExpression(node)) || - node.kind === 168 /* ThisType */; + return node.parent.kind === 159 /* TypeReference */ || + (node.parent.kind === 201 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + (node.kind === 99 /* ThisKeyword */ && !ts.isPartOfExpression(node)) || + node.kind === 169 /* ThisType */; } function isCallExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 180 /* CallExpression */); + return isCallOrNewExpressionTarget(node, 181 /* CallExpression */); } ts.isCallExpressionTarget = isCallExpressionTarget; function isNewExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 181 /* NewExpression */); + return isCallOrNewExpressionTarget(node, 182 /* NewExpression */); } ts.isNewExpressionTarget = isNewExpressionTarget; function isCallOrNewExpressionTarget(node, kind) { @@ -70020,7 +70110,7 @@ var ts; ts.climbPastPropertyAccess = climbPastPropertyAccess; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 221 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 222 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -70029,14 +70119,14 @@ var ts; } ts.getTargetLabel = getTargetLabel; function isJumpStatementTarget(node) { - return node.kind === 70 /* Identifier */ && - (node.parent.kind === 217 /* BreakStatement */ || node.parent.kind === 216 /* ContinueStatement */) && + return node.kind === 71 /* Identifier */ && + (node.parent.kind === 218 /* BreakStatement */ || node.parent.kind === 217 /* ContinueStatement */) && node.parent.label === node; } ts.isJumpStatementTarget = isJumpStatementTarget; function isLabelOfLabeledStatement(node) { - return node.kind === 70 /* Identifier */ && - node.parent.kind === 221 /* LabeledStatement */ && + return node.kind === 71 /* Identifier */ && + node.parent.kind === 222 /* LabeledStatement */ && node.parent.label === node; } function isLabelName(node) { @@ -70044,38 +70134,38 @@ var ts; } ts.isLabelName = isLabelName; function isRightSideOfQualifiedName(node) { - return node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node; + return node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node; } ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName; function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node; + return node && node.parent && node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node; } ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess; function isNameOfModuleDeclaration(node) { - return node.parent.kind === 232 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 233 /* ModuleDeclaration */ && node.parent.name === node; } ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration; function isNameOfFunctionDeclaration(node) { - return node.kind === 70 /* Identifier */ && + return node.kind === 71 /* Identifier */ && ts.isFunctionLike(node.parent) && node.parent.name === node; } ts.isNameOfFunctionDeclaration = isNameOfFunctionDeclaration; function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 263 /* EnumMember */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 232 /* ModuleDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 264 /* EnumMember */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 233 /* ModuleDeclaration */: return node.parent.name === node; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return true; } } @@ -70124,17 +70214,17 @@ var ts; return undefined; } switch (node.kind) { - case 264 /* SourceFile */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return node; } } @@ -70142,46 +70232,46 @@ var ts; ts.getContainerNode = getContainerNode; function getNodeKind(node) { switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.ScriptElementKind.moduleElement; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.ScriptElementKind.classElement; - case 229 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement; - case 230 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement; - case 231 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement; - case 225 /* VariableDeclaration */: + case 230 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement; + case 231 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement; + case 232 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement; + case 226 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return getKindOfVariableDeclaration(ts.getRootDeclaration(node)); - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return ts.ScriptElementKind.functionElement; - case 152 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement; - case 153 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 153 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement; + case 154 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement; + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return ts.ScriptElementKind.memberFunctionElement; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return ts.ScriptElementKind.memberVariableElement; - case 156 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement; - case 155 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement; - case 154 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement; - case 151 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement; - case 144 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement; - case 263 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement; - case 145 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; - case 236 /* ImportEqualsDeclaration */: - case 241 /* ImportSpecifier */: - case 238 /* ImportClause */: - case 245 /* ExportSpecifier */: - case 239 /* NamespaceImport */: + case 157 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement; + case 156 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement; + case 155 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement; + case 152 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement; + case 145 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement; + case 264 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement; + case 146 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; + case 237 /* ImportEqualsDeclaration */: + case 242 /* ImportSpecifier */: + case 239 /* ImportClause */: + case 246 /* ExportSpecifier */: + case 240 /* NamespaceImport */: return ts.ScriptElementKind.alias; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return ts.ScriptElementKind.typeElement; default: return ts.ScriptElementKind.unknown; @@ -70197,12 +70287,12 @@ var ts; ts.getNodeKind = getNodeKind; function isThis(node) { switch (node.kind) { - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: // case SyntaxKind.ThisType: TODO: GH#9267 return true; - case 70 /* Identifier */: + case 71 /* Identifier */: // 'this' as a parameter - return ts.identifierIsThisKeyword(node) && node.parent.kind === 145 /* Parameter */; + return ts.identifierIsThisKeyword(node) && node.parent.kind === 146 /* Parameter */; default: return false; } @@ -70247,42 +70337,42 @@ var ts; return false; } switch (n.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 173 /* ObjectBindingPattern */: - case 162 /* TypeLiteral */: - case 206 /* Block */: - case 233 /* ModuleBlock */: - case 234 /* CaseBlock */: - case 240 /* NamedImports */: - case 244 /* NamedExports */: - return nodeEndsWith(n, 17 /* CloseBraceToken */, sourceFile); - case 259 /* CatchClause */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 163 /* TypeLiteral */: + case 207 /* Block */: + case 234 /* ModuleBlock */: + case 235 /* CaseBlock */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: + return nodeEndsWith(n, 18 /* CloseBraceToken */, sourceFile); + case 260 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 181 /* NewExpression */: + case 182 /* NewExpression */: if (!n.arguments) { return true; } // falls through - case 180 /* CallExpression */: - case 184 /* ParenthesizedExpression */: - case 167 /* ParenthesizedType */: - return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 181 /* CallExpression */: + case 185 /* ParenthesizedExpression */: + case 168 /* ParenthesizedType */: + return nodeEndsWith(n, 20 /* CloseParenToken */, sourceFile); + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 186 /* ArrowFunction */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 187 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -70291,68 +70381,68 @@ var ts; } // Even though type parameters can be unclosed, we can get away with // having at least a closing paren. - return hasChildOfKind(n, 19 /* CloseParenToken */, sourceFile); - case 232 /* ModuleDeclaration */: + return hasChildOfKind(n, 20 /* CloseParenToken */, sourceFile); + case 233 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 210 /* IfStatement */: + case 211 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || - hasChildOfKind(n, 24 /* SemicolonToken */); - case 176 /* ArrayLiteralExpression */: - case 174 /* ArrayBindingPattern */: - case 179 /* ElementAccessExpression */: - case 143 /* ComputedPropertyName */: - case 164 /* TupleType */: - return nodeEndsWith(n, 21 /* CloseBracketToken */, sourceFile); - case 156 /* IndexSignature */: + hasChildOfKind(n, 25 /* SemicolonToken */); + case 177 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 180 /* ElementAccessExpression */: + case 144 /* ComputedPropertyName */: + case 165 /* TupleType */: + return nodeEndsWith(n, 22 /* CloseBracketToken */, sourceFile); + case 157 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 21 /* CloseBracketToken */, sourceFile); - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + return hasChildOfKind(n, 22 /* CloseBracketToken */, sourceFile); + case 257 /* CaseClause */: + case 258 /* DefaultClause */: // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicity always consider them non-completed return false; - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 211 /* DoStatement */: + case 212 /* DoStatement */: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = findChildOfKind(n, 105 /* WhileKeyword */, sourceFile); + var hasWhileKeyword = findChildOfKind(n, 106 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { - return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile); + return nodeEndsWith(n, 20 /* CloseParenToken */, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 188 /* TypeOfExpression */: - case 187 /* DeleteExpression */: - case 189 /* VoidExpression */: - case 196 /* YieldExpression */: - case 197 /* SpreadElement */: + case 189 /* TypeOfExpression */: + case 188 /* DeleteExpression */: + case 190 /* VoidExpression */: + case 197 /* YieldExpression */: + case 198 /* SpreadElement */: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return ts.nodeIsPresent(n.literal); - case 243 /* ExportDeclaration */: - case 237 /* ImportDeclaration */: + case 244 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: return ts.nodeIsPresent(n.moduleSpecifier); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -70370,7 +70460,7 @@ var ts; if (last.kind === expectedLastToken) { return true; } - else if (last.kind === 24 /* SemicolonToken */ && children.length !== 1) { + else if (last.kind === 25 /* SemicolonToken */ && children.length !== 1) { return children[children.length - 2].kind === expectedLastToken; } } @@ -70408,7 +70498,7 @@ var ts; // for the position of the relevant node (or comma). var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { // find syntax list that covers the span of the node - if (c.kind === 293 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 294 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -70580,7 +70670,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 264 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */); // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. @@ -70635,21 +70725,21 @@ var ts; return true; } //
Hello |
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 10 /* JsxText */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 10 /* JsxText */) { return true; } //
{ |
or
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 255 /* JsxExpression */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 256 /* JsxExpression */) { return true; } //
{ // | // } < /div> - if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 255 /* JsxExpression */) { + if (token && token.kind === 18 /* CloseBraceToken */ && token.parent.kind === 256 /* JsxExpression */) { return true; } //
|
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 251 /* JsxClosingElement */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 252 /* JsxClosingElement */) { return true; } return false; @@ -70706,9 +70796,9 @@ var ts; var node = ts.getTokenAtPosition(sourceFile, position); if (ts.isToken(node)) { switch (node.kind) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: // if the current token is var, let or const, skip the VariableDeclarationList node = node.parent === undefined ? undefined : node.parent.parent; break; @@ -70761,17 +70851,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 158 /* TypeReference */ || node.kind === 180 /* CallExpression */) { + if (node.kind === 159 /* TypeReference */ || node.kind === 181 /* CallExpression */) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 228 /* ClassDeclaration */ || node.kind === 229 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(node) || node.kind === 229 /* ClassDeclaration */ || node.kind === 230 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isWord(kind) { - return kind === 70 /* Identifier */ || ts.isKeyword(kind); + return kind === 71 /* Identifier */ || ts.isKeyword(kind); } ts.isWord = isWord; function isPropertyName(kind) { @@ -70783,7 +70873,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 /* StringLiteral */ - || kind === 11 /* RegularExpressionLiteral */ + || kind === 12 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(kind)) { return true; } @@ -70791,7 +70881,7 @@ var ts; } ts.isStringOrRegularExpressionOrTemplateLiteral = isStringOrRegularExpressionOrTemplateLiteral; function isPunctuation(kind) { - return 16 /* FirstPunctuation */ <= kind && kind <= 69 /* LastPunctuation */; + return 17 /* FirstPunctuation */ <= kind && kind <= 70 /* LastPunctuation */; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { @@ -70801,9 +70891,9 @@ var ts; ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function isAccessibilityModifier(kind) { switch (kind) { - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: return true; } return false; @@ -70826,18 +70916,18 @@ var ts; } ts.compareDataObjects = compareDataObjects; function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 176 /* ArrayLiteralExpression */ || - node.kind === 177 /* ObjectLiteralExpression */) { + if (node.kind === 177 /* ArrayLiteralExpression */ || + node.kind === 178 /* ObjectLiteralExpression */) { // [a,b,c] from: // [a, b, c] = someExpression; - if (node.parent.kind === 193 /* BinaryExpression */ && + if (node.parent.kind === 194 /* BinaryExpression */ && node.parent.left === node && - node.parent.operatorToken.kind === 57 /* EqualsToken */) { + node.parent.operatorToken.kind === 58 /* EqualsToken */) { return true; } // [a, b, c] from: // for([a, b, c] of expression) - if (node.parent.kind === 215 /* ForOfStatement */ && + if (node.parent.kind === 216 /* ForOfStatement */ && node.parent.initializer === node) { return true; } @@ -70845,7 +70935,7 @@ var ts; // [x, [a, b, c] ] = someExpression // or // {x, a: {a, b, c} } = someExpression - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 261 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -70879,14 +70969,14 @@ var ts; ts.createTextSpanFromNode = createTextSpanFromNode; function isTypeKeyword(kind) { switch (kind) { - case 118 /* AnyKeyword */: - case 121 /* BooleanKeyword */: - case 129 /* NeverKeyword */: - case 132 /* NumberKeyword */: - case 133 /* ObjectKeyword */: - case 135 /* StringKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: + case 119 /* AnyKeyword */: + case 122 /* BooleanKeyword */: + case 130 /* NeverKeyword */: + case 133 /* NumberKeyword */: + case 134 /* ObjectKeyword */: + case 136 /* StringKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: return true; default: return false; @@ -70913,7 +71003,7 @@ var ts; /* @internal */ (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145 /* Parameter */; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 146 /* Parameter */; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -71091,7 +71181,7 @@ var ts; function getDeclaredName(typeChecker, symbol, location) { // If this is an export or import specifier it could have been renamed using the 'as' syntax. // If so we want to search for whatever is under the cursor. - if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143 /* ComputedPropertyName */) { + if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 144 /* ComputedPropertyName */) { return location.text; } // Try to get the local symbol if we're dealing with an 'export default' @@ -71102,7 +71192,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 241 /* ImportSpecifier */ || location.parent.kind === 245 /* ExportSpecifier */) && + (location.parent.kind === 242 /* ImportSpecifier */ || location.parent.kind === 246 /* ExportSpecifier */) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -71169,7 +71259,7 @@ var ts; } ts.sanitizeConfigFile = sanitizeConfigFile; function getFirstNonSpaceCharacterPosition(text, position) { - while (ts.isWhiteSpace(text.charCodeAt(position))) { + while (ts.isWhiteSpaceLike(text.charCodeAt(position))) { position += 1; } return position; @@ -71195,18 +71285,18 @@ var ts; /// we have a series of divide operator. this list allows us to be more accurate by ruling out /// locations where a regexp cannot exist. var noRegexTable = []; - noRegexTable[70 /* Identifier */] = true; + noRegexTable[71 /* Identifier */] = true; noRegexTable[9 /* StringLiteral */] = true; noRegexTable[8 /* NumericLiteral */] = true; - noRegexTable[11 /* RegularExpressionLiteral */] = true; - noRegexTable[98 /* ThisKeyword */] = true; - noRegexTable[42 /* PlusPlusToken */] = true; - noRegexTable[43 /* MinusMinusToken */] = true; - noRegexTable[19 /* CloseParenToken */] = true; - noRegexTable[21 /* CloseBracketToken */] = true; - noRegexTable[17 /* CloseBraceToken */] = true; - noRegexTable[100 /* TrueKeyword */] = true; - noRegexTable[85 /* FalseKeyword */] = true; + noRegexTable[12 /* RegularExpressionLiteral */] = true; + noRegexTable[99 /* ThisKeyword */] = true; + noRegexTable[43 /* PlusPlusToken */] = true; + noRegexTable[44 /* MinusMinusToken */] = true; + noRegexTable[20 /* CloseParenToken */] = true; + noRegexTable[22 /* CloseBracketToken */] = true; + noRegexTable[18 /* CloseBraceToken */] = true; + noRegexTable[101 /* TrueKeyword */] = true; + noRegexTable[86 /* FalseKeyword */] = true; // Just a stack of TemplateHeads and OpenCurlyBraces, used to perform rudimentary (inexact) // classification on template strings. Because of the context free nature of templates, // the only precise way to classify a template portion would be by propagating the stack across @@ -71231,10 +71321,10 @@ var ts; /** Returns true if 'keyword2' can legally follow 'keyword1' in any language construct. */ function canFollow(keyword1, keyword2) { if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 124 /* GetKeyword */ || - keyword2 === 134 /* SetKeyword */ || - keyword2 === 122 /* ConstructorKeyword */ || - keyword2 === 114 /* StaticKeyword */) { + if (keyword2 === 125 /* GetKeyword */ || + keyword2 === 135 /* SetKeyword */ || + keyword2 === 123 /* ConstructorKeyword */ || + keyword2 === 115 /* StaticKeyword */) { // Allow things like "public get", "public constructor" and "public static". // These are all legal. return true; @@ -71333,7 +71423,7 @@ var ts; offset = 2; // falls through case 6 /* InTemplateSubstitutionPosition */: - templateStack.push(13 /* TemplateHead */); + templateStack.push(14 /* TemplateHead */); break; } scanner.setText(text); @@ -71364,71 +71454,71 @@ var ts; do { token = scanner.scan(); if (!ts.isTrivia(token)) { - if ((token === 40 /* SlashToken */ || token === 62 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 11 /* RegularExpressionLiteral */) { - token = 11 /* RegularExpressionLiteral */; + if ((token === 41 /* SlashToken */ || token === 63 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { + if (scanner.reScanSlashToken() === 12 /* RegularExpressionLiteral */) { + token = 12 /* RegularExpressionLiteral */; } } - else if (lastNonTriviaToken === 22 /* DotToken */ && isKeyword(token)) { - token = 70 /* Identifier */; + else if (lastNonTriviaToken === 23 /* DotToken */ && isKeyword(token)) { + token = 71 /* Identifier */; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { // We have two keywords in a row. Only treat the second as a keyword if // it's a sequence that could legally occur in the language. Otherwise // treat it as an identifier. This way, if someone writes "private var" // we recognize that 'var' is actually an identifier here. - token = 70 /* Identifier */; + token = 71 /* Identifier */; } - else if (lastNonTriviaToken === 70 /* Identifier */ && - token === 26 /* LessThanToken */) { + else if (lastNonTriviaToken === 71 /* Identifier */ && + token === 27 /* LessThanToken */) { // Could be the start of something generic. Keep track of that by bumping // up the current count of generic contexts we may be in. angleBracketStack++; } - else if (token === 28 /* GreaterThanToken */ && angleBracketStack > 0) { + else if (token === 29 /* GreaterThanToken */ && angleBracketStack > 0) { // If we think we're currently in something generic, then mark that that // generic entity is complete. angleBracketStack--; } - else if (token === 118 /* AnyKeyword */ || - token === 135 /* StringKeyword */ || - token === 132 /* NumberKeyword */ || - token === 121 /* BooleanKeyword */ || - token === 136 /* SymbolKeyword */) { + else if (token === 119 /* AnyKeyword */ || + token === 136 /* StringKeyword */ || + token === 133 /* NumberKeyword */ || + token === 122 /* BooleanKeyword */ || + token === 137 /* SymbolKeyword */) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { // If it looks like we're could be in something generic, don't classify this // as a keyword. We may just get overwritten by the syntactic classifier, // causing a noisy experience for the user. - token = 70 /* Identifier */; + token = 71 /* Identifier */; } } - else if (token === 13 /* TemplateHead */) { + else if (token === 14 /* TemplateHead */) { templateStack.push(token); } - else if (token === 16 /* OpenBraceToken */) { + else if (token === 17 /* OpenBraceToken */) { // If we don't have anything on the template stack, // then we aren't trying to keep track of a previously scanned template head. if (templateStack.length > 0) { templateStack.push(token); } } - else if (token === 17 /* CloseBraceToken */) { + else if (token === 18 /* CloseBraceToken */) { // If we don't have anything on the template stack, // then we aren't trying to keep track of a previously scanned template head. if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 13 /* TemplateHead */) { + if (lastTemplateStackToken === 14 /* TemplateHead */) { token = scanner.reScanTemplateToken(); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. - if (token === 15 /* TemplateTail */) { + if (token === 16 /* TemplateTail */) { templateStack.pop(); } else { - ts.Debug.assert(token === 14 /* TemplateMiddle */, "Should have been a template middle. Was " + token); + ts.Debug.assert(token === 15 /* TemplateMiddle */, "Should have been a template middle. Was " + token); } } else { - ts.Debug.assert(lastTemplateStackToken === 16 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); + ts.Debug.assert(lastTemplateStackToken === 17 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); templateStack.pop(); } } @@ -71469,10 +71559,10 @@ var ts; } else if (ts.isTemplateLiteralKind(token)) { if (scanner.isUnterminated()) { - if (token === 15 /* TemplateTail */) { + if (token === 16 /* TemplateTail */) { result.endOfLineState = 5 /* InTemplateMiddleOrTail */; } - else if (token === 12 /* NoSubstitutionTemplateLiteral */) { + else if (token === 13 /* NoSubstitutionTemplateLiteral */) { result.endOfLineState = 4 /* InTemplateHeadOrNoSubstitutionTemplate */; } else { @@ -71480,7 +71570,7 @@ var ts; } } } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 13 /* TemplateHead */) { + else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 14 /* TemplateHead */) { result.endOfLineState = 6 /* InTemplateSubstitutionPosition */; } } @@ -71510,43 +71600,43 @@ var ts; } function isBinaryExpressionOperatorToken(token) { switch (token) { - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: - case 92 /* InstanceOfKeyword */: - case 91 /* InKeyword */: - case 117 /* AsKeyword */: - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: - case 47 /* AmpersandToken */: - case 49 /* CaretToken */: - case 48 /* BarToken */: - case 52 /* AmpersandAmpersandToken */: - case 53 /* BarBarToken */: - case 68 /* BarEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 57 /* EqualsToken */: - case 25 /* CommaToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: + case 93 /* InstanceOfKeyword */: + case 92 /* InKeyword */: + case 118 /* AsKeyword */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: + case 48 /* AmpersandToken */: + case 50 /* CaretToken */: + case 49 /* BarToken */: + case 53 /* AmpersandAmpersandToken */: + case 54 /* BarBarToken */: + case 69 /* BarEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 58 /* EqualsToken */: + case 26 /* CommaToken */: return true; default: return false; @@ -71554,19 +71644,19 @@ var ts; } function isPrefixUnaryExpressionOperatorToken(token) { switch (token) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: return true; default: return false; } } function isKeyword(token) { - return token >= 71 /* FirstKeyword */ && token <= 141 /* LastKeyword */; + return token >= 72 /* FirstKeyword */ && token <= 142 /* LastKeyword */; } function classFromKind(token) { if (isKeyword(token)) { @@ -71575,7 +71665,7 @@ var ts; else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { return 5 /* operator */; } - else if (token >= 16 /* FirstPunctuation */ && token <= 69 /* LastPunctuation */) { + else if (token >= 17 /* FirstPunctuation */ && token <= 70 /* LastPunctuation */) { return 10 /* punctuation */; } switch (token) { @@ -71583,7 +71673,7 @@ var ts; return 4 /* numericLiteral */; case 9 /* StringLiteral */: return 6 /* stringLiteral */; - case 11 /* RegularExpressionLiteral */: + case 12 /* RegularExpressionLiteral */: return 7 /* regularExpressionLiteral */; case 7 /* ConflictMarkerTrivia */: case 3 /* MultiLineCommentTrivia */: @@ -71592,7 +71682,7 @@ var ts; case 5 /* WhitespaceTrivia */: case 4 /* NewLineTrivia */: return 8 /* whiteSpace */; - case 70 /* Identifier */: + case 71 /* Identifier */: default: if (ts.isTemplateLiteralKind(token)) { return 6 /* stringLiteral */; @@ -71623,10 +71713,10 @@ var ts; // That means we're calling back into the host around every 1.2k of the file we process. // Lib.d.ts has similar numbers. switch (kind) { - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } @@ -71677,7 +71767,7 @@ var ts; */ function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 232 /* ModuleDeclaration */ && + return declaration.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) === 1 /* Instantiated */; }); } @@ -71687,7 +71777,7 @@ var ts; if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { var kind = node.kind; checkForClassificationCancellation(cancellationToken, kind); - if (kind === 70 /* Identifier */ && !ts.nodeIsMissing(node)) { + if (kind === 71 /* Identifier */ && !ts.nodeIsMissing(node)) { var identifier = node; // Only bother calling into the typechecker if this is an identifier that // could possibly resolve to a type name. This makes classification run @@ -71841,16 +71931,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); pos = tag.tagName.end; switch (tag.kind) { - case 285 /* JSDocParameterTag */: + case 286 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 288 /* JSDocTemplateTag */: + case 289 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); break; - case 287 /* JSDocTypeTag */: + case 288 /* JSDocTypeTag */: processElement(tag.typeExpression); break; - case 286 /* JSDocReturnTag */: + case 287 /* JSDocReturnTag */: processElement(tag.typeExpression); break; } @@ -71937,22 +72027,22 @@ var ts; } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -71969,7 +72059,7 @@ var ts; } // Special case < and > If they appear in a generic context they are punctuation, // not operators. - if (tokenKind === 26 /* LessThanToken */ || tokenKind === 28 /* GreaterThanToken */) { + if (tokenKind === 27 /* LessThanToken */ || tokenKind === 29 /* GreaterThanToken */) { // If the node owning the token has a type argument list or type parameter list, then // we can effectively assume that a '<' and '>' belong to those lists. if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { @@ -71978,19 +72068,19 @@ var ts; } if (ts.isPunctuation(tokenKind)) { if (token) { - if (tokenKind === 57 /* EqualsToken */) { + if (tokenKind === 58 /* EqualsToken */) { // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 225 /* VariableDeclaration */ || - token.parent.kind === 148 /* PropertyDeclaration */ || - token.parent.kind === 145 /* Parameter */ || - token.parent.kind === 252 /* JsxAttribute */) { + if (token.parent.kind === 226 /* VariableDeclaration */ || + token.parent.kind === 149 /* PropertyDeclaration */ || + token.parent.kind === 146 /* Parameter */ || + token.parent.kind === 253 /* JsxAttribute */) { return 5 /* operator */; } } - if (token.parent.kind === 193 /* BinaryExpression */ || - token.parent.kind === 191 /* PrefixUnaryExpression */ || - token.parent.kind === 192 /* PostfixUnaryExpression */ || - token.parent.kind === 194 /* ConditionalExpression */) { + if (token.parent.kind === 194 /* BinaryExpression */ || + token.parent.kind === 192 /* PrefixUnaryExpression */ || + token.parent.kind === 193 /* PostfixUnaryExpression */ || + token.parent.kind === 195 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -72000,9 +72090,9 @@ var ts; return 4 /* numericLiteral */; } else if (tokenKind === 9 /* StringLiteral */) { - return token.parent.kind === 252 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token.parent.kind === 253 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } - else if (tokenKind === 11 /* RegularExpressionLiteral */) { + else if (tokenKind === 12 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. return 6 /* stringLiteral */; } @@ -72013,35 +72103,35 @@ var ts; else if (tokenKind === 10 /* JsxText */) { return 23 /* jsxText */; } - else if (tokenKind === 70 /* Identifier */) { + else if (tokenKind === 71 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 145 /* Parameter */: + case 146 /* Parameter */: if (token.parent.name === token) { return ts.isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -72581,7 +72671,7 @@ var ts; else { if (!symbols || symbols.length === 0) { if (sourceFile.languageVariant === 1 /* JSX */ && - location.parent && location.parent.kind === 251 /* JsxClosingElement */) { + location.parent && location.parent.kind === 252 /* JsxClosingElement */) { // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. // For example: @@ -72677,8 +72767,8 @@ var ts; if (!node || node.kind !== 9 /* StringLiteral */) { return undefined; } - if (node.parent.kind === 260 /* PropertyAssignment */ && - node.parent.parent.kind === 177 /* ObjectLiteralExpression */ && + if (node.parent.kind === 261 /* PropertyAssignment */ && + node.parent.parent.kind === 178 /* ObjectLiteralExpression */ && node.parent.name === node) { // Get quoted name of properties of the object literal expression // i.e. interface ConfigFiles { @@ -72703,7 +72793,7 @@ var ts; // a['/*completion position*/'] return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log); } - else if (node.parent.kind === 237 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) { + else if (node.parent.kind === 238 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) { // Get all known external module names or complete a path to a module // i.e. import * as ns from "/*completion position*/"; // import x = require("/*completion position*/"); @@ -72903,9 +72993,9 @@ var ts; requestJsDocTagName = true; } switch (tag.kind) { - case 287 /* JSDocTypeTag */: - case 285 /* JSDocParameterTag */: - case 286 /* JSDocReturnTag */: + case 288 /* JSDocTypeTag */: + case 286 /* JSDocParameterTag */: + case 287 /* JSDocReturnTag */: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -72951,12 +73041,12 @@ var ts; return undefined; } var parent = contextToken.parent; - if (contextToken.kind === 22 /* DotToken */) { - if (parent.kind === 178 /* PropertyAccessExpression */) { + if (contextToken.kind === 23 /* DotToken */) { + if (parent.kind === 179 /* PropertyAccessExpression */) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent.kind === 142 /* QualifiedName */) { + else if (parent.kind === 143 /* QualifiedName */) { node = contextToken.parent.left; isRightOfDot = true; } @@ -72970,27 +73060,27 @@ var ts; // // If the tagname is a property access expression, we will then walk up to the top most of property access expression. // Then, try to get a JSX container and its associated attributes type. - if (parent && parent.kind === 178 /* PropertyAccessExpression */) { + if (parent && parent.kind === 179 /* PropertyAccessExpression */) { contextToken = parent; parent = parent.parent; } switch (parent.kind) { - case 251 /* JsxClosingElement */: - if (contextToken.kind === 40 /* SlashToken */) { + case 252 /* JsxClosingElement */: + if (contextToken.kind === 41 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: if (!(parent.left.flags & 32768 /* ThisNodeHasError */)) { // It has a left-hand side, so we're not in an opening JSX tag. break; } // falls through - case 249 /* JsxSelfClosingElement */: - case 248 /* JsxElement */: - case 250 /* JsxOpeningElement */: - if (contextToken.kind === 26 /* LessThanToken */) { + case 250 /* JsxSelfClosingElement */: + case 249 /* JsxElement */: + case 251 /* JsxOpeningElement */: + if (contextToken.kind === 27 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } @@ -73041,7 +73131,7 @@ var ts; isGlobalCompletion = false; isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */) { + if (node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */) { var symbol = typeChecker.getSymbolAtLocation(node); // This is an alias, follow what it aliases if (symbol && symbol.flags & 8388608 /* Alias */) { @@ -73097,7 +73187,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType = void 0; - if ((jsxContainer.kind === 249 /* JsxSelfClosingElement */) || (jsxContainer.kind === 250 /* JsxOpeningElement */)) { + if ((jsxContainer.kind === 250 /* JsxSelfClosingElement */) || (jsxContainer.kind === 251 /* JsxOpeningElement */)) { // Cursor is inside a JSX self-closing element or opening element attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer); if (attrsType) { @@ -73145,9 +73235,9 @@ var ts; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; if (scopeNode) { isGlobalCompletion = - scopeNode.kind === 264 /* SourceFile */ || - scopeNode.kind === 195 /* TemplateExpression */ || - scopeNode.kind === 255 /* JsxExpression */ || + scopeNode.kind === 265 /* SourceFile */ || + scopeNode.kind === 196 /* TemplateExpression */ || + scopeNode.kind === 256 /* JsxExpression */ || ts.isStatement(scopeNode); } /// TODO filter meaning based on the current context @@ -73179,12 +73269,12 @@ var ts; if (contextToken.kind === 10 /* JsxText */) { return true; } - if (contextToken.kind === 28 /* GreaterThanToken */ && contextToken.parent) { - if (contextToken.parent.kind === 250 /* JsxOpeningElement */) { + if (contextToken.kind === 29 /* GreaterThanToken */ && contextToken.parent) { + if (contextToken.parent.kind === 251 /* JsxOpeningElement */) { return true; } - if (contextToken.parent.kind === 251 /* JsxClosingElement */ || contextToken.parent.kind === 249 /* JsxSelfClosingElement */) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 248 /* JsxElement */; + if (contextToken.parent.kind === 252 /* JsxClosingElement */ || contextToken.parent.kind === 250 /* JsxSelfClosingElement */) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 249 /* JsxElement */; } } return false; @@ -73193,41 +73283,41 @@ var ts; if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { - case 25 /* CommaToken */: - return containingNodeKind === 180 /* CallExpression */ // func( a, | - || containingNodeKind === 151 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ - || containingNodeKind === 181 /* NewExpression */ // new C(a, | - || containingNodeKind === 176 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 193 /* BinaryExpression */ // const x = (a, | - || containingNodeKind === 159 /* FunctionType */; // var x: (s: string, list| - case 18 /* OpenParenToken */: - return containingNodeKind === 180 /* CallExpression */ // func( | - || containingNodeKind === 151 /* Constructor */ // constructor( | - || containingNodeKind === 181 /* NewExpression */ // new C(a| - || containingNodeKind === 184 /* ParenthesizedExpression */ // const x = (a| - || containingNodeKind === 167 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ - case 20 /* OpenBracketToken */: - return containingNodeKind === 176 /* ArrayLiteralExpression */ // [ | - || containingNodeKind === 156 /* IndexSignature */ // [ | : string ] - || containingNodeKind === 143 /* ComputedPropertyName */; // [ | /* this can become an index signature */ - case 127 /* ModuleKeyword */: // module | - case 128 /* NamespaceKeyword */: + case 26 /* CommaToken */: + return containingNodeKind === 181 /* CallExpression */ // func( a, | + || containingNodeKind === 152 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + || containingNodeKind === 182 /* NewExpression */ // new C(a, | + || containingNodeKind === 177 /* ArrayLiteralExpression */ // [a, | + || containingNodeKind === 194 /* BinaryExpression */ // const x = (a, | + || containingNodeKind === 160 /* FunctionType */; // var x: (s: string, list| + case 19 /* OpenParenToken */: + return containingNodeKind === 181 /* CallExpression */ // func( | + || containingNodeKind === 152 /* Constructor */ // constructor( | + || containingNodeKind === 182 /* NewExpression */ // new C(a| + || containingNodeKind === 185 /* ParenthesizedExpression */ // const x = (a| + || containingNodeKind === 168 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ + case 21 /* OpenBracketToken */: + return containingNodeKind === 177 /* ArrayLiteralExpression */ // [ | + || containingNodeKind === 157 /* IndexSignature */ // [ | : string ] + || containingNodeKind === 144 /* ComputedPropertyName */; // [ | /* this can become an index signature */ + case 128 /* ModuleKeyword */: // module | + case 129 /* NamespaceKeyword */: return true; - case 22 /* DotToken */: - return containingNodeKind === 232 /* ModuleDeclaration */; // module A.| - case 16 /* OpenBraceToken */: - return containingNodeKind === 228 /* ClassDeclaration */; // class A{ | - case 57 /* EqualsToken */: - return containingNodeKind === 225 /* VariableDeclaration */ // const x = a| - || containingNodeKind === 193 /* BinaryExpression */; // x = a| - case 13 /* TemplateHead */: - return containingNodeKind === 195 /* TemplateExpression */; // `aa ${| - case 14 /* TemplateMiddle */: - return containingNodeKind === 204 /* TemplateSpan */; // `aa ${10} dd ${| - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - return containingNodeKind === 148 /* PropertyDeclaration */; // class A{ public | + case 23 /* DotToken */: + return containingNodeKind === 233 /* ModuleDeclaration */; // module A.| + case 17 /* OpenBraceToken */: + return containingNodeKind === 229 /* ClassDeclaration */; // class A{ | + case 58 /* EqualsToken */: + return containingNodeKind === 226 /* VariableDeclaration */ // const x = a| + || containingNodeKind === 194 /* BinaryExpression */; // x = a| + case 14 /* TemplateHead */: + return containingNodeKind === 196 /* TemplateExpression */; // `aa ${| + case 15 /* TemplateMiddle */: + return containingNodeKind === 205 /* TemplateSpan */; // `aa ${10} dd ${| + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + return containingNodeKind === 149 /* PropertyDeclaration */; // class A{ public | } // Previous token may have been a keyword that was converted to an identifier. switch (previousToken.getText()) { @@ -73241,7 +73331,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ - || contextToken.kind === 11 /* RegularExpressionLiteral */ + || contextToken.kind === 12 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { var start_3 = contextToken.getStart(); var end = contextToken.getEnd(); @@ -73254,7 +73344,7 @@ var ts; } if (position === end) { return !!contextToken.isUnterminated - || contextToken.kind === 11 /* RegularExpressionLiteral */; + || contextToken.kind === 12 /* RegularExpressionLiteral */; } } return false; @@ -73270,7 +73360,7 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 177 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 178 /* ObjectLiteralExpression */) { // We are completing on contextual types, but may also include properties // other than those within the declared type. isNewIdentifierLocation = true; @@ -73280,7 +73370,7 @@ var ts; typeForObject = typeForObject && typeForObject.getNonNullableType(); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 173 /* ObjectBindingPattern */) { + else if (objectLikeContainer.kind === 174 /* ObjectBindingPattern */) { // We are *only* completing on properties from the type being destructured. isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); @@ -73291,11 +73381,11 @@ var ts; // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed - // type of parameter will flow in from the contextual type of the function var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type); - if (!canGetType && rootDeclaration.kind === 145 /* Parameter */) { + if (!canGetType && rootDeclaration.kind === 146 /* Parameter */) { if (ts.isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); } - else if (rootDeclaration.parent.kind === 150 /* MethodDeclaration */ || rootDeclaration.parent.kind === 153 /* SetAccessor */) { + else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) { canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -73337,9 +73427,9 @@ var ts; * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 240 /* NamedImports */ ? - 237 /* ImportDeclaration */ : - 243 /* ExportDeclaration */; + var declarationKind = namedImportsOrExports.kind === 241 /* NamedImports */ ? + 238 /* ImportDeclaration */ : + 244 /* ExportDeclaration */; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -73363,10 +73453,10 @@ var ts; function tryGetObjectLikeCompletionContainer(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16 /* OpenBraceToken */: // const x = { | - case 25 /* CommaToken */: + case 17 /* OpenBraceToken */: // const x = { | + case 26 /* CommaToken */: var parent = contextToken.parent; - if (parent && (parent.kind === 177 /* ObjectLiteralExpression */ || parent.kind === 173 /* ObjectBindingPattern */)) { + if (parent && (parent.kind === 178 /* ObjectLiteralExpression */ || parent.kind === 174 /* ObjectBindingPattern */)) { return parent; } break; @@ -73381,11 +73471,11 @@ var ts; function tryGetNamedImportsOrExportsForCompletion(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16 /* OpenBraceToken */: // import { | - case 25 /* CommaToken */: + case 17 /* OpenBraceToken */: // import { | + case 26 /* CommaToken */: switch (contextToken.parent.kind) { - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return contextToken.parent; } } @@ -73396,17 +73486,17 @@ var ts; if (contextToken) { var parent = contextToken.parent; switch (contextToken.kind) { - case 27 /* LessThanSlashToken */: - case 40 /* SlashToken */: - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 253 /* JsxAttributes */: - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: - if (parent && (parent.kind === 249 /* JsxSelfClosingElement */ || parent.kind === 250 /* JsxOpeningElement */)) { + case 28 /* LessThanSlashToken */: + case 41 /* SlashToken */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 254 /* JsxAttributes */: + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: + if (parent && (parent.kind === 250 /* JsxSelfClosingElement */ || parent.kind === 251 /* JsxOpeningElement */)) { return parent; } - else if (parent.kind === 252 /* JsxAttribute */) { + else if (parent.kind === 253 /* JsxAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73418,7 +73508,7 @@ var ts; // its parent is a JsxExpression, whose parent is a JsxAttribute, // whose parent is a JsxOpeningLikeElement case 9 /* StringLiteral */: - if (parent && ((parent.kind === 252 /* JsxAttribute */) || (parent.kind === 254 /* JsxSpreadAttribute */))) { + if (parent && ((parent.kind === 253 /* JsxAttribute */) || (parent.kind === 255 /* JsxSpreadAttribute */))) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73426,10 +73516,10 @@ var ts; return parent.parent.parent; } break; - case 17 /* CloseBraceToken */: + case 18 /* CloseBraceToken */: if (parent && - parent.kind === 255 /* JsxExpression */ && - parent.parent && parent.parent.kind === 252 /* JsxAttribute */) { + parent.kind === 256 /* JsxExpression */ && + parent.parent && parent.parent.kind === 253 /* JsxAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73437,7 +73527,7 @@ var ts; // each JsxAttribute can have initializer as JsxExpression return parent.parent.parent.parent; } - if (parent && parent.kind === 254 /* JsxSpreadAttribute */) { + if (parent && parent.kind === 255 /* JsxSpreadAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73454,9 +73544,9 @@ var ts; return false; } switch (kind) { - case 151 /* Constructor */: - case 160 /* ConstructorType */: - case 159 /* FunctionType */: + case 152 /* Constructor */: + case 161 /* ConstructorType */: + case 160 /* FunctionType */: return false; default: return true; @@ -73468,67 +73558,67 @@ var ts; function isSolelyIdentifierDefinitionLocation(contextToken) { var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { - case 25 /* CommaToken */: - return containingNodeKind === 225 /* VariableDeclaration */ || - containingNodeKind === 226 /* VariableDeclarationList */ || - containingNodeKind === 207 /* VariableStatement */ || - containingNodeKind === 231 /* EnumDeclaration */ || + case 26 /* CommaToken */: + return containingNodeKind === 226 /* VariableDeclaration */ || + containingNodeKind === 227 /* VariableDeclarationList */ || + containingNodeKind === 208 /* VariableStatement */ || + containingNodeKind === 232 /* EnumDeclaration */ || isFunction(containingNodeKind) || - containingNodeKind === 228 /* ClassDeclaration */ || - containingNodeKind === 198 /* ClassExpression */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 174 /* ArrayBindingPattern */ || - containingNodeKind === 230 /* TypeAliasDeclaration */; // type Map, K, | - case 22 /* DotToken */: - return containingNodeKind === 174 /* ArrayBindingPattern */; // var [.| - case 55 /* ColonToken */: - return containingNodeKind === 175 /* BindingElement */; // var {x :html| - case 20 /* OpenBracketToken */: - return containingNodeKind === 174 /* ArrayBindingPattern */; // var [x| - case 18 /* OpenParenToken */: - return containingNodeKind === 259 /* CatchClause */ || + containingNodeKind === 229 /* ClassDeclaration */ || + containingNodeKind === 199 /* ClassExpression */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 175 /* ArrayBindingPattern */ || + containingNodeKind === 231 /* TypeAliasDeclaration */; // type Map, K, | + case 23 /* DotToken */: + return containingNodeKind === 175 /* ArrayBindingPattern */; // var [.| + case 56 /* ColonToken */: + return containingNodeKind === 176 /* BindingElement */; // var {x :html| + case 21 /* OpenBracketToken */: + return containingNodeKind === 175 /* ArrayBindingPattern */; // var [x| + case 19 /* OpenParenToken */: + return containingNodeKind === 260 /* CatchClause */ || isFunction(containingNodeKind); - case 16 /* OpenBraceToken */: - return containingNodeKind === 231 /* EnumDeclaration */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 162 /* TypeLiteral */; // const x : { | - case 24 /* SemicolonToken */: - return containingNodeKind === 147 /* PropertySignature */ && + case 17 /* OpenBraceToken */: + return containingNodeKind === 232 /* EnumDeclaration */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 163 /* TypeLiteral */; // const x : { | + case 25 /* SemicolonToken */: + return containingNodeKind === 148 /* PropertySignature */ && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 229 /* InterfaceDeclaration */ || - contextToken.parent.parent.kind === 162 /* TypeLiteral */); // const x : { a; | - case 26 /* LessThanToken */: - return containingNodeKind === 228 /* ClassDeclaration */ || - containingNodeKind === 198 /* ClassExpression */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 230 /* TypeAliasDeclaration */ || + (contextToken.parent.parent.kind === 230 /* InterfaceDeclaration */ || + contextToken.parent.parent.kind === 163 /* TypeLiteral */); // const x : { a; | + case 27 /* LessThanToken */: + return containingNodeKind === 229 /* ClassDeclaration */ || + containingNodeKind === 199 /* ClassExpression */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 231 /* TypeAliasDeclaration */ || isFunction(containingNodeKind); - case 114 /* StaticKeyword */: - return containingNodeKind === 148 /* PropertyDeclaration */; - case 23 /* DotDotDotToken */: - return containingNodeKind === 145 /* Parameter */ || + case 115 /* StaticKeyword */: + return containingNodeKind === 149 /* PropertyDeclaration */; + case 24 /* DotDotDotToken */: + return containingNodeKind === 146 /* Parameter */ || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 174 /* ArrayBindingPattern */); // var [...z| - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - return containingNodeKind === 145 /* Parameter */; - case 117 /* AsKeyword */: - return containingNodeKind === 241 /* ImportSpecifier */ || - containingNodeKind === 245 /* ExportSpecifier */ || - containingNodeKind === 239 /* NamespaceImport */; - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: - case 108 /* InterfaceKeyword */: - case 88 /* FunctionKeyword */: - case 103 /* VarKeyword */: - case 124 /* GetKeyword */: - case 134 /* SetKeyword */: - case 90 /* ImportKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: - case 115 /* YieldKeyword */: - case 137 /* TypeKeyword */: + contextToken.parent.parent.kind === 175 /* ArrayBindingPattern */); // var [...z| + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + return containingNodeKind === 146 /* Parameter */; + case 118 /* AsKeyword */: + return containingNodeKind === 242 /* ImportSpecifier */ || + containingNodeKind === 246 /* ExportSpecifier */ || + containingNodeKind === 240 /* NamespaceImport */; + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: + case 109 /* InterfaceKeyword */: + case 89 /* FunctionKeyword */: + case 104 /* VarKeyword */: + case 125 /* GetKeyword */: + case 135 /* SetKeyword */: + case 91 /* ImportKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: + case 116 /* YieldKeyword */: + case 138 /* TypeKeyword */: return true; } // Previous token may have been a keyword that was converted to an identifier. @@ -73598,12 +73688,12 @@ var ts; for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; // Ignore omitted expressions for missing members - if (m.kind !== 260 /* PropertyAssignment */ && - m.kind !== 261 /* ShorthandPropertyAssignment */ && - m.kind !== 175 /* BindingElement */ && - m.kind !== 150 /* MethodDeclaration */ && - m.kind !== 152 /* GetAccessor */ && - m.kind !== 153 /* SetAccessor */) { + if (m.kind !== 261 /* PropertyAssignment */ && + m.kind !== 262 /* ShorthandPropertyAssignment */ && + m.kind !== 176 /* BindingElement */ && + m.kind !== 151 /* MethodDeclaration */ && + m.kind !== 153 /* GetAccessor */ && + m.kind !== 154 /* SetAccessor */) { continue; } // If this is the current item we are editing right now, do not filter it out @@ -73611,9 +73701,9 @@ var ts; continue; } var existingName = void 0; - if (m.kind === 175 /* BindingElement */ && m.propertyName) { + if (m.kind === 176 /* BindingElement */ && m.propertyName) { // include only identifiers in completion list - if (m.propertyName.kind === 70 /* Identifier */) { + if (m.propertyName.kind === 71 /* Identifier */) { existingName = m.propertyName.text; } } @@ -73641,7 +73731,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 252 /* JsxAttribute */) { + if (attr.kind === 253 /* JsxAttribute */) { seenNames.set(attr.name.text, true); } } @@ -73691,7 +73781,7 @@ var ts; } // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions = []; - for (var i = 71 /* FirstKeyword */; i <= 141 /* LastKeyword */; i++) { + for (var i = 72 /* FirstKeyword */; i <= 142 /* LastKeyword */; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ts.ScriptElementKind.keyword, @@ -73703,10 +73793,10 @@ var ts; return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind); } function isEqualityOperatorKind(kind) { - return kind === 31 /* EqualsEqualsToken */ || - kind === 32 /* ExclamationEqualsToken */ || - kind === 33 /* EqualsEqualsEqualsToken */ || - kind === 34 /* ExclamationEqualsEqualsToken */; + return kind === 32 /* EqualsEqualsToken */ || + kind === 33 /* ExclamationEqualsToken */ || + kind === 34 /* EqualsEqualsEqualsToken */ || + kind === 35 /* ExclamationEqualsEqualsToken */; } })(Completions = ts.Completions || (ts.Completions = {})); })(ts || (ts = {})); @@ -73769,74 +73859,74 @@ var ts; return undefined; } switch (node.kind) { - case 89 /* IfKeyword */: - case 81 /* ElseKeyword */: - if (hasKind(node.parent, 210 /* IfStatement */)) { + case 90 /* IfKeyword */: + case 82 /* ElseKeyword */: + if (hasKind(node.parent, 211 /* IfStatement */)) { return getIfElseOccurrences(node.parent, sourceFile); } break; - case 95 /* ReturnKeyword */: - if (hasKind(node.parent, 218 /* ReturnStatement */)) { + case 96 /* ReturnKeyword */: + if (hasKind(node.parent, 219 /* ReturnStatement */)) { return highlightSpans(getReturnOccurrences(node.parent)); } break; - case 99 /* ThrowKeyword */: - if (hasKind(node.parent, 222 /* ThrowStatement */)) { + case 100 /* ThrowKeyword */: + if (hasKind(node.parent, 223 /* ThrowStatement */)) { return highlightSpans(getThrowOccurrences(node.parent)); } break; - case 101 /* TryKeyword */: - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: - var tryStatement = node.kind === 73 /* CatchKeyword */ ? parent(parent(node)) : parent(node); - if (hasKind(tryStatement, 223 /* TryStatement */)) { + case 102 /* TryKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: + var tryStatement = node.kind === 74 /* CatchKeyword */ ? parent(parent(node)) : parent(node); + if (hasKind(tryStatement, 224 /* TryStatement */)) { return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile)); } break; - case 97 /* SwitchKeyword */: - if (hasKind(node.parent, 220 /* SwitchStatement */)) { + case 98 /* SwitchKeyword */: + if (hasKind(node.parent, 221 /* SwitchStatement */)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent)); } break; - case 72 /* CaseKeyword */: - case 78 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 220 /* SwitchStatement */)) { + case 73 /* CaseKeyword */: + case 79 /* DefaultKeyword */: + if (hasKind(parent(parent(parent(node))), 221 /* SwitchStatement */)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent)); } break; - case 71 /* BreakKeyword */: - case 76 /* ContinueKeyword */: - if (hasKind(node.parent, 217 /* BreakStatement */) || hasKind(node.parent, 216 /* ContinueStatement */)) { + case 72 /* BreakKeyword */: + case 77 /* ContinueKeyword */: + if (hasKind(node.parent, 218 /* BreakStatement */) || hasKind(node.parent, 217 /* ContinueStatement */)) { return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent)); } break; - case 87 /* ForKeyword */: - if (hasKind(node.parent, 213 /* ForStatement */) || - hasKind(node.parent, 214 /* ForInStatement */) || - hasKind(node.parent, 215 /* ForOfStatement */)) { + case 88 /* ForKeyword */: + if (hasKind(node.parent, 214 /* ForStatement */) || + hasKind(node.parent, 215 /* ForInStatement */) || + hasKind(node.parent, 216 /* ForOfStatement */)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 105 /* WhileKeyword */: - case 80 /* DoKeyword */: - if (hasKind(node.parent, 212 /* WhileStatement */) || hasKind(node.parent, 211 /* DoStatement */)) { + case 106 /* WhileKeyword */: + case 81 /* DoKeyword */: + if (hasKind(node.parent, 213 /* WhileStatement */) || hasKind(node.parent, 212 /* DoStatement */)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 122 /* ConstructorKeyword */: - if (hasKind(node.parent, 151 /* Constructor */)) { + case 123 /* ConstructorKeyword */: + if (hasKind(node.parent, 152 /* Constructor */)) { return highlightSpans(getConstructorOccurrences(node.parent)); } break; - case 124 /* GetKeyword */: - case 134 /* SetKeyword */: - if (hasKind(node.parent, 152 /* GetAccessor */) || hasKind(node.parent, 153 /* SetAccessor */)) { + case 125 /* GetKeyword */: + case 135 /* SetKeyword */: + if (hasKind(node.parent, 153 /* GetAccessor */) || hasKind(node.parent, 154 /* SetAccessor */)) { return highlightSpans(getGetAndSetOccurrences(node.parent)); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 207 /* VariableStatement */)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 208 /* VariableStatement */)) { return highlightSpans(getModifierOccurrences(node.kind, node.parent)); } } @@ -73853,10 +73943,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 222 /* ThrowStatement */) { + if (node.kind === 223 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 223 /* TryStatement */) { + else if (node.kind === 224 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -73884,12 +73974,12 @@ var ts; var child = throwStatement; while (child.parent) { var parent_2 = child.parent; - if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264 /* SourceFile */) { + if (ts.isFunctionBlock(parent_2) || parent_2.kind === 265 /* SourceFile */) { return parent_2; } // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. - if (parent_2.kind === 223 /* TryStatement */) { + if (parent_2.kind === 224 /* TryStatement */) { var tryStatement = parent_2; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; @@ -73904,7 +73994,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 217 /* BreakStatement */ || node.kind === 216 /* ContinueStatement */) { + if (node.kind === 218 /* BreakStatement */ || node.kind === 217 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -73919,16 +74009,16 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node = statement.parent; node; node = node.parent) { switch (node.kind) { - case 220 /* SwitchStatement */: - if (statement.kind === 216 /* ContinueStatement */) { + case 221 /* SwitchStatement */: + if (statement.kind === 217 /* ContinueStatement */) { continue; } // falls through - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: if (!statement.label || isLabeledBy(node, statement.label.text)) { return node; } @@ -73947,24 +74037,24 @@ var ts; var container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 228 /* ClassDeclaration */ || - container.kind === 198 /* ClassExpression */ || - (declaration.kind === 145 /* Parameter */ && hasKind(container, 151 /* Constructor */)))) { + if (!(container.kind === 229 /* ClassDeclaration */ || + container.kind === 199 /* ClassExpression */ || + (declaration.kind === 146 /* Parameter */ && hasKind(container, 152 /* Constructor */)))) { return undefined; } } - else if (modifier === 114 /* StaticKeyword */) { - if (!(container.kind === 228 /* ClassDeclaration */ || container.kind === 198 /* ClassExpression */)) { + else if (modifier === 115 /* StaticKeyword */) { + if (!(container.kind === 229 /* ClassDeclaration */ || container.kind === 199 /* ClassExpression */)) { return undefined; } } - else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) { - if (!(container.kind === 233 /* ModuleBlock */ || container.kind === 264 /* SourceFile */)) { + else if (modifier === 84 /* ExportKeyword */ || modifier === 124 /* DeclareKeyword */) { + if (!(container.kind === 234 /* ModuleBlock */ || container.kind === 265 /* SourceFile */)) { return undefined; } } - else if (modifier === 116 /* AbstractKeyword */) { - if (!(container.kind === 228 /* ClassDeclaration */ || declaration.kind === 228 /* ClassDeclaration */)) { + else if (modifier === 117 /* AbstractKeyword */) { + if (!(container.kind === 229 /* ClassDeclaration */ || declaration.kind === 229 /* ClassDeclaration */)) { return undefined; } } @@ -73976,8 +74066,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 233 /* ModuleBlock */: - case 264 /* SourceFile */: + case 234 /* ModuleBlock */: + case 265 /* SourceFile */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */) { nodes = declaration.members.concat(declaration); @@ -73986,17 +74076,17 @@ var ts; nodes = container.statements; } break; - case 151 /* Constructor */: + case 152 /* Constructor */: nodes = container.parameters.concat(container.parent.members); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. if (modifierFlag & 28 /* AccessibilityModifier */) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 151 /* Constructor */ && member; + return member.kind === 152 /* Constructor */ && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -74017,19 +74107,19 @@ var ts; return keywords; function getFlagFromModifier(modifier) { switch (modifier) { - case 113 /* PublicKeyword */: + case 114 /* PublicKeyword */: return 4 /* Public */; - case 111 /* PrivateKeyword */: + case 112 /* PrivateKeyword */: return 8 /* Private */; - case 112 /* ProtectedKeyword */: + case 113 /* ProtectedKeyword */: return 16 /* Protected */; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: return 32 /* Static */; - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: return 1 /* Export */; - case 123 /* DeclareKeyword */: + case 124 /* DeclareKeyword */: return 2 /* Ambient */; - case 116 /* AbstractKeyword */: + case 117 /* AbstractKeyword */: return 128 /* Abstract */; default: ts.Debug.fail(); @@ -74049,13 +74139,13 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* SetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* GetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 154 /* SetAccessor */); return keywords; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 134 /* SetKeyword */); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 125 /* GetKeyword */, 135 /* SetKeyword */); }); } } } @@ -74064,19 +74154,19 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */); + return pushKeywordIf(keywords, token, 123 /* ConstructorKeyword */); }); }); return keywords; } function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 88 /* ForKeyword */, 106 /* WhileKeyword */, 81 /* DoKeyword */)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 211 /* DoStatement */) { + if (loopNode.kind === 212 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) { + if (pushKeywordIf(keywords, loopTokens[i], 106 /* WhileKeyword */)) { break; } } @@ -74085,7 +74175,7 @@ var ts; var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 72 /* BreakKeyword */, 77 /* ContinueKeyword */); } }); return keywords; @@ -74094,13 +74184,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -74108,14 +74198,14 @@ var ts; } function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 98 /* SwitchKeyword */); // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */); + pushKeywordIf(keywords, clause.getFirstToken(), 73 /* CaseKeyword */, 79 /* DefaultKeyword */); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 72 /* BreakKeyword */); } }); }); @@ -74123,13 +74213,13 @@ var ts; } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 102 /* TryKeyword */); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 74 /* CatchKeyword */); } if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87 /* FinallyKeyword */, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 87 /* FinallyKeyword */); } return keywords; } @@ -74140,13 +74230,13 @@ var ts; } var keywords = []; ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100 /* ThrowKeyword */); }); // If the "owner" is a function, then we equate 'return' and 'throw' statements in their // ability to "jump out" of the function, and include occurrences for both. if (ts.isFunctionBlock(owner)) { ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96 /* ReturnKeyword */); }); } return keywords; @@ -74154,36 +74244,36 @@ var ts; function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 206 /* Block */))) { + if (!(func && hasKind(func.body, 207 /* Block */))) { return undefined; } var keywords = []; ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96 /* ReturnKeyword */); }); // Include 'throw' statements that do not occur within a try block. ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100 /* ThrowKeyword */); }); return keywords; } function getIfElseOccurrences(ifStatement, sourceFile) { var keywords = []; // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 210 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 211 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. while (ifStatement) { var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 89 /* IfKeyword */); + pushKeywordIf(keywords, children[0], 90 /* IfKeyword */); // Generally the 'else' keyword is second-to-last, so we traverse backwards. for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) { + if (pushKeywordIf(keywords, children[i], 82 /* ElseKeyword */)) { break; } } - if (!hasKind(ifStatement.elseStatement, 210 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 211 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -74192,7 +74282,7 @@ var ts; // We'd like to highlight else/ifs together if they are only separated by whitespace // (i.e. the keywords are separated by no comments, no newlines). for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) { + if (keywords[i].kind === 82 /* ElseKeyword */ && i < keywords.length - 1) { var elseKeyword = keywords[i]; var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. var shouldCombindElseAndIf = true; @@ -74223,7 +74313,7 @@ var ts; * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 221 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 222 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -74406,12 +74496,12 @@ var ts; } cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: if (!isAvailableThroughGlobal) { var parent = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent.kind === 225 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent.kind === 226 /* VariableDeclaration */) { var name = parent.name; - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { directImports.push(name); break; } @@ -74420,19 +74510,19 @@ var ts; addIndirectUser(direct.getSourceFile()); } break; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1 /* Export */)); break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: var namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { handleNamespaceImport(direct, namedBindings.name); } else { directImports.push(direct); } break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: if (!direct.exportClause) { // This is `export * from "foo"`, so imports of this module may import the export too. handleDirectImports(getContainingModuleSymbol(direct, checker)); @@ -74452,7 +74542,7 @@ var ts; } else if (!isAvailableThroughGlobal) { var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - ts.Debug.assert(sourceFileLike.kind === 264 /* SourceFile */ || sourceFileLike.kind === 232 /* ModuleDeclaration */); + ts.Debug.assert(sourceFileLike.kind === 265 /* SourceFile */ || sourceFileLike.kind === 233 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUsers(sourceFileLike); } @@ -74506,13 +74596,13 @@ var ts; } return { importSearches: importSearches, singleReferences: singleReferences }; function handleImport(decl) { - if (decl.kind === 236 /* ImportEqualsDeclaration */) { + if (decl.kind === 237 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } return; } - if (decl.kind === 70 /* Identifier */) { + if (decl.kind === 71 /* Identifier */) { handleNamespaceImportLike(decl); return; } @@ -74520,13 +74610,13 @@ var ts; if (decl.moduleSpecifier.kind !== 9 /* StringLiteral */) { return; } - if (decl.kind === 243 /* ExportDeclaration */) { + if (decl.kind === 244 /* ExportDeclaration */) { searchForNamedImport(decl.exportClause); return; } var importClause = decl.importClause; var namedBindings = importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { handleNamespaceImportLike(namedBindings.name); return; } @@ -74577,7 +74667,7 @@ var ts; } } else { - var localSymbol = element.kind === 245 /* ExportSpecifier */ && element.propertyName + var localSymbol = element.kind === 246 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) // For re-exporting under a different name, we want to get the re-exported symbol. : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); @@ -74589,7 +74679,7 @@ var ts; function findNamespaceReExports(sourceFileLike, name, checker) { var namespaceImportSymbol = checker.getSymbolAtLocation(name); return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) { - if (statement.kind !== 243 /* ExportDeclaration */) + if (statement.kind !== 244 /* ExportDeclaration */) return; var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier; if (moduleSpecifier || !exportClause) @@ -74624,7 +74714,7 @@ var ts; } /** Iterates over all statements at the top level or in module declarations. Returns the first truthy result. */ function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return ts.forEach(sourceFileLike.kind === 264 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { + return ts.forEach(sourceFileLike.kind === 265 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action)); }); } @@ -74639,18 +74729,18 @@ var ts; else { forEachPossibleImportOrExportStatement(sourceFile, function (statement) { switch (statement.kind) { - case 243 /* ExportDeclaration */: - case 237 /* ImportDeclaration */: { + case 244 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: { var decl = statement; if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9 /* StringLiteral */) { action(decl, decl.moduleSpecifier); } break; } - case 236 /* ImportEqualsDeclaration */: { + case 237 /* ImportEqualsDeclaration */: { var decl = statement; var moduleReference = decl.moduleReference; - if (moduleReference.kind === 247 /* ExternalModuleReference */ && + if (moduleReference.kind === 248 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */) { action(decl, moduleReference.expression); } @@ -74673,10 +74763,10 @@ var ts; } function importerFromModuleSpecifier(moduleSpecifier) { var decl = moduleSpecifier.parent; - if (decl.kind === 237 /* ImportDeclaration */ || decl.kind === 243 /* ExportDeclaration */) { + if (decl.kind === 238 /* ImportDeclaration */ || decl.kind === 244 /* ExportDeclaration */) { return decl; } - ts.Debug.assert(decl.kind === 247 /* ExternalModuleReference */); + ts.Debug.assert(decl.kind === 248 /* ExternalModuleReference */); return decl.parent; } /** @@ -74691,10 +74781,10 @@ var ts; function getExport() { var parent = node.parent; if (symbol.flags & 7340032 /* Export */) { - if (parent.kind === 178 /* PropertyAccessExpression */) { + if (parent.kind === 179 /* PropertyAccessExpression */) { // When accessing an export of a JS module, there's no alias. The symbol will still be flagged as an export even though we're at the use. // So check that we are at the declaration. - return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 /* BinaryExpression */ + return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194 /* BinaryExpression */ ? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false) : undefined; } @@ -74705,9 +74795,9 @@ var ts; } } else { - var exportNode = parent.kind === 225 /* VariableDeclaration */ ? ts.getAncestor(parent, 207 /* VariableStatement */) : parent; - if (ts.hasModifier(exportNode, 1 /* Export */)) { - if (exportNode.kind === 236 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) { + var exportNode = getExportNode(parent); + if (exportNode && ts.hasModifier(exportNode, 1 /* Export */)) { + if (exportNode.kind === 237 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) { // We're at `Y` in `export import X = Y`. This is not the exported symbol, the left-hand-side is. So treat this as an import statement. if (comingFromExport) { return undefined; @@ -74719,16 +74809,16 @@ var ts; return exportInfo(symbol, getExportKindForDeclaration(exportNode)); } } - else if (parent.kind === 242 /* ExportAssignment */) { + else if (parent.kind === 243 /* ExportAssignment */) { // Get the symbol for the `export =` node; its parent is the module it's the export of. var exportingModuleSymbol = parent.symbol.parent; ts.Debug.assert(!!exportingModuleSymbol); return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } }; } - else if (parent.kind === 193 /* BinaryExpression */) { + else if (parent.kind === 194 /* BinaryExpression */) { return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true); } - else if (parent.parent.kind === 193 /* BinaryExpression */) { + else if (parent.parent.kind === 194 /* BinaryExpression */) { return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true); } } @@ -74776,18 +74866,28 @@ var ts; } } FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; + // If a reference is a variable declaration, the exported node would be the variable statement. + function getExportNode(parent) { + if (parent.kind === 226 /* VariableDeclaration */) { + var p = parent; + return p.parent.kind === 260 /* CatchClause */ ? undefined : p.parent.parent.kind === 208 /* VariableStatement */ ? p.parent.parent : undefined; + } + else { + return parent; + } + } function isNodeImport(node) { var parent = node.parent; switch (parent.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return parent.name === node && isExternalModuleImportEquals(parent) ? { isNamedImport: false } : undefined; - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: // For a rename import `{ foo as bar }`, don't search for the imported symbol. Just find local uses of `bar`. return parent.propertyName ? undefined : { isNamedImport: true }; - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: ts.Debug.assert(parent.name === node); return { isNamedImport: false }; default: @@ -74806,7 +74906,7 @@ var ts; } var name = ts.forEach(symbol.declarations, function (_a) { var name = _a.name; - return name && name.kind === 70 /* Identifier */ && name.text; + return name && name.kind === 71 /* Identifier */ && name.text; }); ts.Debug.assert(!!name); return name; @@ -74827,22 +74927,22 @@ var ts; return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { return node.getSourceFile(); } var parent = node.parent; - if (parent.kind === 264 /* SourceFile */) { + if (parent.kind === 265 /* SourceFile */) { return parent; } - ts.Debug.assert(parent.kind === 233 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent)); + ts.Debug.assert(parent.kind === 234 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent)); return parent.parent; } function isAmbientModuleDeclaration(node) { - return node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */; + return node.kind === 233 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */; } function isExternalModuleImportEquals(_a) { var moduleReference = _a.moduleReference; - return moduleReference.kind === 247 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */; + return moduleReference.kind === 248 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */; } })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); })(ts || (ts = {})); @@ -74881,12 +74981,12 @@ var ts; function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) { // If invoked directly on a shorthand property assignment, then return // the declaration of the symbol being assigned (not the symbol being assigned to). - if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 262 /* ShorthandPropertyAssignment */) { var result_4 = []; FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); }); return result_4; } - else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) { + else if (node.kind === 97 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) { // References to and accesses on the super keyword only have one possible implementation, so no // need to "Find all References" var symbol = typeChecker.getSymbolAtLocation(node); @@ -74995,16 +75095,16 @@ var ts; if (symbol) { return getDefinitionKindAndDisplayParts(symbol, node, checker); } - else if (node.kind === 177 /* ObjectLiteralExpression */) { + else if (node.kind === 178 /* ObjectLiteralExpression */) { return { kind: ts.ScriptElementKind.interfaceElement, - displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(19 /* CloseParenToken */)] + displayParts: [ts.punctuationPart(19 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(20 /* CloseParenToken */)] }; } - else if (node.kind === 198 /* ClassExpression */) { + else if (node.kind === 199 /* ClassExpression */) { return { kind: ts.ScriptElementKind.localClassElement, - displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(19 /* CloseParenToken */)] + displayParts: [ts.punctuationPart(19 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(20 /* CloseParenToken */)] }; } else { @@ -75038,17 +75138,17 @@ var ts; } /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ function isWriteAccess(node) { - if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) { + if (node.kind === 71 /* Identifier */ && ts.isDeclarationName(node)) { return true; } var parent = node.parent; if (parent) { - if (parent.kind === 192 /* PostfixUnaryExpression */ || parent.kind === 191 /* PrefixUnaryExpression */) { + if (parent.kind === 193 /* PostfixUnaryExpression */ || parent.kind === 192 /* PrefixUnaryExpression */) { return true; } - else if (parent.kind === 193 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 194 /* BinaryExpression */ && parent.left === node) { var operator = parent.operatorToken.kind; - return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */; + return 58 /* FirstAssignment */ <= operator && operator <= 70 /* LastAssignment */; } } return false; @@ -75065,7 +75165,7 @@ var ts; /** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) { if (options === void 0) { options = {}; } - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return undefined; } if (!options.implementations) { @@ -75112,7 +75212,7 @@ var ts; if (ts.isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 96 /* SuperKeyword */) { + if (node.kind === 97 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } return undefined; @@ -75158,7 +75258,7 @@ var ts; var inheritsFromCache = ts.createMap(); // Source file ID → symbol ID → Whether the symbol has been searched for in the source file. var sourceFileToSeenSymbols = []; - var isForConstructor = originalLocation.kind === 122 /* ConstructorKeyword */; + var isForConstructor = originalLocation.kind === 123 /* ConstructorKeyword */; var importTracker; return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference, markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() }); @@ -75255,14 +75355,14 @@ var ts; checker.getPropertySymbolOfDestructuringAssignment(location); } function isObjectBindingPatternElementWithoutPropertyName(symbol) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */); + var bindingElement = ts.getDeclarationOfKind(symbol, 176 /* BindingElement */); return bindingElement && - bindingElement.parent.kind === 173 /* ObjectBindingPattern */ && + bindingElement.parent.kind === 174 /* ObjectBindingPattern */ && !bindingElement.propertyName; } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) { if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */); + var bindingElement = ts.getDeclarationOfKind(symbol, 176 /* BindingElement */); var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); } @@ -75280,7 +75380,7 @@ var ts; // If this is the symbol of a named function expression or named class expression, // then named references are limited to its own scope. var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 185 /* FunctionExpression */ || valueDeclaration.kind === 198 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 186 /* FunctionExpression */ || valueDeclaration.kind === 199 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -75290,7 +75390,7 @@ var ts; if (flags & (4 /* Property */ | 8192 /* Method */)) { var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 228 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 229 /* ClassDeclaration */); } } // If symbol is of object binding pattern element without property name we would want to @@ -75316,7 +75416,7 @@ var ts; // Different declarations have different containers, bail out return undefined; } - if (!container || container.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) { // This is a global variable and not an external module, any declaration defined // within this scope is visible outside the file return undefined; @@ -75381,7 +75481,7 @@ var ts; function isValidReferencePosition(node, searchSymbolName) { // Compare the length so we filter out strict superstrings of the symbol we are looking for switch (node && node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node.getWidth() === searchSymbolName.length; case 9 /* StringLiteral */: return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) && @@ -75460,7 +75560,7 @@ var ts; return; } if (ts.isExportSpecifier(parent)) { - ts.Debug.assert(referenceLocation.kind === 70 /* Identifier */); + ts.Debug.assert(referenceLocation.kind === 71 /* Identifier */); getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state); return; } @@ -75504,7 +75604,7 @@ var ts; } // For `export { foo as bar }`, rename `foo`, but not `bar`. if (!(referenceLocation === propertyName && state.isForRename)) { - var exportKind = referenceLocation.originalKeywordKind === 78 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */; + var exportKind = referenceLocation.originalKeywordKind === 79 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */; var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker); ts.Debug.assert(!!exportInfo); searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state); @@ -75600,16 +75700,16 @@ var ts; function findOwnConstructorReferences(classSymbol, sourceFile, addNode) { for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) { var decl = _a[_i]; - var ctrKeyword = ts.findChildOfKind(decl, 122 /* ConstructorKeyword */, sourceFile); - ts.Debug.assert(decl.kind === 151 /* Constructor */ && !!ctrKeyword); + var ctrKeyword = ts.findChildOfKind(decl, 123 /* ConstructorKeyword */, sourceFile); + ts.Debug.assert(decl.kind === 152 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } classSymbol.exports.forEach(function (member) { var decl = member.valueDeclaration; - if (decl && decl.kind === 150 /* MethodDeclaration */) { + if (decl && decl.kind === 151 /* MethodDeclaration */) { var body = decl.body; if (body) { - forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) { + forEachDescendantOfKind(body, 99 /* ThisKeyword */, function (thisKeyword) { if (ts.isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -75627,10 +75727,10 @@ var ts; } for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - ts.Debug.assert(decl.kind === 151 /* Constructor */); + ts.Debug.assert(decl.kind === 152 /* Constructor */); var body = decl.body; if (body) { - forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) { + forEachDescendantOfKind(body, 97 /* SuperKeyword */, function (node) { if (ts.isCallExpressionTarget(node)) { addNode(node); } @@ -75644,10 +75744,10 @@ var ts; addReference(refNode.parent); return; } - if (refNode.kind !== 70 /* Identifier */) { + if (refNode.kind !== 71 /* Identifier */) { return; } - if (refNode.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 262 /* ShorthandPropertyAssignment */) { // Go ahead and dereference the shorthand assignment by going to its definition getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference); } @@ -75665,7 +75765,7 @@ var ts; addReference(parent.initializer); } else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) { - if (parent.body.kind === 206 /* Block */) { + if (parent.body.kind === 207 /* Block */) { ts.forEachReturnStatement(parent.body, function (returnStatement) { if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) { addReference(returnStatement.expression); @@ -75706,12 +75806,12 @@ var ts; } function getContainingClassIfInHeritageClause(node) { if (node && node.parent) { - if (node.kind === 200 /* ExpressionWithTypeArguments */ - && node.parent.kind === 258 /* HeritageClause */ + if (node.kind === 201 /* ExpressionWithTypeArguments */ + && node.parent.kind === 259 /* HeritageClause */ && ts.isClassLike(node.parent.parent)) { return node.parent.parent; } - else if (node.kind === 70 /* Identifier */ || node.kind === 178 /* PropertyAccessExpression */) { + else if (node.kind === 71 /* Identifier */ || node.kind === 179 /* PropertyAccessExpression */) { return getContainingClassIfInHeritageClause(node.parent); } } @@ -75722,13 +75822,13 @@ var ts; */ function isImplementationExpression(node) { switch (node.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 186 /* ArrowFunction */: - case 185 /* FunctionExpression */: - case 177 /* ObjectLiteralExpression */: - case 198 /* ClassExpression */: - case 176 /* ArrayLiteralExpression */: + case 187 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 178 /* ObjectLiteralExpression */: + case 199 /* ClassExpression */: + case 177 /* ArrayLiteralExpression */: return true; default: return false; @@ -75782,7 +75882,7 @@ var ts; } return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); } - else if (declaration.kind === 229 /* InterfaceDeclaration */) { + else if (declaration.kind === 230 /* InterfaceDeclaration */) { if (parentIsInterface) { return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference); } @@ -75810,13 +75910,13 @@ var ts; // Whether 'super' occurs in a static context within a class. var staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; @@ -75829,7 +75929,7 @@ var ts; for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) { var position = possiblePositions_4[_i]; var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 96 /* SuperKeyword */) { + if (!node || node.kind !== 97 /* SuperKeyword */) { continue; } var container = ts.getSuperContainer(node, /*stopOnFunctions*/ false); @@ -75847,27 +75947,27 @@ var ts; // Whether 'this' occurs in a static context within a class. var staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } // falls through - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } // falls through - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: break; // Computed properties in classes are not handled here because references to this are illegal, // so there is no point finding references to them. @@ -75876,7 +75976,7 @@ var ts; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 264 /* SourceFile */) { + if (searchSpaceNode.kind === 265 /* SourceFile */) { ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); @@ -75900,28 +76000,28 @@ var ts; } var container = ts.getThisContainer(node, /* includeArrowFunctions */ false); switch (searchSpaceNode.kind) { - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: if (searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: // Make sure the container belongs to the same class // and has the appropriate static modifier from the original container. if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32 /* Static */) === staticFlag) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 264 /* SourceFile */: - if (container.kind === 264 /* SourceFile */ && !ts.isExternalModule(container)) { + case 265 /* SourceFile */: + if (container.kind === 265 /* SourceFile */ && !ts.isExternalModule(container)) { result.push(FindAllReferences.nodeEntry(node)); } break; @@ -75961,7 +76061,7 @@ var ts; // If the location is name of property symbol from object literal destructuring pattern // Search the property symbol // for ( { property: p2 } of elems) { } - if (containingObjectLiteralElement.kind !== 261 /* ShorthandPropertyAssignment */) { + if (containingObjectLiteralElement.kind !== 262 /* ShorthandPropertyAssignment */) { var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); if (propertySymbol) { result.push(propertySymbol); @@ -75993,7 +76093,7 @@ var ts; // we should include both parameter declaration symbol and property declaration symbol // Parameter Declaration symbol is only visible within function scope, so the symbol is stored in constructor.locals. // Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 /* Parameter */ && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 146 /* Parameter */ && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -76049,7 +76149,7 @@ var ts; getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 229 /* InterfaceDeclaration */) { + else if (declaration.kind === 230 /* InterfaceDeclaration */) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -76124,7 +76224,7 @@ var ts; }); } function getNameFromObjectLiteralElement(node) { - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression)) { @@ -76194,7 +76294,7 @@ var ts; if (node.initializer) { return true; } - else if (node.kind === 225 /* VariableDeclaration */) { + else if (node.kind === 226 /* VariableDeclaration */) { var parentStatement = getParentStatementOfVariableDeclaration(node); return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */); } @@ -76204,18 +76304,18 @@ var ts; } else { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return true; } } return false; } function getParentStatementOfVariableDeclaration(node) { - if (node.parent && node.parent.parent && node.parent.parent.kind === 207 /* VariableStatement */) { - ts.Debug.assert(node.parent.kind === 226 /* VariableDeclarationList */); + if (node.parent && node.parent.parent && node.parent.parent.kind === 208 /* VariableStatement */) { + ts.Debug.assert(node.parent.kind === 227 /* VariableDeclarationList */); return node.parent.parent; } } @@ -76329,9 +76429,9 @@ var ts; // (1) when the aliased symbol was declared in the location(parent). // (2) when the aliased symbol is originating from a named import. // - if (node.kind === 70 /* Identifier */ && + if (node.kind === 71 /* Identifier */ && (node.parent === declaration || - (declaration.kind === 241 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 240 /* NamedImports */))) { + (declaration.kind === 242 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 241 /* NamedImports */))) { symbol = typeChecker.getAliasedSymbol(symbol); } } @@ -76340,7 +76440,7 @@ var ts; // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. - if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 262 /* ShorthandPropertyAssignment */) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -76429,7 +76529,7 @@ var ts; function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { // Applicable only if we are in a new expression, or we are on a constructor declaration // and in either case the symbol has a construct signature definition, i.e. class - if (ts.isNewExpressionTarget(location) || location.kind === 122 /* ConstructorKeyword */) { + if (ts.isNewExpressionTarget(location) || location.kind === 123 /* ConstructorKeyword */) { if (symbol.flags & 32 /* Class */) { // Find the first class-like declaration and try to get the construct signature. for (var _i = 0, _a = symbol.getDeclarations(); _i < _a.length; _i++) { @@ -76458,7 +76558,7 @@ var ts; var definition; for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) { var d = signatureDeclarations_1[_i]; - if (selectConstructors ? d.kind === 151 /* Constructor */ : isSignatureDeclaration(d)) { + if (selectConstructors ? d.kind === 152 /* Constructor */ : isSignatureDeclaration(d)) { declarations.push(d); if (d.body) definition = d; @@ -76473,10 +76573,10 @@ var ts; } function isSignatureDeclaration(node) { switch (node.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return true; default: return false; @@ -76638,7 +76738,7 @@ var ts; var doc = jsDocs_1[_i]; var tagsForDoc = doc.tags; if (tagsForDoc) { - tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283 /* JSDocTag */; }).map(function (jsDocTag) { + tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 284 /* JSDocTag */; }).map(function (jsDocTag) { return { name: jsDocTag.tagName.text, text: jsDocTag.comment @@ -76728,19 +76828,19 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 151 /* Constructor */: - case 228 /* ClassDeclaration */: - case 207 /* VariableStatement */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 152 /* Constructor */: + case 229 /* ClassDeclaration */: + case 208 /* VariableStatement */: break findOwner; - case 264 /* SourceFile */: + case 265 /* SourceFile */: return undefined; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // If in walking up the tree, we hit a a nested namespace declaration, // then we must be somewhere within a dotted namespace name; however we don't // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'. - if (commentOwner.parent.kind === 232 /* ModuleDeclaration */) { + if (commentOwner.parent.kind === 233 /* ModuleDeclaration */) { return undefined; } break findOwner; @@ -76758,7 +76858,7 @@ var ts; var docParams = ""; for (var i = 0; i < parameters.length; i++) { var currentName = parameters[i].name; - var paramName = currentName.kind === 70 /* Identifier */ ? + var paramName = currentName.kind === 71 /* Identifier */ ? currentName.text : "param" + i; if (isJavaScriptFile) { @@ -76788,7 +76888,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 207 /* VariableStatement */) { + if (commentOwner.kind === 208 /* VariableStatement */) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -76806,17 +76906,17 @@ var ts; * @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'. */ function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 184 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 185 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return rightHandSide.parameters; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151 /* Constructor */) { + if (member.kind === 152 /* Constructor */) { return member.parameters; } } @@ -77085,7 +77185,7 @@ var ts; // Remove imports when the imported declaration is already in the list and has the same name. rawItems = ts.filter(rawItems, function (item) { var decl = item.declaration; - if (decl.kind === 238 /* ImportClause */ || decl.kind === 241 /* ImportSpecifier */ || decl.kind === 236 /* ImportEqualsDeclaration */) { + if (decl.kind === 239 /* ImportClause */ || decl.kind === 242 /* ImportSpecifier */ || decl.kind === 237 /* ImportEqualsDeclaration */) { var importer = checker.getSymbolAtLocation(decl.name); var imported = checker.getAliasedSymbol(importer); return importer.name !== imported.name; @@ -77113,7 +77213,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 /* Identifier */ || + if (node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { return node.text; @@ -77127,7 +77227,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 143 /* ComputedPropertyName */) { + else if (declaration.name.kind === 144 /* ComputedPropertyName */) { return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true); } else { @@ -77148,7 +77248,7 @@ var ts; } return true; } - if (expression.kind === 178 /* PropertyAccessExpression */) { + if (expression.kind === 179 /* PropertyAccessExpression */) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -77161,7 +77261,7 @@ var ts; var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. - if (declaration.name.kind === 143 /* ComputedPropertyName */) { + if (declaration.name.kind === 144 /* ComputedPropertyName */) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) { return undefined; } @@ -77347,7 +77447,7 @@ var ts; return; } switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: // Get parameter properties, and treat them as being on the *same* level as the constructor, not under it. var ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); @@ -77359,21 +77459,21 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 150 /* MethodSignature */: if (!ts.hasDynamicName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: if (!ts.hasDynamicName(node)) { addLeafNode(node); } break; - case 238 /* ImportClause */: + case 239 /* ImportClause */: var importClause = node; // Handle default import case e.g.: // import d from "mod"; @@ -77385,7 +77485,7 @@ var ts; // import {a, b as B} from "mod"; var namedBindings = importClause.namedBindings; if (namedBindings) { - if (namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings.kind === 240 /* NamespaceImport */) { addLeafNode(namedBindings); } else { @@ -77396,8 +77496,8 @@ var ts; } } break; - case 175 /* BindingElement */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 226 /* VariableDeclaration */: var decl = node; var name = decl.name; if (ts.isBindingPattern(name)) { @@ -77411,12 +77511,12 @@ var ts; addNodeWithRecursiveChild(decl, decl.initializer); } break; - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: startNode(node); for (var _d = 0, _e = node.members; _d < _e.length; _d++) { var member = _e[_d]; @@ -77426,9 +77526,9 @@ var ts; } endNode(); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: startNode(node); for (var _f = 0, _g = node.members; _f < _g.length; _f++) { var member = _g[_f]; @@ -77436,21 +77536,21 @@ var ts; } endNode(); break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 245 /* ExportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 156 /* IndexSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 230 /* TypeAliasDeclaration */: + case 246 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 157 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 231 /* TypeAliasDeclaration */: addLeafNode(node); break; default: ts.forEach(node.jsDoc, function (jsDoc) { ts.forEach(jsDoc.tags, function (tag) { - if (tag.kind === 289 /* JSDocTypedefTag */) { + if (tag.kind === 290 /* JSDocTypedefTag */) { addLeafNode(tag); } }); @@ -77501,14 +77601,14 @@ var ts; }); /** a and b have the same name, but they may not be mergeable. */ function shouldReallyMerge(a, b) { - return a.kind === b.kind && (a.kind !== 232 /* ModuleDeclaration */ || areSameModule(a, b)); + return a.kind === b.kind && (a.kind !== 233 /* ModuleDeclaration */ || areSameModule(a, b)); // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes. // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'! function areSameModule(a, b) { if (a.body.kind !== b.body.kind) { return false; } - if (a.body.kind !== 232 /* ModuleDeclaration */) { + if (a.body.kind !== 233 /* ModuleDeclaration */) { return true; } return areSameModule(a.body, b.body); @@ -77549,7 +77649,7 @@ var ts; * So `new()` can still come before an `aardvark` method. */ function tryGetName(node) { - if (node.kind === 232 /* ModuleDeclaration */) { + if (node.kind === 233 /* ModuleDeclaration */) { return getModuleName(node); } var decl = node; @@ -77557,18 +77657,18 @@ var ts; return ts.getPropertyNameForPropertyNameNode(decl.name); } switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 198 /* ClassExpression */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 199 /* ClassExpression */: return getFunctionOrClassName(node); - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return getJSDocTypedefTagName(node); default: return undefined; } } function getItemName(node) { - if (node.kind === 232 /* ModuleDeclaration */) { + if (node.kind === 233 /* ModuleDeclaration */) { return getModuleName(node); } var name = node.name; @@ -77579,16 +77679,16 @@ var ts; } } switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: var sourceFile = node; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: if (ts.getModifierFlags(node) & 512 /* Default */) { return "default"; } @@ -77596,15 +77696,15 @@ var ts; // (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the // navigation bar. return getFunctionOrClassName(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return "constructor"; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return "new()"; - case 154 /* CallSignature */: + case 155 /* CallSignature */: return "()"; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return "[]"; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return getJSDocTypedefTagName(node); default: return ""; @@ -77616,10 +77716,10 @@ var ts; } else { var parentNode = node.parent && node.parent.parent; - if (parentNode && parentNode.kind === 207 /* VariableStatement */) { + if (parentNode && parentNode.kind === 208 /* VariableStatement */) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70 /* Identifier */) { + if (nameIdentifier.kind === 71 /* Identifier */) { return nameIdentifier.text; } } @@ -77645,24 +77745,24 @@ var ts; return topLevel; function isTopLevel(item) { switch (navigationBarNodeKind(item)) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 231 /* EnumDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 264 /* SourceFile */: - case 230 /* TypeAliasDeclaration */: - case 289 /* JSDocTypedefTag */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 231 /* TypeAliasDeclaration */: + case 290 /* JSDocTypedefTag */: return true; - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 225 /* VariableDeclaration */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 226 /* VariableDeclaration */: return hasSomeImportantChild(item); - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -77672,10 +77772,10 @@ var ts; return false; } switch (navigationBarNodeKind(item.parent)) { - case 233 /* ModuleBlock */: - case 264 /* SourceFile */: - case 150 /* MethodDeclaration */: - case 151 /* Constructor */: + case 234 /* ModuleBlock */: + case 265 /* SourceFile */: + case 151 /* MethodDeclaration */: + case 152 /* Constructor */: return true; default: return hasSomeImportantChild(item); @@ -77684,7 +77784,7 @@ var ts; function hasSomeImportantChild(item) { return ts.forEach(item.children, function (child) { var childKind = navigationBarNodeKind(child); - return childKind !== 225 /* VariableDeclaration */ && childKind !== 175 /* BindingElement */; + return childKind !== 226 /* VariableDeclaration */ && childKind !== 176 /* BindingElement */; }); } } @@ -77740,7 +77840,7 @@ var ts; // Otherwise, we need to aggregate each identifier to build up the qualified name. var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 233 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -77751,18 +77851,18 @@ var ts; * We store 'A' as associated with a NavNode, and use getModuleName to traverse down again. */ function getInteriorModule(decl) { - return decl.body.kind === 232 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl; + return decl.body.kind === 233 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 143 /* ComputedPropertyName */; + return !member.name || member.name.kind === 144 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 264 /* SourceFile */ + return node.kind === 265 /* SourceFile */ ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromNode(node, curSourceFile); } function getModifiers(node) { - if (node.parent && node.parent.kind === 225 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 226 /* VariableDeclaration */) { node = node.parent; } return ts.getNodeModifiers(node); @@ -77771,14 +77871,14 @@ var ts; if (node.name && ts.getFullWidth(node.name) > 0) { return ts.declarationNameToString(node.name); } - else if (node.parent.kind === 225 /* VariableDeclaration */) { + else if (node.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(node.parent.name); } - else if (node.parent.kind === 193 /* BinaryExpression */ && - node.parent.operatorToken.kind === 57 /* EqualsToken */) { + else if (node.parent.kind === 194 /* BinaryExpression */ && + node.parent.operatorToken.kind === 58 /* EqualsToken */) { return nodeText(node.parent.left).replace(whiteSpaceRegex, ""); } - else if (node.parent.kind === 260 /* PropertyAssignment */ && node.parent.name) { + else if (node.parent.kind === 261 /* PropertyAssignment */ && node.parent.name) { return nodeText(node.parent.name); } else if (ts.getModifierFlags(node) & 512 /* Default */) { @@ -77789,7 +77889,7 @@ var ts; } } function isFunctionOrClassExpression(node) { - return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */ || node.kind === 198 /* ClassExpression */; + return node.kind === 186 /* FunctionExpression */ || node.kind === 187 /* ArrowFunction */ || node.kind === 199 /* ClassExpression */; } })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); @@ -77866,7 +77966,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 186 /* ArrowFunction */; + return ts.isFunctionBlock(node) && node.parent.kind !== 187 /* ArrowFunction */; } var depth = 0; var maxDepth = 20; @@ -77879,26 +77979,26 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 206 /* Block */: + case 207 /* Block */: if (!ts.isFunctionBlock(n)) { var parent = n.parent; - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. // If the latter, we want to collapse the block, but consider its hint span // to be the entire span of the parent. - if (parent.kind === 211 /* DoStatement */ || - parent.kind === 214 /* ForInStatement */ || - parent.kind === 215 /* ForOfStatement */ || - parent.kind === 213 /* ForStatement */ || - parent.kind === 210 /* IfStatement */ || - parent.kind === 212 /* WhileStatement */ || - parent.kind === 219 /* WithStatement */ || - parent.kind === 259 /* CatchClause */) { + if (parent.kind === 212 /* DoStatement */ || + parent.kind === 215 /* ForInStatement */ || + parent.kind === 216 /* ForOfStatement */ || + parent.kind === 214 /* ForStatement */ || + parent.kind === 211 /* IfStatement */ || + parent.kind === 213 /* WhileStatement */ || + parent.kind === 220 /* WithStatement */ || + parent.kind === 260 /* CatchClause */) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 223 /* TryStatement */) { + if (parent.kind === 224 /* TryStatement */) { // Could be the try-block, or the finally-block. var tryStatement = parent; if (tryStatement.tryBlock === n) { @@ -77906,7 +78006,7 @@ var ts; break; } else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87 /* FinallyKeyword */, sourceFile); if (finallyKeyword) { addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); break; @@ -77926,25 +78026,25 @@ var ts; break; } // falls through - case 233 /* ModuleBlock */: { - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + case 234 /* ModuleBlock */: { + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 234 /* CaseBlock */: { - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 235 /* CaseBlock */: { + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 176 /* ArrayLiteralExpression */: - var openBracket = ts.findChildOfKind(n, 20 /* OpenBracketToken */, sourceFile); - var closeBracket = ts.findChildOfKind(n, 21 /* CloseBracketToken */, sourceFile); + case 177 /* ArrayLiteralExpression */: + var openBracket = ts.findChildOfKind(n, 21 /* OpenBracketToken */, sourceFile); + var closeBracket = ts.findChildOfKind(n, 22 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); break; } @@ -78535,10 +78635,10 @@ var ts; var externalModule = false; function nextToken() { var token = ts.scanner.scan(); - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { braceNesting++; } - else if (token === 17 /* CloseBraceToken */) { + else if (token === 18 /* CloseBraceToken */) { braceNesting--; } return token; @@ -78589,10 +78689,10 @@ var ts; */ function tryConsumeDeclare() { var token = ts.scanner.getToken(); - if (token === 123 /* DeclareKeyword */) { + if (token === 124 /* DeclareKeyword */) { // declare module "mod" token = nextToken(); - if (token === 127 /* ModuleKeyword */) { + if (token === 128 /* ModuleKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { recordAmbientExternalModule(); @@ -78607,7 +78707,7 @@ var ts; */ function tryConsumeImport() { var token = ts.scanner.getToken(); - if (token === 90 /* ImportKeyword */) { + if (token === 91 /* ImportKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import "mod"; @@ -78615,9 +78715,9 @@ var ts; return true; } else { - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import d from "mod"; @@ -78625,12 +78725,12 @@ var ts; return true; } } - else if (token === 57 /* EqualsToken */) { + else if (token === 58 /* EqualsToken */) { if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) { return true; } } - else if (token === 25 /* CommaToken */) { + else if (token === 26 /* CommaToken */) { // consume comma and keep going token = nextToken(); } @@ -78639,16 +78739,16 @@ var ts; return true; } } - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure that it stops on EOF - while (token !== 17 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 18 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = nextToken(); } - if (token === 17 /* CloseBraceToken */) { + if (token === 18 /* CloseBraceToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import {a as A} from "mod"; @@ -78658,13 +78758,13 @@ var ts; } } } - else if (token === 38 /* AsteriskToken */) { + else if (token === 39 /* AsteriskToken */) { token = nextToken(); - if (token === 117 /* AsKeyword */) { + if (token === 118 /* AsKeyword */) { token = nextToken(); - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import * as NS from "mod" @@ -78682,19 +78782,19 @@ var ts; } function tryConsumeExport() { var token = ts.scanner.getToken(); - if (token === 83 /* ExportKeyword */) { + if (token === 84 /* ExportKeyword */) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure it stops on EOF - while (token !== 17 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 18 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = nextToken(); } - if (token === 17 /* CloseBraceToken */) { + if (token === 18 /* CloseBraceToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // export {a as A} from "mod"; @@ -78704,9 +78804,9 @@ var ts; } } } - else if (token === 38 /* AsteriskToken */) { + else if (token === 39 /* AsteriskToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // export * from "mod" @@ -78714,11 +78814,11 @@ var ts; } } } - else if (token === 90 /* ImportKeyword */) { + else if (token === 91 /* ImportKeyword */) { token = nextToken(); - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 57 /* EqualsToken */) { + if (token === 58 /* EqualsToken */) { if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) { return true; } @@ -78731,9 +78831,9 @@ var ts; } function tryConsumeRequireCall(skipCurrentToken) { var token = skipCurrentToken ? nextToken() : ts.scanner.getToken(); - if (token === 131 /* RequireKeyword */) { + if (token === 132 /* RequireKeyword */) { token = nextToken(); - if (token === 18 /* OpenParenToken */) { + if (token === 19 /* OpenParenToken */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // require("mod"); @@ -78746,16 +78846,16 @@ var ts; } function tryConsumeDefine() { var token = ts.scanner.getToken(); - if (token === 70 /* Identifier */ && ts.scanner.getTokenValue() === "define") { + if (token === 71 /* Identifier */ && ts.scanner.getTokenValue() === "define") { token = nextToken(); - if (token !== 18 /* OpenParenToken */) { + if (token !== 19 /* OpenParenToken */) { return true; } token = nextToken(); if (token === 9 /* StringLiteral */) { // looks like define ("modname", ... - skip string literal and comma token = nextToken(); - if (token === 25 /* CommaToken */) { + if (token === 26 /* CommaToken */) { token = nextToken(); } else { @@ -78764,14 +78864,14 @@ var ts; } } // should be start of dependency list - if (token !== 20 /* OpenBracketToken */) { + if (token !== 21 /* OpenBracketToken */) { return true; } // skip open bracket token = nextToken(); var i = 0; // scan until ']' or EOF - while (token !== 21 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 22 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { // record string literals as module names if (token === 9 /* StringLiteral */) { recordModuleName(); @@ -78885,8 +78985,8 @@ var ts; return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); } // Cannot rename `default` as in `import { default as foo } from "./someModule"; - if (node.kind === 70 /* Identifier */ && - node.originalKeywordKind === 78 /* DefaultKeyword */ && + if (node.kind === 71 /* Identifier */ && + node.originalKeywordKind === 79 /* DefaultKeyword */ && symbol.parent.flags & 1536 /* Module */) { return undefined; } @@ -78936,7 +79036,7 @@ var ts; return ts.createTextSpan(start, width); } function nodeIsEligibleForRename(node) { - return node.kind === 70 /* Identifier */ || + return node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || ts.isThis(node); @@ -79119,15 +79219,15 @@ var ts; } SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; function createJavaScriptSignatureHelpItems(argumentInfo, program) { - if (argumentInfo.invocation.kind !== 180 /* CallExpression */) { + if (argumentInfo.invocation.kind !== 181 /* CallExpression */) { return undefined; } // See if we can find some symbol with the call expression name that has call signatures. var callExpression = argumentInfo.invocation; var expression = callExpression.expression; - var name = expression.kind === 70 /* Identifier */ + var name = expression.kind === 71 /* Identifier */ ? expression - : expression.kind === 178 /* PropertyAccessExpression */ + : expression.kind === 179 /* PropertyAccessExpression */ ? expression.name : undefined; if (!name || !name.text) { @@ -79160,7 +79260,7 @@ var ts; * in the argument of an invocation; returns undefined otherwise. */ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { - if (node.parent.kind === 180 /* CallExpression */ || node.parent.kind === 181 /* NewExpression */) { + if (node.parent.kind === 181 /* CallExpression */ || node.parent.kind === 182 /* NewExpression */) { var callExpression = node.parent; // There are 3 cases to handle: // 1. The token introduces a list, and should begin a signature help session @@ -79176,8 +79276,8 @@ var ts; // Case 3: // foo(a#, #b#) -> The token is buried inside a list, and should give signature help // Find out if 'node' is an argument, a type argument, or neither - if (node.kind === 26 /* LessThanToken */ || - node.kind === 18 /* OpenParenToken */) { + if (node.kind === 27 /* LessThanToken */ || + node.kind === 19 /* OpenParenToken */) { // Find the list that starts right *after* the < or ( token. // If the user has just opened a list, consider this item 0. var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); @@ -79214,27 +79314,27 @@ var ts; } return undefined; } - else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.kind === 13 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 183 /* TaggedTemplateExpression */) { // Check if we're actually inside the template; // otherwise we'll fall out and return undefined. if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0, sourceFile); } } - else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.kind === 14 /* TemplateHead */ && node.parent.parent.kind === 183 /* TaggedTemplateExpression */) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 196 /* TemplateExpression */); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } - else if (node.parent.kind === 204 /* TemplateSpan */ && node.parent.parent.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.parent.kind === 205 /* TemplateSpan */ && node.parent.parent.parent.kind === 183 /* TaggedTemplateExpression */) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 196 /* TemplateExpression */); // If we're just after a template tail, don't show signature help. - if (node.kind === 15 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { + if (node.kind === 16 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); @@ -79279,7 +79379,7 @@ var ts; if (child === node) { break; } - if (child.kind !== 25 /* CommaToken */) { + if (child.kind !== 26 /* CommaToken */) { argumentIndex++; } } @@ -79298,8 +79398,8 @@ var ts; // That will give us 2 non-commas. We then add one for the last comma, giving us an // arg count of 3. var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25 /* CommaToken */; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 25 /* CommaToken */) { + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 26 /* CommaToken */; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 26 /* CommaToken */) { argumentCount++; } return argumentCount; @@ -79329,7 +79429,7 @@ var ts; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === 12 /* NoSubstitutionTemplateLiteral */ + var argumentCount = tagExpression.template.kind === 13 /* NoSubstitutionTemplateLiteral */ ? 1 : tagExpression.template.templateSpans.length + 1; ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); @@ -79367,7 +79467,7 @@ var ts; // // This is because a Missing node has no width. However, what we actually want is to include trivia // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 195 /* TemplateExpression */) { + if (template.kind === 196 /* TemplateExpression */) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); @@ -79376,7 +79476,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node, position, sourceFile) { - for (var n = node; n.kind !== 264 /* SourceFile */; n = n.parent) { + for (var n = node; n.kind !== 265 /* SourceFile */; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -79440,10 +79540,10 @@ var ts; var isVariadic; if (isTypeParameterList) { isVariadic = false; // type parameter lists are not variadic - prefixDisplayParts.push(ts.punctuationPart(26 /* LessThanToken */)); + prefixDisplayParts.push(ts.punctuationPart(27 /* LessThanToken */)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(28 /* GreaterThanToken */)); + suffixDisplayParts.push(ts.punctuationPart(29 /* GreaterThanToken */)); var parameterParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.thisParameter, candidateSignature.parameters, writer, invocation); }); @@ -79455,10 +79555,10 @@ var ts; return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); }); ts.addRange(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + prefixDisplayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + suffixDisplayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); @@ -79468,7 +79568,7 @@ var ts; isVariadic: isVariadic, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(25 /* CommaToken */), ts.spacePart()], + separatorDisplayParts: [ts.punctuationPart(26 /* CommaToken */), ts.spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment(), tags: candidateSignature.getJsDocTags() @@ -79523,7 +79623,7 @@ var ts; function getSymbolKind(typeChecker, symbol, location) { var flags = symbol.flags; if (flags & 32 /* Class */) - return ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */) ? + return ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */) ? ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement; if (flags & 384 /* Enum */) return ts.ScriptElementKind.enumElement; @@ -79554,7 +79654,7 @@ var ts; if (typeChecker.isArgumentsSymbol(symbol)) { return ts.ScriptElementKind.localVariableElement; } - if (location.kind === 98 /* ThisKeyword */ && ts.isExpression(location)) { + if (location.kind === 99 /* ThisKeyword */ && ts.isExpression(location)) { return ts.ScriptElementKind.parameterElement; } var flags = symbol.flags; @@ -79623,7 +79723,7 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); var hasAddedSymbolInfo; - var isThisExpression = location.kind === 98 /* ThisKeyword */ && ts.isExpression(location); + var isThisExpression = location.kind === 99 /* ThisKeyword */ && ts.isExpression(location); var type; // Class at constructor site need to be shown as constructor apart from property,method, vars if (symbolKind !== ts.ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 8388608 /* Alias */) { @@ -79634,7 +79734,7 @@ var ts; var signature = void 0; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 178 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 179 /* PropertyAccessExpression */) { var right = location.parent.name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { @@ -79643,7 +79743,7 @@ var ts; } // try get the call/construct signature from the type if it matches var callExpressionLike = void 0; - if (location.kind === 180 /* CallExpression */ || location.kind === 181 /* NewExpression */) { + if (location.kind === 181 /* CallExpression */ || location.kind === 182 /* NewExpression */) { callExpressionLike = location; } else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) { @@ -79659,7 +79759,7 @@ var ts; // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpressionLike.kind === 181 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96 /* SuperKeyword */); + var useConstructSignatures = callExpressionLike.kind === 182 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 97 /* SuperKeyword */); var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { // Get the first signature if there is one -- allSignatures may contain @@ -79677,7 +79777,7 @@ var ts; pushTypePart(symbolKind); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } addFullSymbolName(symbol); @@ -79694,10 +79794,10 @@ var ts; case ts.ScriptElementKind.parameterElement: case ts.ScriptElementKind.localVariableElement: // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(55 /* ColonToken */)); + displayParts.push(ts.punctuationPart(56 /* ColonToken */)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */) && type.symbol) { @@ -79713,24 +79813,24 @@ var ts; } } else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 151 /* Constructor */)) { + (location.kind === 123 /* ConstructorKeyword */ && location.parent.kind === 152 /* Constructor */)) { // get the signature from the declaration and write it var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 151 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + var allSignatures = functionDeclaration.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 151 /* Constructor */) { + if (functionDeclaration.kind === 152 /* Constructor */) { // show (constructor) Type(...) signature symbolKind = ts.ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 /* CallSignature */ && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -79739,7 +79839,7 @@ var ts; } } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { - if (ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */)) { + if (ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */)) { // Special case for class expressions because we would like to indicate that // the class name is local to the class body (similar to function expression) // (local class) class @@ -79747,7 +79847,7 @@ var ts; } else { // Class declaration has name which is not local. - displayParts.push(ts.keywordPart(74 /* ClassKeyword */)); + displayParts.push(ts.keywordPart(75 /* ClassKeyword */)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); @@ -79755,45 +79855,45 @@ var ts; } if ((symbolFlags & 64 /* Interface */) && (semanticMeaning & 2 /* Type */)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(108 /* InterfaceKeyword */)); + displayParts.push(ts.keywordPart(109 /* InterfaceKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288 /* TypeAlias */) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(137 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(138 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512 /* InTypeAlias */)); } if (symbolFlags & 384 /* Enum */) { addNewLineIfDisplayPartsExist(); if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(75 /* ConstKeyword */)); + displayParts.push(ts.keywordPart(76 /* ConstKeyword */)); displayParts.push(ts.spacePart()); } - displayParts.push(ts.keywordPart(82 /* EnumKeyword */)); + displayParts.push(ts.keywordPart(83 /* EnumKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 232 /* ModuleDeclaration */); - var isNamespace = declaration && declaration.name && declaration.name.kind === 70 /* Identifier */; - displayParts.push(ts.keywordPart(isNamespace ? 128 /* NamespaceKeyword */ : 127 /* ModuleKeyword */)); + var declaration = ts.getDeclarationOfKind(symbol, 233 /* ModuleDeclaration */); + var isNamespace = declaration && declaration.name && declaration.name.kind === 71 /* Identifier */; + displayParts.push(ts.keywordPart(isNamespace ? 129 /* NamespaceKeyword */ : 128 /* ModuleKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if ((symbolFlags & 262144 /* TypeParameter */) && (semanticMeaning & 2 /* Type */)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.textPart("type parameter")); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); if (symbol.parent) { @@ -79804,28 +79904,28 @@ var ts; } else { // Method/function type parameter - var declaration = ts.getDeclarationOfKind(symbol, 144 /* TypeParameter */); + var declaration = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { addInPrefix(); var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 155 /* ConstructSignature */) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + if (declaration.kind === 156 /* ConstructSignature */) { + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 154 /* CallSignature */ && declaration.name) { + else if (declaration.kind !== 155 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); } - else if (declaration.kind === 230 /* TypeAliasDeclaration */) { + else if (declaration.kind === 231 /* TypeAliasDeclaration */) { // Type alias type parameter // For example // type list = T[]; // Both T will go through same code path addInPrefix(); - displayParts.push(ts.keywordPart(137 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(138 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -79837,11 +79937,11 @@ var ts; symbolKind = ts.ScriptElementKind.enumMemberElement; addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 263 /* EnumMember */) { + if (declaration.kind === 264 /* EnumMember */) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral)); } @@ -79849,33 +79949,33 @@ var ts; } if (symbolFlags & 8388608 /* Alias */) { addNewLineIfDisplayPartsExist(); - if (symbol.declarations[0].kind === 235 /* NamespaceExportDeclaration */) { - displayParts.push(ts.keywordPart(83 /* ExportKeyword */)); + if (symbol.declarations[0].kind === 236 /* NamespaceExportDeclaration */) { + displayParts.push(ts.keywordPart(84 /* ExportKeyword */)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(128 /* NamespaceKeyword */)); + displayParts.push(ts.keywordPart(129 /* NamespaceKeyword */)); } else { - displayParts.push(ts.keywordPart(90 /* ImportKeyword */)); + displayParts.push(ts.keywordPart(91 /* ImportKeyword */)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 236 /* ImportEqualsDeclaration */) { + if (declaration.kind === 237 /* ImportEqualsDeclaration */) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(131 /* RequireKeyword */)); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.keywordPart(132 /* RequireKeyword */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } else { var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); if (internalAliasSymbol) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); addFullSymbolName(internalAliasSymbol, enclosingDeclaration); } @@ -79889,7 +79989,7 @@ var ts; if (type) { if (isThisExpression) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(98 /* ThisKeyword */)); + displayParts.push(ts.keywordPart(99 /* ThisKeyword */)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); @@ -79900,7 +80000,7 @@ var ts; symbolFlags & 3 /* Variable */ || symbolKind === ts.ScriptElementKind.localVariableElement || isThisExpression) { - displayParts.push(ts.punctuationPart(55 /* ColonToken */)); + displayParts.push(ts.punctuationPart(56 /* ColonToken */)); displayParts.push(ts.spacePart()); // If the type is type parameter, format it specially if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */) { @@ -79935,10 +80035,10 @@ var ts; // For some special property access expressions like `exports.foo = foo` or `module.exports.foo = foo` // there documentation comments might be attached to the right hand side symbol of their declarations. // The pattern of such special property access is that the parent symbol is the symbol of the file. - if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264 /* SourceFile */; })) { + if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 265 /* SourceFile */; })) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (!declaration.parent || declaration.parent.kind !== 193 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 194 /* BinaryExpression */) { continue; } var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -79962,7 +80062,7 @@ var ts; } function addInPrefix() { displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(91 /* InKeyword */)); + displayParts.push(ts.keywordPart(92 /* InKeyword */)); displayParts.push(ts.spacePart()); } function addFullSymbolName(symbol, enclosingDeclaration) { @@ -79987,9 +80087,9 @@ var ts; displayParts.push(ts.textOrKeywordPart(symbolKind)); return; default: - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.textOrKeywordPart(symbolKind)); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); return; } } @@ -79997,12 +80097,12 @@ var ts; ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); if (allSignatures.length > 1) { displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); - displayParts.push(ts.operatorPart(36 /* PlusToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); + displayParts.push(ts.operatorPart(37 /* PlusToken */)); displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), ts.SymbolDisplayPartKind.numericLiteral)); displayParts.push(ts.spacePart()); displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } documentation = signature.getDocumentationComment(); tags = signature.getJsDocTags(); @@ -80021,16 +80121,16 @@ var ts; } return ts.forEach(symbol.declarations, function (declaration) { // Function expressions are local - if (declaration.kind === 185 /* FunctionExpression */) { + if (declaration.kind === 186 /* FunctionExpression */) { return true; } - if (declaration.kind !== 225 /* VariableDeclaration */ && declaration.kind !== 227 /* FunctionDeclaration */) { + if (declaration.kind !== 226 /* VariableDeclaration */ && declaration.kind !== 228 /* FunctionDeclaration */) { return false; } // If the parent is not sourceFile or module block it is local variable for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { // Reached source file or module block - if (parent.kind === 264 /* SourceFile */ || parent.kind === 233 /* ModuleBlock */) { + if (parent.kind === 265 /* SourceFile */ || parent.kind === 234 /* ModuleBlock */) { return false; } } @@ -80257,11 +80357,11 @@ var ts; function shouldRescanGreaterThanToken(node) { if (node) { switch (node.kind) { - case 30 /* GreaterThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 45 /* GreaterThanGreaterThanToken */: + case 31 /* GreaterThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 46 /* GreaterThanGreaterThanToken */: return true; } } @@ -80270,11 +80370,11 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 252 /* JsxAttribute */: - case 250 /* JsxOpeningElement */: - case 251 /* JsxClosingElement */: - case 249 /* JsxSelfClosingElement */: - return node.kind === 70 /* Identifier */; + case 253 /* JsxAttribute */: + case 251 /* JsxOpeningElement */: + case 252 /* JsxClosingElement */: + case 250 /* JsxSelfClosingElement */: + return node.kind === 71 /* Identifier */; } } return false; @@ -80283,14 +80383,14 @@ var ts; return node && node.kind === 10 /* JsxText */; } function shouldRescanSlashToken(container) { - return container.kind === 11 /* RegularExpressionLiteral */; + return container.kind === 12 /* RegularExpressionLiteral */; } function shouldRescanTemplateToken(container) { - return container.kind === 14 /* TemplateMiddle */ || - container.kind === 15 /* TemplateTail */; + return container.kind === 15 /* TemplateMiddle */ || + container.kind === 16 /* TemplateTail */; } function startsWithSlashToken(t) { - return t === 40 /* SlashToken */ || t === 62 /* SlashEqualsToken */; + return t === 41 /* SlashToken */ || t === 63 /* SlashEqualsToken */; } function readTokenInfo(n) { ts.Debug.assert(scanner !== undefined); @@ -80331,7 +80431,7 @@ var ts; scanner.scan(); } var currentToken = scanner.getToken(); - if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 28 /* GreaterThanToken */) { + if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 29 /* GreaterThanToken */) { currentToken = scanner.reScanGreaterToken(); ts.Debug.assert(n.kind === currentToken); lastScanAction = 1 /* RescanGreaterThanToken */; @@ -80341,11 +80441,11 @@ var ts; ts.Debug.assert(n.kind === currentToken); lastScanAction = 2 /* RescanSlashToken */; } - else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 17 /* CloseBraceToken */) { + else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 18 /* CloseBraceToken */) { currentToken = scanner.reScanTemplateToken(); lastScanAction = 3 /* RescanTemplateToken */; } - else if (expectedScanAction === 4 /* RescanJsxIdentifier */ && currentToken === 70 /* Identifier */) { + else if (expectedScanAction === 4 /* RescanJsxIdentifier */ && currentToken === 71 /* Identifier */) { currentToken = scanner.scanJsxIdentifier(); lastScanAction = 4 /* RescanJsxIdentifier */; } @@ -80488,8 +80588,8 @@ var ts; return startLine === endLine; }; FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 16 /* OpenBraceToken */, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 17 /* CloseBraceToken */, this.sourceFile); + var openBrace = ts.findChildOfKind(node, 17 /* OpenBraceToken */, this.sourceFile); + var closeBrace = ts.findChildOfKind(node, 18 /* CloseBraceToken */, this.sourceFile); if (openBrace && closeBrace) { var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; @@ -80677,129 +80777,129 @@ var ts; this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); + this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); + this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Space after }. - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 141 /* LastToken */, [19 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 142 /* LastToken */, [20 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 81 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 105 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseBraceToken */, 82 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseBraceToken */, 106 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([22 /* CloseBracketToken */, 26 /* CommaToken */, 25 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space for dot - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space before and after indexer - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); // Place a space before open brace in a function declaration this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 3 /* MultiLineCommentTrivia */, 74 /* ClassKeyword */, 83 /* ExportKeyword */, 90 /* ImportKeyword */]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([71 /* Identifier */, 3 /* MultiLineCommentTrivia */, 75 /* ClassKeyword */, 84 /* ExportKeyword */, 91 /* ImportKeyword */]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a control flow construct - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 80 /* DoKeyword */, 101 /* TryKeyword */, 86 /* FinallyKeyword */, 81 /* ElseKeyword */]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 81 /* DoKeyword */, 102 /* TryKeyword */, 87 /* FinallyKeyword */, 82 /* ElseKeyword */]); + this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); - this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); + this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); + this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); + this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); // Insert new line after { and before } in multi-line contexts. - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); // For functions and control block place } on a new line [multi-line rule] - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 42 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 43 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(44 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 43 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // More unary operator special-casing. // DevDiv 181814: Be careful when removing leading whitespace // around unary operators. Examples: // 1 - -2 --X--> 1--2 // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(42 /* PlusPlusToken */, 36 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* PlusToken */, 36 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* PlusToken */, 42 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(43 /* MinusMinusToken */, 37 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* MinusToken */, 37 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* MinusToken */, 43 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([103 /* VarKeyword */, 99 /* ThrowKeyword */, 93 /* NewKeyword */, 79 /* DeleteKeyword */, 95 /* ReturnKeyword */, 102 /* TypeOfKeyword */, 120 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109 /* LetKeyword */, 75 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95 /* ReturnKeyword */, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(43 /* PlusPlusToken */, 37 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* PlusToken */, 37 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* PlusToken */, 43 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(44 /* MinusMinusToken */, 38 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 38 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* VarKeyword */, 100 /* ThrowKeyword */, 94 /* NewKeyword */, 80 /* DeleteKeyword */, 96 /* ReturnKeyword */, 103 /* TypeOfKeyword */, 121 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* LetKeyword */, 76 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); + this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96 /* ReturnKeyword */, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 80 /* DoKeyword */, 81 /* ElseKeyword */, 72 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2 /* Space */)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 81 /* DoKeyword */, 82 /* ElseKeyword */, 73 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2 /* Space */)); // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101 /* TryKeyword */, 86 /* FinallyKeyword */]), 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([102 /* TryKeyword */, 87 /* FinallyKeyword */]), 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // get x() {} // set x(val) {} - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 134 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125 /* GetKeyword */, 135 /* SetKeyword */]), 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); // TypeScript-specific higher priority rules // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127 /* ModuleKeyword */, 131 /* RequireKeyword */]), 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128 /* ModuleKeyword */, 132 /* RequireKeyword */]), 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 130 /* ReadonlyKeyword */, 134 /* SetKeyword */, 114 /* StaticKeyword */, 137 /* TypeKeyword */, 139 /* FromKeyword */, 126 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 139 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117 /* AbstractKeyword */, 75 /* ClassKeyword */, 124 /* DeclareKeyword */, 79 /* DefaultKeyword */, 83 /* EnumKeyword */, 84 /* ExportKeyword */, 85 /* ExtendsKeyword */, 125 /* GetKeyword */, 108 /* ImplementsKeyword */, 91 /* ImportKeyword */, 109 /* InterfaceKeyword */, 128 /* ModuleKeyword */, 129 /* NamespaceKeyword */, 112 /* PrivateKeyword */, 114 /* PublicKeyword */, 113 /* ProtectedKeyword */, 131 /* ReadonlyKeyword */, 135 /* SetKeyword */, 115 /* StaticKeyword */, 138 /* TypeKeyword */, 140 /* FromKeyword */, 127 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([85 /* ExtendsKeyword */, 108 /* ImplementsKeyword */, 140 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); + this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); // Lambda expressions - this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 36 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(36 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Optional parameters and let args - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(23 /* DotDotDotToken */, 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 25 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(24 /* DotDotDotToken */, 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 26 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); // generics and type assertions - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 26 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* CloseParenToken */, 26 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([18 /* OpenParenToken */, 20 /* OpenBracketToken */, 28 /* GreaterThanToken */, 25 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 27 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(20 /* CloseParenToken */, 27 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 29 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([19 /* OpenParenToken */, 21 /* OpenBracketToken */, 29 /* GreaterThanToken */, 26 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); // decorators - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 134 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115 /* YieldKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115 /* YieldKeyword */, 38 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); + this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([117 /* AbstractKeyword */, 71 /* Identifier */, 84 /* ExportKeyword */, 79 /* DefaultKeyword */, 75 /* ClassKeyword */, 115 /* StaticKeyword */, 114 /* PublicKeyword */, 112 /* PrivateKeyword */, 113 /* ProtectedKeyword */, 125 /* GetKeyword */, 135 /* SetKeyword */, 21 /* OpenBracketToken */, 39 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); + this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 39 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); + this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(39 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); + this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(116 /* YieldKeyword */, 39 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); + this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* YieldKeyword */, 39 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); // Async-await - this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(119 /* AsyncKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(119 /* AsyncKeyword */, 88 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(120 /* AsyncKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(120 /* AsyncKeyword */, 89 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // template string - this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(70 /* Identifier */, formatting.Shared.TokenRange.FromTokens([12 /* NoSubstitutionTemplateLiteral */, 13 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(71 /* Identifier */, formatting.Shared.TokenRange.FromTokens([13 /* NoSubstitutionTemplateLiteral */, 14 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // jsx opening element - this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 40 /* SlashToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40 /* SlashToken */, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 41 /* SlashToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(41 /* SlashToken */, 29 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space before non-null assertion operator - this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */)); // These rules are higher in priority than user-configurable rules. this.HighPriorityCommonRules = [ this.IgnoreBeforeComment, this.IgnoreAfterLineComment, @@ -80861,54 +80961,54 @@ var ts; /// Rules controlled by user options /// // Insert space after comma delimiter - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */)); + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */)); // Insert space before and after binary operators this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); // Insert space after keywords in control flow statements - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); + this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); + this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); // Open Brace braces after function // TypeScript: Function can have return types, which can be made of tons of different token kinds - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after TypeScript module/class/interface - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after control block - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* OpenParenToken */, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty brackets - this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(20 /* OpenBracketToken */, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing template string braces - this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13 /* TemplateHead */, 14 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13 /* TemplateHead */, 14 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14 /* TemplateMiddle */, 15 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14 /* TemplateMiddle */, 15 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // No space after { and before } in JSX expression - this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); - this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); - this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); - this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); + this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); + this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); // Insert space after function keyword for anonymous functions - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); // No space after type assertion - this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); - this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */)); + this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); + this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */)); } Rules.prototype.getRuleName = function (rule) { var o = this; @@ -80923,44 +81023,44 @@ var ts; /// Contexts /// Rules.IsForContext = function (context) { - return context.contextNode.kind === 213 /* ForStatement */; + return context.contextNode.kind === 214 /* ForStatement */; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 193 /* BinaryExpression */: - case 194 /* ConditionalExpression */: - case 201 /* AsExpression */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: - case 157 /* TypePredicate */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 194 /* BinaryExpression */: + case 195 /* ConditionalExpression */: + case 202 /* AsExpression */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 158 /* TypePredicate */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return true; // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 175 /* BindingElement */: + case 176 /* BindingElement */: // equals in type X = ... - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: // equal in import a = module('a'); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // equal in let a = 0; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: // equal in p = 0; - case 145 /* Parameter */: - case 263 /* EnumMember */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - return context.currentTokenSpan.kind === 57 /* EqualsToken */ || context.nextTokenSpan.kind === 57 /* EqualsToken */; + case 146 /* Parameter */: + case 264 /* EnumMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + return context.currentTokenSpan.kind === 58 /* EqualsToken */ || context.nextTokenSpan.kind === 58 /* EqualsToken */; // "in" keyword in for (let x in []) { } - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // "in" keyword in [P in keyof T]: T[P] - case 144 /* TypeParameter */: - return context.currentTokenSpan.kind === 91 /* InKeyword */ || context.nextTokenSpan.kind === 91 /* InKeyword */; + case 145 /* TypeParameter */: + return context.currentTokenSpan.kind === 92 /* InKeyword */ || context.nextTokenSpan.kind === 92 /* InKeyword */; // Technically, "of" is not a binary operator, but format it the same way as "in" - case 215 /* ForOfStatement */: - return context.currentTokenSpan.kind === 141 /* OfKeyword */ || context.nextTokenSpan.kind === 141 /* OfKeyword */; + case 216 /* ForOfStatement */: + return context.currentTokenSpan.kind === 142 /* OfKeyword */ || context.nextTokenSpan.kind === 142 /* OfKeyword */; } return false; }; @@ -80968,7 +81068,7 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 194 /* ConditionalExpression */; + return context.contextNode.kind === 195 /* ConditionalExpression */; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. @@ -80990,7 +81090,7 @@ var ts; return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); }; Rules.IsBraceWrappedContext = function (context) { - return context.contextNode.kind === 173 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context); + return context.contextNode.kind === 174 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context); }; // This check is done before an open brace in a control construct, a function, or a typescript block declaration Rules.IsBeforeMultilineBlockContext = function (context) { @@ -81015,70 +81115,70 @@ var ts; return true; } switch (node.kind) { - case 206 /* Block */: - case 234 /* CaseBlock */: - case 177 /* ObjectLiteralExpression */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 178 /* ObjectLiteralExpression */: + case 234 /* ModuleBlock */: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: // case SyntaxKind.MemberFunctionDeclaration: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // case SyntaxKind.MethodSignature: - case 154 /* CallSignature */: - case 185 /* FunctionExpression */: - case 151 /* Constructor */: - case 186 /* ArrowFunction */: + case 155 /* CallSignature */: + case 186 /* FunctionExpression */: + case 152 /* Constructor */: + case 187 /* ArrowFunction */: // case SyntaxKind.ConstructorDeclaration: // case SyntaxKind.SimpleArrowFunctionExpression: // case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 227 /* FunctionDeclaration */ || context.contextNode.kind === 185 /* FunctionExpression */; + return context.contextNode.kind === 228 /* FunctionDeclaration */ || context.contextNode.kind === 186 /* FunctionExpression */; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 162 /* TypeLiteral */: - case 232 /* ModuleDeclaration */: - case 243 /* ExportDeclaration */: - case 244 /* NamedExports */: - case 237 /* ImportDeclaration */: - case 240 /* NamedImports */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 163 /* TypeLiteral */: + case 233 /* ModuleDeclaration */: + case 244 /* ExportDeclaration */: + case 245 /* NamedExports */: + case 238 /* ImportDeclaration */: + case 241 /* NamedImports */: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 228 /* ClassDeclaration */: - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: - case 259 /* CatchClause */: - case 233 /* ModuleBlock */: - case 220 /* SwitchStatement */: + case 229 /* ClassDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 260 /* CatchClause */: + case 234 /* ModuleBlock */: + case 221 /* SwitchStatement */: return true; - case 206 /* Block */: { + case 207 /* Block */: { var blockParent = context.currentTokenParent.parent; - if (blockParent.kind !== 186 /* ArrowFunction */ && - blockParent.kind !== 185 /* FunctionExpression */) { + if (blockParent.kind !== 187 /* ArrowFunction */ && + blockParent.kind !== 186 /* FunctionExpression */) { return true; } } @@ -81087,61 +81187,61 @@ var ts; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 210 /* IfStatement */: - case 220 /* SwitchStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: - case 223 /* TryStatement */: - case 211 /* DoStatement */: - case 219 /* WithStatement */: + case 211 /* IfStatement */: + case 221 /* SwitchStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: + case 224 /* TryStatement */: + case 212 /* DoStatement */: + case 220 /* WithStatement */: // TODO // case SyntaxKind.ElseClause: - case 259 /* CatchClause */: + case 260 /* CatchClause */: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 177 /* ObjectLiteralExpression */; + return context.contextNode.kind === 178 /* ObjectLiteralExpression */; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 180 /* CallExpression */; + return context.contextNode.kind === 181 /* CallExpression */; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 181 /* NewExpression */; + return context.contextNode.kind === 182 /* NewExpression */; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); }; Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 25 /* CommaToken */; + return context.currentTokenSpan.kind !== 26 /* CommaToken */; }; Rules.IsNextTokenNotCloseBracket = function (context) { - return context.nextTokenSpan.kind !== 21 /* CloseBracketToken */; + return context.nextTokenSpan.kind !== 22 /* CloseBracketToken */; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 186 /* ArrowFunction */; + return context.contextNode.kind === 187 /* ArrowFunction */; }; Rules.IsNonJsxSameLineTokenContext = function (context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 10 /* JsxText */; }; Rules.IsNonJsxElementContext = function (context) { - return context.contextNode.kind !== 248 /* JsxElement */; + return context.contextNode.kind !== 249 /* JsxElement */; }; Rules.IsJsxExpressionContext = function (context) { - return context.contextNode.kind === 255 /* JsxExpression */; + return context.contextNode.kind === 256 /* JsxExpression */; }; Rules.IsNextTokenParentJsxAttribute = function (context) { - return context.nextTokenParent.kind === 252 /* JsxAttribute */; + return context.nextTokenParent.kind === 253 /* JsxAttribute */; }; Rules.IsJsxAttributeContext = function (context) { - return context.contextNode.kind === 252 /* JsxAttribute */; + return context.contextNode.kind === 253 /* JsxAttribute */; }; Rules.IsJsxSelfClosingElementContext = function (context) { - return context.contextNode.kind === 249 /* JsxSelfClosingElement */; + return context.contextNode.kind === 250 /* JsxSelfClosingElement */; }; Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); @@ -81156,42 +81256,42 @@ var ts; while (ts.isPartOfExpression(node)) { node = node.parent; } - return node.kind === 146 /* Decorator */; + return node.kind === 147 /* Decorator */; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 226 /* VariableDeclarationList */ && + return context.currentTokenParent.kind === 227 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 232 /* ModuleDeclaration */; + return context.contextNode.kind === 233 /* ModuleDeclaration */; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 162 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === 163 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { - if (token.kind !== 26 /* LessThanToken */ && token.kind !== 28 /* GreaterThanToken */) { + if (token.kind !== 27 /* LessThanToken */ && token.kind !== 29 /* GreaterThanToken */) { return false; } switch (parent.kind) { - case 158 /* TypeReference */: - case 183 /* TypeAssertionExpression */: - case 230 /* TypeAliasDeclaration */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 200 /* ExpressionWithTypeArguments */: + case 159 /* TypeReference */: + case 184 /* TypeAssertionExpression */: + case 231 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 201 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -81202,16 +81302,16 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 183 /* TypeAssertionExpression */; + return context.contextNode.kind === 184 /* TypeAssertionExpression */; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 189 /* VoidExpression */; + return context.currentTokenSpan.kind === 105 /* VoidKeyword */ && context.currentTokenParent.kind === 190 /* VoidExpression */; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 196 /* YieldExpression */ && context.contextNode.expression !== undefined; + return context.contextNode.kind === 197 /* YieldExpression */ && context.contextNode.expression !== undefined; }; Rules.IsNonNullAssertionContext = function (context) { - return context.contextNode.kind === 202 /* NonNullExpression */; + return context.contextNode.kind === 203 /* NonNullExpression */; }; return Rules; }()); @@ -81235,7 +81335,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 141 /* LastToken */ + 1; + this.mapRowLength = 142 /* LastToken */ + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); // new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map var rulesBucketConstructionStateList = new Array(this.map.length); // new Array(this.map.length); @@ -81249,7 +81349,7 @@ var ts; }); }; RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - ts.Debug.assert(row <= 141 /* LastKeyword */ && column <= 141 /* LastKeyword */, "Must compute formatting context from tokens"); + ts.Debug.assert(row <= 142 /* LastKeyword */ && column <= 142 /* LastKeyword */, "Must compute formatting context from tokens"); var rulesBucketIndex = (row * this.mapRowLength) + column; return rulesBucketIndex; }; @@ -81430,7 +81530,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0 /* FirstToken */; token <= 141 /* LastToken */; token++) { + for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) { result.push(token); } return result; @@ -81474,17 +81574,17 @@ var ts; }()); TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 141 /* LastKeyword */); - TokenRange.BinaryOperators = TokenRange.FromRange(26 /* FirstBinaryOperator */, 69 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 141 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42 /* PlusPlusToken */, 43 /* MinusMinusToken */, 51 /* TildeToken */, 50 /* ExclamationToken */]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 70 /* Identifier */, 18 /* OpenParenToken */, 20 /* OpenBracketToken */, 16 /* OpenBraceToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]); + TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */); + TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */]); + TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */]); + TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */, 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]); + TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]); TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 135 /* StringKeyword */, 121 /* BooleanKeyword */, 136 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]); + TokenRange.TypeNames = TokenRange.FromTokens([71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */, 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */]); Shared.TokenRange = TokenRange; })(Shared = formatting.Shared || (formatting.Shared = {})); })(formatting = ts.formatting || (ts.formatting = {})); @@ -81690,11 +81790,11 @@ var ts; } formatting.formatOnEnter = formatOnEnter; function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 24 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); + return formatOutermostParent(position, 25 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); } formatting.formatOnSemicolon = formatOnSemicolon; function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 17 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); + return formatOutermostParent(position, 18 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); } formatting.formatOnClosingCurly = formatOnClosingCurly; function formatDocument(sourceFile, rulesProvider, options) { @@ -81758,17 +81858,17 @@ var ts; // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent, node) { switch (parent.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: return ts.rangeContainsRange(parent.members, node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: var body = parent.body; - return body && body.kind === 233 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node); - case 264 /* SourceFile */: - case 206 /* Block */: - case 233 /* ModuleBlock */: + return body && body.kind === 234 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node); + case 265 /* SourceFile */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return ts.rangeContainsRange(parent.statements, node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -81979,19 +82079,19 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 228 /* ClassDeclaration */: return 74 /* ClassKeyword */; - case 229 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */; - case 227 /* FunctionDeclaration */: return 88 /* FunctionKeyword */; - case 231 /* EnumDeclaration */: return 231 /* EnumDeclaration */; - case 152 /* GetAccessor */: return 124 /* GetKeyword */; - case 153 /* SetAccessor */: return 134 /* SetKeyword */; - case 150 /* MethodDeclaration */: + case 229 /* ClassDeclaration */: return 75 /* ClassKeyword */; + case 230 /* InterfaceDeclaration */: return 109 /* InterfaceKeyword */; + case 228 /* FunctionDeclaration */: return 89 /* FunctionKeyword */; + case 232 /* EnumDeclaration */: return 232 /* EnumDeclaration */; + case 153 /* GetAccessor */: return 125 /* GetKeyword */; + case 154 /* SetAccessor */: return 135 /* SetKeyword */; + case 151 /* MethodDeclaration */: if (node.asteriskToken) { - return 38 /* AsteriskToken */; + return 39 /* AsteriskToken */; } // falls through - case 148 /* PropertyDeclaration */: - case 145 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 146 /* Parameter */: return node.name.kind; } } @@ -82003,9 +82103,9 @@ var ts; // .. { // // comment // } - case 17 /* CloseBraceToken */: - case 21 /* CloseBracketToken */: - case 19 /* CloseParenToken */: + case 18 /* CloseBraceToken */: + case 22 /* CloseBracketToken */: + case 20 /* CloseParenToken */: return indentation + getEffectiveDelta(delta, container); } return tokenIndentation !== -1 /* Unknown */ ? tokenIndentation : indentation; @@ -82019,26 +82119,26 @@ var ts; } switch (kind) { // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent - case 16 /* OpenBraceToken */: - case 17 /* CloseBraceToken */: - case 18 /* OpenParenToken */: - case 19 /* CloseParenToken */: - case 81 /* ElseKeyword */: - case 105 /* WhileKeyword */: - case 56 /* AtToken */: + case 17 /* OpenBraceToken */: + case 18 /* CloseBraceToken */: + case 19 /* OpenParenToken */: + case 20 /* CloseParenToken */: + case 82 /* ElseKeyword */: + case 106 /* WhileKeyword */: + case 57 /* AtToken */: return indentation; - case 40 /* SlashToken */: - case 28 /* GreaterThanToken */: { - if (container.kind === 250 /* JsxOpeningElement */ || - container.kind === 251 /* JsxClosingElement */ || - container.kind === 249 /* JsxSelfClosingElement */) { + case 41 /* SlashToken */: + case 29 /* GreaterThanToken */: { + if (container.kind === 251 /* JsxOpeningElement */ || + container.kind === 252 /* JsxClosingElement */ || + container.kind === 250 /* JsxSelfClosingElement */) { return indentation; } break; } - case 20 /* OpenBracketToken */: - case 21 /* CloseBracketToken */: { - if (container.kind !== 171 /* MappedType */) { + case 21 /* OpenBracketToken */: + case 22 /* CloseBracketToken */: { + if (container.kind !== 172 /* MappedType */) { return indentation; } break; @@ -82148,11 +82248,11 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 146 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 147 /* Decorator */ ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent.kind === 176 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent.kind === 177 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -82509,41 +82609,41 @@ var ts; } function getOpenTokenForList(node, list) { switch (node.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 186 /* ArrowFunction */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 187 /* ArrowFunction */: if (node.typeParameters === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } else if (node.parameters === list) { - return 18 /* OpenParenToken */; + return 19 /* OpenParenToken */; } break; - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: if (node.typeArguments === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } else if (node.arguments === list) { - return 18 /* OpenParenToken */; + return 19 /* OpenParenToken */; } break; - case 158 /* TypeReference */: + case 159 /* TypeReference */: if (node.typeArguments === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } } return 0 /* Unknown */; } function getCloseTokenForOpenToken(kind) { switch (kind) { - case 18 /* OpenParenToken */: - return 19 /* CloseParenToken */; - case 26 /* LessThanToken */: - return 28 /* GreaterThanToken */; + case 19 /* OpenParenToken */: + return 20 /* CloseParenToken */; + case 27 /* LessThanToken */: + return 29 /* GreaterThanToken */; } return 0 /* Unknown */; } @@ -82652,7 +82752,7 @@ var ts; var current_1 = position; while (current_1 > 0) { var char = sourceFile.text.charCodeAt(current_1); - if (!ts.isWhiteSpace(char)) { + if (!ts.isWhiteSpaceLike(char)) { break; } current_1--; @@ -82660,7 +82760,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 193 /* BinaryExpression */) { + if (precedingToken.kind === 26 /* CommaToken */ && precedingToken.parent.kind !== 194 /* BinaryExpression */) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { @@ -82785,7 +82885,7 @@ var ts; // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) && - (parent.kind === 264 /* SourceFile */ || !parentAndChildShareLine); + (parent.kind === 265 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -82802,11 +82902,11 @@ var ts; if (!nextToken) { return 0 /* Unknown */; } - if (nextToken.kind === 16 /* OpenBraceToken */) { + if (nextToken.kind === 17 /* OpenBraceToken */) { // open braces are always indented at the parent level return 1 /* OpenBrace */; } - else if (nextToken.kind === 17 /* CloseBraceToken */) { + else if (nextToken.kind === 18 /* CloseBraceToken */) { // close braces are indented at the parent level if they are located on the same line with cursor // this means that if new line will be added at $ position, this case will be indented // class A { @@ -82824,8 +82924,8 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 210 /* IfStatement */ && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 81 /* ElseKeyword */, sourceFile); + if (parent.kind === 211 /* IfStatement */ && parent.elseStatement === child) { + var elseKeyword = ts.findChildOfKind(parent, 82 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -82839,37 +82939,37 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 158 /* TypeReference */: + case 159 /* TypeReference */: return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd()); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return node.parent.properties; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return node.parent.elements; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 151 /* Constructor */: - case 160 /* ConstructorType */: - case 155 /* ConstructSignature */: { + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 152 /* Constructor */: + case 161 /* ConstructorType */: + case 156 /* ConstructSignature */: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd()); } - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd()); - case 181 /* NewExpression */: - case 180 /* CallExpression */: { + case 182 /* NewExpression */: + case 181 /* CallExpression */: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd()); } - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd()); - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd()); } } @@ -82887,11 +82987,11 @@ var ts; function getLineIndentationWhenExpressionIsInMultiLine(node, sourceFile, options) { // actual indentation should not be used when: // - node is close parenthesis - this is the end of the expression - if (node.kind === 19 /* CloseParenToken */) { + if (node.kind === 20 /* CloseParenToken */) { return -1 /* Unknown */; } - if (node.parent && (node.parent.kind === 180 /* CallExpression */ || - node.parent.kind === 181 /* NewExpression */) && + if (node.parent && (node.parent.kind === 181 /* CallExpression */ || + node.parent.kind === 182 /* NewExpression */) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -82909,10 +83009,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: node = node.expression; break; default: @@ -82928,7 +83028,7 @@ var ts; // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; i--) { - if (list[i].kind === 25 /* CommaToken */) { + if (list[i].kind === 26 /* CommaToken */) { continue; } // skip list items that ends on the same line with the current list element @@ -82976,49 +83076,49 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 209 /* ExpressionStatement */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 176 /* ArrayLiteralExpression */: - case 206 /* Block */: - case 233 /* ModuleBlock */: - case 177 /* ObjectLiteralExpression */: - case 162 /* TypeLiteral */: - case 171 /* MappedType */: - case 164 /* TupleType */: - case 234 /* CaseBlock */: - case 257 /* DefaultClause */: - case 256 /* CaseClause */: - case 184 /* ParenthesizedExpression */: - case 178 /* PropertyAccessExpression */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 207 /* VariableStatement */: - case 225 /* VariableDeclaration */: - case 242 /* ExportAssignment */: - case 218 /* ReturnStatement */: - case 194 /* ConditionalExpression */: - case 174 /* ArrayBindingPattern */: - case 173 /* ObjectBindingPattern */: - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: - case 255 /* JsxExpression */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 145 /* Parameter */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 167 /* ParenthesizedType */: - case 182 /* TaggedTemplateExpression */: - case 190 /* AwaitExpression */: - case 244 /* NamedExports */: - case 240 /* NamedImports */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: + case 210 /* ExpressionStatement */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 177 /* ArrayLiteralExpression */: + case 207 /* Block */: + case 234 /* ModuleBlock */: + case 178 /* ObjectLiteralExpression */: + case 163 /* TypeLiteral */: + case 172 /* MappedType */: + case 165 /* TupleType */: + case 235 /* CaseBlock */: + case 258 /* DefaultClause */: + case 257 /* CaseClause */: + case 185 /* ParenthesizedExpression */: + case 179 /* PropertyAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 208 /* VariableStatement */: + case 226 /* VariableDeclaration */: + case 243 /* ExportAssignment */: + case 219 /* ReturnStatement */: + case 195 /* ConditionalExpression */: + case 175 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 256 /* JsxExpression */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 146 /* Parameter */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 168 /* ParenthesizedType */: + case 183 /* TaggedTemplateExpression */: + case 191 /* AwaitExpression */: + case 245 /* NamedExports */: + case 241 /* NamedImports */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: return true; } return false; @@ -83027,27 +83127,27 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0 /* Unknown */; switch (parent.kind) { - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 213 /* ForStatement */: - case 210 /* IfStatement */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 186 /* ArrowFunction */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - return childKind !== 206 /* Block */; - case 243 /* ExportDeclaration */: - return childKind !== 244 /* NamedExports */; - case 237 /* ImportDeclaration */: - return childKind !== 238 /* ImportClause */ || - (child.namedBindings && child.namedBindings.kind !== 240 /* NamedImports */); - case 248 /* JsxElement */: - return childKind !== 251 /* JsxClosingElement */; + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 214 /* ForStatement */: + case 211 /* IfStatement */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 187 /* ArrowFunction */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + return childKind !== 207 /* Block */; + case 244 /* ExportDeclaration */: + return childKind !== 245 /* NamedExports */; + case 238 /* ImportDeclaration */: + return childKind !== 239 /* ImportClause */ || + (child.namedBindings && child.namedBindings.kind !== 241 /* NamedImports */); + case 249 /* JsxElement */: + return childKind !== 252 /* JsxClosingElement */; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; @@ -83153,7 +83253,7 @@ var ts; * Checks if 'candidate' argument is a legal separator in the list that contains 'node' as an element */ function isSeparator(node, candidate) { - return candidate && node.parent && (candidate.kind === 25 /* CommaToken */ || (candidate.kind === 24 /* SemicolonToken */ && node.parent.kind === 177 /* ObjectLiteralExpression */)); + return candidate && node.parent && (candidate.kind === 26 /* CommaToken */ || (candidate.kind === 25 /* SemicolonToken */ && node.parent.kind === 178 /* ObjectLiteralExpression */)); } function spaces(count) { var s = ""; @@ -83258,9 +83358,9 @@ var ts; ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) { if (options === void 0) { options = {}; } if ((ts.isStatementButNotDeclaration(after)) || - after.kind === 148 /* PropertyDeclaration */ || - after.kind === 147 /* PropertySignature */ || - after.kind === 149 /* MethodSignature */) { + after.kind === 149 /* PropertyDeclaration */ || + after.kind === 148 /* PropertySignature */ || + after.kind === 150 /* MethodSignature */) { // check if previous statement ends with semicolon // if not - insert semicolon to preserve the code from changing the meaning due to ASI if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) { @@ -83268,7 +83368,7 @@ var ts; sourceFile: sourceFile, options: {}, range: { pos: after.end, end: after.end }, - node: ts.createToken(24 /* SemicolonToken */) + node: ts.createToken(25 /* SemicolonToken */) }); } } @@ -83365,12 +83465,12 @@ var ts; // if list has only one element then we'll format is as multiline if node has comment in trailing trivia, or as singleline otherwise // i.e. var x = 1 // this is x // | new element will be inserted at this position - separator = 25 /* CommaToken */; + separator = 26 /* CommaToken */; } else { // element has more than one element, pick separator from the list var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile); - separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25 /* CommaToken */; + separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 26 /* CommaToken */; // determine if list is multiline by checking lines of after element and element that precedes it. var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; @@ -83585,7 +83685,7 @@ var ts; if (force || !isTrivia(s)) { this.lastNonTriviaPosition = this.writer.getTextPos(); var i = 0; - while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) { + while (ts.isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { i++; } // trim trailing whitespaces @@ -83755,10 +83855,10 @@ var ts; // this.missing = 1; // ^^^^^^^ var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind !== 70 /* Identifier */) { + if (token.kind !== 71 /* Identifier */) { return undefined; } - if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98 /* ThisKeyword */) { + if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99 /* ThisKeyword */) { return undefined; } var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false); @@ -83774,7 +83874,7 @@ var ts; function getActionsForAddMissingMemberInJavaScriptFile() { var memberName = token.getText(); if (isStatic) { - if (classDeclaration.kind === 198 /* ClassExpression */) { + if (classDeclaration.kind === 199 /* ClassExpression */) { return undefined; } var className = classDeclaration.name.getText(); @@ -83808,17 +83908,17 @@ var ts; } function getActionsForAddMissingMemberInTypeScriptFile() { var typeNode; - if (token.parent.parent.kind === 193 /* BinaryExpression */) { + if (token.parent.parent.kind === 194 /* BinaryExpression */) { var binaryExpression = token.parent.parent; var checker = context.program.getTypeChecker(); var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right))); typeNode = checker.typeToTypeNode(widenedType, classDeclaration); } - typeNode = typeNode || ts.createKeywordTypeNode(118 /* AnyKeyword */); + typeNode = typeNode || ts.createKeywordTypeNode(119 /* AnyKeyword */); var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile); var property = ts.createProperty( /*decorators*/ undefined, - /*modifiers*/ isStatic ? [ts.createToken(114 /* StaticKeyword */)] : undefined, token.getText(sourceFile), + /*modifiers*/ isStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, token.getText(sourceFile), /*questionToken*/ undefined, typeNode, /*initializer*/ undefined); var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -83828,7 +83928,7 @@ var ts; changes: propertyChangeTracker.getChanges() }]; if (!isStatic) { - var stringTypeNode = ts.createKeywordTypeNode(135 /* StringKeyword */); + var stringTypeNode = ts.createKeywordTypeNode(136 /* StringKeyword */); var indexingParameter = ts.createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, @@ -83907,7 +84007,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 98 /* ThisKeyword */) { + if (token.kind !== 99 /* ThisKeyword */) { return undefined; } var constructor = ts.getContainingFunction(token); @@ -83917,7 +84017,7 @@ var ts; } // figure out if the `this` access is actually inside the supercall // i.e. super(this.a), since in that case we won't suggest a fix - if (superCall.expression && superCall.expression.kind === 180 /* CallExpression */) { + if (superCall.expression && superCall.expression.kind === 181 /* CallExpression */) { var arguments_1 = superCall.expression.arguments; for (var i = 0; i < arguments_1.length; i++) { if (arguments_1[i].expression === token) { @@ -83933,7 +84033,7 @@ var ts; changes: changeTracker.getChanges() }]; function findSuperCall(n) { - if (n.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) { + if (n.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) { return n; } if (ts.isFunctionLike(n)) { @@ -83955,7 +84055,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 122 /* ConstructorKeyword */) { + if (token.kind !== 123 /* ConstructorKeyword */) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -83981,7 +84081,7 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); var classDeclNode = ts.getContainingClass(token); - if (!(token.kind === 70 /* Identifier */ && ts.isClassLike(classDeclNode))) { + if (!(token.kind === 71 /* Identifier */ && ts.isClassLike(classDeclNode))) { return undefined; } var heritageClauses = classDeclNode.heritageClauses; @@ -83989,16 +84089,16 @@ var ts; return undefined; } var extendsToken = heritageClauses[0].getFirstToken(); - if (!(extendsToken && extendsToken.kind === 84 /* ExtendsKeyword */)) { + if (!(extendsToken && extendsToken.kind === 85 /* ExtendsKeyword */)) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); - changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107 /* ImplementsKeyword */)); + changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(108 /* ImplementsKeyword */)); // We replace existing keywords with commas. for (var i = 1; i < heritageClauses.length; i++) { var keywordToken = heritageClauses[i].getFirstToken(); if (keywordToken) { - changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25 /* CommaToken */)); + changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(26 /* CommaToken */)); } } var result = [{ @@ -84020,7 +84120,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 70 /* Identifier */) { + if (token.kind !== 71 /* Identifier */) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -84048,15 +84148,15 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); // this handles var ["computed"] = 12; - if (token.kind === 20 /* OpenBracketToken */) { + if (token.kind === 21 /* OpenBracketToken */) { token = ts.getTokenAtPosition(sourceFile, start + 1); } switch (token.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: switch (token.parent.kind) { - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: switch (token.parent.parent.parent.kind) { - case 213 /* ForStatement */: + case 214 /* ForStatement */: var forStatement = token.parent.parent.parent; var forInitializer = forStatement.initializer; if (forInitializer.declarations.length === 1) { @@ -84065,18 +84165,18 @@ var ts; else { return deleteNodeInList(token.parent); } - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: var forOfStatement = token.parent.parent.parent; - if (forOfStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forOfStatement.initializer.kind === 227 /* VariableDeclarationList */) { var forOfInitializer = forOfStatement.initializer; return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()); } break; - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // There is no valid fix in the case of: // for .. in return undefined; - case 259 /* CatchClause */: + case 260 /* CatchClause */: var catchClause = token.parent.parent; var parameter = catchClause.variableDeclaration.getChildren()[0]; return deleteNode(parameter); @@ -84091,15 +84191,15 @@ var ts; } // TODO: #14885 // falls through - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: var typeParameters = token.parent.parent.typeParameters; if (typeParameters.length === 1) { var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1); - if (!previousToken || previousToken.kind !== 26 /* LessThanToken */) { + if (!previousToken || previousToken.kind !== 27 /* LessThanToken */) { return deleteRange(typeParameters); } var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end); - if (!nextToken || nextToken.kind !== 28 /* GreaterThanToken */) { + if (!nextToken || nextToken.kind !== 29 /* GreaterThanToken */) { return deleteRange(typeParameters); } return deleteNodeRange(previousToken, nextToken); @@ -84107,7 +84207,7 @@ var ts; else { return deleteNodeInList(token.parent); } - case 145 /* Parameter */: + case 146 /* Parameter */: var functionDeclaration = token.parent.parent; if (functionDeclaration.parameters.length === 1) { return deleteNode(token.parent); @@ -84116,14 +84216,14 @@ var ts; return deleteNodeInList(token.parent); } // handle case where 'import a = A;' - case 236 /* ImportEqualsDeclaration */: - var importEquals = ts.getAncestor(token, 236 /* ImportEqualsDeclaration */); + case 237 /* ImportEqualsDeclaration */: + var importEquals = ts.getAncestor(token, 237 /* ImportEqualsDeclaration */); return deleteNode(importEquals); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: var namedImports = token.parent.parent; if (namedImports.elements.length === 1) { // Only 1 import and it is unused. So the entire declaration should be removed. - var importSpec = ts.getAncestor(token, 237 /* ImportDeclaration */); + var importSpec = ts.getAncestor(token, 238 /* ImportDeclaration */); return deleteNode(importSpec); } else { @@ -84132,17 +84232,17 @@ var ts; } // handle case where "import d, * as ns from './file'" // or "'import {a, b as ns} from './file'" - case 238 /* ImportClause */: + case 239 /* ImportClause */: var importClause = token.parent; if (!importClause.namedBindings) { - var importDecl = ts.getAncestor(importClause, 237 /* ImportDeclaration */); + var importDecl = ts.getAncestor(importClause, 238 /* ImportDeclaration */); return deleteNode(importDecl); } else { // import |d,| * as ns from './file' var start_4 = importClause.name.getStart(sourceFile); var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end); - if (nextToken && nextToken.kind === 25 /* CommaToken */) { + if (nextToken && nextToken.kind === 26 /* CommaToken */) { // shift first non-whitespace position after comma to the start position of the node return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) }); } @@ -84150,15 +84250,15 @@ var ts; return deleteNode(importClause.name); } } - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: var namespaceImport = token.parent; if (namespaceImport.name === token && !namespaceImport.parent.name) { - var importDecl = ts.getAncestor(namespaceImport, 237 /* ImportDeclaration */); + var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */); return deleteNode(importDecl); } else { var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1); - if (previousToken && previousToken.kind === 25 /* CommaToken */) { + if (previousToken && previousToken.kind === 26 /* CommaToken */) { var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart); return deleteRange({ pos: startPosition, end: namespaceImport.end }); } @@ -84166,8 +84266,8 @@ var ts; } } break; - case 148 /* PropertyDeclaration */: - case 239 /* NamespaceImport */: + case 149 /* PropertyDeclaration */: + case 240 /* NamespaceImport */: return deleteNode(token.parent); } if (ts.isDeclarationName(token)) { @@ -84375,10 +84475,10 @@ var ts; function getImportDeclaration(moduleSpecifier) { var node = moduleSpecifier; while (node) { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { return node; } - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } node = node.parent; @@ -84424,9 +84524,9 @@ var ts; var existingModuleSpecifier; for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) { var declaration = declarations_14[_i]; - if (declaration.kind === 237 /* ImportDeclaration */) { + if (declaration.kind === 238 /* ImportDeclaration */) { var namedBindings = declaration.importClause && declaration.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { // case: // import * as ns from "foo" namespaceImportDeclaration = declaration; @@ -84466,7 +84566,7 @@ var ts; } return actions; function getModuleSpecifierFromImportEqualsDeclaration(declaration) { - if (declaration.moduleReference && declaration.moduleReference.kind === 247 /* ExternalModuleReference */) { + if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) { return declaration.moduleReference.expression.getText(); } return declaration.moduleReference.getText(); @@ -84494,7 +84594,7 @@ var ts; } function getCodeActionForNamespaceImport(declaration) { var namespacePrefix; - if (declaration.kind === 237 /* ImportDeclaration */) { + if (declaration.kind === 238 /* ImportDeclaration */) { namespacePrefix = declaration.importClause.namedBindings.name.getText(); } else { @@ -84519,7 +84619,7 @@ var ts; // insert after any existing imports for (var i = sourceFile.statements.length - 1; i >= 0; i--) { var statement = sourceFile.statements[i]; - if (statement.kind === 236 /* ImportEqualsDeclaration */ || statement.kind === 237 /* ImportDeclaration */) { + if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) { lastImportDeclaration = statement; break; } @@ -84556,7 +84656,7 @@ var ts; tryGetModuleNameFromRootDirs() || ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory)); function tryGetModuleNameFromAmbientModule() { - if (moduleSymbol.valueDeclaration.kind !== 264 /* SourceFile */) { + if (moduleSymbol.valueDeclaration.kind !== 265 /* SourceFile */) { return moduleSymbol.name; } } @@ -84837,17 +84937,17 @@ var ts; var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); var optional = !!(symbol.flags & 67108864 /* Optional */); switch (declaration.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 147 /* PropertySignature */: - case 148 /* PropertyDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 148 /* PropertySignature */: + case 149 /* PropertyDeclaration */: var typeNode = checker.typeToTypeNode(type, enclosingDeclaration); var property = ts.createProperty( - /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeNode, + /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined); return property; - case 149 /* MethodSignature */: - case 150 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 151 /* MethodDeclaration */: // The signature for the implementation appears as an entry in `signatures` iff // there is only one signature. // If there are overloads and an implementation signature, it appears as an @@ -84889,12 +84989,12 @@ var ts; return undefined; } function signatureToMethodDeclaration(signature, enclosingDeclaration, body) { - var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150 /* MethodDeclaration */, enclosingDeclaration); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration); if (signatureDeclaration) { signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; - signatureDeclaration.questionToken = optional ? ts.createToken(54 /* QuestionToken */) : undefined; + signatureDeclaration.questionToken = optional ? ts.createToken(55 /* QuestionToken */) : undefined; signatureDeclaration.body = body; } return signatureDeclaration; @@ -84922,21 +85022,21 @@ var ts; var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); }); var parameters = []; for (var i = 0; i < maxNonRestArgs; i++) { - var anyType = ts.createKeywordTypeNode(118 /* AnyKeyword */); + var anyType = ts.createKeywordTypeNode(119 /* AnyKeyword */); var newParameter = ts.createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i], - /*questionToken*/ i >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyType, + /*questionToken*/ i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyType, /*initializer*/ undefined); parameters.push(newParameter); } if (someSigHasRestParameter) { - var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118 /* AnyKeyword */)); + var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119 /* AnyKeyword */)); var restParameter = ts.createParameter( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createToken(23 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", - /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyArrayType, + /*modifiers*/ undefined, ts.createToken(24 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", + /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyArrayType, /*initializer*/ undefined); parameters.push(restParameter); } @@ -84947,7 +85047,7 @@ var ts; function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) { return ts.createMethodDeclaration( /*decorators*/ undefined, modifiers, - /*asteriskToken*/ undefined, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); + /*asteriskToken*/ undefined, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); } codefix.createStubbedMethod = createStubbedMethod; function createStubbedMethodBody() { @@ -84957,10 +85057,10 @@ var ts; } function createVisibilityModifier(flags) { if (flags & 4 /* Public */) { - return ts.createToken(113 /* PublicKeyword */); + return ts.createToken(114 /* PublicKeyword */); } else if (flags & 16 /* Protected */) { - return ts.createToken(112 /* ProtectedKeyword */); + return ts.createToken(113 /* ProtectedKeyword */); } return undefined; } @@ -85009,8 +85109,8 @@ var ts; /** The version of the language service API */ ts.servicesVersion = "0.5"; function createNode(kind, pos, end, parent) { - var node = kind >= 142 /* FirstNode */ ? new NodeObject(kind, pos, end) : - kind === 70 /* Identifier */ ? new IdentifierObject(70 /* Identifier */, pos, end) : + var node = kind >= 143 /* FirstNode */ ? new NodeObject(kind, pos, end) : + kind === 71 /* Identifier */ ? new IdentifierObject(71 /* Identifier */, pos, end) : new TokenObject(kind, pos, end); node.parent = parent; return node; @@ -85067,7 +85167,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(293 /* SyntaxList */, nodes.pos, nodes.end, this); + var list = createNode(294 /* SyntaxList */, nodes.pos, nodes.end, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) { @@ -85086,11 +85186,11 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 142 /* FirstNode */) { + if (this.kind >= 143 /* FirstNode */) { ts.scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos_3 = this.pos; - var useJSDocScanner_1 = this.kind >= 282 /* FirstJSDocTagNode */ && this.kind <= 292 /* LastJSDocTagNode */; + var useJSDocScanner_1 = this.kind >= 283 /* FirstJSDocTagNode */ && this.kind <= 293 /* LastJSDocTagNode */; var processNode = function (node) { var isJSDocTagNode = ts.isJSDocTag(node); if (!isJSDocTagNode && pos_3 < node.pos) { @@ -85147,8 +85247,8 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 266 /* FirstJSDocNode */ || kid.kind > 292 /* LastJSDocNode */; }); - return child.kind < 142 /* FirstNode */ ? + var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 293 /* LastJSDocNode */; }); + return child.kind < 143 /* FirstNode */ ? child : child.getFirstToken(sourceFile); }; @@ -85158,7 +85258,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 142 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 143 /* FirstNode */ ? child : child.getLastToken(sourceFile); }; NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) { return ts.forEachChild(this, cbNode, cbNodeArray); @@ -85264,7 +85364,7 @@ var ts; } return IdentifierObject; }(TokenOrIdentifierObject)); - IdentifierObject.prototype.kind = 70 /* Identifier */; + IdentifierObject.prototype.kind = 71 /* Identifier */; var TypeObject = (function () { function TypeObject(checker, flags) { this.checker = checker; @@ -85397,9 +85497,9 @@ var ts; if (result_7 !== undefined) { return result_7; } - if (declaration.name.kind === 143 /* ComputedPropertyName */) { + if (declaration.name.kind === 144 /* ComputedPropertyName */) { var expr = declaration.name.expression; - if (expr.kind === 178 /* PropertyAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -85409,7 +85509,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 /* Identifier */ || + if (node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { return node.text; @@ -85419,10 +85519,10 @@ var ts; } function visit(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -85442,32 +85542,32 @@ var ts; } ts.forEachChild(node, visit); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 162 /* TypeLiteral */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 163 /* TypeLiteral */: addDeclaration(node); ts.forEachChild(node, visit); break; - case 145 /* Parameter */: + case 146 /* Parameter */: // Only consider parameter properties if (!ts.hasModifier(node, 92 /* ParameterPropertyModifier */)) { break; } // falls through - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: { + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: { var decl = node; if (ts.isBindingPattern(decl.name)) { ts.forEachChild(decl.name, visit); @@ -85477,19 +85577,19 @@ var ts; visit(decl.initializer); } // falls through - case 263 /* EnumMember */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 264 /* EnumMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: addDeclaration(node); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -85501,7 +85601,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 240 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { @@ -86061,12 +86161,12 @@ var ts; if (!symbol || typeChecker.isUnknownSymbol(symbol)) { // Try getting just type at this position and show switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: - case 98 /* ThisKeyword */: - case 168 /* ThisType */: - case 96 /* SuperKeyword */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: + case 99 /* ThisKeyword */: + case 169 /* ThisType */: + case 97 /* SuperKeyword */: // For the identifiers/this/super etc get the type at position var type = typeChecker.getTypeAtLocation(node); if (type) { @@ -86208,16 +86308,16 @@ var ts; return; } switch (node.kind) { - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: case 9 /* StringLiteral */: - case 85 /* FalseKeyword */: - case 100 /* TrueKeyword */: - case 94 /* NullKeyword */: - case 96 /* SuperKeyword */: - case 98 /* ThisKeyword */: - case 168 /* ThisType */: - case 70 /* Identifier */: + case 86 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 95 /* NullKeyword */: + case 97 /* SuperKeyword */: + case 99 /* ThisKeyword */: + case 169 /* ThisType */: + case 71 /* Identifier */: break; // Cant create the text span default: @@ -86233,7 +86333,7 @@ var ts; // If this is name of a module declarations, check if this is right side of dotted module name // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 232 /* ModuleDeclaration */ && + if (nodeForStartPos.parent.parent.kind === 233 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { // Use parent module declarations name for start pos nodeForStartPos = nodeForStartPos.parent.parent.name; @@ -86324,14 +86424,14 @@ var ts; return result; function getMatchingTokenKind(token) { switch (token.kind) { - case 16 /* OpenBraceToken */: return 17 /* CloseBraceToken */; - case 18 /* OpenParenToken */: return 19 /* CloseParenToken */; - case 20 /* OpenBracketToken */: return 21 /* CloseBracketToken */; - case 26 /* LessThanToken */: return 28 /* GreaterThanToken */; - case 17 /* CloseBraceToken */: return 16 /* OpenBraceToken */; - case 19 /* CloseParenToken */: return 18 /* OpenParenToken */; - case 21 /* CloseBracketToken */: return 20 /* OpenBracketToken */; - case 28 /* GreaterThanToken */: return 26 /* LessThanToken */; + case 17 /* OpenBraceToken */: return 18 /* CloseBraceToken */; + case 19 /* OpenParenToken */: return 20 /* CloseParenToken */; + case 21 /* OpenBracketToken */: return 22 /* CloseBracketToken */; + case 27 /* LessThanToken */: return 29 /* GreaterThanToken */; + case 18 /* CloseBraceToken */: return 17 /* OpenBraceToken */; + case 20 /* CloseParenToken */: return 19 /* OpenParenToken */; + case 22 /* CloseBracketToken */: return 21 /* OpenBracketToken */; + case 29 /* GreaterThanToken */: return 27 /* LessThanToken */; } return undefined; } @@ -86611,7 +86711,7 @@ var ts; sourceFile.nameTable = nameTable; function walk(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: setNameTable(node.text, node); break; case 9 /* StringLiteral */: @@ -86621,7 +86721,7 @@ var ts; // then we want 'something' to be in the name table. Similarly, if we have // "a['propname']" then we want to store "propname" in the name table. if (ts.isDeclarationName(node) || - node.parent.kind === 247 /* ExternalModuleReference */ || + node.parent.kind === 248 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || ts.isLiteralComputedPropertyDeclarationName(node)) { setNameTable(node.text, node); @@ -86643,13 +86743,13 @@ var ts; } function isObjectLiteralElement(node) { switch (node.kind) { - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return true; } return false; @@ -86662,13 +86762,13 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 143 /* ComputedPropertyName */) { + if (node.parent.kind === 144 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined; } // falls through - case 70 /* Identifier */: + case 71 /* Identifier */: return isObjectLiteralElement(node.parent) && - (node.parent.parent.kind === 177 /* ObjectLiteralExpression */ || node.parent.parent.kind === 253 /* JsxAttributes */) && + (node.parent.parent.kind === 178 /* ObjectLiteralExpression */ || node.parent.parent.kind === 254 /* JsxAttributes */) && node.parent.name === node ? node.parent : undefined; } return undefined; @@ -86702,7 +86802,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 179 /* ElementAccessExpression */ && + node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } /** @@ -86783,144 +86883,144 @@ var ts; function spanInNode(node) { if (node) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // Span on first variable declaration return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 225 /* VariableDeclaration */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 226 /* VariableDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return spanInVariableDeclaration(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return spanInParameterDeclaration(node); - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 206 /* Block */: + case 207 /* Block */: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } // falls through - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return spanInBlock(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return spanInBlock(node.block); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: // span on the expression return textSpan(node.expression); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: // span on return keyword and expression if present return textSpan(node.getChildAt(0), node.expression); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: // Span on while(...) return textSpanEndingAtNextToken(node, node.expression); - case 211 /* DoStatement */: + case 212 /* DoStatement */: // span in statement of the do statement return spanInNode(node.statement); - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: // span on debugger keyword return textSpan(node.getChildAt(0)); - case 210 /* IfStatement */: + case 211 /* IfStatement */: // set on if(..) span return textSpanEndingAtNextToken(node, node.expression); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: // span in statement return spanInNode(node.statement); - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: // On break or continue keyword and label if present return textSpan(node.getChildAt(0), node.label); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return spanInForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // span of for (a in ...) return textSpanEndingAtNextToken(node, node.expression); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: // span in initializer return spanInInitializerOfForLike(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: // span on switch(...) return textSpanEndingAtNextToken(node, node.expression); - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: // span in first statement of the clause return spanInNode(node.statements[0]); - case 223 /* TryStatement */: + case 224 /* TryStatement */: // span in try block return spanInBlock(node.tryBlock); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: // span in throw ... return textSpan(node, node.expression); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: // span on export = id return textSpan(node, node.expression); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleReference); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // span on complete module if it is instantiated if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } // falls through - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 175 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 176 /* BindingElement */: // span on complete node return textSpan(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: // span in statement return spanInNode(node.statement); - case 146 /* Decorator */: + case 147 /* Decorator */: return spanInNodeArray(node.parent.decorators); - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return spanInBindingPattern(node); // No breakpoint in interface, type alias - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: return undefined; // Tokens: - case 24 /* SemicolonToken */: + case 25 /* SemicolonToken */: case 1 /* EndOfFileToken */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return spanInPreviousNode(node); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return spanInOpenBraceToken(node); - case 17 /* CloseBraceToken */: + case 18 /* CloseBraceToken */: return spanInCloseBraceToken(node); - case 21 /* CloseBracketToken */: + case 22 /* CloseBracketToken */: return spanInCloseBracketToken(node); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return spanInOpenParenToken(node); - case 19 /* CloseParenToken */: + case 20 /* CloseParenToken */: return spanInCloseParenToken(node); - case 55 /* ColonToken */: + case 56 /* ColonToken */: return spanInColonToken(node); - case 28 /* GreaterThanToken */: - case 26 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 27 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); // Keywords: - case 105 /* WhileKeyword */: + case 106 /* WhileKeyword */: return spanInWhileKeyword(node); - case 81 /* ElseKeyword */: - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 82 /* ElseKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return spanInNextNode(node); - case 141 /* OfKeyword */: + case 142 /* OfKeyword */: return spanInOfKeyword(node); default: // Destructuring pattern in destructuring assignment @@ -86932,14 +87032,14 @@ var ts; // Set breakpoint on identifier element of destructuring pattern // a or ...c or d: x from // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern - if ((node.kind === 70 /* Identifier */ || - node.kind === 197 /* SpreadElement */ || - node.kind === 260 /* PropertyAssignment */ || - node.kind === 261 /* ShorthandPropertyAssignment */) && + if ((node.kind === 71 /* Identifier */ || + node.kind === 198 /* SpreadElement */ || + node.kind === 261 /* PropertyAssignment */ || + node.kind === 262 /* ShorthandPropertyAssignment */) && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } - if (node.kind === 193 /* BinaryExpression */) { + if (node.kind === 194 /* BinaryExpression */) { var binaryExpression = node; // Set breakpoint in destructuring pattern if its destructuring assignment // [a, b, c] or {a, b, c} of @@ -86948,7 +87048,7 @@ var ts; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); } - if (binaryExpression.operatorToken.kind === 57 /* EqualsToken */ && + if (binaryExpression.operatorToken.kind === 58 /* EqualsToken */ && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { // Set breakpoint on assignment expression element of destructuring pattern // a = expression of @@ -86956,28 +87056,28 @@ var ts; // { a = expression, b, c } = someExpression return textSpan(node); } - if (binaryExpression.operatorToken.kind === 25 /* CommaToken */) { + if (binaryExpression.operatorToken.kind === 26 /* CommaToken */) { return spanInNode(binaryExpression.left); } } if (ts.isPartOfExpression(node)) { switch (node.parent.kind) { - case 211 /* DoStatement */: + case 212 /* DoStatement */: // Set span as if on while keyword return spanInPreviousNode(node); - case 146 /* Decorator */: + case 147 /* Decorator */: // Set breakpoint on the decorator emit return spanInNode(node.parent); - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: return textSpan(node); - case 193 /* BinaryExpression */: - if (node.parent.operatorToken.kind === 25 /* CommaToken */) { + case 194 /* BinaryExpression */: + if (node.parent.operatorToken.kind === 26 /* CommaToken */) { // If this is a comma expression, the breakpoint is possible in this expression return textSpan(node); } break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (node.parent.body === node) { // If this is body of arrow function, it is allowed to have the breakpoint return textSpan(node); @@ -86986,13 +87086,13 @@ var ts; } } // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 260 /* PropertyAssignment */ && + if (node.parent.kind === 261 /* PropertyAssignment */ && node.parent.name === node && !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 183 /* TypeAssertionExpression */ && node.parent.type === node) { + if (node.parent.kind === 184 /* TypeAssertionExpression */ && node.parent.type === node) { return spanInNextNode(node.parent.type); } // return type of function go to previous token @@ -87000,8 +87100,8 @@ var ts; return spanInPreviousNode(node); } // initializer of variable/parameter declaration go to previous node - if ((node.parent.kind === 225 /* VariableDeclaration */ || - node.parent.kind === 145 /* Parameter */)) { + if ((node.parent.kind === 226 /* VariableDeclaration */ || + node.parent.kind === 146 /* Parameter */)) { var paramOrVarDecl = node.parent; if (paramOrVarDecl.initializer === node || paramOrVarDecl.type === node || @@ -87009,7 +87109,7 @@ var ts; return spanInPreviousNode(node); } } - if (node.parent.kind === 193 /* BinaryExpression */) { + if (node.parent.kind === 194 /* BinaryExpression */) { var binaryExpression = node.parent; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && (binaryExpression.right === node || @@ -87023,7 +87123,7 @@ var ts; } } function textSpanFromVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ && + if (variableDeclaration.parent.kind === 227 /* VariableDeclarationList */ && variableDeclaration.parent.declarations[0] === variableDeclaration) { // First declaration - include let keyword return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); @@ -87035,7 +87135,7 @@ var ts; } function spanInVariableDeclaration(variableDeclaration) { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 214 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 215 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } // If this is a destructuring pattern, set breakpoint in binding pattern @@ -87046,10 +87146,10 @@ var ts; // or its declaration from 'for of' if (variableDeclaration.initializer || ts.hasModifier(variableDeclaration, 1 /* Export */) || - variableDeclaration.parent.parent.kind === 215 /* ForOfStatement */) { + variableDeclaration.parent.parent.kind === 216 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } - if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ && + if (variableDeclaration.parent.kind === 227 /* VariableDeclarationList */ && variableDeclaration.parent.declarations[0] !== variableDeclaration) { // If we cannot set breakpoint on this declaration, set it on previous one // Because the variable declaration may be binding pattern and @@ -87086,7 +87186,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return ts.hasModifier(functionDeclaration, 1 /* Export */) || - (functionDeclaration.parent.kind === 228 /* ClassDeclaration */ && functionDeclaration.kind !== 151 /* Constructor */); + (functionDeclaration.parent.kind === 229 /* ClassDeclaration */ && functionDeclaration.kind !== 152 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { // No breakpoints in the function signature @@ -87109,26 +87209,26 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } // falls through // Set on parent if on same line otherwise on first statement - case 212 /* WhileStatement */: - case 210 /* IfStatement */: - case 214 /* ForInStatement */: + case 213 /* WhileStatement */: + case 211 /* IfStatement */: + case 215 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } // Default action is to set on first statement return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 227 /* VariableDeclarationList */) { // Declaration list - set breakpoint in first declaration var variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -87153,23 +87253,23 @@ var ts; } function spanInBindingPattern(bindingPattern) { // Set breakpoint in first binding element - var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 200 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } // Empty binding pattern of binding element, set breakpoint on binding element - if (bindingPattern.parent.kind === 175 /* BindingElement */) { + if (bindingPattern.parent.kind === 176 /* BindingElement */) { return textSpan(bindingPattern.parent); } // Variable declaration is used as the span return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { - ts.Debug.assert(node.kind !== 174 /* ArrayBindingPattern */ && node.kind !== 173 /* ObjectBindingPattern */); - var elements = node.kind === 176 /* ArrayLiteralExpression */ ? + ts.Debug.assert(node.kind !== 175 /* ArrayBindingPattern */ && node.kind !== 174 /* ObjectBindingPattern */); + var elements = node.kind === 177 /* ArrayLiteralExpression */ ? node.elements : node.properties; - var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 200 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -87177,18 +87277,18 @@ var ts; // just nested element in another destructuring assignment // set breakpoint on assignment when parent is destructuring assignment // Otherwise set breakpoint for this element - return textSpan(node.parent.kind === 193 /* BinaryExpression */ ? node.parent : node); + return textSpan(node.parent.kind === 194 /* BinaryExpression */ ? node.parent : node); } // Tokens: function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } // Default to parent node @@ -87196,25 +87296,25 @@ var ts; } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: // If this is not an instantiated module block, no bp span if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } // falls through - case 231 /* EnumDeclaration */: - case 228 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: // Span on close brace token return textSpan(node); - case 206 /* Block */: + case 207 /* Block */: if (ts.isFunctionBlock(node.parent)) { // Span on close brace token return textSpan(node); } // falls through - case 259 /* CatchClause */: + case 260 /* CatchClause */: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: // breakpoint in last statement of the last clause var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); @@ -87222,7 +87322,7 @@ var ts; return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -87238,7 +87338,7 @@ var ts; } function spanInCloseBracketToken(node) { switch (node.parent.kind) { - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -87253,12 +87353,12 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 211 /* DoStatement */ || - node.parent.kind === 180 /* CallExpression */ || - node.parent.kind === 181 /* NewExpression */) { + if (node.parent.kind === 212 /* DoStatement */ || + node.parent.kind === 181 /* CallExpression */ || + node.parent.kind === 182 /* NewExpression */) { return spanInPreviousNode(node); } - if (node.parent.kind === 184 /* ParenthesizedExpression */) { + if (node.parent.kind === 185 /* ParenthesizedExpression */) { return spanInNextNode(node); } // Default to parent node @@ -87267,21 +87367,21 @@ var ts; function spanInCloseParenToken(node) { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 184 /* ParenthesizedExpression */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 185 /* ParenthesizedExpression */: return spanInPreviousNode(node); // Default to parent node default: @@ -87291,20 +87391,20 @@ var ts; function spanInColonToken(node) { // Is this : specifying return annotation of the function declaration if (ts.isFunctionLike(node.parent) || - node.parent.kind === 260 /* PropertyAssignment */ || - node.parent.kind === 145 /* Parameter */) { + node.parent.kind === 261 /* PropertyAssignment */ || + node.parent.kind === 146 /* Parameter */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 183 /* TypeAssertionExpression */) { + if (node.parent.kind === 184 /* TypeAssertionExpression */) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 211 /* DoStatement */) { + if (node.parent.kind === 212 /* DoStatement */) { // Set span on while expression return textSpanEndingAtNextToken(node, node.parent.expression); } @@ -87312,7 +87412,7 @@ var ts; return spanInNode(node.parent); } function spanInOfKeyword(node) { - if (node.parent.kind === 215 /* ForOfStatement */) { + if (node.parent.kind === 216 /* ForOfStatement */) { // Set using next token return spanInNextNode(node); } diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index c79d517f3489b..e6dab7293ab2f 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -24,7 +24,7 @@ declare namespace ts { } /** ES6 Map interface. */ interface Map { - get(key: string): T; + get(key: string): T | undefined; has(key: string): boolean; set(key: string, value: T): this; delete(key: string): boolean; @@ -73,323 +73,324 @@ declare namespace ts { NumericLiteral = 8, StringLiteral = 9, JsxText = 10, - RegularExpressionLiteral = 11, - NoSubstitutionTemplateLiteral = 12, - TemplateHead = 13, - TemplateMiddle = 14, - TemplateTail = 15, - OpenBraceToken = 16, - CloseBraceToken = 17, - OpenParenToken = 18, - CloseParenToken = 19, - OpenBracketToken = 20, - CloseBracketToken = 21, - DotToken = 22, - DotDotDotToken = 23, - SemicolonToken = 24, - CommaToken = 25, - LessThanToken = 26, - LessThanSlashToken = 27, - GreaterThanToken = 28, - LessThanEqualsToken = 29, - GreaterThanEqualsToken = 30, - EqualsEqualsToken = 31, - ExclamationEqualsToken = 32, - EqualsEqualsEqualsToken = 33, - ExclamationEqualsEqualsToken = 34, - EqualsGreaterThanToken = 35, - PlusToken = 36, - MinusToken = 37, - AsteriskToken = 38, - AsteriskAsteriskToken = 39, - SlashToken = 40, - PercentToken = 41, - PlusPlusToken = 42, - MinusMinusToken = 43, - LessThanLessThanToken = 44, - GreaterThanGreaterThanToken = 45, - GreaterThanGreaterThanGreaterThanToken = 46, - AmpersandToken = 47, - BarToken = 48, - CaretToken = 49, - ExclamationToken = 50, - TildeToken = 51, - AmpersandAmpersandToken = 52, - BarBarToken = 53, - QuestionToken = 54, - ColonToken = 55, - AtToken = 56, - EqualsToken = 57, - PlusEqualsToken = 58, - MinusEqualsToken = 59, - AsteriskEqualsToken = 60, - AsteriskAsteriskEqualsToken = 61, - SlashEqualsToken = 62, - PercentEqualsToken = 63, - LessThanLessThanEqualsToken = 64, - GreaterThanGreaterThanEqualsToken = 65, - GreaterThanGreaterThanGreaterThanEqualsToken = 66, - AmpersandEqualsToken = 67, - BarEqualsToken = 68, - CaretEqualsToken = 69, - Identifier = 70, - BreakKeyword = 71, - CaseKeyword = 72, - CatchKeyword = 73, - ClassKeyword = 74, - ConstKeyword = 75, - ContinueKeyword = 76, - DebuggerKeyword = 77, - DefaultKeyword = 78, - DeleteKeyword = 79, - DoKeyword = 80, - ElseKeyword = 81, - EnumKeyword = 82, - ExportKeyword = 83, - ExtendsKeyword = 84, - FalseKeyword = 85, - FinallyKeyword = 86, - ForKeyword = 87, - FunctionKeyword = 88, - IfKeyword = 89, - ImportKeyword = 90, - InKeyword = 91, - InstanceOfKeyword = 92, - NewKeyword = 93, - NullKeyword = 94, - ReturnKeyword = 95, - SuperKeyword = 96, - SwitchKeyword = 97, - ThisKeyword = 98, - ThrowKeyword = 99, - TrueKeyword = 100, - TryKeyword = 101, - TypeOfKeyword = 102, - VarKeyword = 103, - VoidKeyword = 104, - WhileKeyword = 105, - WithKeyword = 106, - ImplementsKeyword = 107, - InterfaceKeyword = 108, - LetKeyword = 109, - PackageKeyword = 110, - PrivateKeyword = 111, - ProtectedKeyword = 112, - PublicKeyword = 113, - StaticKeyword = 114, - YieldKeyword = 115, - AbstractKeyword = 116, - AsKeyword = 117, - AnyKeyword = 118, - AsyncKeyword = 119, - AwaitKeyword = 120, - BooleanKeyword = 121, - ConstructorKeyword = 122, - DeclareKeyword = 123, - GetKeyword = 124, - IsKeyword = 125, - KeyOfKeyword = 126, - ModuleKeyword = 127, - NamespaceKeyword = 128, - NeverKeyword = 129, - ReadonlyKeyword = 130, - RequireKeyword = 131, - NumberKeyword = 132, - ObjectKeyword = 133, - SetKeyword = 134, - StringKeyword = 135, - SymbolKeyword = 136, - TypeKeyword = 137, - UndefinedKeyword = 138, - FromKeyword = 139, - GlobalKeyword = 140, - OfKeyword = 141, - QualifiedName = 142, - ComputedPropertyName = 143, - TypeParameter = 144, - Parameter = 145, - Decorator = 146, - PropertySignature = 147, - PropertyDeclaration = 148, - MethodSignature = 149, - MethodDeclaration = 150, - Constructor = 151, - GetAccessor = 152, - SetAccessor = 153, - CallSignature = 154, - ConstructSignature = 155, - IndexSignature = 156, - TypePredicate = 157, - TypeReference = 158, - FunctionType = 159, - ConstructorType = 160, - TypeQuery = 161, - TypeLiteral = 162, - ArrayType = 163, - TupleType = 164, - UnionType = 165, - IntersectionType = 166, - ParenthesizedType = 167, - ThisType = 168, - TypeOperator = 169, - IndexedAccessType = 170, - MappedType = 171, - LiteralType = 172, - ObjectBindingPattern = 173, - ArrayBindingPattern = 174, - BindingElement = 175, - ArrayLiteralExpression = 176, - ObjectLiteralExpression = 177, - PropertyAccessExpression = 178, - ElementAccessExpression = 179, - CallExpression = 180, - NewExpression = 181, - TaggedTemplateExpression = 182, - TypeAssertionExpression = 183, - ParenthesizedExpression = 184, - FunctionExpression = 185, - ArrowFunction = 186, - DeleteExpression = 187, - TypeOfExpression = 188, - VoidExpression = 189, - AwaitExpression = 190, - PrefixUnaryExpression = 191, - PostfixUnaryExpression = 192, - BinaryExpression = 193, - ConditionalExpression = 194, - TemplateExpression = 195, - YieldExpression = 196, - SpreadElement = 197, - ClassExpression = 198, - OmittedExpression = 199, - ExpressionWithTypeArguments = 200, - AsExpression = 201, - NonNullExpression = 202, - MetaProperty = 203, - TemplateSpan = 204, - SemicolonClassElement = 205, - Block = 206, - VariableStatement = 207, - EmptyStatement = 208, - ExpressionStatement = 209, - IfStatement = 210, - DoStatement = 211, - WhileStatement = 212, - ForStatement = 213, - ForInStatement = 214, - ForOfStatement = 215, - ContinueStatement = 216, - BreakStatement = 217, - ReturnStatement = 218, - WithStatement = 219, - SwitchStatement = 220, - LabeledStatement = 221, - ThrowStatement = 222, - TryStatement = 223, - DebuggerStatement = 224, - VariableDeclaration = 225, - VariableDeclarationList = 226, - FunctionDeclaration = 227, - ClassDeclaration = 228, - InterfaceDeclaration = 229, - TypeAliasDeclaration = 230, - EnumDeclaration = 231, - ModuleDeclaration = 232, - ModuleBlock = 233, - CaseBlock = 234, - NamespaceExportDeclaration = 235, - ImportEqualsDeclaration = 236, - ImportDeclaration = 237, - ImportClause = 238, - NamespaceImport = 239, - NamedImports = 240, - ImportSpecifier = 241, - ExportAssignment = 242, - ExportDeclaration = 243, - NamedExports = 244, - ExportSpecifier = 245, - MissingDeclaration = 246, - ExternalModuleReference = 247, - JsxElement = 248, - JsxSelfClosingElement = 249, - JsxOpeningElement = 250, - JsxClosingElement = 251, - JsxAttribute = 252, - JsxAttributes = 253, - JsxSpreadAttribute = 254, - JsxExpression = 255, - CaseClause = 256, - DefaultClause = 257, - HeritageClause = 258, - CatchClause = 259, - PropertyAssignment = 260, - ShorthandPropertyAssignment = 261, - SpreadAssignment = 262, - EnumMember = 263, - SourceFile = 264, - Bundle = 265, - JSDocTypeExpression = 266, - JSDocAllType = 267, - JSDocUnknownType = 268, - JSDocArrayType = 269, - JSDocUnionType = 270, - JSDocTupleType = 271, - JSDocNullableType = 272, - JSDocNonNullableType = 273, - JSDocRecordType = 274, - JSDocRecordMember = 275, - JSDocTypeReference = 276, - JSDocOptionalType = 277, - JSDocFunctionType = 278, - JSDocVariadicType = 279, - JSDocConstructorType = 280, - JSDocThisType = 281, - JSDocComment = 282, - JSDocTag = 283, - JSDocAugmentsTag = 284, - JSDocParameterTag = 285, - JSDocReturnTag = 286, - JSDocTypeTag = 287, - JSDocTemplateTag = 288, - JSDocTypedefTag = 289, - JSDocPropertyTag = 290, - JSDocTypeLiteral = 291, - JSDocLiteralType = 292, - SyntaxList = 293, - NotEmittedStatement = 294, - PartiallyEmittedExpression = 295, - MergeDeclarationMarker = 296, - EndOfDeclarationMarker = 297, - Count = 298, - FirstAssignment = 57, - LastAssignment = 69, - FirstCompoundAssignment = 58, - LastCompoundAssignment = 69, - FirstReservedWord = 71, - LastReservedWord = 106, - FirstKeyword = 71, - LastKeyword = 141, - FirstFutureReservedWord = 107, - LastFutureReservedWord = 115, - FirstTypeNode = 157, - LastTypeNode = 172, - FirstPunctuation = 16, - LastPunctuation = 69, + JsxTextAllWhiteSpaces = 11, + RegularExpressionLiteral = 12, + NoSubstitutionTemplateLiteral = 13, + TemplateHead = 14, + TemplateMiddle = 15, + TemplateTail = 16, + OpenBraceToken = 17, + CloseBraceToken = 18, + OpenParenToken = 19, + CloseParenToken = 20, + OpenBracketToken = 21, + CloseBracketToken = 22, + DotToken = 23, + DotDotDotToken = 24, + SemicolonToken = 25, + CommaToken = 26, + LessThanToken = 27, + LessThanSlashToken = 28, + GreaterThanToken = 29, + LessThanEqualsToken = 30, + GreaterThanEqualsToken = 31, + EqualsEqualsToken = 32, + ExclamationEqualsToken = 33, + EqualsEqualsEqualsToken = 34, + ExclamationEqualsEqualsToken = 35, + EqualsGreaterThanToken = 36, + PlusToken = 37, + MinusToken = 38, + AsteriskToken = 39, + AsteriskAsteriskToken = 40, + SlashToken = 41, + PercentToken = 42, + PlusPlusToken = 43, + MinusMinusToken = 44, + LessThanLessThanToken = 45, + GreaterThanGreaterThanToken = 46, + GreaterThanGreaterThanGreaterThanToken = 47, + AmpersandToken = 48, + BarToken = 49, + CaretToken = 50, + ExclamationToken = 51, + TildeToken = 52, + AmpersandAmpersandToken = 53, + BarBarToken = 54, + QuestionToken = 55, + ColonToken = 56, + AtToken = 57, + EqualsToken = 58, + PlusEqualsToken = 59, + MinusEqualsToken = 60, + AsteriskEqualsToken = 61, + AsteriskAsteriskEqualsToken = 62, + SlashEqualsToken = 63, + PercentEqualsToken = 64, + LessThanLessThanEqualsToken = 65, + GreaterThanGreaterThanEqualsToken = 66, + GreaterThanGreaterThanGreaterThanEqualsToken = 67, + AmpersandEqualsToken = 68, + BarEqualsToken = 69, + CaretEqualsToken = 70, + Identifier = 71, + BreakKeyword = 72, + CaseKeyword = 73, + CatchKeyword = 74, + ClassKeyword = 75, + ConstKeyword = 76, + ContinueKeyword = 77, + DebuggerKeyword = 78, + DefaultKeyword = 79, + DeleteKeyword = 80, + DoKeyword = 81, + ElseKeyword = 82, + EnumKeyword = 83, + ExportKeyword = 84, + ExtendsKeyword = 85, + FalseKeyword = 86, + FinallyKeyword = 87, + ForKeyword = 88, + FunctionKeyword = 89, + IfKeyword = 90, + ImportKeyword = 91, + InKeyword = 92, + InstanceOfKeyword = 93, + NewKeyword = 94, + NullKeyword = 95, + ReturnKeyword = 96, + SuperKeyword = 97, + SwitchKeyword = 98, + ThisKeyword = 99, + ThrowKeyword = 100, + TrueKeyword = 101, + TryKeyword = 102, + TypeOfKeyword = 103, + VarKeyword = 104, + VoidKeyword = 105, + WhileKeyword = 106, + WithKeyword = 107, + ImplementsKeyword = 108, + InterfaceKeyword = 109, + LetKeyword = 110, + PackageKeyword = 111, + PrivateKeyword = 112, + ProtectedKeyword = 113, + PublicKeyword = 114, + StaticKeyword = 115, + YieldKeyword = 116, + AbstractKeyword = 117, + AsKeyword = 118, + AnyKeyword = 119, + AsyncKeyword = 120, + AwaitKeyword = 121, + BooleanKeyword = 122, + ConstructorKeyword = 123, + DeclareKeyword = 124, + GetKeyword = 125, + IsKeyword = 126, + KeyOfKeyword = 127, + ModuleKeyword = 128, + NamespaceKeyword = 129, + NeverKeyword = 130, + ReadonlyKeyword = 131, + RequireKeyword = 132, + NumberKeyword = 133, + ObjectKeyword = 134, + SetKeyword = 135, + StringKeyword = 136, + SymbolKeyword = 137, + TypeKeyword = 138, + UndefinedKeyword = 139, + FromKeyword = 140, + GlobalKeyword = 141, + OfKeyword = 142, + QualifiedName = 143, + ComputedPropertyName = 144, + TypeParameter = 145, + Parameter = 146, + Decorator = 147, + PropertySignature = 148, + PropertyDeclaration = 149, + MethodSignature = 150, + MethodDeclaration = 151, + Constructor = 152, + GetAccessor = 153, + SetAccessor = 154, + CallSignature = 155, + ConstructSignature = 156, + IndexSignature = 157, + TypePredicate = 158, + TypeReference = 159, + FunctionType = 160, + ConstructorType = 161, + TypeQuery = 162, + TypeLiteral = 163, + ArrayType = 164, + TupleType = 165, + UnionType = 166, + IntersectionType = 167, + ParenthesizedType = 168, + ThisType = 169, + TypeOperator = 170, + IndexedAccessType = 171, + MappedType = 172, + LiteralType = 173, + ObjectBindingPattern = 174, + ArrayBindingPattern = 175, + BindingElement = 176, + ArrayLiteralExpression = 177, + ObjectLiteralExpression = 178, + PropertyAccessExpression = 179, + ElementAccessExpression = 180, + CallExpression = 181, + NewExpression = 182, + TaggedTemplateExpression = 183, + TypeAssertionExpression = 184, + ParenthesizedExpression = 185, + FunctionExpression = 186, + ArrowFunction = 187, + DeleteExpression = 188, + TypeOfExpression = 189, + VoidExpression = 190, + AwaitExpression = 191, + PrefixUnaryExpression = 192, + PostfixUnaryExpression = 193, + BinaryExpression = 194, + ConditionalExpression = 195, + TemplateExpression = 196, + YieldExpression = 197, + SpreadElement = 198, + ClassExpression = 199, + OmittedExpression = 200, + ExpressionWithTypeArguments = 201, + AsExpression = 202, + NonNullExpression = 203, + MetaProperty = 204, + TemplateSpan = 205, + SemicolonClassElement = 206, + Block = 207, + VariableStatement = 208, + EmptyStatement = 209, + ExpressionStatement = 210, + IfStatement = 211, + DoStatement = 212, + WhileStatement = 213, + ForStatement = 214, + ForInStatement = 215, + ForOfStatement = 216, + ContinueStatement = 217, + BreakStatement = 218, + ReturnStatement = 219, + WithStatement = 220, + SwitchStatement = 221, + LabeledStatement = 222, + ThrowStatement = 223, + TryStatement = 224, + DebuggerStatement = 225, + VariableDeclaration = 226, + VariableDeclarationList = 227, + FunctionDeclaration = 228, + ClassDeclaration = 229, + InterfaceDeclaration = 230, + TypeAliasDeclaration = 231, + EnumDeclaration = 232, + ModuleDeclaration = 233, + ModuleBlock = 234, + CaseBlock = 235, + NamespaceExportDeclaration = 236, + ImportEqualsDeclaration = 237, + ImportDeclaration = 238, + ImportClause = 239, + NamespaceImport = 240, + NamedImports = 241, + ImportSpecifier = 242, + ExportAssignment = 243, + ExportDeclaration = 244, + NamedExports = 245, + ExportSpecifier = 246, + MissingDeclaration = 247, + ExternalModuleReference = 248, + JsxElement = 249, + JsxSelfClosingElement = 250, + JsxOpeningElement = 251, + JsxClosingElement = 252, + JsxAttribute = 253, + JsxAttributes = 254, + JsxSpreadAttribute = 255, + JsxExpression = 256, + CaseClause = 257, + DefaultClause = 258, + HeritageClause = 259, + CatchClause = 260, + PropertyAssignment = 261, + ShorthandPropertyAssignment = 262, + SpreadAssignment = 263, + EnumMember = 264, + SourceFile = 265, + Bundle = 266, + JSDocTypeExpression = 267, + JSDocAllType = 268, + JSDocUnknownType = 269, + JSDocArrayType = 270, + JSDocUnionType = 271, + JSDocTupleType = 272, + JSDocNullableType = 273, + JSDocNonNullableType = 274, + JSDocRecordType = 275, + JSDocRecordMember = 276, + JSDocTypeReference = 277, + JSDocOptionalType = 278, + JSDocFunctionType = 279, + JSDocVariadicType = 280, + JSDocConstructorType = 281, + JSDocThisType = 282, + JSDocComment = 283, + JSDocTag = 284, + JSDocAugmentsTag = 285, + JSDocParameterTag = 286, + JSDocReturnTag = 287, + JSDocTypeTag = 288, + JSDocTemplateTag = 289, + JSDocTypedefTag = 290, + JSDocPropertyTag = 291, + JSDocTypeLiteral = 292, + JSDocLiteralType = 293, + SyntaxList = 294, + NotEmittedStatement = 295, + PartiallyEmittedExpression = 296, + MergeDeclarationMarker = 297, + EndOfDeclarationMarker = 298, + Count = 299, + FirstAssignment = 58, + LastAssignment = 70, + FirstCompoundAssignment = 59, + LastCompoundAssignment = 70, + FirstReservedWord = 72, + LastReservedWord = 107, + FirstKeyword = 72, + LastKeyword = 142, + FirstFutureReservedWord = 108, + LastFutureReservedWord = 116, + FirstTypeNode = 158, + LastTypeNode = 173, + FirstPunctuation = 17, + LastPunctuation = 70, FirstToken = 0, - LastToken = 141, + LastToken = 142, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, - LastLiteralToken = 12, - FirstTemplateToken = 12, - LastTemplateToken = 15, - FirstBinaryOperator = 26, - LastBinaryOperator = 69, - FirstNode = 142, - FirstJSDocNode = 266, - LastJSDocNode = 292, - FirstJSDocTagNode = 282, - LastJSDocTagNode = 292, + LastLiteralToken = 13, + FirstTemplateToken = 13, + LastTemplateToken = 16, + FirstBinaryOperator = 27, + LastBinaryOperator = 70, + FirstNode = 143, + FirstJSDocNode = 267, + LastJSDocNode = 293, + FirstJSDocTagNode = 283, + LastJSDocTagNode = 293, } enum NodeFlags { None = 0, @@ -1065,6 +1066,7 @@ declare namespace ts { } interface JsxText extends Node { kind: SyntaxKind.JsxText; + containsOnlyWhiteSpaces: boolean; parent?: JsxElement; } type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; @@ -2603,7 +2605,7 @@ declare namespace ts { function tokenToString(t: SyntaxKind): string; function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; - function isWhiteSpace(ch: number): boolean; + function isWhiteSpaceLike(ch: number): boolean; /** Does not include line breaks. For that, see isWhiteSpaceLike. */ function isWhiteSpaceSingleLine(ch: number): boolean; function isLineBreak(ch: number): boolean; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index a52d86c4e10ec..97d836262898d 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -52,352 +52,353 @@ var ts; SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral"; SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 11] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 12] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 13] = "NoSubstitutionTemplateLiteral"; // Pseudo-literals - SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail"; + SyntaxKind[SyntaxKind["TemplateHead"] = 14] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 15] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 16] = "TemplateTail"; // Punctuation - SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken"; - SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 17] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 18] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 19] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 20] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 21] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 22] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 23] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 24] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 25] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 26] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 27] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 28] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 29] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 30] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 31] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 32] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 33] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 34] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 35] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 36] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 37] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 38] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 39] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 40] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 41] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 42] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 43] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 44] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 45] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 47] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 48] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 49] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 50] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 51] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 52] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 53] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 54] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 55] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 56] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 57] = "AtToken"; // Assignments - SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 58] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 59] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 60] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 61] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 62] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 63] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 64] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 65] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 67] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 68] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 69] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 70] = "CaretEqualsToken"; // Identifiers - SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier"; + SyntaxKind[SyntaxKind["Identifier"] = 71] = "Identifier"; // Reserved words - SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 72] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 73] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 74] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 75] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 76] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 77] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 78] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 79] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 80] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 81] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 82] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 83] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 84] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 85] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 86] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 87] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 88] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 89] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 90] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 91] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 92] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 93] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 94] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 95] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 96] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 97] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 98] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 99] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 100] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 101] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 102] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 103] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 104] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 105] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 106] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 107] = "WithKeyword"; // Strict mode reserved words - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 108] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 109] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 110] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 111] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 112] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 113] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 114] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 115] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 116] = "YieldKeyword"; // Contextual keywords - SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword"; - SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword"; - SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword"; - SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword"; - SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword"; - SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword"; - SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword"; - SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword"; - SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 117] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 118] = "AsKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 119] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 120] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 121] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 122] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 123] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 124] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 125] = "GetKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 126] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 127] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 128] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 129] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 130] = "NeverKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 131] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 132] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 133] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 134] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 135] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 136] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 137] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 138] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 139] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 140] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 141] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 142] = "OfKeyword"; // Parse tree nodes // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 143] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 144] = "ComputedPropertyName"; // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator"; + SyntaxKind[SyntaxKind["TypeParameter"] = 145] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 146] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 147] = "Decorator"; // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 148] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 149] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 150] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 151] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 152] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 153] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 154] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 155] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 156] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 157] = "IndexSignature"; // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType"; - SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator"; - SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType"; - SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType"; - SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType"; + SyntaxKind[SyntaxKind["TypePredicate"] = 158] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 159] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 160] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 161] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 162] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 163] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 164] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 165] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 166] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 167] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 168] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 169] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 170] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 171] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 172] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 173] = "LiteralType"; // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 174] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 175] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 176] = "BindingElement"; // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement"; - SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression"; - SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression"; - SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 177] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 178] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 179] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 180] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 181] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 182] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 183] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 184] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 185] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 186] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 187] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 188] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 189] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 190] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 191] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 192] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 193] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 194] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 195] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 196] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 197] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 198] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 199] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 200] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 201] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 202] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 203] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 204] = "MetaProperty"; // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 205] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 206] = "SemicolonClassElement"; // Element - SyntaxKind[SyntaxKind["Block"] = 206] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock"; - SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["Block"] = 207] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 208] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 209] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 210] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 211] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 212] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 213] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 214] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 215] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 216] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 217] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 218] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 219] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 220] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 221] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 222] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 223] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 224] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 225] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 226] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 227] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 228] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 229] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 230] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 231] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 232] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 233] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 234] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 235] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 236] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 237] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 238] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 239] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 240] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 241] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 242] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 243] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 244] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 245] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 246] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 247] = "MissingDeclaration"; // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 248] = "ExternalModuleReference"; // JSX - SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxElement"] = 249] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 250] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 251] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 252] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 253] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 254] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 255] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 256] = "JsxExpression"; // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause"; + SyntaxKind[SyntaxKind["CaseClause"] = 257] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 258] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 259] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 260] = "CatchClause"; // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment"; - SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 261] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 262] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 263] = "SpreadAssignment"; // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember"; + SyntaxKind[SyntaxKind["EnumMember"] = 264] = "EnumMember"; // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile"; - SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle"; + SyntaxKind[SyntaxKind["SourceFile"] = 265] = "SourceFile"; + SyntaxKind[SyntaxKind["Bundle"] = 266] = "Bundle"; // JSDoc nodes - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 267] = "JSDocTypeExpression"; // The * type - SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 268] = "JSDocAllType"; // The ? type - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag"; - SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral"; - SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 269] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 270] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 271] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 272] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 273] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 274] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 275] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 276] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 277] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 278] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 279] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 280] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 281] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 282] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 298] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 299] = "Count"; // Markers - SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment"; - SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 70] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 72] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 107] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 72] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 142] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 108] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 116] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 158] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 173] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 17] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 70] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 142] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode"; - SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode"; - SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 13] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 13] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 16] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 27] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); var NodeFlags; (function (NodeFlags) { @@ -4427,6 +4428,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -4788,135 +4790,135 @@ var ts; (function (ts) { /* @internal */ function tokenIsIdentifierOrKeyword(token) { - return token >= 70 /* Identifier */; + return token >= 71 /* Identifier */; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116 /* AbstractKeyword */, - "any": 118 /* AnyKeyword */, - "as": 117 /* AsKeyword */, - "boolean": 121 /* BooleanKeyword */, - "break": 71 /* BreakKeyword */, - "case": 72 /* CaseKeyword */, - "catch": 73 /* CatchKeyword */, - "class": 74 /* ClassKeyword */, - "continue": 76 /* ContinueKeyword */, - "const": 75 /* ConstKeyword */, - "constructor": 122 /* ConstructorKeyword */, - "debugger": 77 /* DebuggerKeyword */, - "declare": 123 /* DeclareKeyword */, - "default": 78 /* DefaultKeyword */, - "delete": 79 /* DeleteKeyword */, - "do": 80 /* DoKeyword */, - "else": 81 /* ElseKeyword */, - "enum": 82 /* EnumKeyword */, - "export": 83 /* ExportKeyword */, - "extends": 84 /* ExtendsKeyword */, - "false": 85 /* FalseKeyword */, - "finally": 86 /* FinallyKeyword */, - "for": 87 /* ForKeyword */, - "from": 139 /* FromKeyword */, - "function": 88 /* FunctionKeyword */, - "get": 124 /* GetKeyword */, - "if": 89 /* IfKeyword */, - "implements": 107 /* ImplementsKeyword */, - "import": 90 /* ImportKeyword */, - "in": 91 /* InKeyword */, - "instanceof": 92 /* InstanceOfKeyword */, - "interface": 108 /* InterfaceKeyword */, - "is": 125 /* IsKeyword */, - "keyof": 126 /* KeyOfKeyword */, - "let": 109 /* LetKeyword */, - "module": 127 /* ModuleKeyword */, - "namespace": 128 /* NamespaceKeyword */, - "never": 129 /* NeverKeyword */, - "new": 93 /* NewKeyword */, - "null": 94 /* NullKeyword */, - "number": 132 /* NumberKeyword */, - "object": 133 /* ObjectKeyword */, - "package": 110 /* PackageKeyword */, - "private": 111 /* PrivateKeyword */, - "protected": 112 /* ProtectedKeyword */, - "public": 113 /* PublicKeyword */, - "readonly": 130 /* ReadonlyKeyword */, - "require": 131 /* RequireKeyword */, - "global": 140 /* GlobalKeyword */, - "return": 95 /* ReturnKeyword */, - "set": 134 /* SetKeyword */, - "static": 114 /* StaticKeyword */, - "string": 135 /* StringKeyword */, - "super": 96 /* SuperKeyword */, - "switch": 97 /* SwitchKeyword */, - "symbol": 136 /* SymbolKeyword */, - "this": 98 /* ThisKeyword */, - "throw": 99 /* ThrowKeyword */, - "true": 100 /* TrueKeyword */, - "try": 101 /* TryKeyword */, - "type": 137 /* TypeKeyword */, - "typeof": 102 /* TypeOfKeyword */, - "undefined": 138 /* UndefinedKeyword */, - "var": 103 /* VarKeyword */, - "void": 104 /* VoidKeyword */, - "while": 105 /* WhileKeyword */, - "with": 106 /* WithKeyword */, - "yield": 115 /* YieldKeyword */, - "async": 119 /* AsyncKeyword */, - "await": 120 /* AwaitKeyword */, - "of": 141 /* OfKeyword */, - "{": 16 /* OpenBraceToken */, - "}": 17 /* CloseBraceToken */, - "(": 18 /* OpenParenToken */, - ")": 19 /* CloseParenToken */, - "[": 20 /* OpenBracketToken */, - "]": 21 /* CloseBracketToken */, - ".": 22 /* DotToken */, - "...": 23 /* DotDotDotToken */, - ";": 24 /* SemicolonToken */, - ",": 25 /* CommaToken */, - "<": 26 /* LessThanToken */, - ">": 28 /* GreaterThanToken */, - "<=": 29 /* LessThanEqualsToken */, - ">=": 30 /* GreaterThanEqualsToken */, - "==": 31 /* EqualsEqualsToken */, - "!=": 32 /* ExclamationEqualsToken */, - "===": 33 /* EqualsEqualsEqualsToken */, - "!==": 34 /* ExclamationEqualsEqualsToken */, - "=>": 35 /* EqualsGreaterThanToken */, - "+": 36 /* PlusToken */, - "-": 37 /* MinusToken */, - "**": 39 /* AsteriskAsteriskToken */, - "*": 38 /* AsteriskToken */, - "/": 40 /* SlashToken */, - "%": 41 /* PercentToken */, - "++": 42 /* PlusPlusToken */, - "--": 43 /* MinusMinusToken */, - "<<": 44 /* LessThanLessThanToken */, - ">": 45 /* GreaterThanGreaterThanToken */, - ">>>": 46 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 47 /* AmpersandToken */, - "|": 48 /* BarToken */, - "^": 49 /* CaretToken */, - "!": 50 /* ExclamationToken */, - "~": 51 /* TildeToken */, - "&&": 52 /* AmpersandAmpersandToken */, - "||": 53 /* BarBarToken */, - "?": 54 /* QuestionToken */, - ":": 55 /* ColonToken */, - "=": 57 /* EqualsToken */, - "+=": 58 /* PlusEqualsToken */, - "-=": 59 /* MinusEqualsToken */, - "*=": 60 /* AsteriskEqualsToken */, - "**=": 61 /* AsteriskAsteriskEqualsToken */, - "/=": 62 /* SlashEqualsToken */, - "%=": 63 /* PercentEqualsToken */, - "<<=": 64 /* LessThanLessThanEqualsToken */, - ">>=": 65 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 67 /* AmpersandEqualsToken */, - "|=": 68 /* BarEqualsToken */, - "^=": 69 /* CaretEqualsToken */, - "@": 56 /* AtToken */, + "abstract": 117 /* AbstractKeyword */, + "any": 119 /* AnyKeyword */, + "as": 118 /* AsKeyword */, + "boolean": 122 /* BooleanKeyword */, + "break": 72 /* BreakKeyword */, + "case": 73 /* CaseKeyword */, + "catch": 74 /* CatchKeyword */, + "class": 75 /* ClassKeyword */, + "continue": 77 /* ContinueKeyword */, + "const": 76 /* ConstKeyword */, + "constructor": 123 /* ConstructorKeyword */, + "debugger": 78 /* DebuggerKeyword */, + "declare": 124 /* DeclareKeyword */, + "default": 79 /* DefaultKeyword */, + "delete": 80 /* DeleteKeyword */, + "do": 81 /* DoKeyword */, + "else": 82 /* ElseKeyword */, + "enum": 83 /* EnumKeyword */, + "export": 84 /* ExportKeyword */, + "extends": 85 /* ExtendsKeyword */, + "false": 86 /* FalseKeyword */, + "finally": 87 /* FinallyKeyword */, + "for": 88 /* ForKeyword */, + "from": 140 /* FromKeyword */, + "function": 89 /* FunctionKeyword */, + "get": 125 /* GetKeyword */, + "if": 90 /* IfKeyword */, + "implements": 108 /* ImplementsKeyword */, + "import": 91 /* ImportKeyword */, + "in": 92 /* InKeyword */, + "instanceof": 93 /* InstanceOfKeyword */, + "interface": 109 /* InterfaceKeyword */, + "is": 126 /* IsKeyword */, + "keyof": 127 /* KeyOfKeyword */, + "let": 110 /* LetKeyword */, + "module": 128 /* ModuleKeyword */, + "namespace": 129 /* NamespaceKeyword */, + "never": 130 /* NeverKeyword */, + "new": 94 /* NewKeyword */, + "null": 95 /* NullKeyword */, + "number": 133 /* NumberKeyword */, + "object": 134 /* ObjectKeyword */, + "package": 111 /* PackageKeyword */, + "private": 112 /* PrivateKeyword */, + "protected": 113 /* ProtectedKeyword */, + "public": 114 /* PublicKeyword */, + "readonly": 131 /* ReadonlyKeyword */, + "require": 132 /* RequireKeyword */, + "global": 141 /* GlobalKeyword */, + "return": 96 /* ReturnKeyword */, + "set": 135 /* SetKeyword */, + "static": 115 /* StaticKeyword */, + "string": 136 /* StringKeyword */, + "super": 97 /* SuperKeyword */, + "switch": 98 /* SwitchKeyword */, + "symbol": 137 /* SymbolKeyword */, + "this": 99 /* ThisKeyword */, + "throw": 100 /* ThrowKeyword */, + "true": 101 /* TrueKeyword */, + "try": 102 /* TryKeyword */, + "type": 138 /* TypeKeyword */, + "typeof": 103 /* TypeOfKeyword */, + "undefined": 139 /* UndefinedKeyword */, + "var": 104 /* VarKeyword */, + "void": 105 /* VoidKeyword */, + "while": 106 /* WhileKeyword */, + "with": 107 /* WithKeyword */, + "yield": 116 /* YieldKeyword */, + "async": 120 /* AsyncKeyword */, + "await": 121 /* AwaitKeyword */, + "of": 142 /* OfKeyword */, + "{": 17 /* OpenBraceToken */, + "}": 18 /* CloseBraceToken */, + "(": 19 /* OpenParenToken */, + ")": 20 /* CloseParenToken */, + "[": 21 /* OpenBracketToken */, + "]": 22 /* CloseBracketToken */, + ".": 23 /* DotToken */, + "...": 24 /* DotDotDotToken */, + ";": 25 /* SemicolonToken */, + ",": 26 /* CommaToken */, + "<": 27 /* LessThanToken */, + ">": 29 /* GreaterThanToken */, + "<=": 30 /* LessThanEqualsToken */, + ">=": 31 /* GreaterThanEqualsToken */, + "==": 32 /* EqualsEqualsToken */, + "!=": 33 /* ExclamationEqualsToken */, + "===": 34 /* EqualsEqualsEqualsToken */, + "!==": 35 /* ExclamationEqualsEqualsToken */, + "=>": 36 /* EqualsGreaterThanToken */, + "+": 37 /* PlusToken */, + "-": 38 /* MinusToken */, + "**": 40 /* AsteriskAsteriskToken */, + "*": 39 /* AsteriskToken */, + "/": 41 /* SlashToken */, + "%": 42 /* PercentToken */, + "++": 43 /* PlusPlusToken */, + "--": 44 /* MinusMinusToken */, + "<<": 45 /* LessThanLessThanToken */, + ">": 46 /* GreaterThanGreaterThanToken */, + ">>>": 47 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 48 /* AmpersandToken */, + "|": 49 /* BarToken */, + "^": 50 /* CaretToken */, + "!": 51 /* ExclamationToken */, + "~": 52 /* TildeToken */, + "&&": 53 /* AmpersandAmpersandToken */, + "||": 54 /* BarBarToken */, + "?": 55 /* QuestionToken */, + ":": 56 /* ColonToken */, + "=": 58 /* EqualsToken */, + "+=": 59 /* PlusEqualsToken */, + "-=": 60 /* MinusEqualsToken */, + "*=": 61 /* AsteriskEqualsToken */, + "**=": 62 /* AsteriskAsteriskEqualsToken */, + "/=": 63 /* SlashEqualsToken */, + "%=": 64 /* PercentEqualsToken */, + "<<=": 65 /* LessThanLessThanEqualsToken */, + ">>=": 66 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 68 /* AmpersandEqualsToken */, + "|=": 69 /* BarEqualsToken */, + "^=": 70 /* CaretEqualsToken */, + "@": 57 /* AtToken */, }); /* As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers @@ -5089,10 +5091,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; /** Does not include line breaks. For that, see isWhiteSpaceLike. */ function isWhiteSpaceSingleLine(ch) { // Note: nextLine is in the Zs space, and should be considered to be a whitespace. @@ -5229,7 +5231,7 @@ var ts; } break; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -5391,7 +5393,7 @@ var ts; } break scan; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -5496,8 +5498,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 /* Identifier */ || token > 106 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */; }, + isIdentifier: function () { return token === 71 /* Identifier */ || token > 107 /* LastReservedWord */; }, + isReservedWord: function () { return token >= 72 /* FirstReservedWord */ && token <= 107 /* LastReservedWord */; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -5647,7 +5649,7 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */; + resultingToken = startedWithBacktick ? 13 /* NoSubstitutionTemplateLiteral */ : 16 /* TemplateTail */; break; } var currChar = text.charCodeAt(pos); @@ -5655,14 +5657,14 @@ var ts; if (currChar === 96 /* backtick */) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */; + resultingToken = startedWithBacktick ? 13 /* NoSubstitutionTemplateLiteral */ : 16 /* TemplateTail */; break; } // '${' if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 /* TemplateHead */ : 14 /* TemplateMiddle */; + resultingToken = startedWithBacktick ? 14 /* TemplateHead */ : 15 /* TemplateMiddle */; break; } // Escape character @@ -5843,7 +5845,7 @@ var ts; } } } - return token = 70 /* Identifier */; + return token = 71 /* Identifier */; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -5924,12 +5926,12 @@ var ts; case 33 /* exclamation */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 34 /* ExclamationEqualsEqualsToken */; + return pos += 3, token = 35 /* ExclamationEqualsEqualsToken */; } - return pos += 2, token = 32 /* ExclamationEqualsToken */; + return pos += 2, token = 33 /* ExclamationEqualsToken */; } pos++; - return token = 50 /* ExclamationToken */; + return token = 51 /* ExclamationToken */; case 34 /* doubleQuote */: case 39 /* singleQuote */: tokenValue = scanString(); @@ -5938,68 +5940,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 63 /* PercentEqualsToken */; + return pos += 2, token = 64 /* PercentEqualsToken */; } pos++; - return token = 41 /* PercentToken */; + return token = 42 /* PercentToken */; case 38 /* ampersand */: if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 52 /* AmpersandAmpersandToken */; + return pos += 2, token = 53 /* AmpersandAmpersandToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 67 /* AmpersandEqualsToken */; + return pos += 2, token = 68 /* AmpersandEqualsToken */; } pos++; - return token = 47 /* AmpersandToken */; + return token = 48 /* AmpersandToken */; case 40 /* openParen */: pos++; - return token = 18 /* OpenParenToken */; + return token = 19 /* OpenParenToken */; case 41 /* closeParen */: pos++; - return token = 19 /* CloseParenToken */; + return token = 20 /* CloseParenToken */; case 42 /* asterisk */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* AsteriskEqualsToken */; + return pos += 2, token = 61 /* AsteriskEqualsToken */; } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 61 /* AsteriskAsteriskEqualsToken */; + return pos += 3, token = 62 /* AsteriskAsteriskEqualsToken */; } - return pos += 2, token = 39 /* AsteriskAsteriskToken */; + return pos += 2, token = 40 /* AsteriskAsteriskToken */; } pos++; - return token = 38 /* AsteriskToken */; + return token = 39 /* AsteriskToken */; case 43 /* plus */: if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 42 /* PlusPlusToken */; + return pos += 2, token = 43 /* PlusPlusToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* PlusEqualsToken */; + return pos += 2, token = 59 /* PlusEqualsToken */; } pos++; - return token = 36 /* PlusToken */; + return token = 37 /* PlusToken */; case 44 /* comma */: pos++; - return token = 25 /* CommaToken */; + return token = 26 /* CommaToken */; case 45 /* minus */: if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 43 /* MinusMinusToken */; + return pos += 2, token = 44 /* MinusMinusToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 59 /* MinusEqualsToken */; + return pos += 2, token = 60 /* MinusEqualsToken */; } pos++; - return token = 37 /* MinusToken */; + return token = 38 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 23 /* DotDotDotToken */; + return pos += 3, token = 24 /* DotDotDotToken */; } pos++; - return token = 22 /* DotToken */; + return token = 23 /* DotToken */; case 47 /* slash */: // Single-line comment if (text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -6045,10 +6047,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* SlashEqualsToken */; + return pos += 2, token = 63 /* SlashEqualsToken */; } pos++; - return token = 40 /* SlashToken */; + return token = 41 /* SlashToken */; case 48 /* _0 */: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { pos += 2; @@ -6106,10 +6108,10 @@ var ts; return token = 8 /* NumericLiteral */; case 58 /* colon */: pos++; - return token = 55 /* ColonToken */; + return token = 56 /* ColonToken */; case 59 /* semicolon */: pos++; - return token = 24 /* SemicolonToken */; + return token = 25 /* SemicolonToken */; case 60 /* lessThan */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6122,20 +6124,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 64 /* LessThanLessThanEqualsToken */; + return pos += 3, token = 65 /* LessThanLessThanEqualsToken */; } - return pos += 2, token = 44 /* LessThanLessThanToken */; + return pos += 2, token = 45 /* LessThanLessThanToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 29 /* LessThanEqualsToken */; + return pos += 2, token = 30 /* LessThanEqualsToken */; } if (languageVariant === 1 /* JSX */ && text.charCodeAt(pos + 1) === 47 /* slash */ && text.charCodeAt(pos + 2) !== 42 /* asterisk */) { - return pos += 2, token = 27 /* LessThanSlashToken */; + return pos += 2, token = 28 /* LessThanSlashToken */; } pos++; - return token = 26 /* LessThanToken */; + return token = 27 /* LessThanToken */; case 61 /* equals */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6148,15 +6150,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 33 /* EqualsEqualsEqualsToken */; + return pos += 3, token = 34 /* EqualsEqualsEqualsToken */; } - return pos += 2, token = 31 /* EqualsEqualsToken */; + return pos += 2, token = 32 /* EqualsEqualsToken */; } if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 35 /* EqualsGreaterThanToken */; + return pos += 2, token = 36 /* EqualsGreaterThanToken */; } pos++; - return token = 57 /* EqualsToken */; + return token = 58 /* EqualsToken */; case 62 /* greaterThan */: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -6168,43 +6170,43 @@ var ts; } } pos++; - return token = 28 /* GreaterThanToken */; + return token = 29 /* GreaterThanToken */; case 63 /* question */: pos++; - return token = 54 /* QuestionToken */; + return token = 55 /* QuestionToken */; case 91 /* openBracket */: pos++; - return token = 20 /* OpenBracketToken */; + return token = 21 /* OpenBracketToken */; case 93 /* closeBracket */: pos++; - return token = 21 /* CloseBracketToken */; + return token = 22 /* CloseBracketToken */; case 94 /* caret */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 69 /* CaretEqualsToken */; + return pos += 2, token = 70 /* CaretEqualsToken */; } pos++; - return token = 49 /* CaretToken */; + return token = 50 /* CaretToken */; case 123 /* openBrace */: pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; case 124 /* bar */: if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 53 /* BarBarToken */; + return pos += 2, token = 54 /* BarBarToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 68 /* BarEqualsToken */; + return pos += 2, token = 69 /* BarEqualsToken */; } pos++; - return token = 48 /* BarToken */; + return token = 49 /* BarToken */; case 125 /* closeBrace */: pos++; - return token = 17 /* CloseBraceToken */; + return token = 18 /* CloseBraceToken */; case 126 /* tilde */: pos++; - return token = 51 /* TildeToken */; + return token = 52 /* TildeToken */; case 64 /* at */: pos++; - return token = 56 /* AtToken */; + return token = 57 /* AtToken */; case 92 /* backslash */: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -6242,29 +6244,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28 /* GreaterThanToken */) { + if (token === 29 /* GreaterThanToken */) { if (text.charCodeAt(pos) === 62 /* greaterThan */) { if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */; + return pos += 3, token = 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */; } - return pos += 2, token = 46 /* GreaterThanGreaterThanGreaterThanToken */; + return pos += 2, token = 47 /* GreaterThanGreaterThanGreaterThanToken */; } if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 65 /* GreaterThanGreaterThanEqualsToken */; + return pos += 2, token = 66 /* GreaterThanGreaterThanEqualsToken */; } pos++; - return token = 45 /* GreaterThanGreaterThanToken */; + return token = 46 /* GreaterThanGreaterThanToken */; } if (text.charCodeAt(pos) === 61 /* equals */) { pos++; - return token = 30 /* GreaterThanEqualsToken */; + return token = 31 /* GreaterThanEqualsToken */; } } return token; } function reScanSlashToken() { - if (token === 40 /* SlashToken */ || token === 62 /* SlashEqualsToken */) { + if (token === 41 /* SlashToken */ || token === 63 /* SlashEqualsToken */) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -6309,7 +6311,7 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11 /* RegularExpressionLiteral */; + token = 12 /* RegularExpressionLiteral */; } return token; } @@ -6317,7 +6319,7 @@ var ts; * Unconditionally back up and scan a template expression portion. */ function reScanTemplateToken() { - ts.Debug.assert(token === 17 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -6334,17 +6336,20 @@ var ts; if (char === 60 /* lessThan */) { if (text.charCodeAt(pos + 1) === 47 /* slash */) { pos += 2; - return token = 27 /* LessThanSlashToken */; + return token = 28 /* LessThanSlashToken */; } pos++; - return token = 26 /* LessThanToken */; + return token = 27 /* LessThanToken */; } if (char === 123 /* openBrace */) { pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; } + // First non-whitespace character on this line. + var firstNonWhitespace = 0; + // These initial values are special because the first line is: + // firstNonWhitespace = 0 to indicate that we want leading whitspace, while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -6356,8 +6361,21 @@ var ts; } break; } + // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. + // i.e (- : whitespace) + //
---- + //
becomes
+ // + //
----
becomes
----
+ if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10 /* JsxText */; + return firstNonWhitespace === -1 ? 11 /* JsxTextAllWhiteSpaces */ : 10 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that // they allow dashes @@ -6407,42 +6425,42 @@ var ts; return token = 5 /* WhitespaceTrivia */; case 64 /* at */: pos++; - return token = 56 /* AtToken */; + return token = 57 /* AtToken */; case 10 /* lineFeed */: case 13 /* carriageReturn */: pos++; return token = 4 /* NewLineTrivia */; case 42 /* asterisk */: pos++; - return token = 38 /* AsteriskToken */; + return token = 39 /* AsteriskToken */; case 123 /* openBrace */: pos++; - return token = 16 /* OpenBraceToken */; + return token = 17 /* OpenBraceToken */; case 125 /* closeBrace */: pos++; - return token = 17 /* CloseBraceToken */; + return token = 18 /* CloseBraceToken */; case 91 /* openBracket */: pos++; - return token = 20 /* OpenBracketToken */; + return token = 21 /* OpenBracketToken */; case 93 /* closeBracket */: pos++; - return token = 21 /* CloseBracketToken */; + return token = 22 /* CloseBracketToken */; case 61 /* equals */: pos++; - return token = 57 /* EqualsToken */; + return token = 58 /* EqualsToken */; case 44 /* comma */: pos++; - return token = 25 /* CommaToken */; + return token = 26 /* CommaToken */; case 46 /* dot */: pos++; - return token = 22 /* DotToken */; + return token = 23 /* DotToken */; } if (isIdentifierStart(ch, 5 /* Latest */)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5 /* Latest */) && pos < end) { pos++; } - return token = 70 /* Identifier */; + return token = 71 /* Identifier */; } else { return pos += 1, token = 0 /* Unknown */; @@ -6674,7 +6692,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 264 /* SourceFile */) { + while (node && node.kind !== 265 /* SourceFile */) { node = node.parent; } return node; @@ -6682,11 +6700,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 206 /* Block */: - case 234 /* CaseBlock */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return true; } return false; @@ -6762,7 +6780,7 @@ var ts; } ts.nodeIsPresent = nodeIsPresent; function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 141 /* LastToken */; + return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* LastToken */; } ts.isToken = isToken; function getTokenPosOfNode(node, sourceFile, includeJsDoc) { @@ -6781,18 +6799,18 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 293 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 294 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; function isJSDocNode(node) { - return node.kind >= 266 /* FirstJSDocNode */ && node.kind <= 292 /* LastJSDocNode */; + return node.kind >= 267 /* FirstJSDocNode */ && node.kind <= 293 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; function isJSDocTag(node) { - return node.kind >= 282 /* FirstJSDocTagNode */ && node.kind <= 292 /* LastJSDocTagNode */; + return node.kind >= 283 /* FirstJSDocTagNode */ && node.kind <= 293 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { @@ -6834,13 +6852,13 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: return getQuotedEscapedLiteralText('"', node.text, '"'); - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return getQuotedEscapedLiteralText("`", node.text, "`"); - case 13 /* TemplateHead */: + case 14 /* TemplateHead */: return getQuotedEscapedLiteralText("`", node.text, "${"); - case 14 /* TemplateMiddle */: + case 15 /* TemplateMiddle */: return getQuotedEscapedLiteralText("}", node.text, "${"); - case 15 /* TemplateTail */: + case 16 /* TemplateTail */: return getQuotedEscapedLiteralText("}", node.text, "`"); case 8 /* NumericLiteral */: return node.text; @@ -6869,11 +6887,11 @@ var ts; ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isCatchClauseVariableDeclarationOrBindingElement(declaration) { var node = getRootDeclaration(declaration); - return node.kind === 225 /* VariableDeclaration */ && node.parent.kind === 259 /* CatchClause */; + return node.kind === 226 /* VariableDeclaration */ && node.parent.kind === 260 /* CatchClause */; } ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement; function isAmbientModule(node) { - return node && node.kind === 232 /* ModuleDeclaration */ && + return node && node.kind === 233 /* ModuleDeclaration */ && (node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; @@ -6884,11 +6902,11 @@ var ts; ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; function isShorthandAmbientModule(node) { // The only kind of module that can be missing a body is a shorthand ambient module. - return node && node.kind === 232 /* ModuleDeclaration */ && (!node.body); + return node && node.kind === 233 /* ModuleDeclaration */ && (!node.body); } function isBlockScopedContainerTopLevel(node) { - return node.kind === 264 /* SourceFile */ || - node.kind === 232 /* ModuleDeclaration */ || + return node.kind === 265 /* SourceFile */ || + node.kind === 233 /* ModuleDeclaration */ || isFunctionLike(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; @@ -6904,9 +6922,9 @@ var ts; return false; } switch (node.parent.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.isExternalModule(node.parent); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; @@ -6918,22 +6936,22 @@ var ts; ts.isEffectiveExternalModule = isEffectiveExternalModule; function isBlockScope(node, parentNode) { switch (node.kind) { - case 264 /* SourceFile */: - case 234 /* CaseBlock */: - case 259 /* CatchClause */: - case 232 /* ModuleDeclaration */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 265 /* SourceFile */: + case 235 /* CaseBlock */: + case 260 /* CatchClause */: + case 233 /* ModuleDeclaration */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return true; - case 206 /* Block */: + case 207 /* Block */: // function block is not considered block-scope container // see comment in binder.ts: bind(...), case for SyntaxKind.Block return parentNode && !isFunctionLike(parentNode); @@ -6966,12 +6984,12 @@ var ts; ts.getNameFromIndexInfo = getNameFromIndexInfo; function getTextOfPropertyName(name) { switch (name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return name.text; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: return name.text; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: if (isStringOrNumericLiteral(name.expression)) { return name.expression.text; } @@ -6981,11 +6999,11 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name); - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return entityNameToString(name.expression) + "." + entityNameToString(name.name); } } @@ -7022,7 +7040,7 @@ var ts; ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; function getErrorSpanForArrowFunction(sourceFile, node) { var pos = ts.skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 206 /* Block */) { + if (node.body && node.body.kind === 207 /* Block */) { var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; if (startLine < endLine) { @@ -7036,7 +7054,7 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false); if (pos_1 === sourceFile.text.length) { // file is empty - return span for the beginning of the file @@ -7045,23 +7063,23 @@ var ts; return getSpanOfTokenAtPosition(sourceFile, pos_1); // This list is a work in progress. Add missing node kinds to improve their error // spans. - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 230 /* TypeAliasDeclaration */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 231 /* TypeAliasDeclaration */: errorNode = node.name; break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { @@ -7084,7 +7102,7 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 231 /* EnumDeclaration */ && isConst(node); + return node.kind === 232 /* EnumDeclaration */ && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isConst(node) { @@ -7097,11 +7115,11 @@ var ts; } ts.isLet = isLet; function isSuperCall(n) { - return n.kind === 180 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */; + return n.kind === 181 /* CallExpression */ && n.expression.kind === 97 /* SuperKeyword */; } ts.isSuperCall = isSuperCall; function isPrologueDirective(node) { - return node.kind === 209 /* ExpressionStatement */ + return node.kind === 210 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; @@ -7114,10 +7132,10 @@ var ts; } ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText; function getJSDocCommentRanges(node, text) { - var commentRanges = (node.kind === 145 /* Parameter */ || - node.kind === 144 /* TypeParameter */ || - node.kind === 185 /* FunctionExpression */ || - node.kind === 186 /* ArrowFunction */) ? + var commentRanges = (node.kind === 146 /* Parameter */ || + node.kind === 145 /* TypeParameter */ || + node.kind === 186 /* FunctionExpression */ || + node.kind === 187 /* ArrowFunction */) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); // True if the comment starts with '/**' but not if it is '/**/' @@ -7132,40 +7150,40 @@ var ts; ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (157 /* FirstTypeNode */ <= node.kind && node.kind <= 172 /* LastTypeNode */) { + if (158 /* FirstTypeNode */ <= node.kind && node.kind <= 173 /* LastTypeNode */) { return true; } switch (node.kind) { - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 135 /* StringKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 136 /* StringKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: return true; - case 104 /* VoidKeyword */: - return node.parent.kind !== 189 /* VoidExpression */; - case 200 /* ExpressionWithTypeArguments */: + case 105 /* VoidKeyword */: + return node.parent.kind !== 190 /* VoidExpression */; + case 201 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); // Identifiers and qualified names may be type nodes, depending on their context. Climb // above them to find the lowest container - case 70 /* Identifier */: + case 71 /* Identifier */: // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node) { + else if (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + ts.Debug.assert(node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); // falls through - case 142 /* QualifiedName */: - case 178 /* PropertyAccessExpression */: - case 98 /* ThisKeyword */: + case 143 /* QualifiedName */: + case 179 /* PropertyAccessExpression */: + case 99 /* ThisKeyword */: var parent = node.parent; - if (parent.kind === 161 /* TypeQuery */) { + if (parent.kind === 162 /* TypeQuery */) { return false; } // Do not recursively call isPartOfTypeNode on the parent. In the example: @@ -7174,38 +7192,38 @@ var ts; // // Calling isPartOfTypeNode would consider the qualified name A.B a type node. // Only C and A.B.C are type nodes. - if (157 /* FirstTypeNode */ <= parent.kind && parent.kind <= 172 /* LastTypeNode */) { + if (158 /* FirstTypeNode */ <= parent.kind && parent.kind <= 173 /* LastTypeNode */) { return true; } switch (parent.kind) { - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return node === parent.constraint; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 145 /* Parameter */: - case 225 /* VariableDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 146 /* Parameter */: + case 226 /* VariableDeclaration */: return node === parent.type; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return node === parent.type; - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return node === parent.type; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return node === parent.type; - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. return false; } @@ -7224,7 +7242,7 @@ var ts; } ts.isChildOfNodeWithKind = isChildOfNodeWithKind; function isPrefixUnaryExpression(node) { - return node.kind === 191 /* PrefixUnaryExpression */; + return node.kind === 192 /* PrefixUnaryExpression */; } ts.isPrefixUnaryExpression = isPrefixUnaryExpression; // Warning: This has the same semantics as the forEach family of functions, @@ -7233,23 +7251,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitor(node); - case 234 /* CaseBlock */: - case 206 /* Block */: - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 219 /* WithStatement */: - case 220 /* SwitchStatement */: - case 256 /* CaseClause */: - case 257 /* DefaultClause */: - case 221 /* LabeledStatement */: - case 223 /* TryStatement */: - case 259 /* CatchClause */: + case 235 /* CaseBlock */: + case 207 /* Block */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 220 /* WithStatement */: + case 221 /* SwitchStatement */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: + case 222 /* LabeledStatement */: + case 224 /* TryStatement */: + case 260 /* CatchClause */: return ts.forEachChild(node, traverse); } } @@ -7259,19 +7277,19 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } return; - case 231 /* EnumDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: // These are not allowed inside a generator now, but eventually they may be allowed // as local types. Regardless, any yield statements contained within them should be // skipped in this traversal. @@ -7279,7 +7297,7 @@ var ts; default: if (isFunctionLike(node)) { var name = node.name; - if (name && name.kind === 143 /* ComputedPropertyName */) { + if (name && name.kind === 144 /* ComputedPropertyName */) { // Note that we will not include methods/accessors of a class because they would require // first descending into the class. This is by design. traverse(name.expression); @@ -7302,10 +7320,10 @@ var ts; * @param node The type node. */ function getRestParameterElementType(node) { - if (node && node.kind === 163 /* ArrayType */) { + if (node && node.kind === 164 /* ArrayType */) { return node.elementType; } - else if (node && node.kind === 158 /* TypeReference */) { + else if (node && node.kind === 159 /* TypeReference */) { return ts.singleOrUndefined(node.typeArguments); } else { @@ -7316,14 +7334,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 175 /* BindingElement */: - case 263 /* EnumMember */: - case 145 /* Parameter */: - case 260 /* PropertyAssignment */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 261 /* ShorthandPropertyAssignment */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 264 /* EnumMember */: + case 146 /* Parameter */: + case 261 /* PropertyAssignment */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 262 /* ShorthandPropertyAssignment */: + case 226 /* VariableDeclaration */: return true; } } @@ -7331,11 +7349,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */); + return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */); + return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -7344,19 +7362,19 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return true; } return false; @@ -7364,13 +7382,13 @@ var ts; ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return true; } return false; @@ -7378,13 +7396,13 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return true; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -7395,7 +7413,7 @@ var ts; if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 221 /* LabeledStatement */) { + if (node.statement.kind !== 222 /* LabeledStatement */) { return node.statement; } node = node.statement; @@ -7403,17 +7421,17 @@ var ts; } ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel; function isFunctionBlock(node) { - return node && node.kind === 206 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 207 /* Block */ && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 150 /* MethodDeclaration */ && node.parent.kind === 177 /* ObjectLiteralExpression */; + return node && node.kind === 151 /* MethodDeclaration */ && node.parent.kind === 178 /* ObjectLiteralExpression */; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isObjectLiteralOrClassExpressionMethod(node) { - return node.kind === 150 /* MethodDeclaration */ && - (node.parent.kind === 177 /* ObjectLiteralExpression */ || - node.parent.kind === 198 /* ClassExpression */); + return node.kind === 151 /* MethodDeclaration */ && + (node.parent.kind === 178 /* ObjectLiteralExpression */ || + node.parent.kind === 199 /* ClassExpression */); } ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod; function isIdentifierTypePredicate(predicate) { @@ -7449,7 +7467,7 @@ var ts; return undefined; } switch (node.kind) { - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: // If the grandparent node is an object literal (as opposed to a class), // then the computed property is not a 'this' container. // A computed property name in a class needs to be a this container @@ -7464,9 +7482,9 @@ var ts; // the *body* of the container. node = node.parent; break; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -7477,26 +7495,26 @@ var ts; node = node.parent; } break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } // falls through - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 232 /* ModuleDeclaration */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 231 /* EnumDeclaration */: - case 264 /* SourceFile */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 233 /* ModuleDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 232 /* EnumDeclaration */: + case 265 /* SourceFile */: return node; } } @@ -7506,9 +7524,9 @@ var ts; var container = getThisContainer(node, /*includeArrowFunctions*/ false); if (container) { switch (container.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return container; } } @@ -7530,27 +7548,27 @@ var ts; return node; } switch (node.kind) { - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: node = node.parent; break; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: if (!stopOnFunctions) { continue; } // falls through - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return node; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -7566,14 +7584,14 @@ var ts; } ts.getSuperContainer = getSuperContainer; function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */) { + if (func.kind === 186 /* FunctionExpression */ || func.kind === 187 /* ArrowFunction */) { var prev = func; var parent = func.parent; - while (parent.kind === 184 /* ParenthesizedExpression */) { + while (parent.kind === 185 /* ParenthesizedExpression */) { prev = parent; parent = parent.parent; } - if (parent.kind === 180 /* CallExpression */ && parent.expression === prev) { + if (parent.kind === 181 /* CallExpression */ && parent.expression === prev) { return parent; } } @@ -7584,21 +7602,21 @@ var ts; */ function isSuperProperty(node) { var kind = node.kind; - return (kind === 178 /* PropertyAccessExpression */ || kind === 179 /* ElementAccessExpression */) - && node.expression.kind === 96 /* SuperKeyword */; + return (kind === 179 /* PropertyAccessExpression */ || kind === 180 /* ElementAccessExpression */) + && node.expression.kind === 97 /* SuperKeyword */; } ts.isSuperProperty = isSuperProperty; function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 158 /* TypeReference */: - case 276 /* JSDocTypeReference */: + case 159 /* TypeReference */: + case 277 /* JSDocTypeReference */: return node.typeName; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : undefined; - case 70 /* Identifier */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 143 /* QualifiedName */: return node; } return undefined; @@ -7606,12 +7624,12 @@ var ts; ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function isCallLikeExpression(node) { switch (node.kind) { - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 182 /* TaggedTemplateExpression */: - case 146 /* Decorator */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 183 /* TaggedTemplateExpression */: + case 147 /* Decorator */: return true; default: return false; @@ -7619,7 +7637,7 @@ var ts; } ts.isCallLikeExpression = isCallLikeExpression; function getInvokedExpression(node) { - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { return node.tag; } else if (isJsxOpeningLikeElement(node)) { @@ -7631,25 +7649,25 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: // classes are valid targets return true; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 228 /* ClassDeclaration */; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: + return node.parent.kind === 229 /* ClassDeclaration */; + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: // if this method has a body and its parent is a class declaration, this is a valid target. return node.body !== undefined - && node.parent.kind === 228 /* ClassDeclaration */; - case 145 /* Parameter */: + && node.parent.kind === 229 /* ClassDeclaration */; + case 146 /* Parameter */: // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; return node.parent.body !== undefined - && (node.parent.kind === 151 /* Constructor */ - || node.parent.kind === 150 /* MethodDeclaration */ - || node.parent.kind === 153 /* SetAccessor */) - && node.parent.parent.kind === 228 /* ClassDeclaration */; + && (node.parent.kind === 152 /* Constructor */ + || node.parent.kind === 151 /* MethodDeclaration */ + || node.parent.kind === 154 /* SetAccessor */) + && node.parent.parent.kind === 229 /* ClassDeclaration */; } return false; } @@ -7665,19 +7683,19 @@ var ts; ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; function childIsDecorated(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return ts.forEach(node.members, nodeOrChildIsDecorated); - case 150 /* MethodDeclaration */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 154 /* SetAccessor */: return ts.forEach(node.parameters, nodeIsDecorated); } } ts.childIsDecorated = childIsDecorated; function isJSXTagName(node) { var parent = node.parent; - if (parent.kind === 250 /* JsxOpeningElement */ || - parent.kind === 249 /* JsxSelfClosingElement */ || - parent.kind === 251 /* JsxClosingElement */) { + if (parent.kind === 251 /* JsxOpeningElement */ || + parent.kind === 250 /* JsxSelfClosingElement */ || + parent.kind === 252 /* JsxClosingElement */) { return parent.tagName === node; } return false; @@ -7685,100 +7703,100 @@ var ts; ts.isJSXTagName = isJSXTagName; function isPartOfExpression(node) { switch (node.kind) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 11 /* RegularExpressionLiteral */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 182 /* TaggedTemplateExpression */: - case 201 /* AsExpression */: - case 183 /* TypeAssertionExpression */: - case 202 /* NonNullExpression */: - case 184 /* ParenthesizedExpression */: - case 185 /* FunctionExpression */: - case 198 /* ClassExpression */: - case 186 /* ArrowFunction */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 188 /* TypeOfExpression */: - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: - case 193 /* BinaryExpression */: - case 194 /* ConditionalExpression */: - case 197 /* SpreadElement */: - case 195 /* TemplateExpression */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 199 /* OmittedExpression */: - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 196 /* YieldExpression */: - case 190 /* AwaitExpression */: - case 203 /* MetaProperty */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 12 /* RegularExpressionLiteral */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 183 /* TaggedTemplateExpression */: + case 202 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 203 /* NonNullExpression */: + case 185 /* ParenthesizedExpression */: + case 186 /* FunctionExpression */: + case 199 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 189 /* TypeOfExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: + case 194 /* BinaryExpression */: + case 195 /* ConditionalExpression */: + case 198 /* SpreadElement */: + case 196 /* TemplateExpression */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 200 /* OmittedExpression */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 197 /* YieldExpression */: + case 191 /* AwaitExpression */: + case 204 /* MetaProperty */: return true; - case 142 /* QualifiedName */: - while (node.parent.kind === 142 /* QualifiedName */) { + case 143 /* QualifiedName */: + while (node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node); - case 70 /* Identifier */: - if (node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node)) { + return node.parent.kind === 162 /* TypeQuery */ || isJSXTagName(node); + case 71 /* Identifier */: + if (node.parent.kind === 162 /* TypeQuery */ || isJSXTagName(node)) { return true; } // falls through case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: var parent = node.parent; switch (parent.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 263 /* EnumMember */: - case 260 /* PropertyAssignment */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 264 /* EnumMember */: + case 261 /* PropertyAssignment */: + case 176 /* BindingElement */: return parent.initializer === node; - case 209 /* ExpressionStatement */: - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 218 /* ReturnStatement */: - case 219 /* WithStatement */: - case 220 /* SwitchStatement */: - case 256 /* CaseClause */: - case 222 /* ThrowStatement */: - case 220 /* SwitchStatement */: + case 210 /* ExpressionStatement */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 219 /* ReturnStatement */: + case 220 /* WithStatement */: + case 221 /* SwitchStatement */: + case 257 /* CaseClause */: + case 223 /* ThrowStatement */: + case 221 /* SwitchStatement */: return parent.expression === node; - case 213 /* ForStatement */: + case 214 /* ForStatement */: var forStatement = parent; - return (forStatement.initializer === node && forStatement.initializer.kind !== 226 /* VariableDeclarationList */) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 227 /* VariableDeclarationList */) || forStatement.condition === node || forStatement.incrementor === node; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: var forInStatement = parent; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226 /* VariableDeclarationList */) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 227 /* VariableDeclarationList */) || forInStatement.expression === node; - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return node === parent.expression; - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return node === parent.expression; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return node === parent.expression; - case 146 /* Decorator */: - case 255 /* JsxExpression */: - case 254 /* JsxSpreadAttribute */: - case 262 /* SpreadAssignment */: + case 147 /* Decorator */: + case 256 /* JsxExpression */: + case 255 /* JsxSpreadAttribute */: + case 263 /* SpreadAssignment */: return true; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent); default: if (isPartOfExpression(parent)) { @@ -7796,7 +7814,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */; + return node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 248 /* ExternalModuleReference */; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -7805,7 +7823,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 247 /* ExternalModuleReference */; + return node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 248 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -7822,18 +7840,18 @@ var ts; * This function does not test if the node is in a JavaScript file or not. */ function isRequireCall(callExpression, checkArgumentIsStringLiteral) { - if (callExpression.kind !== 180 /* CallExpression */) { + if (callExpression.kind !== 181 /* CallExpression */) { return false; } var _a = callExpression, expression = _a.expression, args = _a.arguments; - if (expression.kind !== 70 /* Identifier */ || expression.text !== "require") { + if (expression.kind !== 71 /* Identifier */ || expression.text !== "require") { return false; } if (args.length !== 1) { return false; } var arg = args[0]; - return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 12 /* NoSubstitutionTemplateLiteral */; + return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -7845,9 +7863,9 @@ var ts; * This function does not test if the node is in a JavaScript file or not. */ function isDeclarationOfFunctionOrClassExpression(s) { - if (s.valueDeclaration && s.valueDeclaration.kind === 225 /* VariableDeclaration */) { + if (s.valueDeclaration && s.valueDeclaration.kind === 226 /* VariableDeclaration */) { var declaration = s.valueDeclaration; - return declaration.initializer && (declaration.initializer.kind === 185 /* FunctionExpression */ || declaration.initializer.kind === 198 /* ClassExpression */); + return declaration.initializer && (declaration.initializer.kind === 186 /* FunctionExpression */ || declaration.initializer.kind === 199 /* ClassExpression */); } return false; } @@ -7874,11 +7892,11 @@ var ts; return 0 /* None */; } var expr = expression; - if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 178 /* PropertyAccessExpression */) { + if (expr.operatorToken.kind !== 58 /* EqualsToken */ || expr.left.kind !== 179 /* PropertyAccessExpression */) { return 0 /* None */; } var lhs = expr.left; - if (lhs.expression.kind === 70 /* Identifier */) { + if (lhs.expression.kind === 71 /* Identifier */) { var lhsId = lhs.expression; if (lhsId.text === "exports") { // exports.name = expr @@ -7893,13 +7911,13 @@ var ts; return 5 /* Property */; } } - else if (lhs.expression.kind === 98 /* ThisKeyword */) { + else if (lhs.expression.kind === 99 /* ThisKeyword */) { return 4 /* ThisProperty */; } - else if (lhs.expression.kind === 178 /* PropertyAccessExpression */) { + else if (lhs.expression.kind === 179 /* PropertyAccessExpression */) { // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 70 /* Identifier */) { + if (innerPropertyAccess.expression.kind === 71 /* Identifier */) { // module.exports.name = expr var innerPropertyAccessIdentifier = innerPropertyAccess.expression; if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { @@ -7914,35 +7932,35 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { var reference = node.moduleReference; - if (reference.kind === 247 /* ExternalModuleReference */) { + if (reference.kind === 248 /* ExternalModuleReference */) { return reference.expression; } } - if (node.kind === 243 /* ExportDeclaration */) { + if (node.kind === 244 /* ExportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + if (node.kind === 233 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { return node.name; } } ts.getExternalModuleName = getExternalModuleName; function getNamespaceDeclarationNode(node) { - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 240 /* NamespaceImport */) { return importClause.namedBindings; } } ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode; function isDefaultImport(node) { - return node.kind === 237 /* ImportDeclaration */ + return node.kind === 238 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; } @@ -7950,13 +7968,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 145 /* Parameter */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 261 /* ShorthandPropertyAssignment */: - case 260 /* PropertyAssignment */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 146 /* Parameter */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 262 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return node.questionToken !== undefined; } } @@ -7964,9 +7982,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 278 /* JSDocFunctionType */ && + return node.kind === 279 /* JSDocFunctionType */ && node.parameters.length > 0 && - node.parameters[0].type.kind === 280 /* JSDocConstructorType */; + node.parameters[0].type.kind === 281 /* JSDocConstructorType */; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getCommentsFromJSDoc(node) { @@ -7974,7 +7992,7 @@ var ts; } ts.getCommentsFromJSDoc = getCommentsFromJSDoc; function hasJSDocParameterTags(node) { - var parameterTags = getJSDocTags(node, 285 /* JSDocParameterTag */); + var parameterTags = getJSDocTags(node, 286 /* JSDocParameterTag */); return parameterTags && parameterTags.length > 0; } ts.hasJSDocParameterTags = hasJSDocParameterTags; @@ -7984,7 +8002,7 @@ var ts; var result = []; for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) { var doc = docs_1[_i]; - if (doc.kind === 285 /* JSDocParameterTag */) { + if (doc.kind === 286 /* JSDocParameterTag */) { if (doc.kind === kind) { result.push(doc); } @@ -8019,9 +8037,9 @@ var ts; // var x = function(name) { return name.length; } var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) && parent.initializer === node && - parent.parent.parent.kind === 207 /* VariableStatement */; + parent.parent.parent.kind === 208 /* VariableStatement */; var isVariableOfVariableDeclarationStatement = isVariableLike(node) && - parent.parent.kind === 207 /* VariableStatement */; + parent.parent.kind === 208 /* VariableStatement */; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent : isVariableOfVariableDeclarationStatement ? parent.parent : undefined; @@ -8030,20 +8048,20 @@ var ts; } // Also recognize when the node is the RHS of an assignment expression var isSourceOfAssignmentExpressionStatement = parent && parent.parent && - parent.kind === 193 /* BinaryExpression */ && - parent.operatorToken.kind === 57 /* EqualsToken */ && - parent.parent.kind === 209 /* ExpressionStatement */; + parent.kind === 194 /* BinaryExpression */ && + parent.operatorToken.kind === 58 /* EqualsToken */ && + parent.parent.kind === 210 /* ExpressionStatement */; if (isSourceOfAssignmentExpressionStatement) { getJSDocsWorker(parent.parent); } - var isModuleDeclaration = node.kind === 232 /* ModuleDeclaration */ && - parent && parent.kind === 232 /* ModuleDeclaration */; - var isPropertyAssignmentExpression = parent && parent.kind === 260 /* PropertyAssignment */; + var isModuleDeclaration = node.kind === 233 /* ModuleDeclaration */ && + parent && parent.kind === 233 /* ModuleDeclaration */; + var isPropertyAssignmentExpression = parent && parent.kind === 261 /* PropertyAssignment */; if (isModuleDeclaration || isPropertyAssignmentExpression) { getJSDocsWorker(parent); } // Pull parameter comments from declaring function as well - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { cache = ts.concatenate(cache, getJSDocParameterTags(node)); } if (isVariableLike(node) && node.initializer) { @@ -8058,18 +8076,18 @@ var ts; return undefined; } var func = param.parent; - var tags = getJSDocTags(func, 285 /* JSDocParameterTag */); + var tags = getJSDocTags(func, 286 /* JSDocParameterTag */); if (!param.name) { // this is an anonymous jsdoc param from a `function(type1, type2): type3` specification var i = func.parameters.indexOf(param); - var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */; }); + var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */; }); if (paramTags && 0 <= i && i < paramTags.length) { return [paramTags[i]]; } } - else if (param.name.kind === 70 /* Identifier */) { + else if (param.name.kind === 71 /* Identifier */) { var name_1 = param.name.text; - return ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */ && tag.parameterName.text === name_1; }); + return ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */ && tag.parameterName.text === name_1; }); } else { // TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines @@ -8079,8 +8097,8 @@ var ts; } ts.getJSDocParameterTags = getJSDocParameterTags; function getJSDocType(node) { - var tag = getFirstJSDocTag(node, 287 /* JSDocTypeTag */); - if (!tag && node.kind === 145 /* Parameter */) { + var tag = getFirstJSDocTag(node, 288 /* JSDocTypeTag */); + if (!tag && node.kind === 146 /* Parameter */) { var paramTags = getJSDocParameterTags(node); if (paramTags) { tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; }); @@ -8090,15 +8108,15 @@ var ts; } ts.getJSDocType = getJSDocType; function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, 284 /* JSDocAugmentsTag */); + return getFirstJSDocTag(node, 285 /* JSDocAugmentsTag */); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, 286 /* JSDocReturnTag */); + return getFirstJSDocTag(node, 287 /* JSDocReturnTag */); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, 288 /* JSDocTemplateTag */); + return getFirstJSDocTag(node, 289 /* JSDocTemplateTag */); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function hasRestParameter(s) { @@ -8111,8 +8129,8 @@ var ts; ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { if (node && (node.flags & 65536 /* JavaScriptFile */)) { - if (node.type && node.type.kind === 279 /* JSDocVariadicType */ || - ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279 /* JSDocVariadicType */; })) { + if (node.type && node.type.kind === 280 /* JSDocVariadicType */ || + ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 280 /* JSDocVariadicType */; })) { return true; } } @@ -8133,30 +8151,30 @@ var ts; var parent = node.parent; while (true) { switch (parent.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? - binaryOperator === 57 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ : + binaryOperator === 58 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: var unaryOperator = parent.operator; - return unaryOperator === 42 /* PlusPlusToken */ || unaryOperator === 43 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + return unaryOperator === 43 /* PlusPlusToken */ || unaryOperator === 44 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 184 /* ParenthesizedExpression */: - case 176 /* ArrayLiteralExpression */: - case 197 /* SpreadElement */: + case 185 /* ParenthesizedExpression */: + case 177 /* ArrayLiteralExpression */: + case 198 /* SpreadElement */: node = parent; break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: if (parent.name !== node) { return 0 /* None */; } node = parent.parent; break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: if (parent.name === node) { return 0 /* None */; } @@ -8179,14 +8197,14 @@ var ts; ts.isAssignmentTarget = isAssignmentTarget; // a node is delete target iff. it is PropertyAccessExpression/ElementAccessExpression with parentheses skipped function isDeleteTarget(node) { - if (node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) { + if (node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) { return false; } node = node.parent; - while (node && node.kind === 184 /* ParenthesizedExpression */) { + while (node && node.kind === 185 /* ParenthesizedExpression */) { node = node.parent; } - return node && node.kind === 187 /* DeleteExpression */; + return node && node.kind === 188 /* DeleteExpression */; } ts.isDeleteTarget = isDeleteTarget; function isNodeDescendantOf(node, ancestor) { @@ -8200,7 +8218,7 @@ var ts; ts.isNodeDescendantOf = isNodeDescendantOf; function isInAmbientContext(node) { while (node) { - if (hasModifier(node, 2 /* Ambient */) || (node.kind === 264 /* SourceFile */ && node.isDeclarationFile)) { + if (hasModifier(node, 2 /* Ambient */) || (node.kind === 265 /* SourceFile */ && node.isDeclarationFile)) { return true; } node = node.parent; @@ -8210,11 +8228,11 @@ var ts; ts.isInAmbientContext = isInAmbientContext; // True if the given identifier, string literal, or number literal is the name of a declaration node function isDeclarationName(name) { - if (name.kind !== 70 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) { + if (name.kind !== 71 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) { return false; } var parent = name.parent; - if (parent.kind === 241 /* ImportSpecifier */ || parent.kind === 245 /* ExportSpecifier */) { + if (parent.kind === 242 /* ImportSpecifier */ || parent.kind === 246 /* ExportSpecifier */) { if (parent.propertyName) { return true; } @@ -8227,7 +8245,7 @@ var ts; ts.isDeclarationName = isDeclarationName; function isLiteralComputedPropertyDeclarationName(node) { return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && - node.parent.kind === 143 /* ComputedPropertyName */ && + node.parent.kind === 144 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; @@ -8235,31 +8253,31 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 263 /* EnumMember */: - case 260 /* PropertyAssignment */: - case 178 /* PropertyAccessExpression */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 264 /* EnumMember */: + case 261 /* PropertyAssignment */: + case 179 /* PropertyAccessExpression */: // Name in member declaration or property name in property access return parent.name === node; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: // Name on right hand side of dot in a type query if (parent.right === node) { - while (parent.kind === 142 /* QualifiedName */) { + while (parent.kind === 143 /* QualifiedName */) { parent = parent.parent; } - return parent.kind === 161 /* TypeQuery */; + return parent.kind === 162 /* TypeQuery */; } return false; - case 175 /* BindingElement */: - case 241 /* ImportSpecifier */: + case 176 /* BindingElement */: + case 242 /* ImportSpecifier */: // Property name in binding element or import specifier return parent.propertyName === node; - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: // Any name in an export specifier return true; } @@ -8275,13 +8293,13 @@ var ts; // export = // export default function isAliasSymbolDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */ || - node.kind === 235 /* NamespaceExportDeclaration */ || - node.kind === 238 /* ImportClause */ && !!node.name || - node.kind === 239 /* NamespaceImport */ || - node.kind === 241 /* ImportSpecifier */ || - node.kind === 245 /* ExportSpecifier */ || - node.kind === 242 /* ExportAssignment */ && exportAssignmentIsAlias(node); + return node.kind === 237 /* ImportEqualsDeclaration */ || + node.kind === 236 /* NamespaceExportDeclaration */ || + node.kind === 239 /* ImportClause */ && !!node.name || + node.kind === 240 /* NamespaceImport */ || + node.kind === 242 /* ImportSpecifier */ || + node.kind === 246 /* ExportSpecifier */ || + node.kind === 243 /* ExportAssignment */ && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function exportAssignmentIsAlias(node) { @@ -8289,17 +8307,17 @@ var ts; } ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84 /* ExtendsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 85 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 107 /* ImplementsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 108 /* ImplementsKeyword */); return heritageClause ? heritageClause.types : undefined; } ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 84 /* ExtendsKeyword */); + var heritageClause = getHeritageClause(node.heritageClauses, 85 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : undefined; } ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; @@ -8367,7 +8385,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 71 /* FirstKeyword */ <= token && token <= 141 /* LastKeyword */; + return 72 /* FirstKeyword */ <= token && token <= 142 /* LastKeyword */; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -8387,14 +8405,14 @@ var ts; function getFunctionFlags(node) { var flags = 0 /* Normal */; switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } // falls through - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (hasModifier(node, 256 /* Async */)) { flags |= 2 /* Async */; } @@ -8408,10 +8426,10 @@ var ts; ts.getFunctionFlags = getFunctionFlags; function isAsyncFunction(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: return node.body !== undefined && node.asteriskToken === undefined && hasModifier(node, 256 /* Async */); @@ -8441,7 +8459,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 143 /* ComputedPropertyName */ && + return name.kind === 144 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } @@ -8456,10 +8474,10 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 145 /* Parameter */) { + if (name.kind === 71 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 146 /* Parameter */) { return name.text; } - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -8480,7 +8498,7 @@ var ts; * Includes the word "Symbol" with unicode escapes */ function isESSymbolIdentifier(node) { - return node.kind === 70 /* Identifier */ && node.text === "Symbol"; + return node.kind === 71 /* Identifier */ && node.text === "Symbol"; } ts.isESSymbolIdentifier = isESSymbolIdentifier; function isPushOrUnshiftIdentifier(node) { @@ -8489,17 +8507,17 @@ var ts; ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier; function isModifierKind(token) { switch (token) { - case 116 /* AbstractKeyword */: - case 119 /* AsyncKeyword */: - case 75 /* ConstKeyword */: - case 123 /* DeclareKeyword */: - case 78 /* DefaultKeyword */: - case 83 /* ExportKeyword */: - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 130 /* ReadonlyKeyword */: - case 114 /* StaticKeyword */: + case 117 /* AbstractKeyword */: + case 120 /* AsyncKeyword */: + case 76 /* ConstKeyword */: + case 124 /* DeclareKeyword */: + case 79 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 131 /* ReadonlyKeyword */: + case 115 /* StaticKeyword */: return true; } return false; @@ -8507,11 +8525,11 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 145 /* Parameter */; + return root.kind === 146 /* Parameter */; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 175 /* BindingElement */) { + while (node.kind === 176 /* BindingElement */) { node = node.parent.parent; } return node; @@ -8519,15 +8537,15 @@ var ts; ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(node) { var kind = node.kind; - return kind === 151 /* Constructor */ - || kind === 185 /* FunctionExpression */ - || kind === 227 /* FunctionDeclaration */ - || kind === 186 /* ArrowFunction */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 232 /* ModuleDeclaration */ - || kind === 264 /* SourceFile */; + return kind === 152 /* Constructor */ + || kind === 186 /* FunctionExpression */ + || kind === 228 /* FunctionDeclaration */ + || kind === 187 /* ArrowFunction */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 233 /* ModuleDeclaration */ + || kind === 265 /* SourceFile */; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function nodeIsSynthesized(node) { @@ -8536,7 +8554,7 @@ var ts; } ts.nodeIsSynthesized = nodeIsSynthesized; function getOriginalSourceFileOrBundle(sourceFileOrBundle) { - if (sourceFileOrBundle.kind === 265 /* Bundle */) { + if (sourceFileOrBundle.kind === 266 /* Bundle */) { return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile)); } return getOriginalSourceFile(sourceFileOrBundle); @@ -8561,38 +8579,38 @@ var ts; })(Associativity = ts.Associativity || (ts.Associativity = {})); function getExpressionAssociativity(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 /* NewExpression */ && expression.arguments !== undefined; return getOperatorAssociativity(expression.kind, operator, hasArguments); } ts.getExpressionAssociativity = getExpressionAssociativity; function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 181 /* NewExpression */: + case 182 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 191 /* PrefixUnaryExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 190 /* AwaitExpression */: - case 194 /* ConditionalExpression */: - case 196 /* YieldExpression */: + case 192 /* PrefixUnaryExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 191 /* AwaitExpression */: + case 195 /* ConditionalExpression */: + case 197 /* YieldExpression */: return 1 /* Right */; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (operator) { - case 39 /* AsteriskAsteriskToken */: - case 57 /* EqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 68 /* BarEqualsToken */: + case 40 /* AsteriskAsteriskToken */: + case 58 /* EqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 69 /* BarEqualsToken */: return 1 /* Right */; } } @@ -8601,15 +8619,15 @@ var ts; ts.getOperatorAssociativity = getOperatorAssociativity; function getExpressionPrecedence(expression) { var operator = getOperator(expression); - var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined; + var hasArguments = expression.kind === 182 /* NewExpression */ && expression.arguments !== undefined; return getOperatorPrecedence(expression.kind, operator, hasArguments); } ts.getExpressionPrecedence = getExpressionPrecedence; function getOperator(expression) { - if (expression.kind === 193 /* BinaryExpression */) { + if (expression.kind === 194 /* BinaryExpression */) { return expression.operatorToken.kind; } - else if (expression.kind === 191 /* PrefixUnaryExpression */ || expression.kind === 192 /* PostfixUnaryExpression */) { + else if (expression.kind === 192 /* PrefixUnaryExpression */ || expression.kind === 193 /* PostfixUnaryExpression */) { return expression.operator; } else { @@ -8619,106 +8637,106 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 70 /* Identifier */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 71 /* Identifier */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 198 /* ClassExpression */: - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 11 /* RegularExpressionLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 195 /* TemplateExpression */: - case 184 /* ParenthesizedExpression */: - case 199 /* OmittedExpression */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 199 /* ClassExpression */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 12 /* RegularExpressionLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 196 /* TemplateExpression */: + case 185 /* ParenthesizedExpression */: + case 200 /* OmittedExpression */: return 19; - case 182 /* TaggedTemplateExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 183 /* TaggedTemplateExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: return 18; - case 181 /* NewExpression */: + case 182 /* NewExpression */: return hasArguments ? 18 : 17; - case 180 /* CallExpression */: + case 181 /* CallExpression */: return 17; - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return 16; - case 191 /* PrefixUnaryExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 187 /* DeleteExpression */: - case 190 /* AwaitExpression */: + case 192 /* PrefixUnaryExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 188 /* DeleteExpression */: + case 191 /* AwaitExpression */: return 15; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (operatorKind) { - case 50 /* ExclamationToken */: - case 51 /* TildeToken */: + case 51 /* ExclamationToken */: + case 52 /* TildeToken */: return 15; - case 39 /* AsteriskAsteriskToken */: - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: + case 40 /* AsteriskAsteriskToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: return 14; - case 36 /* PlusToken */: - case 37 /* MinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: return 13; - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return 12; - case 26 /* LessThanToken */: - case 29 /* LessThanEqualsToken */: - case 28 /* GreaterThanToken */: - case 30 /* GreaterThanEqualsToken */: - case 91 /* InKeyword */: - case 92 /* InstanceOfKeyword */: + case 27 /* LessThanToken */: + case 30 /* LessThanEqualsToken */: + case 29 /* GreaterThanToken */: + case 31 /* GreaterThanEqualsToken */: + case 92 /* InKeyword */: + case 93 /* InstanceOfKeyword */: return 11; - case 31 /* EqualsEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return 10; - case 47 /* AmpersandToken */: + case 48 /* AmpersandToken */: return 9; - case 49 /* CaretToken */: + case 50 /* CaretToken */: return 8; - case 48 /* BarToken */: + case 49 /* BarToken */: return 7; - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return 6; - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return 5; - case 57 /* EqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 68 /* BarEqualsToken */: + case 58 /* EqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 69 /* BarEqualsToken */: return 3; - case 25 /* CommaToken */: + case 26 /* CommaToken */: return 0; default: return -1; } - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return 4; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return 2; - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return 1; default: return -1; @@ -9073,7 +9091,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 151 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 152 /* Constructor */ && nodeIsPresent(member.body)) { return member; } }); @@ -9101,11 +9119,11 @@ var ts; } ts.parameterIsThisKeyword = parameterIsThisKeyword; function isThisIdentifier(node) { - return node && node.kind === 70 /* Identifier */ && identifierIsThisKeyword(node); + return node && node.kind === 71 /* Identifier */ && identifierIsThisKeyword(node); } ts.isThisIdentifier = isThisIdentifier; function identifierIsThisKeyword(id) { - return id.originalKeywordKind === 98 /* ThisKeyword */; + return id.originalKeywordKind === 99 /* ThisKeyword */; } ts.identifierIsThisKeyword = identifierIsThisKeyword; function getAllAccessorDeclarations(declarations, accessor) { @@ -9115,10 +9133,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 152 /* GetAccessor */) { + if (accessor.kind === 153 /* GetAccessor */) { getAccessor = accessor; } - else if (accessor.kind === 153 /* SetAccessor */) { + else if (accessor.kind === 154 /* SetAccessor */) { setAccessor = accessor; } else { @@ -9127,7 +9145,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 152 /* GetAccessor */ || member.kind === 153 /* SetAccessor */) + if ((member.kind === 153 /* GetAccessor */ || member.kind === 154 /* SetAccessor */) && hasModifier(member, 32 /* Static */) === hasModifier(accessor, 32 /* Static */)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -9138,10 +9156,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 152 /* GetAccessor */ && !getAccessor) { + if (member.kind === 153 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 153 /* SetAccessor */ && !setAccessor) { + if (member.kind === 154 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -9368,7 +9386,7 @@ var ts; flags |= modifierToFlag(modifier.kind); } } - if (node.flags & 4 /* NestedNamespace */ || (node.kind === 70 /* Identifier */ && node.isInJSDocNamespace)) { + if (node.flags & 4 /* NestedNamespace */ || (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace)) { flags |= 1 /* Export */; } node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */; @@ -9377,35 +9395,35 @@ var ts; ts.getModifierFlags = getModifierFlags; function modifierToFlag(token) { switch (token) { - case 114 /* StaticKeyword */: return 32 /* Static */; - case 113 /* PublicKeyword */: return 4 /* Public */; - case 112 /* ProtectedKeyword */: return 16 /* Protected */; - case 111 /* PrivateKeyword */: return 8 /* Private */; - case 116 /* AbstractKeyword */: return 128 /* Abstract */; - case 83 /* ExportKeyword */: return 1 /* Export */; - case 123 /* DeclareKeyword */: return 2 /* Ambient */; - case 75 /* ConstKeyword */: return 2048 /* Const */; - case 78 /* DefaultKeyword */: return 512 /* Default */; - case 119 /* AsyncKeyword */: return 256 /* Async */; - case 130 /* ReadonlyKeyword */: return 64 /* Readonly */; + case 115 /* StaticKeyword */: return 32 /* Static */; + case 114 /* PublicKeyword */: return 4 /* Public */; + case 113 /* ProtectedKeyword */: return 16 /* Protected */; + case 112 /* PrivateKeyword */: return 8 /* Private */; + case 117 /* AbstractKeyword */: return 128 /* Abstract */; + case 84 /* ExportKeyword */: return 1 /* Export */; + case 124 /* DeclareKeyword */: return 2 /* Ambient */; + case 76 /* ConstKeyword */: return 2048 /* Const */; + case 79 /* DefaultKeyword */: return 512 /* Default */; + case 120 /* AsyncKeyword */: return 256 /* Async */; + case 131 /* ReadonlyKeyword */: return 64 /* Readonly */; } return 0 /* None */; } ts.modifierToFlag = modifierToFlag; function isLogicalOperator(token) { - return token === 53 /* BarBarToken */ - || token === 52 /* AmpersandAmpersandToken */ - || token === 50 /* ExclamationToken */; + return token === 54 /* BarBarToken */ + || token === 53 /* AmpersandAmpersandToken */ + || token === 51 /* ExclamationToken */; } ts.isLogicalOperator = isLogicalOperator; function isAssignmentOperator(token) { - return token >= 57 /* FirstAssignment */ && token <= 69 /* LastAssignment */; + return token >= 58 /* FirstAssignment */ && token <= 70 /* LastAssignment */; } ts.isAssignmentOperator = isAssignmentOperator; /** Get `C` given `N` if `N` is in the position `class C extends N` where `N` is an ExpressionWithTypeArguments. */ function tryGetClassExtendingExpressionWithTypeArguments(node) { - if (node.kind === 200 /* ExpressionWithTypeArguments */ && - node.parent.token === 84 /* ExtendsKeyword */ && + if (node.kind === 201 /* ExpressionWithTypeArguments */ && + node.parent.token === 85 /* ExtendsKeyword */ && isClassLike(node.parent.parent)) { return node.parent.parent; } @@ -9414,7 +9432,7 @@ var ts; function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment - ? node.operatorToken.kind === 57 /* EqualsToken */ + ? node.operatorToken.kind === 58 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } @@ -9422,8 +9440,8 @@ var ts; function isDestructuringAssignment(node) { if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) { var kind = node.left.kind; - return kind === 177 /* ObjectLiteralExpression */ - || kind === 176 /* ArrayLiteralExpression */; + return kind === 178 /* ObjectLiteralExpression */ + || kind === 177 /* ArrayLiteralExpression */; } return false; } @@ -9435,7 +9453,7 @@ var ts; } ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { return true; } else if (isPropertyAccessExpression(node)) { @@ -9450,31 +9468,31 @@ var ts; } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; function isExpressionWithTypeArgumentsInClassImplementsClause(node) { - return node.kind === 200 /* ExpressionWithTypeArguments */ + return node.kind === 201 /* ExpressionWithTypeArguments */ && isEntityNameExpression(node.expression) && node.parent - && node.parent.token === 107 /* ImplementsKeyword */ + && node.parent.token === 108 /* ImplementsKeyword */ && node.parent.parent && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause; function isEntityNameExpression(node) { - return node.kind === 70 /* Identifier */ || - node.kind === 178 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression); + return node.kind === 71 /* Identifier */ || + node.kind === 179 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression); } ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node); + return (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node) || + (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteral(expression) { - return expression.kind === 177 /* ObjectLiteralExpression */ && + return expression.kind === 178 /* ObjectLiteralExpression */ && expression.properties.length === 0; } ts.isEmptyObjectLiteral = isEmptyObjectLiteral; function isEmptyArrayLiteral(expression) { - return expression.kind === 176 /* ArrayLiteralExpression */ && + return expression.kind === 177 /* ArrayLiteralExpression */ && expression.elements.length === 0; } ts.isEmptyArrayLiteral = isEmptyArrayLiteral; @@ -9586,49 +9604,49 @@ var ts; var kind = node.kind; if (kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */ - || kind === 11 /* RegularExpressionLiteral */ - || kind === 12 /* NoSubstitutionTemplateLiteral */ - || kind === 70 /* Identifier */ - || kind === 98 /* ThisKeyword */ - || kind === 96 /* SuperKeyword */ - || kind === 100 /* TrueKeyword */ - || kind === 85 /* FalseKeyword */ - || kind === 94 /* NullKeyword */) { + || kind === 12 /* RegularExpressionLiteral */ + || kind === 13 /* NoSubstitutionTemplateLiteral */ + || kind === 71 /* Identifier */ + || kind === 99 /* ThisKeyword */ + || kind === 97 /* SuperKeyword */ + || kind === 101 /* TrueKeyword */ + || kind === 86 /* FalseKeyword */ + || kind === 95 /* NullKeyword */) { return true; } - else if (kind === 178 /* PropertyAccessExpression */) { + else if (kind === 179 /* PropertyAccessExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 179 /* ElementAccessExpression */) { + else if (kind === 180 /* ElementAccessExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1) && isSimpleExpressionWorker(node.argumentExpression, depth + 1); } - else if (kind === 191 /* PrefixUnaryExpression */ - || kind === 192 /* PostfixUnaryExpression */) { + else if (kind === 192 /* PrefixUnaryExpression */ + || kind === 193 /* PostfixUnaryExpression */) { return isSimpleExpressionWorker(node.operand, depth + 1); } - else if (kind === 193 /* BinaryExpression */) { - return node.operatorToken.kind !== 39 /* AsteriskAsteriskToken */ + else if (kind === 194 /* BinaryExpression */) { + return node.operatorToken.kind !== 40 /* AsteriskAsteriskToken */ && isSimpleExpressionWorker(node.left, depth + 1) && isSimpleExpressionWorker(node.right, depth + 1); } - else if (kind === 194 /* ConditionalExpression */) { + else if (kind === 195 /* ConditionalExpression */) { return isSimpleExpressionWorker(node.condition, depth + 1) && isSimpleExpressionWorker(node.whenTrue, depth + 1) && isSimpleExpressionWorker(node.whenFalse, depth + 1); } - else if (kind === 189 /* VoidExpression */ - || kind === 188 /* TypeOfExpression */ - || kind === 187 /* DeleteExpression */) { + else if (kind === 190 /* VoidExpression */ + || kind === 189 /* TypeOfExpression */ + || kind === 188 /* DeleteExpression */) { return isSimpleExpressionWorker(node.expression, depth + 1); } - else if (kind === 176 /* ArrayLiteralExpression */) { + else if (kind === 177 /* ArrayLiteralExpression */) { return node.elements.length === 0; } - else if (kind === 177 /* ObjectLiteralExpression */) { + else if (kind === 178 /* ObjectLiteralExpression */) { return node.properties.length === 0; } - else if (kind === 180 /* CallExpression */) { + else if (kind === 181 /* CallExpression */) { if (!isSimpleExpressionWorker(node.expression, depth + 1)) { return false; } @@ -9806,8 +9824,8 @@ var ts; var parseNode = ts.getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -9828,7 +9846,7 @@ var ts; if (node.symbol) { for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 228 /* ClassDeclaration */ && declaration !== node) { + if (declaration.kind === 229 /* ClassDeclaration */ && declaration !== node) { return true; } } @@ -9858,15 +9876,15 @@ var ts; ts.isNodeArray = isNodeArray; // Literals function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 12 /* NoSubstitutionTemplateLiteral */; + return node.kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral; function isLiteralKind(kind) { - return 8 /* FirstLiteralToken */ <= kind && kind <= 12 /* LastLiteralToken */; + return 8 /* FirstLiteralToken */ <= kind && kind <= 13 /* LastLiteralToken */; } ts.isLiteralKind = isLiteralKind; function isTextualLiteralKind(kind) { - return kind === 9 /* StringLiteral */ || kind === 12 /* NoSubstitutionTemplateLiteral */; + return kind === 9 /* StringLiteral */ || kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isTextualLiteralKind = isTextualLiteralKind; function isLiteralExpression(node) { @@ -9875,26 +9893,26 @@ var ts; ts.isLiteralExpression = isLiteralExpression; // Pseudo-literals function isTemplateLiteralKind(kind) { - return 12 /* FirstTemplateToken */ <= kind && kind <= 15 /* LastTemplateToken */; + return 13 /* FirstTemplateToken */ <= kind && kind <= 16 /* LastTemplateToken */; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isTemplateHead(node) { - return node.kind === 13 /* TemplateHead */; + return node.kind === 14 /* TemplateHead */; } ts.isTemplateHead = isTemplateHead; function isTemplateMiddleOrTemplateTail(node) { var kind = node.kind; - return kind === 14 /* TemplateMiddle */ - || kind === 15 /* TemplateTail */; + return kind === 15 /* TemplateMiddle */ + || kind === 16 /* TemplateTail */; } ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail; // Identifiers function isIdentifier(node) { - return node.kind === 70 /* Identifier */; + return node.kind === 71 /* Identifier */; } ts.isIdentifier = isIdentifier; function isVoidExpression(node) { - return node.kind === 189 /* VoidExpression */; + return node.kind === 190 /* VoidExpression */; } ts.isVoidExpression = isVoidExpression; function isGeneratedIdentifier(node) { @@ -9909,95 +9927,95 @@ var ts; ts.isModifier = isModifier; // Names function isQualifiedName(node) { - return node.kind === 142 /* QualifiedName */; + return node.kind === 143 /* QualifiedName */; } ts.isQualifiedName = isQualifiedName; function isComputedPropertyName(node) { - return node.kind === 143 /* ComputedPropertyName */; + return node.kind === 144 /* ComputedPropertyName */; } ts.isComputedPropertyName = isComputedPropertyName; function isEntityName(node) { var kind = node.kind; - return kind === 142 /* QualifiedName */ - || kind === 70 /* Identifier */; + return kind === 143 /* QualifiedName */ + || kind === 71 /* Identifier */; } ts.isEntityName = isEntityName; function isPropertyName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ + return kind === 71 /* Identifier */ || kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */ - || kind === 143 /* ComputedPropertyName */; + || kind === 144 /* ComputedPropertyName */; } ts.isPropertyName = isPropertyName; function isModuleName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ + return kind === 71 /* Identifier */ || kind === 9 /* StringLiteral */; } ts.isModuleName = isModuleName; function isBindingName(node) { var kind = node.kind; - return kind === 70 /* Identifier */ - || kind === 173 /* ObjectBindingPattern */ - || kind === 174 /* ArrayBindingPattern */; + return kind === 71 /* Identifier */ + || kind === 174 /* ObjectBindingPattern */ + || kind === 175 /* ArrayBindingPattern */; } ts.isBindingName = isBindingName; // Signature elements function isTypeParameter(node) { - return node.kind === 144 /* TypeParameter */; + return node.kind === 145 /* TypeParameter */; } ts.isTypeParameter = isTypeParameter; function isParameter(node) { - return node.kind === 145 /* Parameter */; + return node.kind === 146 /* Parameter */; } ts.isParameter = isParameter; function isDecorator(node) { - return node.kind === 146 /* Decorator */; + return node.kind === 147 /* Decorator */; } ts.isDecorator = isDecorator; // Type members function isMethodDeclaration(node) { - return node.kind === 150 /* MethodDeclaration */; + return node.kind === 151 /* MethodDeclaration */; } ts.isMethodDeclaration = isMethodDeclaration; function isClassElement(node) { var kind = node.kind; - return kind === 151 /* Constructor */ - || kind === 148 /* PropertyDeclaration */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 156 /* IndexSignature */ - || kind === 205 /* SemicolonClassElement */; + return kind === 152 /* Constructor */ + || kind === 149 /* PropertyDeclaration */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 157 /* IndexSignature */ + || kind === 206 /* SemicolonClassElement */; } ts.isClassElement = isClassElement; function isObjectLiteralElementLike(node) { var kind = node.kind; - return kind === 260 /* PropertyAssignment */ - || kind === 261 /* ShorthandPropertyAssignment */ - || kind === 262 /* SpreadAssignment */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 246 /* MissingDeclaration */; + return kind === 261 /* PropertyAssignment */ + || kind === 262 /* ShorthandPropertyAssignment */ + || kind === 263 /* SpreadAssignment */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 247 /* MissingDeclaration */; } ts.isObjectLiteralElementLike = isObjectLiteralElementLike; // Type function isTypeNodeKind(kind) { - return (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) - || kind === 118 /* AnyKeyword */ - || kind === 132 /* NumberKeyword */ - || kind === 133 /* ObjectKeyword */ - || kind === 121 /* BooleanKeyword */ - || kind === 135 /* StringKeyword */ - || kind === 136 /* SymbolKeyword */ - || kind === 98 /* ThisKeyword */ - || kind === 104 /* VoidKeyword */ - || kind === 138 /* UndefinedKeyword */ - || kind === 94 /* NullKeyword */ - || kind === 129 /* NeverKeyword */ - || kind === 200 /* ExpressionWithTypeArguments */; + return (kind >= 158 /* FirstTypeNode */ && kind <= 173 /* LastTypeNode */) + || kind === 119 /* AnyKeyword */ + || kind === 133 /* NumberKeyword */ + || kind === 134 /* ObjectKeyword */ + || kind === 122 /* BooleanKeyword */ + || kind === 136 /* StringKeyword */ + || kind === 137 /* SymbolKeyword */ + || kind === 99 /* ThisKeyword */ + || kind === 105 /* VoidKeyword */ + || kind === 139 /* UndefinedKeyword */ + || kind === 95 /* NullKeyword */ + || kind === 130 /* NeverKeyword */ + || kind === 201 /* ExpressionWithTypeArguments */; } /** * Node test that determines whether a node is a valid type node. @@ -10010,36 +10028,36 @@ var ts; ts.isTypeNode = isTypeNode; // Binding patterns function isArrayBindingPattern(node) { - return node.kind === 174 /* ArrayBindingPattern */; + return node.kind === 175 /* ArrayBindingPattern */; } ts.isArrayBindingPattern = isArrayBindingPattern; function isObjectBindingPattern(node) { - return node.kind === 173 /* ObjectBindingPattern */; + return node.kind === 174 /* ObjectBindingPattern */; } ts.isObjectBindingPattern = isObjectBindingPattern; function isBindingPattern(node) { if (node) { var kind = node.kind; - return kind === 174 /* ArrayBindingPattern */ - || kind === 173 /* ObjectBindingPattern */; + return kind === 175 /* ArrayBindingPattern */ + || kind === 174 /* ObjectBindingPattern */; } return false; } ts.isBindingPattern = isBindingPattern; function isAssignmentPattern(node) { var kind = node.kind; - return kind === 176 /* ArrayLiteralExpression */ - || kind === 177 /* ObjectLiteralExpression */; + return kind === 177 /* ArrayLiteralExpression */ + || kind === 178 /* ObjectLiteralExpression */; } ts.isAssignmentPattern = isAssignmentPattern; function isBindingElement(node) { - return node.kind === 175 /* BindingElement */; + return node.kind === 176 /* BindingElement */; } ts.isBindingElement = isBindingElement; function isArrayBindingElement(node) { var kind = node.kind; - return kind === 175 /* BindingElement */ - || kind === 199 /* OmittedExpression */; + return kind === 176 /* BindingElement */ + || kind === 200 /* OmittedExpression */; } ts.isArrayBindingElement = isArrayBindingElement; /** @@ -10047,9 +10065,9 @@ var ts; */ function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 176 /* BindingElement */: return true; } return false; @@ -10068,8 +10086,8 @@ var ts; */ function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 173 /* ObjectBindingPattern */: - case 177 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 178 /* ObjectLiteralExpression */: return true; } return false; @@ -10080,8 +10098,8 @@ var ts; */ function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: return true; } return false; @@ -10089,92 +10107,92 @@ var ts; ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern; // Expression function isArrayLiteralExpression(node) { - return node.kind === 176 /* ArrayLiteralExpression */; + return node.kind === 177 /* ArrayLiteralExpression */; } ts.isArrayLiteralExpression = isArrayLiteralExpression; function isObjectLiteralExpression(node) { - return node.kind === 177 /* ObjectLiteralExpression */; + return node.kind === 178 /* ObjectLiteralExpression */; } ts.isObjectLiteralExpression = isObjectLiteralExpression; function isPropertyAccessExpression(node) { - return node.kind === 178 /* PropertyAccessExpression */; + return node.kind === 179 /* PropertyAccessExpression */; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isPropertyAccessOrQualifiedName(node) { var kind = node.kind; - return kind === 178 /* PropertyAccessExpression */ - || kind === 142 /* QualifiedName */; + return kind === 179 /* PropertyAccessExpression */ + || kind === 143 /* QualifiedName */; } ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName; function isElementAccessExpression(node) { - return node.kind === 179 /* ElementAccessExpression */; + return node.kind === 180 /* ElementAccessExpression */; } ts.isElementAccessExpression = isElementAccessExpression; function isBinaryExpression(node) { - return node.kind === 193 /* BinaryExpression */; + return node.kind === 194 /* BinaryExpression */; } ts.isBinaryExpression = isBinaryExpression; function isConditionalExpression(node) { - return node.kind === 194 /* ConditionalExpression */; + return node.kind === 195 /* ConditionalExpression */; } ts.isConditionalExpression = isConditionalExpression; function isCallExpression(node) { - return node.kind === 180 /* CallExpression */; + return node.kind === 181 /* CallExpression */; } ts.isCallExpression = isCallExpression; function isTemplateLiteral(node) { var kind = node.kind; - return kind === 195 /* TemplateExpression */ - || kind === 12 /* NoSubstitutionTemplateLiteral */; + return kind === 196 /* TemplateExpression */ + || kind === 13 /* NoSubstitutionTemplateLiteral */; } ts.isTemplateLiteral = isTemplateLiteral; function isSpreadExpression(node) { - return node.kind === 197 /* SpreadElement */; + return node.kind === 198 /* SpreadElement */; } ts.isSpreadExpression = isSpreadExpression; function isExpressionWithTypeArguments(node) { - return node.kind === 200 /* ExpressionWithTypeArguments */; + return node.kind === 201 /* ExpressionWithTypeArguments */; } ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments; function isLeftHandSideExpressionKind(kind) { - return kind === 178 /* PropertyAccessExpression */ - || kind === 179 /* ElementAccessExpression */ - || kind === 181 /* NewExpression */ - || kind === 180 /* CallExpression */ - || kind === 248 /* JsxElement */ - || kind === 249 /* JsxSelfClosingElement */ - || kind === 182 /* TaggedTemplateExpression */ - || kind === 176 /* ArrayLiteralExpression */ - || kind === 184 /* ParenthesizedExpression */ - || kind === 177 /* ObjectLiteralExpression */ - || kind === 198 /* ClassExpression */ - || kind === 185 /* FunctionExpression */ - || kind === 70 /* Identifier */ - || kind === 11 /* RegularExpressionLiteral */ + return kind === 179 /* PropertyAccessExpression */ + || kind === 180 /* ElementAccessExpression */ + || kind === 182 /* NewExpression */ + || kind === 181 /* CallExpression */ + || kind === 249 /* JsxElement */ + || kind === 250 /* JsxSelfClosingElement */ + || kind === 183 /* TaggedTemplateExpression */ + || kind === 177 /* ArrayLiteralExpression */ + || kind === 185 /* ParenthesizedExpression */ + || kind === 178 /* ObjectLiteralExpression */ + || kind === 199 /* ClassExpression */ + || kind === 186 /* FunctionExpression */ + || kind === 71 /* Identifier */ + || kind === 12 /* RegularExpressionLiteral */ || kind === 8 /* NumericLiteral */ || kind === 9 /* StringLiteral */ - || kind === 12 /* NoSubstitutionTemplateLiteral */ - || kind === 195 /* TemplateExpression */ - || kind === 85 /* FalseKeyword */ - || kind === 94 /* NullKeyword */ - || kind === 98 /* ThisKeyword */ - || kind === 100 /* TrueKeyword */ - || kind === 96 /* SuperKeyword */ - || kind === 202 /* NonNullExpression */ - || kind === 203 /* MetaProperty */; + || kind === 13 /* NoSubstitutionTemplateLiteral */ + || kind === 196 /* TemplateExpression */ + || kind === 86 /* FalseKeyword */ + || kind === 95 /* NullKeyword */ + || kind === 99 /* ThisKeyword */ + || kind === 101 /* TrueKeyword */ + || kind === 97 /* SuperKeyword */ + || kind === 203 /* NonNullExpression */ + || kind === 204 /* MetaProperty */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind); } ts.isLeftHandSideExpression = isLeftHandSideExpression; function isUnaryExpressionKind(kind) { - return kind === 191 /* PrefixUnaryExpression */ - || kind === 192 /* PostfixUnaryExpression */ - || kind === 187 /* DeleteExpression */ - || kind === 188 /* TypeOfExpression */ - || kind === 189 /* VoidExpression */ - || kind === 190 /* AwaitExpression */ - || kind === 183 /* TypeAssertionExpression */ + return kind === 192 /* PrefixUnaryExpression */ + || kind === 193 /* PostfixUnaryExpression */ + || kind === 188 /* DeleteExpression */ + || kind === 189 /* TypeOfExpression */ + || kind === 190 /* VoidExpression */ + || kind === 191 /* AwaitExpression */ + || kind === 184 /* TypeAssertionExpression */ || isLeftHandSideExpressionKind(kind); } function isUnaryExpression(node) { @@ -10182,13 +10200,13 @@ var ts; } ts.isUnaryExpression = isUnaryExpression; function isExpressionKind(kind) { - return kind === 194 /* ConditionalExpression */ - || kind === 196 /* YieldExpression */ - || kind === 186 /* ArrowFunction */ - || kind === 193 /* BinaryExpression */ - || kind === 197 /* SpreadElement */ - || kind === 201 /* AsExpression */ - || kind === 199 /* OmittedExpression */ + return kind === 195 /* ConditionalExpression */ + || kind === 197 /* YieldExpression */ + || kind === 187 /* ArrowFunction */ + || kind === 194 /* BinaryExpression */ + || kind === 198 /* SpreadElement */ + || kind === 202 /* AsExpression */ + || kind === 200 /* OmittedExpression */ || isUnaryExpressionKind(kind); } function isExpression(node) { @@ -10197,16 +10215,16 @@ var ts; ts.isExpression = isExpression; function isAssertionExpression(node) { var kind = node.kind; - return kind === 183 /* TypeAssertionExpression */ - || kind === 201 /* AsExpression */; + return kind === 184 /* TypeAssertionExpression */ + || kind === 202 /* AsExpression */; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 295 /* PartiallyEmittedExpression */; + return node.kind === 296 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 294 /* NotEmittedStatement */; + return node.kind === 295 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -10215,17 +10233,17 @@ var ts; } ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode; function isOmittedExpression(node) { - return node.kind === 199 /* OmittedExpression */; + return node.kind === 200 /* OmittedExpression */; } ts.isOmittedExpression = isOmittedExpression; // Misc function isTemplateSpan(node) { - return node.kind === 204 /* TemplateSpan */; + return node.kind === 205 /* TemplateSpan */; } ts.isTemplateSpan = isTemplateSpan; // Element function isBlock(node) { - return node.kind === 206 /* Block */; + return node.kind === 207 /* Block */; } ts.isBlock = isBlock; function isConciseBody(node) { @@ -10243,135 +10261,135 @@ var ts; } ts.isForInitializer = isForInitializer; function isVariableDeclaration(node) { - return node.kind === 225 /* VariableDeclaration */; + return node.kind === 226 /* VariableDeclaration */; } ts.isVariableDeclaration = isVariableDeclaration; function isVariableDeclarationList(node) { - return node.kind === 226 /* VariableDeclarationList */; + return node.kind === 227 /* VariableDeclarationList */; } ts.isVariableDeclarationList = isVariableDeclarationList; function isCaseBlock(node) { - return node.kind === 234 /* CaseBlock */; + return node.kind === 235 /* CaseBlock */; } ts.isCaseBlock = isCaseBlock; function isModuleBody(node) { var kind = node.kind; - return kind === 233 /* ModuleBlock */ - || kind === 232 /* ModuleDeclaration */ - || kind === 70 /* Identifier */; + return kind === 234 /* ModuleBlock */ + || kind === 233 /* ModuleDeclaration */ + || kind === 71 /* Identifier */; } ts.isModuleBody = isModuleBody; function isNamespaceBody(node) { var kind = node.kind; - return kind === 233 /* ModuleBlock */ - || kind === 232 /* ModuleDeclaration */; + return kind === 234 /* ModuleBlock */ + || kind === 233 /* ModuleDeclaration */; } ts.isNamespaceBody = isNamespaceBody; function isJSDocNamespaceBody(node) { var kind = node.kind; - return kind === 70 /* Identifier */ - || kind === 232 /* ModuleDeclaration */; + return kind === 71 /* Identifier */ + || kind === 233 /* ModuleDeclaration */; } ts.isJSDocNamespaceBody = isJSDocNamespaceBody; function isImportEqualsDeclaration(node) { - return node.kind === 236 /* ImportEqualsDeclaration */; + return node.kind === 237 /* ImportEqualsDeclaration */; } ts.isImportEqualsDeclaration = isImportEqualsDeclaration; function isImportClause(node) { - return node.kind === 238 /* ImportClause */; + return node.kind === 239 /* ImportClause */; } ts.isImportClause = isImportClause; function isNamedImportBindings(node) { var kind = node.kind; - return kind === 240 /* NamedImports */ - || kind === 239 /* NamespaceImport */; + return kind === 241 /* NamedImports */ + || kind === 240 /* NamespaceImport */; } ts.isNamedImportBindings = isNamedImportBindings; function isImportSpecifier(node) { - return node.kind === 241 /* ImportSpecifier */; + return node.kind === 242 /* ImportSpecifier */; } ts.isImportSpecifier = isImportSpecifier; function isNamedExports(node) { - return node.kind === 244 /* NamedExports */; + return node.kind === 245 /* NamedExports */; } ts.isNamedExports = isNamedExports; function isExportSpecifier(node) { - return node.kind === 245 /* ExportSpecifier */; + return node.kind === 246 /* ExportSpecifier */; } ts.isExportSpecifier = isExportSpecifier; function isModuleOrEnumDeclaration(node) { - return node.kind === 232 /* ModuleDeclaration */ || node.kind === 231 /* EnumDeclaration */; + return node.kind === 233 /* ModuleDeclaration */ || node.kind === 232 /* EnumDeclaration */; } ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration; function isDeclarationKind(kind) { - return kind === 186 /* ArrowFunction */ - || kind === 175 /* BindingElement */ - || kind === 228 /* ClassDeclaration */ - || kind === 198 /* ClassExpression */ - || kind === 151 /* Constructor */ - || kind === 231 /* EnumDeclaration */ - || kind === 263 /* EnumMember */ - || kind === 245 /* ExportSpecifier */ - || kind === 227 /* FunctionDeclaration */ - || kind === 185 /* FunctionExpression */ - || kind === 152 /* GetAccessor */ - || kind === 238 /* ImportClause */ - || kind === 236 /* ImportEqualsDeclaration */ - || kind === 241 /* ImportSpecifier */ - || kind === 229 /* InterfaceDeclaration */ - || kind === 252 /* JsxAttribute */ - || kind === 150 /* MethodDeclaration */ - || kind === 149 /* MethodSignature */ - || kind === 232 /* ModuleDeclaration */ - || kind === 235 /* NamespaceExportDeclaration */ - || kind === 239 /* NamespaceImport */ - || kind === 145 /* Parameter */ - || kind === 260 /* PropertyAssignment */ - || kind === 148 /* PropertyDeclaration */ - || kind === 147 /* PropertySignature */ - || kind === 153 /* SetAccessor */ - || kind === 261 /* ShorthandPropertyAssignment */ - || kind === 230 /* TypeAliasDeclaration */ - || kind === 144 /* TypeParameter */ - || kind === 225 /* VariableDeclaration */ - || kind === 289 /* JSDocTypedefTag */; + return kind === 187 /* ArrowFunction */ + || kind === 176 /* BindingElement */ + || kind === 229 /* ClassDeclaration */ + || kind === 199 /* ClassExpression */ + || kind === 152 /* Constructor */ + || kind === 232 /* EnumDeclaration */ + || kind === 264 /* EnumMember */ + || kind === 246 /* ExportSpecifier */ + || kind === 228 /* FunctionDeclaration */ + || kind === 186 /* FunctionExpression */ + || kind === 153 /* GetAccessor */ + || kind === 239 /* ImportClause */ + || kind === 237 /* ImportEqualsDeclaration */ + || kind === 242 /* ImportSpecifier */ + || kind === 230 /* InterfaceDeclaration */ + || kind === 253 /* JsxAttribute */ + || kind === 151 /* MethodDeclaration */ + || kind === 150 /* MethodSignature */ + || kind === 233 /* ModuleDeclaration */ + || kind === 236 /* NamespaceExportDeclaration */ + || kind === 240 /* NamespaceImport */ + || kind === 146 /* Parameter */ + || kind === 261 /* PropertyAssignment */ + || kind === 149 /* PropertyDeclaration */ + || kind === 148 /* PropertySignature */ + || kind === 154 /* SetAccessor */ + || kind === 262 /* ShorthandPropertyAssignment */ + || kind === 231 /* TypeAliasDeclaration */ + || kind === 145 /* TypeParameter */ + || kind === 226 /* VariableDeclaration */ + || kind === 290 /* JSDocTypedefTag */; } function isDeclarationStatementKind(kind) { - return kind === 227 /* FunctionDeclaration */ - || kind === 246 /* MissingDeclaration */ - || kind === 228 /* ClassDeclaration */ - || kind === 229 /* InterfaceDeclaration */ - || kind === 230 /* TypeAliasDeclaration */ - || kind === 231 /* EnumDeclaration */ - || kind === 232 /* ModuleDeclaration */ - || kind === 237 /* ImportDeclaration */ - || kind === 236 /* ImportEqualsDeclaration */ - || kind === 243 /* ExportDeclaration */ - || kind === 242 /* ExportAssignment */ - || kind === 235 /* NamespaceExportDeclaration */; + return kind === 228 /* FunctionDeclaration */ + || kind === 247 /* MissingDeclaration */ + || kind === 229 /* ClassDeclaration */ + || kind === 230 /* InterfaceDeclaration */ + || kind === 231 /* TypeAliasDeclaration */ + || kind === 232 /* EnumDeclaration */ + || kind === 233 /* ModuleDeclaration */ + || kind === 238 /* ImportDeclaration */ + || kind === 237 /* ImportEqualsDeclaration */ + || kind === 244 /* ExportDeclaration */ + || kind === 243 /* ExportAssignment */ + || kind === 236 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 217 /* BreakStatement */ - || kind === 216 /* ContinueStatement */ - || kind === 224 /* DebuggerStatement */ - || kind === 211 /* DoStatement */ - || kind === 209 /* ExpressionStatement */ - || kind === 208 /* EmptyStatement */ - || kind === 214 /* ForInStatement */ - || kind === 215 /* ForOfStatement */ - || kind === 213 /* ForStatement */ - || kind === 210 /* IfStatement */ - || kind === 221 /* LabeledStatement */ - || kind === 218 /* ReturnStatement */ - || kind === 220 /* SwitchStatement */ - || kind === 222 /* ThrowStatement */ - || kind === 223 /* TryStatement */ - || kind === 207 /* VariableStatement */ - || kind === 212 /* WhileStatement */ - || kind === 219 /* WithStatement */ - || kind === 294 /* NotEmittedStatement */ - || kind === 297 /* EndOfDeclarationMarker */ - || kind === 296 /* MergeDeclarationMarker */; + return kind === 218 /* BreakStatement */ + || kind === 217 /* ContinueStatement */ + || kind === 225 /* DebuggerStatement */ + || kind === 212 /* DoStatement */ + || kind === 210 /* ExpressionStatement */ + || kind === 209 /* EmptyStatement */ + || kind === 215 /* ForInStatement */ + || kind === 216 /* ForOfStatement */ + || kind === 214 /* ForStatement */ + || kind === 211 /* IfStatement */ + || kind === 222 /* LabeledStatement */ + || kind === 219 /* ReturnStatement */ + || kind === 221 /* SwitchStatement */ + || kind === 223 /* ThrowStatement */ + || kind === 224 /* TryStatement */ + || kind === 208 /* VariableStatement */ + || kind === 213 /* WhileStatement */ + || kind === 220 /* WithStatement */ + || kind === 295 /* NotEmittedStatement */ + || kind === 298 /* EndOfDeclarationMarker */ + || kind === 297 /* MergeDeclarationMarker */; } function isDeclaration(node) { return isDeclarationKind(node.kind); @@ -10392,104 +10410,104 @@ var ts; var kind = node.kind; return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) - || kind === 206 /* Block */; + || kind === 207 /* Block */; } ts.isStatement = isStatement; // Module references function isModuleReference(node) { var kind = node.kind; - return kind === 247 /* ExternalModuleReference */ - || kind === 142 /* QualifiedName */ - || kind === 70 /* Identifier */; + return kind === 248 /* ExternalModuleReference */ + || kind === 143 /* QualifiedName */ + || kind === 71 /* Identifier */; } ts.isModuleReference = isModuleReference; // JSX function isJsxOpeningElement(node) { - return node.kind === 250 /* JsxOpeningElement */; + return node.kind === 251 /* JsxOpeningElement */; } ts.isJsxOpeningElement = isJsxOpeningElement; function isJsxClosingElement(node) { - return node.kind === 251 /* JsxClosingElement */; + return node.kind === 252 /* JsxClosingElement */; } ts.isJsxClosingElement = isJsxClosingElement; function isJsxTagNameExpression(node) { var kind = node.kind; - return kind === 98 /* ThisKeyword */ - || kind === 70 /* Identifier */ - || kind === 178 /* PropertyAccessExpression */; + return kind === 99 /* ThisKeyword */ + || kind === 71 /* Identifier */ + || kind === 179 /* PropertyAccessExpression */; } ts.isJsxTagNameExpression = isJsxTagNameExpression; function isJsxChild(node) { var kind = node.kind; - return kind === 248 /* JsxElement */ - || kind === 255 /* JsxExpression */ - || kind === 249 /* JsxSelfClosingElement */ + return kind === 249 /* JsxElement */ + || kind === 256 /* JsxExpression */ + || kind === 250 /* JsxSelfClosingElement */ || kind === 10 /* JsxText */; } ts.isJsxChild = isJsxChild; function isJsxAttributes(node) { var kind = node.kind; - return kind === 253 /* JsxAttributes */; + return kind === 254 /* JsxAttributes */; } ts.isJsxAttributes = isJsxAttributes; function isJsxAttributeLike(node) { var kind = node.kind; - return kind === 252 /* JsxAttribute */ - || kind === 254 /* JsxSpreadAttribute */; + return kind === 253 /* JsxAttribute */ + || kind === 255 /* JsxSpreadAttribute */; } ts.isJsxAttributeLike = isJsxAttributeLike; function isJsxSpreadAttribute(node) { - return node.kind === 254 /* JsxSpreadAttribute */; + return node.kind === 255 /* JsxSpreadAttribute */; } ts.isJsxSpreadAttribute = isJsxSpreadAttribute; function isJsxAttribute(node) { - return node.kind === 252 /* JsxAttribute */; + return node.kind === 253 /* JsxAttribute */; } ts.isJsxAttribute = isJsxAttribute; function isStringLiteralOrJsxExpression(node) { var kind = node.kind; return kind === 9 /* StringLiteral */ - || kind === 255 /* JsxExpression */; + || kind === 256 /* JsxExpression */; } ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression; function isJsxOpeningLikeElement(node) { var kind = node.kind; - return kind === 250 /* JsxOpeningElement */ - || kind === 249 /* JsxSelfClosingElement */; + return kind === 251 /* JsxOpeningElement */ + || kind === 250 /* JsxSelfClosingElement */; } ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement; // Clauses function isCaseOrDefaultClause(node) { var kind = node.kind; - return kind === 256 /* CaseClause */ - || kind === 257 /* DefaultClause */; + return kind === 257 /* CaseClause */ + || kind === 258 /* DefaultClause */; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isHeritageClause(node) { - return node.kind === 258 /* HeritageClause */; + return node.kind === 259 /* HeritageClause */; } ts.isHeritageClause = isHeritageClause; function isCatchClause(node) { - return node.kind === 259 /* CatchClause */; + return node.kind === 260 /* CatchClause */; } ts.isCatchClause = isCatchClause; // Property assignments function isPropertyAssignment(node) { - return node.kind === 260 /* PropertyAssignment */; + return node.kind === 261 /* PropertyAssignment */; } ts.isPropertyAssignment = isPropertyAssignment; function isShorthandPropertyAssignment(node) { - return node.kind === 261 /* ShorthandPropertyAssignment */; + return node.kind === 262 /* ShorthandPropertyAssignment */; } ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment; // Enum function isEnumMember(node) { - return node.kind === 263 /* EnumMember */; + return node.kind === 264 /* EnumMember */; } ts.isEnumMember = isEnumMember; // Top-level nodes function isSourceFile(node) { - return node.kind === 264 /* SourceFile */; + return node.kind === 265 /* SourceFile */; } ts.isSourceFile = isSourceFile; function isWatchSet(options) { @@ -10720,9 +10738,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 144 /* TypeParameter */) { + if (d && d.kind === 145 /* TypeParameter */) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) { return current; } } @@ -10730,11 +10748,11 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 151 /* Constructor */ && ts.isClassLike(node.parent.parent); + return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 175 /* BindingElement */ || ts.isBindingPattern(node))) { + while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) { node = node.parent; } return node; @@ -10742,14 +10760,14 @@ var ts; function getCombinedModifierFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = ts.getModifierFlags(node); - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 226 /* VariableDeclarationList */) { + if (node && node.kind === 227 /* VariableDeclarationList */) { flags |= ts.getModifierFlags(node); node = node.parent; } - if (node && node.kind === 207 /* VariableStatement */) { + if (node && node.kind === 208 /* VariableStatement */) { flags |= ts.getModifierFlags(node); } return flags; @@ -10765,14 +10783,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 226 /* VariableDeclarationList */) { + if (node && node.kind === 227 /* VariableDeclarationList */) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 207 /* VariableStatement */) { + if (node && node.kind === 208 /* VariableStatement */) { flags |= node.flags; } return flags; @@ -10965,7 +10983,7 @@ var ts; } // Identifiers function createIdentifier(text) { - var node = createSynthesizedNode(70 /* Identifier */); + var node = createSynthesizedNode(71 /* Identifier */); node.text = ts.escapeIdentifier(text); node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */; node.autoGenerateKind = 0 /* None */; @@ -11021,28 +11039,28 @@ var ts; ts.createToken = createToken; // Reserved words function createSuper() { - return createSynthesizedNode(96 /* SuperKeyword */); + return createSynthesizedNode(97 /* SuperKeyword */); } ts.createSuper = createSuper; function createThis() { - return createSynthesizedNode(98 /* ThisKeyword */); + return createSynthesizedNode(99 /* ThisKeyword */); } ts.createThis = createThis; function createNull() { - return createSynthesizedNode(94 /* NullKeyword */); + return createSynthesizedNode(95 /* NullKeyword */); } ts.createNull = createNull; function createTrue() { - return createSynthesizedNode(100 /* TrueKeyword */); + return createSynthesizedNode(101 /* TrueKeyword */); } ts.createTrue = createTrue; function createFalse() { - return createSynthesizedNode(85 /* FalseKeyword */); + return createSynthesizedNode(86 /* FalseKeyword */); } ts.createFalse = createFalse; // Names function createQualifiedName(left, right) { - var node = createSynthesizedNode(142 /* QualifiedName */); + var node = createSynthesizedNode(143 /* QualifiedName */); node.left = left; node.right = asName(right); return node; @@ -11056,7 +11074,7 @@ var ts; } ts.updateQualifiedName = updateQualifiedName; function createComputedPropertyName(expression) { - var node = createSynthesizedNode(143 /* ComputedPropertyName */); + var node = createSynthesizedNode(144 /* ComputedPropertyName */); node.expression = expression; return node; } @@ -11084,7 +11102,7 @@ var ts; : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(159 /* FunctionType */, typeParameters, parameters, type); + return createSignatureDeclaration(160 /* FunctionType */, typeParameters, parameters, type); } ts.createFunctionTypeNode = createFunctionTypeNode; function updateFunctionTypeNode(node, typeParameters, parameters, type) { @@ -11092,7 +11110,7 @@ var ts; } ts.updateFunctionTypeNode = updateFunctionTypeNode; function createConstructorTypeNode(typeParameters, parameters, type) { - return createSignatureDeclaration(160 /* ConstructorType */, typeParameters, parameters, type); + return createSignatureDeclaration(161 /* ConstructorType */, typeParameters, parameters, type); } ts.createConstructorTypeNode = createConstructorTypeNode; function updateConstructorTypeNode(node, typeParameters, parameters, type) { @@ -11100,7 +11118,7 @@ var ts; } ts.updateConstructorTypeNode = updateConstructorTypeNode; function createCallSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(154 /* CallSignature */, typeParameters, parameters, type); + return createSignatureDeclaration(155 /* CallSignature */, typeParameters, parameters, type); } ts.createCallSignatureDeclaration = createCallSignatureDeclaration; function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { @@ -11108,7 +11126,7 @@ var ts; } ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration; function createConstructSignatureDeclaration(typeParameters, parameters, type) { - return createSignatureDeclaration(155 /* ConstructSignature */, typeParameters, parameters, type); + return createSignatureDeclaration(156 /* ConstructSignature */, typeParameters, parameters, type); } ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration; function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { @@ -11116,7 +11134,7 @@ var ts; } ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration; function createMethodSignature(typeParameters, parameters, type, name, questionToken) { - var methodSignature = createSignatureDeclaration(149 /* MethodSignature */, typeParameters, parameters, type); + var methodSignature = createSignatureDeclaration(150 /* MethodSignature */, typeParameters, parameters, type); methodSignature.name = asName(name); methodSignature.questionToken = questionToken; return methodSignature; @@ -11138,11 +11156,11 @@ var ts; } ts.createKeywordTypeNode = createKeywordTypeNode; function createThisTypeNode() { - return createSynthesizedNode(168 /* ThisType */); + return createSynthesizedNode(169 /* ThisType */); } ts.createThisTypeNode = createThisTypeNode; function createLiteralTypeNode(literal) { - var literalTypeNode = createSynthesizedNode(172 /* LiteralType */); + var literalTypeNode = createSynthesizedNode(173 /* LiteralType */); literalTypeNode.literal = literal; return literalTypeNode; } @@ -11154,7 +11172,7 @@ var ts; } ts.updateLiteralTypeNode = updateLiteralTypeNode; function createTypeReferenceNode(typeName, typeArguments) { - var typeReference = createSynthesizedNode(158 /* TypeReference */); + var typeReference = createSynthesizedNode(159 /* TypeReference */); typeReference.typeName = asName(typeName); typeReference.typeArguments = asNodeArray(typeArguments); return typeReference; @@ -11168,7 +11186,7 @@ var ts; } ts.updateTypeReferenceNode = updateTypeReferenceNode; function createTypePredicateNode(parameterName, type) { - var typePredicateNode = createSynthesizedNode(157 /* TypePredicate */); + var typePredicateNode = createSynthesizedNode(158 /* TypePredicate */); typePredicateNode.parameterName = asName(parameterName); typePredicateNode.type = type; return typePredicateNode; @@ -11182,7 +11200,7 @@ var ts; } ts.updateTypePredicateNode = updateTypePredicateNode; function createTypeQueryNode(exprName) { - var typeQueryNode = createSynthesizedNode(161 /* TypeQuery */); + var typeQueryNode = createSynthesizedNode(162 /* TypeQuery */); typeQueryNode.exprName = exprName; return typeQueryNode; } @@ -11192,7 +11210,7 @@ var ts; } ts.updateTypeQueryNode = updateTypeQueryNode; function createArrayTypeNode(elementType) { - var arrayTypeNode = createSynthesizedNode(163 /* ArrayType */); + var arrayTypeNode = createSynthesizedNode(164 /* ArrayType */); arrayTypeNode.elementType = elementType; return arrayTypeNode; } @@ -11216,7 +11234,7 @@ var ts; } ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode; function createTypeLiteralNode(members) { - var typeLiteralNode = createSynthesizedNode(162 /* TypeLiteral */); + var typeLiteralNode = createSynthesizedNode(163 /* TypeLiteral */); typeLiteralNode.members = createNodeArray(members); return typeLiteralNode; } @@ -11228,7 +11246,7 @@ var ts; } ts.updateTypeLiteralNode = updateTypeLiteralNode; function createTupleTypeNode(elementTypes) { - var tupleTypeNode = createSynthesizedNode(164 /* TupleType */); + var tupleTypeNode = createSynthesizedNode(165 /* TupleType */); tupleTypeNode.elementTypes = createNodeArray(elementTypes); return tupleTypeNode; } @@ -11240,7 +11258,7 @@ var ts; } ts.updateTypleTypeNode = updateTypleTypeNode; function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) { - var mappedTypeNode = createSynthesizedNode(171 /* MappedType */); + var mappedTypeNode = createSynthesizedNode(172 /* MappedType */); mappedTypeNode.readonlyToken = readonlyToken; mappedTypeNode.typeParameter = typeParameter; mappedTypeNode.questionToken = questionToken; @@ -11258,8 +11276,8 @@ var ts; } ts.updateMappedTypeNode = updateMappedTypeNode; function createTypeOperatorNode(type) { - var typeOperatorNode = createSynthesizedNode(169 /* TypeOperator */); - typeOperatorNode.operator = 126 /* KeyOfKeyword */; + var typeOperatorNode = createSynthesizedNode(170 /* TypeOperator */); + typeOperatorNode.operator = 127 /* KeyOfKeyword */; typeOperatorNode.type = type; return typeOperatorNode; } @@ -11269,7 +11287,7 @@ var ts; } ts.updateTypeOperatorNode = updateTypeOperatorNode; function createIndexedAccessTypeNode(objectType, indexType) { - var indexedAccessTypeNode = createSynthesizedNode(170 /* IndexedAccessType */); + var indexedAccessTypeNode = createSynthesizedNode(171 /* IndexedAccessType */); indexedAccessTypeNode.objectType = objectType; indexedAccessTypeNode.indexType = indexType; return indexedAccessTypeNode; @@ -11284,7 +11302,7 @@ var ts; ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode; // Type Declarations function createTypeParameterDeclaration(name, constraint, defaultType) { - var typeParameter = createSynthesizedNode(144 /* TypeParameter */); + var typeParameter = createSynthesizedNode(145 /* TypeParameter */); typeParameter.name = asName(name); typeParameter.constraint = constraint; typeParameter.default = defaultType; @@ -11301,7 +11319,7 @@ var ts; ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration; // Signature elements function createPropertySignature(name, questionToken, type, initializer) { - var propertySignature = createSynthesizedNode(147 /* PropertySignature */); + var propertySignature = createSynthesizedNode(148 /* PropertySignature */); propertySignature.name = asName(name); propertySignature.questionToken = questionToken; propertySignature.type = type; @@ -11319,7 +11337,7 @@ var ts; } ts.updatePropertySignature = updatePropertySignature; function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) { - var indexSignature = createSynthesizedNode(156 /* IndexSignature */); + var indexSignature = createSynthesizedNode(157 /* IndexSignature */); indexSignature.decorators = asNodeArray(decorators); indexSignature.modifiers = asNodeArray(modifiers); indexSignature.parameters = createNodeArray(parameters); @@ -11338,7 +11356,7 @@ var ts; ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration; // Signature elements function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - var node = createSynthesizedNode(145 /* Parameter */); + var node = createSynthesizedNode(146 /* Parameter */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; @@ -11362,7 +11380,7 @@ var ts; } ts.updateParameter = updateParameter; function createDecorator(expression) { - var node = createSynthesizedNode(146 /* Decorator */); + var node = createSynthesizedNode(147 /* Decorator */); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -11375,7 +11393,7 @@ var ts; ts.updateDecorator = updateDecorator; // Type members function createProperty(decorators, modifiers, name, questionToken, type, initializer) { - var node = createSynthesizedNode(148 /* PropertyDeclaration */); + var node = createSynthesizedNode(149 /* PropertyDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11396,7 +11414,7 @@ var ts; } ts.updateProperty = updateProperty; function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(150 /* MethodDeclaration */); + var node = createSynthesizedNode(151 /* MethodDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -11423,7 +11441,7 @@ var ts; } ts.updateMethod = updateMethod; function createConstructor(decorators, modifiers, parameters, body) { - var node = createSynthesizedNode(151 /* Constructor */); + var node = createSynthesizedNode(152 /* Constructor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.typeParameters = undefined; @@ -11443,7 +11461,7 @@ var ts; } ts.updateConstructor = updateConstructor; function createGetAccessor(decorators, modifiers, name, parameters, type, body) { - var node = createSynthesizedNode(152 /* GetAccessor */); + var node = createSynthesizedNode(153 /* GetAccessor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11466,7 +11484,7 @@ var ts; } ts.updateGetAccessor = updateGetAccessor; function createSetAccessor(decorators, modifiers, name, parameters, body) { - var node = createSynthesizedNode(153 /* SetAccessor */); + var node = createSynthesizedNode(154 /* SetAccessor */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11488,7 +11506,7 @@ var ts; ts.updateSetAccessor = updateSetAccessor; // Binding Patterns function createObjectBindingPattern(elements) { - var node = createSynthesizedNode(173 /* ObjectBindingPattern */); + var node = createSynthesizedNode(174 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); return node; } @@ -11500,7 +11518,7 @@ var ts; } ts.updateObjectBindingPattern = updateObjectBindingPattern; function createArrayBindingPattern(elements) { - var node = createSynthesizedNode(174 /* ArrayBindingPattern */); + var node = createSynthesizedNode(175 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); return node; } @@ -11512,7 +11530,7 @@ var ts; } ts.updateArrayBindingPattern = updateArrayBindingPattern; function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - var node = createSynthesizedNode(175 /* BindingElement */); + var node = createSynthesizedNode(176 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -11531,7 +11549,7 @@ var ts; ts.updateBindingElement = updateBindingElement; // Expression function createArrayLiteral(elements, multiLine) { - var node = createSynthesizedNode(176 /* ArrayLiteralExpression */); + var node = createSynthesizedNode(177 /* ArrayLiteralExpression */); node.elements = ts.parenthesizeListElements(createNodeArray(elements)); if (multiLine) { node.multiLine = true; @@ -11546,7 +11564,7 @@ var ts; } ts.updateArrayLiteral = updateArrayLiteral; function createObjectLiteral(properties, multiLine) { - var node = createSynthesizedNode(177 /* ObjectLiteralExpression */); + var node = createSynthesizedNode(178 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); if (multiLine) { node.multiLine = true; @@ -11561,7 +11579,7 @@ var ts; } ts.updateObjectLiteral = updateObjectLiteral; function createPropertyAccess(expression, name) { - var node = createSynthesizedNode(178 /* PropertyAccessExpression */); + var node = createSynthesizedNode(179 /* PropertyAccessExpression */); node.expression = ts.parenthesizeForAccess(expression); node.name = asName(name); setEmitFlags(node, 65536 /* NoIndentation */); @@ -11578,7 +11596,7 @@ var ts; } ts.updatePropertyAccess = updatePropertyAccess; function createElementAccess(expression, index) { - var node = createSynthesizedNode(179 /* ElementAccessExpression */); + var node = createSynthesizedNode(180 /* ElementAccessExpression */); node.expression = ts.parenthesizeForAccess(expression); node.argumentExpression = asExpression(index); return node; @@ -11592,7 +11610,7 @@ var ts; } ts.updateElementAccess = updateElementAccess; function createCall(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(180 /* CallExpression */); + var node = createSynthesizedNode(181 /* CallExpression */); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray)); @@ -11608,7 +11626,7 @@ var ts; } ts.updateCall = updateCall; function createNew(expression, typeArguments, argumentsArray) { - var node = createSynthesizedNode(181 /* NewExpression */); + var node = createSynthesizedNode(182 /* NewExpression */); node.expression = ts.parenthesizeForNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined; @@ -11624,7 +11642,7 @@ var ts; } ts.updateNew = updateNew; function createTaggedTemplate(tag, template) { - var node = createSynthesizedNode(182 /* TaggedTemplateExpression */); + var node = createSynthesizedNode(183 /* TaggedTemplateExpression */); node.tag = ts.parenthesizeForAccess(tag); node.template = template; return node; @@ -11638,7 +11656,7 @@ var ts; } ts.updateTaggedTemplate = updateTaggedTemplate; function createTypeAssertion(type, expression) { - var node = createSynthesizedNode(183 /* TypeAssertionExpression */); + var node = createSynthesizedNode(184 /* TypeAssertionExpression */); node.type = type; node.expression = ts.parenthesizePrefixOperand(expression); return node; @@ -11652,7 +11670,7 @@ var ts; } ts.updateTypeAssertion = updateTypeAssertion; function createParen(expression) { - var node = createSynthesizedNode(184 /* ParenthesizedExpression */); + var node = createSynthesizedNode(185 /* ParenthesizedExpression */); node.expression = expression; return node; } @@ -11664,7 +11682,7 @@ var ts; } ts.updateParen = updateParen; function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(185 /* FunctionExpression */); + var node = createSynthesizedNode(186 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -11688,12 +11706,12 @@ var ts; } ts.updateFunctionExpression = updateFunctionExpression; function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - var node = createSynthesizedNode(186 /* ArrowFunction */); + var node = createSynthesizedNode(187 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35 /* EqualsGreaterThanToken */); + node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(36 /* EqualsGreaterThanToken */); node.body = ts.parenthesizeConciseBody(body); return node; } @@ -11709,7 +11727,7 @@ var ts; } ts.updateArrowFunction = updateArrowFunction; function createDelete(expression) { - var node = createSynthesizedNode(187 /* DeleteExpression */); + var node = createSynthesizedNode(188 /* DeleteExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11721,7 +11739,7 @@ var ts; } ts.updateDelete = updateDelete; function createTypeOf(expression) { - var node = createSynthesizedNode(188 /* TypeOfExpression */); + var node = createSynthesizedNode(189 /* TypeOfExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11733,7 +11751,7 @@ var ts; } ts.updateTypeOf = updateTypeOf; function createVoid(expression) { - var node = createSynthesizedNode(189 /* VoidExpression */); + var node = createSynthesizedNode(190 /* VoidExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11745,7 +11763,7 @@ var ts; } ts.updateVoid = updateVoid; function createAwait(expression) { - var node = createSynthesizedNode(190 /* AwaitExpression */); + var node = createSynthesizedNode(191 /* AwaitExpression */); node.expression = ts.parenthesizePrefixOperand(expression); return node; } @@ -11757,7 +11775,7 @@ var ts; } ts.updateAwait = updateAwait; function createPrefix(operator, operand) { - var node = createSynthesizedNode(191 /* PrefixUnaryExpression */); + var node = createSynthesizedNode(192 /* PrefixUnaryExpression */); node.operator = operator; node.operand = ts.parenthesizePrefixOperand(operand); return node; @@ -11770,7 +11788,7 @@ var ts; } ts.updatePrefix = updatePrefix; function createPostfix(operand, operator) { - var node = createSynthesizedNode(192 /* PostfixUnaryExpression */); + var node = createSynthesizedNode(193 /* PostfixUnaryExpression */); node.operand = ts.parenthesizePostfixOperand(operand); node.operator = operator; return node; @@ -11783,7 +11801,7 @@ var ts; } ts.updatePostfix = updatePostfix; function createBinary(left, operator, right) { - var node = createSynthesizedNode(193 /* BinaryExpression */); + var node = createSynthesizedNode(194 /* BinaryExpression */); var operatorToken = asToken(operator); var operatorKind = operatorToken.kind; node.left = ts.parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined); @@ -11800,11 +11818,11 @@ var ts; } ts.updateBinary = updateBinary; function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) { - var node = createSynthesizedNode(194 /* ConditionalExpression */); + var node = createSynthesizedNode(195 /* ConditionalExpression */); node.condition = ts.parenthesizeForConditionalHead(condition); - node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54 /* QuestionToken */); + node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(55 /* QuestionToken */); node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue); - node.colonToken = whenFalse ? colonToken : createToken(55 /* ColonToken */); + node.colonToken = whenFalse ? colonToken : createToken(56 /* ColonToken */); node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse); return node; } @@ -11818,7 +11836,7 @@ var ts; } ts.updateConditional = updateConditional; function createTemplateExpression(head, templateSpans) { - var node = createSynthesizedNode(195 /* TemplateExpression */); + var node = createSynthesizedNode(196 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); return node; @@ -11832,9 +11850,9 @@ var ts; } ts.updateTemplateExpression = updateTemplateExpression; function createYield(asteriskTokenOrExpression, expression) { - var node = createSynthesizedNode(196 /* YieldExpression */); - node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined; - node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 /* AsteriskToken */ ? asteriskTokenOrExpression : expression; + var node = createSynthesizedNode(197 /* YieldExpression */); + node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 39 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined; + node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 39 /* AsteriskToken */ ? asteriskTokenOrExpression : expression; return node; } ts.createYield = createYield; @@ -11846,7 +11864,7 @@ var ts; } ts.updateYield = updateYield; function createSpread(expression) { - var node = createSynthesizedNode(197 /* SpreadElement */); + var node = createSynthesizedNode(198 /* SpreadElement */); node.expression = ts.parenthesizeExpressionForList(expression); return node; } @@ -11858,7 +11876,7 @@ var ts; } ts.updateSpread = updateSpread; function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(198 /* ClassExpression */); + var node = createSynthesizedNode(199 /* ClassExpression */); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -11879,11 +11897,11 @@ var ts; } ts.updateClassExpression = updateClassExpression; function createOmittedExpression() { - return createSynthesizedNode(199 /* OmittedExpression */); + return createSynthesizedNode(200 /* OmittedExpression */); } ts.createOmittedExpression = createOmittedExpression; function createExpressionWithTypeArguments(typeArguments, expression) { - var node = createSynthesizedNode(200 /* ExpressionWithTypeArguments */); + var node = createSynthesizedNode(201 /* ExpressionWithTypeArguments */); node.expression = ts.parenthesizeForAccess(expression); node.typeArguments = asNodeArray(typeArguments); return node; @@ -11897,7 +11915,7 @@ var ts; } ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments; function createAsExpression(expression, type) { - var node = createSynthesizedNode(201 /* AsExpression */); + var node = createSynthesizedNode(202 /* AsExpression */); node.expression = expression; node.type = type; return node; @@ -11911,7 +11929,7 @@ var ts; } ts.updateAsExpression = updateAsExpression; function createNonNullExpression(expression) { - var node = createSynthesizedNode(202 /* NonNullExpression */); + var node = createSynthesizedNode(203 /* NonNullExpression */); node.expression = ts.parenthesizeForAccess(expression); return node; } @@ -11924,7 +11942,7 @@ var ts; ts.updateNonNullExpression = updateNonNullExpression; // Misc function createTemplateSpan(expression, literal) { - var node = createSynthesizedNode(204 /* TemplateSpan */); + var node = createSynthesizedNode(205 /* TemplateSpan */); node.expression = expression; node.literal = literal; return node; @@ -11939,7 +11957,7 @@ var ts; ts.updateTemplateSpan = updateTemplateSpan; // Element function createBlock(statements, multiLine) { - var block = createSynthesizedNode(206 /* Block */); + var block = createSynthesizedNode(207 /* Block */); block.statements = createNodeArray(statements); if (multiLine) block.multiLine = multiLine; @@ -11953,7 +11971,7 @@ var ts; } ts.updateBlock = updateBlock; function createVariableStatement(modifiers, declarationList) { - var node = createSynthesizedNode(207 /* VariableStatement */); + var node = createSynthesizedNode(208 /* VariableStatement */); node.decorators = undefined; node.modifiers = asNodeArray(modifiers); node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; @@ -11968,7 +11986,7 @@ var ts; } ts.updateVariableStatement = updateVariableStatement; function createVariableDeclarationList(declarations, flags) { - var node = createSynthesizedNode(226 /* VariableDeclarationList */); + var node = createSynthesizedNode(227 /* VariableDeclarationList */); node.flags |= flags; node.declarations = createNodeArray(declarations); return node; @@ -11981,7 +11999,7 @@ var ts; } ts.updateVariableDeclarationList = updateVariableDeclarationList; function createVariableDeclaration(name, type, initializer) { - var node = createSynthesizedNode(225 /* VariableDeclaration */); + var node = createSynthesizedNode(226 /* VariableDeclaration */); node.name = asName(name); node.type = type; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -11997,11 +12015,11 @@ var ts; } ts.updateVariableDeclaration = updateVariableDeclaration; function createEmptyStatement() { - return createSynthesizedNode(208 /* EmptyStatement */); + return createSynthesizedNode(209 /* EmptyStatement */); } ts.createEmptyStatement = createEmptyStatement; function createStatement(expression) { - var node = createSynthesizedNode(209 /* ExpressionStatement */); + var node = createSynthesizedNode(210 /* ExpressionStatement */); node.expression = ts.parenthesizeExpressionForExpressionStatement(expression); return node; } @@ -12013,7 +12031,7 @@ var ts; } ts.updateStatement = updateStatement; function createIf(expression, thenStatement, elseStatement) { - var node = createSynthesizedNode(210 /* IfStatement */); + var node = createSynthesizedNode(211 /* IfStatement */); node.expression = expression; node.thenStatement = thenStatement; node.elseStatement = elseStatement; @@ -12029,7 +12047,7 @@ var ts; } ts.updateIf = updateIf; function createDo(statement, expression) { - var node = createSynthesizedNode(211 /* DoStatement */); + var node = createSynthesizedNode(212 /* DoStatement */); node.statement = statement; node.expression = expression; return node; @@ -12043,7 +12061,7 @@ var ts; } ts.updateDo = updateDo; function createWhile(expression, statement) { - var node = createSynthesizedNode(212 /* WhileStatement */); + var node = createSynthesizedNode(213 /* WhileStatement */); node.expression = expression; node.statement = statement; return node; @@ -12057,7 +12075,7 @@ var ts; } ts.updateWhile = updateWhile; function createFor(initializer, condition, incrementor, statement) { - var node = createSynthesizedNode(213 /* ForStatement */); + var node = createSynthesizedNode(214 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -12075,7 +12093,7 @@ var ts; } ts.updateFor = updateFor; function createForIn(initializer, expression, statement) { - var node = createSynthesizedNode(214 /* ForInStatement */); + var node = createSynthesizedNode(215 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = statement; @@ -12091,7 +12109,7 @@ var ts; } ts.updateForIn = updateForIn; function createForOf(awaitModifier, initializer, expression, statement) { - var node = createSynthesizedNode(215 /* ForOfStatement */); + var node = createSynthesizedNode(216 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; @@ -12109,7 +12127,7 @@ var ts; } ts.updateForOf = updateForOf; function createContinue(label) { - var node = createSynthesizedNode(216 /* ContinueStatement */); + var node = createSynthesizedNode(217 /* ContinueStatement */); node.label = asName(label); return node; } @@ -12121,7 +12139,7 @@ var ts; } ts.updateContinue = updateContinue; function createBreak(label) { - var node = createSynthesizedNode(217 /* BreakStatement */); + var node = createSynthesizedNode(218 /* BreakStatement */); node.label = asName(label); return node; } @@ -12133,7 +12151,7 @@ var ts; } ts.updateBreak = updateBreak; function createReturn(expression) { - var node = createSynthesizedNode(218 /* ReturnStatement */); + var node = createSynthesizedNode(219 /* ReturnStatement */); node.expression = expression; return node; } @@ -12145,7 +12163,7 @@ var ts; } ts.updateReturn = updateReturn; function createWith(expression, statement) { - var node = createSynthesizedNode(219 /* WithStatement */); + var node = createSynthesizedNode(220 /* WithStatement */); node.expression = expression; node.statement = statement; return node; @@ -12159,7 +12177,7 @@ var ts; } ts.updateWith = updateWith; function createSwitch(expression, caseBlock) { - var node = createSynthesizedNode(220 /* SwitchStatement */); + var node = createSynthesizedNode(221 /* SwitchStatement */); node.expression = ts.parenthesizeExpressionForList(expression); node.caseBlock = caseBlock; return node; @@ -12173,7 +12191,7 @@ var ts; } ts.updateSwitch = updateSwitch; function createLabel(label, statement) { - var node = createSynthesizedNode(221 /* LabeledStatement */); + var node = createSynthesizedNode(222 /* LabeledStatement */); node.label = asName(label); node.statement = statement; return node; @@ -12187,7 +12205,7 @@ var ts; } ts.updateLabel = updateLabel; function createThrow(expression) { - var node = createSynthesizedNode(222 /* ThrowStatement */); + var node = createSynthesizedNode(223 /* ThrowStatement */); node.expression = expression; return node; } @@ -12199,7 +12217,7 @@ var ts; } ts.updateThrow = updateThrow; function createTry(tryBlock, catchClause, finallyBlock) { - var node = createSynthesizedNode(223 /* TryStatement */); + var node = createSynthesizedNode(224 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -12215,7 +12233,7 @@ var ts; } ts.updateTry = updateTry; function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - var node = createSynthesizedNode(227 /* FunctionDeclaration */); + var node = createSynthesizedNode(228 /* FunctionDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; @@ -12241,7 +12259,7 @@ var ts; } ts.updateFunctionDeclaration = updateFunctionDeclaration; function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) { - var node = createSynthesizedNode(228 /* ClassDeclaration */); + var node = createSynthesizedNode(229 /* ClassDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12263,7 +12281,7 @@ var ts; } ts.updateClassDeclaration = updateClassDeclaration; function createEnumDeclaration(decorators, modifiers, name, members) { - var node = createSynthesizedNode(231 /* EnumDeclaration */); + var node = createSynthesizedNode(232 /* EnumDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12281,7 +12299,7 @@ var ts; } ts.updateEnumDeclaration = updateEnumDeclaration; function createModuleDeclaration(decorators, modifiers, name, body, flags) { - var node = createSynthesizedNode(232 /* ModuleDeclaration */); + var node = createSynthesizedNode(233 /* ModuleDeclaration */); node.flags |= flags; node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); @@ -12300,7 +12318,7 @@ var ts; } ts.updateModuleDeclaration = updateModuleDeclaration; function createModuleBlock(statements) { - var node = createSynthesizedNode(233 /* ModuleBlock */); + var node = createSynthesizedNode(234 /* ModuleBlock */); node.statements = createNodeArray(statements); return node; } @@ -12312,7 +12330,7 @@ var ts; } ts.updateModuleBlock = updateModuleBlock; function createCaseBlock(clauses) { - var node = createSynthesizedNode(234 /* CaseBlock */); + var node = createSynthesizedNode(235 /* CaseBlock */); node.clauses = createNodeArray(clauses); return node; } @@ -12324,7 +12342,7 @@ var ts; } ts.updateCaseBlock = updateCaseBlock; function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) { - var node = createSynthesizedNode(236 /* ImportEqualsDeclaration */); + var node = createSynthesizedNode(237 /* ImportEqualsDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.name = asName(name); @@ -12342,7 +12360,7 @@ var ts; } ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration; function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) { - var node = createSynthesizedNode(237 /* ImportDeclaration */); + var node = createSynthesizedNode(238 /* ImportDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; @@ -12359,7 +12377,7 @@ var ts; } ts.updateImportDeclaration = updateImportDeclaration; function createImportClause(name, namedBindings) { - var node = createSynthesizedNode(238 /* ImportClause */); + var node = createSynthesizedNode(239 /* ImportClause */); node.name = name; node.namedBindings = namedBindings; return node; @@ -12373,7 +12391,7 @@ var ts; } ts.updateImportClause = updateImportClause; function createNamespaceImport(name) { - var node = createSynthesizedNode(239 /* NamespaceImport */); + var node = createSynthesizedNode(240 /* NamespaceImport */); node.name = name; return node; } @@ -12385,7 +12403,7 @@ var ts; } ts.updateNamespaceImport = updateNamespaceImport; function createNamedImports(elements) { - var node = createSynthesizedNode(240 /* NamedImports */); + var node = createSynthesizedNode(241 /* NamedImports */); node.elements = createNodeArray(elements); return node; } @@ -12397,7 +12415,7 @@ var ts; } ts.updateNamedImports = updateNamedImports; function createImportSpecifier(propertyName, name) { - var node = createSynthesizedNode(241 /* ImportSpecifier */); + var node = createSynthesizedNode(242 /* ImportSpecifier */); node.propertyName = propertyName; node.name = name; return node; @@ -12411,7 +12429,7 @@ var ts; } ts.updateImportSpecifier = updateImportSpecifier; function createExportAssignment(decorators, modifiers, isExportEquals, expression) { - var node = createSynthesizedNode(242 /* ExportAssignment */); + var node = createSynthesizedNode(243 /* ExportAssignment */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; @@ -12428,7 +12446,7 @@ var ts; } ts.updateExportAssignment = updateExportAssignment; function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) { - var node = createSynthesizedNode(243 /* ExportDeclaration */); + var node = createSynthesizedNode(244 /* ExportDeclaration */); node.decorators = asNodeArray(decorators); node.modifiers = asNodeArray(modifiers); node.exportClause = exportClause; @@ -12446,7 +12464,7 @@ var ts; } ts.updateExportDeclaration = updateExportDeclaration; function createNamedExports(elements) { - var node = createSynthesizedNode(244 /* NamedExports */); + var node = createSynthesizedNode(245 /* NamedExports */); node.elements = createNodeArray(elements); return node; } @@ -12458,7 +12476,7 @@ var ts; } ts.updateNamedExports = updateNamedExports; function createExportSpecifier(propertyName, name) { - var node = createSynthesizedNode(245 /* ExportSpecifier */); + var node = createSynthesizedNode(246 /* ExportSpecifier */); node.propertyName = asName(propertyName); node.name = asName(name); return node; @@ -12473,7 +12491,7 @@ var ts; ts.updateExportSpecifier = updateExportSpecifier; // Module references function createExternalModuleReference(expression) { - var node = createSynthesizedNode(247 /* ExternalModuleReference */); + var node = createSynthesizedNode(248 /* ExternalModuleReference */); node.expression = expression; return node; } @@ -12486,7 +12504,7 @@ var ts; ts.updateExternalModuleReference = updateExternalModuleReference; // JSX function createJsxElement(openingElement, children, closingElement) { - var node = createSynthesizedNode(248 /* JsxElement */); + var node = createSynthesizedNode(249 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -12502,7 +12520,7 @@ var ts; } ts.updateJsxElement = updateJsxElement; function createJsxSelfClosingElement(tagName, attributes) { - var node = createSynthesizedNode(249 /* JsxSelfClosingElement */); + var node = createSynthesizedNode(250 /* JsxSelfClosingElement */); node.tagName = tagName; node.attributes = attributes; return node; @@ -12516,7 +12534,7 @@ var ts; } ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement; function createJsxOpeningElement(tagName, attributes) { - var node = createSynthesizedNode(250 /* JsxOpeningElement */); + var node = createSynthesizedNode(251 /* JsxOpeningElement */); node.tagName = tagName; node.attributes = attributes; return node; @@ -12530,7 +12548,7 @@ var ts; } ts.updateJsxOpeningElement = updateJsxOpeningElement; function createJsxClosingElement(tagName) { - var node = createSynthesizedNode(251 /* JsxClosingElement */); + var node = createSynthesizedNode(252 /* JsxClosingElement */); node.tagName = tagName; return node; } @@ -12542,7 +12560,7 @@ var ts; } ts.updateJsxClosingElement = updateJsxClosingElement; function createJsxAttributes(properties) { - var jsxAttributes = createSynthesizedNode(253 /* JsxAttributes */); + var jsxAttributes = createSynthesizedNode(254 /* JsxAttributes */); jsxAttributes.properties = createNodeArray(properties); return jsxAttributes; } @@ -12555,7 +12573,7 @@ var ts; } ts.updateJsxAttributes = updateJsxAttributes; function createJsxAttribute(name, initializer) { - var node = createSynthesizedNode(252 /* JsxAttribute */); + var node = createSynthesizedNode(253 /* JsxAttribute */); node.name = name; node.initializer = initializer; return node; @@ -12569,7 +12587,7 @@ var ts; } ts.updateJsxAttribute = updateJsxAttribute; function createJsxSpreadAttribute(expression) { - var node = createSynthesizedNode(254 /* JsxSpreadAttribute */); + var node = createSynthesizedNode(255 /* JsxSpreadAttribute */); node.expression = expression; return node; } @@ -12581,7 +12599,7 @@ var ts; } ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute; function createJsxExpression(dotDotDotToken, expression) { - var node = createSynthesizedNode(255 /* JsxExpression */); + var node = createSynthesizedNode(256 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; return node; @@ -12595,7 +12613,7 @@ var ts; ts.updateJsxExpression = updateJsxExpression; // Clauses function createHeritageClause(token, types) { - var node = createSynthesizedNode(258 /* HeritageClause */); + var node = createSynthesizedNode(259 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); return node; @@ -12609,7 +12627,7 @@ var ts; } ts.updateHeritageClause = updateHeritageClause; function createCaseClause(expression, statements) { - var node = createSynthesizedNode(256 /* CaseClause */); + var node = createSynthesizedNode(257 /* CaseClause */); node.expression = ts.parenthesizeExpressionForList(expression); node.statements = createNodeArray(statements); return node; @@ -12623,7 +12641,7 @@ var ts; } ts.updateCaseClause = updateCaseClause; function createDefaultClause(statements) { - var node = createSynthesizedNode(257 /* DefaultClause */); + var node = createSynthesizedNode(258 /* DefaultClause */); node.statements = createNodeArray(statements); return node; } @@ -12636,7 +12654,7 @@ var ts; } ts.updateDefaultClause = updateDefaultClause; function createCatchClause(variableDeclaration, block) { - var node = createSynthesizedNode(259 /* CatchClause */); + var node = createSynthesizedNode(260 /* CatchClause */); node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration; node.block = block; return node; @@ -12651,7 +12669,7 @@ var ts; ts.updateCatchClause = updateCatchClause; // Property assignments function createPropertyAssignment(name, initializer) { - var node = createSynthesizedNode(260 /* PropertyAssignment */); + var node = createSynthesizedNode(261 /* PropertyAssignment */); node.name = asName(name); node.questionToken = undefined; node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined; @@ -12666,7 +12684,7 @@ var ts; } ts.updatePropertyAssignment = updatePropertyAssignment; function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - var node = createSynthesizedNode(261 /* ShorthandPropertyAssignment */); + var node = createSynthesizedNode(262 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined; return node; @@ -12680,7 +12698,7 @@ var ts; } ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment; function createSpreadAssignment(expression) { - var node = createSynthesizedNode(262 /* SpreadAssignment */); + var node = createSynthesizedNode(263 /* SpreadAssignment */); node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined; return node; } @@ -12694,7 +12712,7 @@ var ts; ts.updateSpreadAssignment = updateSpreadAssignment; // Enum function createEnumMember(name, initializer) { - var node = createSynthesizedNode(263 /* EnumMember */); + var node = createSynthesizedNode(264 /* EnumMember */); node.name = asName(name); node.initializer = initializer && ts.parenthesizeExpressionForList(initializer); return node; @@ -12710,7 +12728,7 @@ var ts; // Top-level nodes function updateSourceFileNode(node, statements) { if (node.statements !== statements) { - var updated = createSynthesizedNode(264 /* SourceFile */); + var updated = createSynthesizedNode(265 /* SourceFile */); updated.flags |= node.flags; updated.statements = createNodeArray(statements); updated.endOfFileToken = node.endOfFileToken; @@ -12789,7 +12807,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(294 /* NotEmittedStatement */); + var node = createSynthesizedNode(295 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -12801,7 +12819,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(297 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(298 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -12813,7 +12831,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(296 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(297 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -12828,7 +12846,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(295 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(296 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -12843,7 +12861,7 @@ var ts; } ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function createBundle(sourceFiles) { - var node = ts.createNode(265 /* Bundle */); + var node = ts.createNode(266 /* Bundle */); node.sourceFiles = sourceFiles; return node; } @@ -12857,47 +12875,47 @@ var ts; ts.updateBundle = updateBundle; // Compound nodes function createComma(left, right) { - return createBinary(left, 25 /* CommaToken */, right); + return createBinary(left, 26 /* CommaToken */, right); } ts.createComma = createComma; function createLessThan(left, right) { - return createBinary(left, 26 /* LessThanToken */, right); + return createBinary(left, 27 /* LessThanToken */, right); } ts.createLessThan = createLessThan; function createAssignment(left, right) { - return createBinary(left, 57 /* EqualsToken */, right); + return createBinary(left, 58 /* EqualsToken */, right); } ts.createAssignment = createAssignment; function createStrictEquality(left, right) { - return createBinary(left, 33 /* EqualsEqualsEqualsToken */, right); + return createBinary(left, 34 /* EqualsEqualsEqualsToken */, right); } ts.createStrictEquality = createStrictEquality; function createStrictInequality(left, right) { - return createBinary(left, 34 /* ExclamationEqualsEqualsToken */, right); + return createBinary(left, 35 /* ExclamationEqualsEqualsToken */, right); } ts.createStrictInequality = createStrictInequality; function createAdd(left, right) { - return createBinary(left, 36 /* PlusToken */, right); + return createBinary(left, 37 /* PlusToken */, right); } ts.createAdd = createAdd; function createSubtract(left, right) { - return createBinary(left, 37 /* MinusToken */, right); + return createBinary(left, 38 /* MinusToken */, right); } ts.createSubtract = createSubtract; function createPostfixIncrement(operand) { - return createPostfix(operand, 42 /* PlusPlusToken */); + return createPostfix(operand, 43 /* PlusPlusToken */); } ts.createPostfixIncrement = createPostfixIncrement; function createLogicalAnd(left, right) { - return createBinary(left, 52 /* AmpersandAmpersandToken */, right); + return createBinary(left, 53 /* AmpersandAmpersandToken */, right); } ts.createLogicalAnd = createLogicalAnd; function createLogicalOr(left, right) { - return createBinary(left, 53 /* BarBarToken */, right); + return createBinary(left, 54 /* BarBarToken */, right); } ts.createLogicalOr = createLogicalOr; function createLogicalNot(operand) { - return createPrefix(50 /* ExclamationToken */, operand); + return createPrefix(51 /* ExclamationToken */, operand); } ts.createLogicalNot = createLogicalNot; function createVoidZero() { @@ -12957,7 +12975,7 @@ var ts; // To avoid holding onto transformation artifacts, we keep track of any // parse tree node we are annotating. This allows us to clean them up after // all transformations have completed. - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } var sourceFile = ts.getSourceFileOfNode(node); @@ -13392,7 +13410,7 @@ var ts; if (!outermostLabeledStatement) { return node; } - var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 /* LabeledStatement */ + var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 222 /* LabeledStatement */ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node); if (afterRestoreLabelCallback) { @@ -13404,19 +13422,19 @@ var ts; function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { var target = skipParentheses(node); switch (target.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return cacheIdentifiers; - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return false; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: var elements = target.elements; if (elements.length === 0) { return false; } return true; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -13430,7 +13448,7 @@ var ts; thisArg = ts.createThis(); target = callee; } - else if (callee.kind === 96 /* SuperKeyword */) { + else if (callee.kind === 97 /* SuperKeyword */) { thisArg = ts.createThis(); target = languageVersion < 2 /* ES2015 */ ? ts.setTextRange(ts.createIdentifier("_super"), callee) @@ -13442,7 +13460,7 @@ var ts; } else { switch (callee.kind) { - case 178 /* PropertyAccessExpression */: { + case 179 /* PropertyAccessExpression */: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { // for `a.b()` target is `(_a = a).b` and thisArg is `_a` thisArg = ts.createTempVariable(recordTempVariable); @@ -13455,7 +13473,7 @@ var ts; } break; } - case 179 /* ElementAccessExpression */: { + case 180 /* ElementAccessExpression */: { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { // for `a[b]()` target is `(_a = a)[b]` and thisArg is `_a` thisArg = ts.createTempVariable(recordTempVariable); @@ -13508,14 +13526,14 @@ var ts; ts.createExpressionForPropertyName = createExpressionForPropertyName; function createExpressionForObjectLiteralElementLike(node, property, receiver) { switch (property.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return createExpressionForPropertyAssignment(property, receiver); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(property, receiver); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return createExpressionForMethodDeclaration(property, receiver); } } @@ -13793,7 +13811,7 @@ var ts; } ts.ensureUseStrict = ensureUseStrict; function parenthesizeConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */); + var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* QuestionToken */); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { @@ -13814,7 +13832,7 @@ var ts; function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { var skipped = skipPartiallyEmittedExpressions(operand); // If the resulting expression is already parenthesized, we do not need to do any further processing. - if (skipped.kind === 184 /* ParenthesizedExpression */) { + if (skipped.kind === 185 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) @@ -13848,8 +13866,8 @@ var ts; // // If `a ** d` is on the left of operator `**`, we need to parenthesize to preserve // the intended order of operations: `(a ** b) ** c` - var binaryOperatorPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, binaryOperator); - var binaryOperatorAssociativity = ts.getOperatorAssociativity(193 /* BinaryExpression */, binaryOperator); + var binaryOperatorPrecedence = ts.getOperatorPrecedence(194 /* BinaryExpression */, binaryOperator); + var binaryOperatorAssociativity = ts.getOperatorAssociativity(194 /* BinaryExpression */, binaryOperator); var emittedOperand = skipPartiallyEmittedExpressions(operand); var operandPrecedence = ts.getExpressionPrecedence(emittedOperand); switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) { @@ -13858,7 +13876,7 @@ var ts; // and is a yield expression, then we do not need parentheses. if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ - && operand.kind === 196 /* YieldExpression */) { + && operand.kind === 197 /* YieldExpression */) { return false; } return true; @@ -13895,7 +13913,7 @@ var ts; // the same kind (recursively). // "a"+(1+2) => "a"+(1+2) // "a"+("b"+"c") => "a"+"b"+"c" - if (binaryOperator === 36 /* PlusToken */) { + if (binaryOperator === 37 /* PlusToken */) { var leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0 /* Unknown */; if (ts.isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { return false; @@ -13930,10 +13948,10 @@ var ts; // // While addition is associative in mathematics, JavaScript's `+` is not // guaranteed to be associative as it is overloaded with string concatenation. - return binaryOperator === 38 /* AsteriskToken */ - || binaryOperator === 48 /* BarToken */ - || binaryOperator === 47 /* AmpersandToken */ - || binaryOperator === 49 /* CaretToken */; + return binaryOperator === 39 /* AsteriskToken */ + || binaryOperator === 49 /* BarToken */ + || binaryOperator === 48 /* AmpersandToken */ + || binaryOperator === 50 /* CaretToken */; } /** * This function determines whether an expression consists of a homogeneous set of @@ -13946,7 +13964,7 @@ var ts; if (ts.isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) { + if (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 37 /* PlusToken */) { if (node.cachedLiteralKind !== undefined) { return node.cachedLiteralKind; } @@ -13961,7 +13979,7 @@ var ts; return 0 /* Unknown */; } function parenthesizeForConditionalHead(condition) { - var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */); + var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* QuestionToken */); var emittedCondition = skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { @@ -13974,7 +13992,7 @@ var ts; // per ES grammar both 'whenTrue' and 'whenFalse' parts of conditional expression are assignment expressions // so in case when comma expression is introduced as a part of previous transformations // if should be wrapped in parens since comma operator has the lowest precedence - return e.kind === 193 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */ + return e.kind === 194 /* BinaryExpression */ && e.operatorToken.kind === 26 /* CommaToken */ ? ts.createParen(e) : e; } @@ -13988,9 +14006,9 @@ var ts; function parenthesizeForNew(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); switch (emittedExpression.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return ts.createParen(expression); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return emittedExpression.arguments ? expression : ts.createParen(expression); @@ -14013,7 +14031,7 @@ var ts; // var emittedExpression = skipPartiallyEmittedExpressions(expression); if (ts.isLeftHandSideExpression(emittedExpression) - && (emittedExpression.kind !== 181 /* NewExpression */ || emittedExpression.arguments)) { + && (emittedExpression.kind !== 182 /* NewExpression */ || emittedExpression.arguments)) { return expression; } return ts.setTextRange(ts.createParen(expression), expression); @@ -14051,7 +14069,7 @@ var ts; function parenthesizeExpressionForList(expression) { var emittedExpression = skipPartiallyEmittedExpressions(expression); var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression); - var commaPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, 25 /* CommaToken */); + var commaPrecedence = ts.getOperatorPrecedence(194 /* BinaryExpression */, 26 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(ts.createParen(expression), expression); @@ -14062,7 +14080,7 @@ var ts; if (ts.isCallExpression(emittedExpression)) { var callee = emittedExpression.expression; var kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 185 /* FunctionExpression */ || kind === 186 /* ArrowFunction */) { + if (kind === 186 /* FunctionExpression */ || kind === 187 /* ArrowFunction */) { var mutableCall = ts.getMutableClone(emittedExpression); mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee); return recreatePartiallyEmittedExpressions(expression, mutableCall); @@ -14070,7 +14088,7 @@ var ts; } else { var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind; - if (leftmostExpressionKind === 177 /* ObjectLiteralExpression */ || leftmostExpressionKind === 185 /* FunctionExpression */) { + if (leftmostExpressionKind === 178 /* ObjectLiteralExpression */ || leftmostExpressionKind === 186 /* FunctionExpression */) { return ts.setTextRange(ts.createParen(expression), expression); } } @@ -14094,21 +14112,21 @@ var ts; function getLeftmostExpression(node) { while (true) { switch (node.kind) { - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: node = node.operand; continue; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: node = node.left; continue; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: node = node.condition; continue; - case 180 /* CallExpression */: - case 179 /* ElementAccessExpression */: - case 178 /* PropertyAccessExpression */: + case 181 /* CallExpression */: + case 180 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: node = node.expression; continue; - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -14116,7 +14134,7 @@ var ts; } } function parenthesizeConciseBody(body) { - if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177 /* ObjectLiteralExpression */) { + if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 178 /* ObjectLiteralExpression */) { return ts.setTextRange(ts.createParen(body), body); } return body; @@ -14148,7 +14166,7 @@ var ts; } ts.skipOuterExpressions = skipOuterExpressions; function skipParentheses(node) { - while (node.kind === 184 /* ParenthesizedExpression */) { + while (node.kind === 185 /* ParenthesizedExpression */) { node = node.expression; } return node; @@ -14162,7 +14180,7 @@ var ts; } ts.skipAssertions = skipAssertions; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 295 /* PartiallyEmittedExpression */) { + while (node.kind === 296 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -14208,10 +14226,10 @@ var ts; var name = namespaceDeclaration.name; return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name)); } - if (node.kind === 237 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 238 /* ImportDeclaration */ && node.importClause) { return ts.getGeneratedNameForNode(node); } - if (node.kind === 243 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 244 /* ExportDeclaration */ && node.moduleSpecifier) { return ts.getGeneratedNameForNode(node); } return undefined; @@ -14329,7 +14347,7 @@ var ts; } if (ts.isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: // `b` in `({ a: b } = ...)` // `b` in `({ a: b = 1 } = ...)` // `{b}` in `({ a: {b} } = ...)` @@ -14341,11 +14359,11 @@ var ts; // `b[0]` in `({ a: b[0] } = ...)` // `b[0]` in `({ a: b[0] = 1 } = ...)` return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: // `a` in `({ a } = ...)` // `a` in `({ a = 1 } = ...)` return bindingElement.name; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: // `a` in `({ ...a } = ...)` return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } @@ -14377,12 +14395,12 @@ var ts; */ function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 145 /* Parameter */: - case 175 /* BindingElement */: + case 146 /* Parameter */: + case 176 /* BindingElement */: // `...` in `let [...a] = ...` return bindingElement.dotDotDotToken; - case 197 /* SpreadElement */: - case 262 /* SpreadAssignment */: + case 198 /* SpreadElement */: + case 263 /* SpreadAssignment */: // `...` in `[...a] = ...` return bindingElement; } @@ -14394,7 +14412,7 @@ var ts; */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 175 /* BindingElement */: + case 176 /* BindingElement */: // `a` in `let { a: b } = ...` // `[a]` in `let { [a]: b } = ...` // `"a"` in `let { "a": b } = ...` @@ -14406,7 +14424,7 @@ var ts; : propertyName; } break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: // `a` in `({ a: b } = ...)` // `[a]` in `({ [a]: b } = ...)` // `"a"` in `({ "a": b } = ...)` @@ -14418,7 +14436,7 @@ var ts; : propertyName; } break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: // `a` in `({ ...a } = ...)` return bindingElement.name; } @@ -14436,13 +14454,13 @@ var ts; */ function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: // `a` in `{a}` // `a` in `[a]` return name.elements; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: // `a` in `{a}` return name.properties; } @@ -14482,11 +14500,11 @@ var ts; ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement; function convertToAssignmentPattern(node) { switch (node.kind) { - case 174 /* ArrayBindingPattern */: - case 176 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 177 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 173 /* ObjectBindingPattern */: - case 177 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 178 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -14534,20 +14552,20 @@ var ts; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // import "mod" // import x from "mod" // import * as x from "mod" // import { x, y } from "mod" externalImports.push(node); break; - case 236 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 247 /* ExternalModuleReference */) { + case 237 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 248 /* ExternalModuleReference */) { // import x = require("mod") externalImports.push(node); } break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { // export * from "mod" @@ -14577,13 +14595,13 @@ var ts; } } break; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { // export = x exportEquals = node; } break; - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: if (ts.hasModifier(node, 1 /* Export */)) { for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) { var decl = _e[_d]; @@ -14591,7 +14609,7 @@ var ts; } } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: if (ts.hasModifier(node, 1 /* Export */)) { if (ts.hasModifier(node, 512 /* Default */)) { // export default function() { } @@ -14611,7 +14629,7 @@ var ts; } } break; - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: if (ts.hasModifier(node, 1 /* Export */)) { if (ts.hasModifier(node, 512 /* Default */)) { // export default class { } @@ -14675,13 +14693,13 @@ var ts; var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 264 /* SourceFile */) { + if (kind === 265 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } - else if (kind === 70 /* Identifier */) { + else if (kind === 71 /* Identifier */) { return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); } - else if (kind < 142 /* FirstNode */) { + else if (kind < 143 /* FirstNode */) { return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); } else { @@ -14724,29 +14742,29 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.default) || visitNode(cbNode, node.expression); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return visitNode(cbNode, node.expression); - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -14755,24 +14773,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -14783,326 +14801,326 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return visitNode(cbNode, node.exprName); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return visitNodes(cbNodes, node.members); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return visitNode(cbNode, node.elementType); - case 164 /* TupleType */: + case 165 /* TupleType */: return visitNodes(cbNodes, node.elementTypes); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return visitNodes(cbNodes, node.types); - case 167 /* ParenthesizedType */: - case 169 /* TypeOperator */: + case 168 /* ParenthesizedType */: + case 170 /* TypeOperator */: return visitNode(cbNode, node.type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return visitNode(cbNode, node.objectType) || visitNode(cbNode, node.indexType); - case 171 /* MappedType */: + case 172 /* MappedType */: return visitNode(cbNode, node.readonlyToken) || visitNode(cbNode, node.typeParameter) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return visitNode(cbNode, node.literal); - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return visitNodes(cbNodes, node.elements); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitNodes(cbNodes, node.elements); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitNodes(cbNodes, node.properties); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.name); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitNode(cbNode, node.expression); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return visitNode(cbNode, node.expression); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return visitNode(cbNode, node.expression); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return visitNode(cbNode, node.expression); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return visitNode(cbNode, node.operand); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitNode(cbNode, node.asteriskToken) || visitNode(cbNode, node.expression); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitNode(cbNode, node.expression); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return visitNode(cbNode, node.operand); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 201 /* AsExpression */: + case 202 /* AsExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return visitNode(cbNode, node.expression); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return visitNode(cbNode, node.name); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return visitNode(cbNode, node.expression); - case 206 /* Block */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return visitNodes(cbNodes, node.statements); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return visitNodes(cbNodes, node.declarations); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitNode(cbNode, node.expression); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitNode(cbNode, node.awaitModifier) || visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: return visitNode(cbNode, node.label); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitNode(cbNode, node.expression); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitNodes(cbNodes, node.clauses); - case 256 /* CaseClause */: + case 257 /* CaseClause */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return visitNodes(cbNodes, node.statements); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return visitNode(cbNode, node.expression); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 146 /* Decorator */: + case 147 /* Decorator */: return visitNode(cbNode, node.expression); - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return visitNode(cbNode, node.name); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return visitNode(cbNode, node.name); - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return visitNodes(cbNodes, node.elements); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return visitNode(cbNode, node.expression); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return visitNodes(cbNodes, node.types); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return visitNode(cbNode, node.expression); - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return visitNodes(cbNodes, node.decorators); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.attributes); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return visitNodes(cbNodes, node.properties); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return visitNode(cbNode, node.expression); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitNode(cbNode, node.dotDotDotToken) || visitNode(cbNode, node.expression); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return visitNode(cbNode, node.tagName); - case 266 /* JSDocTypeExpression */: + case 267 /* JSDocTypeExpression */: return visitNode(cbNode, node.type); - case 270 /* JSDocUnionType */: + case 271 /* JSDocUnionType */: return visitNodes(cbNodes, node.types); - case 271 /* JSDocTupleType */: + case 272 /* JSDocTupleType */: return visitNodes(cbNodes, node.types); - case 269 /* JSDocArrayType */: + case 270 /* JSDocArrayType */: return visitNode(cbNode, node.elementType); - case 273 /* JSDocNonNullableType */: + case 274 /* JSDocNonNullableType */: return visitNode(cbNode, node.type); - case 272 /* JSDocNullableType */: + case 273 /* JSDocNullableType */: return visitNode(cbNode, node.type); - case 274 /* JSDocRecordType */: + case 275 /* JSDocRecordType */: return visitNode(cbNode, node.literal); - case 276 /* JSDocTypeReference */: + case 277 /* JSDocTypeReference */: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 277 /* JSDocOptionalType */: + case 278 /* JSDocOptionalType */: return visitNode(cbNode, node.type); - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 279 /* JSDocVariadicType */: + case 280 /* JSDocVariadicType */: return visitNode(cbNode, node.type); - case 280 /* JSDocConstructorType */: + case 281 /* JSDocConstructorType */: return visitNode(cbNode, node.type); - case 281 /* JSDocThisType */: + case 282 /* JSDocThisType */: return visitNode(cbNode, node.type); - case 275 /* JSDocRecordMember */: + case 276 /* JSDocRecordMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 282 /* JSDocComment */: + case 283 /* JSDocComment */: return visitNodes(cbNodes, node.tags); - case 285 /* JSDocParameterTag */: + case 286 /* JSDocParameterTag */: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 286 /* JSDocReturnTag */: + case 287 /* JSDocReturnTag */: return visitNode(cbNode, node.typeExpression); - case 287 /* JSDocTypeTag */: + case 288 /* JSDocTypeTag */: return visitNode(cbNode, node.typeExpression); - case 284 /* JSDocAugmentsTag */: + case 285 /* JSDocAugmentsTag */: return visitNode(cbNode, node.typeExpression); - case 288 /* JSDocTemplateTag */: + case 289 /* JSDocTemplateTag */: return visitNodes(cbNodes, node.typeParameters); - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.name) || visitNode(cbNode, node.jsDocTypeLiteral); - case 291 /* JSDocTypeLiteral */: + case 292 /* JSDocTypeLiteral */: return visitNodes(cbNodes, node.jsDocPropertyTags); - case 290 /* JSDocPropertyTag */: + case 291 /* JSDocPropertyTag */: return visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name); - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); - case 292 /* JSDocLiteralType */: + case 293 /* JSDocLiteralType */: return visitNode(cbNode, node.literal); } } @@ -15375,7 +15393,7 @@ var ts; function createSourceFile(fileName, languageVersion, scriptKind) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible - var sourceFile = new SourceFileConstructor(264 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + var sourceFile = new SourceFileConstructor(265 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -15579,20 +15597,20 @@ var ts; } // Ignore strict mode flag because we will report an error in type checker instead. function isIdentifier() { - if (token() === 70 /* Identifier */) { + if (token() === 71 /* Identifier */) { return true; } // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is // considered a keyword and is not an identifier. - if (token() === 115 /* YieldKeyword */ && inYieldContext()) { + if (token() === 116 /* YieldKeyword */ && inYieldContext()) { return false; } // If we have a 'await' keyword, and we're in the [Await] context, then 'await' is // considered a keyword and is not an identifier. - if (token() === 120 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 121 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 106 /* LastReservedWord */; + return token() > 107 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } @@ -15635,22 +15653,22 @@ var ts; } function canParseSemicolon() { // If there's a real semicolon, then we can always parse it out. - if (token() === 24 /* SemicolonToken */) { + if (token() === 25 /* SemicolonToken */) { return true; } // We can parse out an optional semicolon in ASI cases in the following cases. - return token() === 17 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); + return token() === 18 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token() === 24 /* SemicolonToken */) { + if (token() === 25 /* SemicolonToken */) { // consume the semicolon if it was explicitly provided. nextToken(); } return true; } else { - return parseExpected(24 /* SemicolonToken */); + return parseExpected(25 /* SemicolonToken */); } } // note: this function creates only node @@ -15659,8 +15677,8 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return kind >= 142 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) : - kind === 70 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) : + return kind >= 143 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) : + kind === 71 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) : new TokenConstructor(kind, pos, pos); } function createNodeArray(elements, pos) { @@ -15711,16 +15729,16 @@ var ts; function createIdentifier(isIdentifier, diagnosticMessage) { identifierCount++; if (isIdentifier) { - var node = createNode(70 /* Identifier */); + var node = createNode(71 /* Identifier */); // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker - if (token() !== 70 /* Identifier */) { + if (token() !== 71 /* Identifier */) { node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } - return createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ false, diagnosticMessage || ts.Diagnostics.Identifier_expected); + return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ false, diagnosticMessage || ts.Diagnostics.Identifier_expected); } function parseIdentifier(diagnosticMessage) { return createIdentifier(isIdentifier(), diagnosticMessage); @@ -15737,7 +15755,7 @@ var ts; if (token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */) { return parseLiteralNode(/*internName*/ true); } - if (allowComputedPropertyNames && token() === 20 /* OpenBracketToken */) { + if (allowComputedPropertyNames && token() === 21 /* OpenBracketToken */) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -15755,13 +15773,13 @@ var ts; // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] - var node = createNode(143 /* ComputedPropertyName */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(144 /* ComputedPropertyName */); + parseExpected(21 /* OpenBracketToken */); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. node.expression = allowInAnd(parseExpression); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function parseContextualModifier(t) { @@ -15775,21 +15793,21 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token() === 75 /* ConstKeyword */) { + if (token() === 76 /* ConstKeyword */) { // 'const' is only a modifier if followed by 'enum'. - return nextToken() === 82 /* EnumKeyword */; + return nextToken() === 83 /* EnumKeyword */; } - if (token() === 83 /* ExportKeyword */) { + if (token() === 84 /* ExportKeyword */) { nextToken(); - if (token() === 78 /* DefaultKeyword */) { + if (token() === 79 /* DefaultKeyword */) { return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token() !== 38 /* AsteriskToken */ && token() !== 117 /* AsKeyword */ && token() !== 16 /* OpenBraceToken */ && canFollowModifier(); + return token() !== 39 /* AsteriskToken */ && token() !== 118 /* AsKeyword */ && token() !== 17 /* OpenBraceToken */ && canFollowModifier(); } - if (token() === 78 /* DefaultKeyword */) { + if (token() === 79 /* DefaultKeyword */) { return nextTokenIsClassOrFunctionOrAsync(); } - if (token() === 114 /* StaticKeyword */) { + if (token() === 115 /* StaticKeyword */) { nextToken(); return canFollowModifier(); } @@ -15799,17 +15817,17 @@ var ts; return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 20 /* OpenBracketToken */ - || token() === 16 /* OpenBraceToken */ - || token() === 38 /* AsteriskToken */ - || token() === 23 /* DotDotDotToken */ + return token() === 21 /* OpenBracketToken */ + || token() === 17 /* OpenBraceToken */ + || token() === 39 /* AsteriskToken */ + || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token() === 74 /* ClassKeyword */ || token() === 88 /* FunctionKeyword */ || - (token() === 116 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) || - (token() === 119 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); + return token() === 75 /* ClassKeyword */ || token() === 89 /* FunctionKeyword */ || + (token() === 117 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) || + (token() === 120 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } // True if positioned at the start of a list element function isListElement(parsingContext, inErrorRecovery) { @@ -15827,9 +15845,9 @@ var ts; // we're parsing. For example, if we have a semicolon in the middle of a class, then // we really don't want to assume the class is over and we're on a statement in the // outer module. We just want to consume and move on. - return !(token() === 24 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); + return !(token() === 25 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 72 /* CaseKeyword */ || token() === 78 /* DefaultKeyword */; + return token() === 73 /* CaseKeyword */ || token() === 79 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -15837,21 +15855,21 @@ var ts; // not in error recovery. If we're in error recovery, we don't want an errant // semicolon to be treated as a class member (since they're almost always used // for statements. - return lookAhead(isClassMemberStart) || (token() === 24 /* SemicolonToken */ && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 25 /* SemicolonToken */ && !inErrorRecovery); case 6 /* EnumMembers */: // Include open bracket computed properties. This technically also lets in indexers, // which would be a candidate for improved error reporting. - return token() === 20 /* OpenBracketToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || isLiteralPropertyName(); case 12 /* ObjectLiteralMembers */: - return token() === 20 /* OpenBracketToken */ || token() === 38 /* AsteriskToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || token() === 39 /* AsteriskToken */ || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); case 17 /* RestProperties */: return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: - return token() === 20 /* OpenBracketToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName(); + return token() === 21 /* OpenBracketToken */ || token() === 24 /* DotDotDotToken */ || isLiteralPropertyName(); case 7 /* HeritageClauseElement */: // If we see `{ ... }` then only consume it as an expression if it is followed by `,` or `{` // That way we won't consume the body of a class in its heritage clause. - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -15866,23 +15884,23 @@ var ts; case 8 /* VariableDeclarations */: return isIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 25 /* CommaToken */ || token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 26 /* CommaToken */ || token() === 24 /* DotDotDotToken */ || isIdentifierOrPattern(); case 18 /* TypeParameters */: return isIdentifier(); case 11 /* ArgumentExpressions */: case 15 /* ArrayLiteralMembers */: - return token() === 25 /* CommaToken */ || token() === 23 /* DotDotDotToken */ || isStartOfExpression(); + return token() === 26 /* CommaToken */ || token() === 24 /* DotDotDotToken */ || isStartOfExpression(); case 16 /* Parameters */: return isStartOfParameter(); case 19 /* TypeArguments */: case 20 /* TupleElementTypes */: - return token() === 25 /* CommaToken */ || isStartOfType(); + return token() === 26 /* CommaToken */ || isStartOfType(); case 21 /* HeritageClauses */: return isHeritageClause(); case 22 /* ImportOrExportSpecifiers */: return ts.tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: - return ts.tokenIsIdentifierOrKeyword(token()) || token() === 16 /* OpenBraceToken */; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 17 /* OpenBraceToken */; case 14 /* JsxChildren */: return true; case 23 /* JSDocFunctionParameters */: @@ -15895,8 +15913,8 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token() === 16 /* OpenBraceToken */); - if (nextToken() === 17 /* CloseBraceToken */) { + ts.Debug.assert(token() === 17 /* OpenBraceToken */); + if (nextToken() === 18 /* CloseBraceToken */) { // if we see "extends {}" then only treat the {} as what we're extending (and not // the class body) if we have: // @@ -15905,7 +15923,7 @@ var ts; // extends {} extends // extends {} implements var next = nextToken(); - return next === 25 /* CommaToken */ || next === 16 /* OpenBraceToken */ || next === 84 /* ExtendsKeyword */ || next === 107 /* ImplementsKeyword */; + return next === 26 /* CommaToken */ || next === 17 /* OpenBraceToken */ || next === 85 /* ExtendsKeyword */ || next === 108 /* ImplementsKeyword */; } return true; } @@ -15918,8 +15936,8 @@ var ts; return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 107 /* ImplementsKeyword */ || - token() === 84 /* ExtendsKeyword */) { + if (token() === 108 /* ImplementsKeyword */ || + token() === 85 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -15943,44 +15961,44 @@ var ts; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 22 /* ImportOrExportSpecifiers */: - return token() === 17 /* CloseBraceToken */; + return token() === 18 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 17 /* CloseBraceToken */ || token() === 72 /* CaseKeyword */ || token() === 78 /* DefaultKeyword */; + return token() === 18 /* CloseBraceToken */ || token() === 73 /* CaseKeyword */ || token() === 79 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 16 /* OpenBraceToken */ || token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 17 /* OpenBraceToken */ || token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 18 /* TypeParameters */: // Tokens other than '>' are here for better error recovery - return token() === 28 /* GreaterThanToken */ || token() === 18 /* OpenParenToken */ || token() === 16 /* OpenBraceToken */ || token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 29 /* GreaterThanToken */ || token() === 19 /* OpenParenToken */ || token() === 17 /* OpenBraceToken */ || token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: // Tokens other than ')' are here for better error recovery - return token() === 19 /* CloseParenToken */ || token() === 24 /* SemicolonToken */; + return token() === 20 /* CloseParenToken */ || token() === 25 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: case 20 /* TupleElementTypes */: case 10 /* ArrayBindingElements */: - return token() === 21 /* CloseBracketToken */; + return token() === 22 /* CloseBracketToken */; case 16 /* Parameters */: case 17 /* RestProperties */: // Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery - return token() === 19 /* CloseParenToken */ || token() === 21 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; + return token() === 20 /* CloseParenToken */ || token() === 22 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; case 19 /* TypeArguments */: // All other tokens should cause the type-argument to terminate except comma token - return token() !== 25 /* CommaToken */; + return token() !== 26 /* CommaToken */; case 21 /* HeritageClauses */: - return token() === 16 /* OpenBraceToken */ || token() === 17 /* CloseBraceToken */; + return token() === 17 /* OpenBraceToken */ || token() === 18 /* CloseBraceToken */; case 13 /* JsxAttributes */: - return token() === 28 /* GreaterThanToken */ || token() === 40 /* SlashToken */; + return token() === 29 /* GreaterThanToken */ || token() === 41 /* SlashToken */; case 14 /* JsxChildren */: - return token() === 26 /* LessThanToken */ && lookAhead(nextTokenIsSlash); + return token() === 27 /* LessThanToken */ && lookAhead(nextTokenIsSlash); case 23 /* JSDocFunctionParameters */: - return token() === 19 /* CloseParenToken */ || token() === 55 /* ColonToken */ || token() === 17 /* CloseBraceToken */; + return token() === 20 /* CloseParenToken */ || token() === 56 /* ColonToken */ || token() === 18 /* CloseBraceToken */; case 24 /* JSDocTypeArguments */: - return token() === 28 /* GreaterThanToken */ || token() === 17 /* CloseBraceToken */; + return token() === 29 /* GreaterThanToken */ || token() === 18 /* CloseBraceToken */; case 26 /* JSDocTupleTypes */: - return token() === 21 /* CloseBracketToken */ || token() === 17 /* CloseBraceToken */; + return token() === 22 /* CloseBracketToken */ || token() === 18 /* CloseBraceToken */; case 25 /* JSDocRecordMembers */: - return token() === 17 /* CloseBraceToken */; + return token() === 18 /* CloseBraceToken */; } } function isVariableDeclaratorListTerminator() { @@ -15998,7 +16016,7 @@ var ts; // For better error recovery, if we see an '=>' then we just stop immediately. We've got an // arrow function here and it's going to be very unlikely that we'll resynchronize and get // another variable declaration. - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { return true; } // Keep trying to parse out variable declarators. @@ -16163,20 +16181,20 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 151 /* Constructor */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 148 /* PropertyDeclaration */: - case 205 /* SemicolonClassElement */: + case 152 /* Constructor */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 206 /* SemicolonClassElement */: return true; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: // Method declarations are not necessarily reusable. An object-literal // may have a method calls "constructor(...)" and we must reparse that // into an actual .ConstructorDeclaration. var methodDeclaration = node; - var nameIsConstructor = methodDeclaration.name.kind === 70 /* Identifier */ && - methodDeclaration.name.originalKeywordKind === 122 /* ConstructorKeyword */; + var nameIsConstructor = methodDeclaration.name.kind === 71 /* Identifier */ && + methodDeclaration.name.originalKeywordKind === 123 /* ConstructorKeyword */; return !nameIsConstructor; } } @@ -16185,8 +16203,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: return true; } } @@ -16195,58 +16213,58 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 207 /* VariableStatement */: - case 206 /* Block */: - case 210 /* IfStatement */: - case 209 /* ExpressionStatement */: - case 222 /* ThrowStatement */: - case 218 /* ReturnStatement */: - case 220 /* SwitchStatement */: - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 213 /* ForStatement */: - case 212 /* WhileStatement */: - case 219 /* WithStatement */: - case 208 /* EmptyStatement */: - case 223 /* TryStatement */: - case 221 /* LabeledStatement */: - case 211 /* DoStatement */: - case 224 /* DebuggerStatement */: - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: - case 242 /* ExportAssignment */: - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + case 208 /* VariableStatement */: + case 207 /* Block */: + case 211 /* IfStatement */: + case 210 /* ExpressionStatement */: + case 223 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 221 /* SwitchStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 214 /* ForStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: + case 209 /* EmptyStatement */: + case 224 /* TryStatement */: + case 222 /* LabeledStatement */: + case 212 /* DoStatement */: + case 225 /* DebuggerStatement */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 231 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 263 /* EnumMember */; + return node.kind === 264 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 155 /* ConstructSignature */: - case 149 /* MethodSignature */: - case 156 /* IndexSignature */: - case 147 /* PropertySignature */: - case 154 /* CallSignature */: + case 156 /* ConstructSignature */: + case 150 /* MethodSignature */: + case 157 /* IndexSignature */: + case 148 /* PropertySignature */: + case 155 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 225 /* VariableDeclaration */) { + if (node.kind !== 226 /* VariableDeclaration */) { return false; } // Very subtle incremental parsing bug. Consider the following code: @@ -16267,7 +16285,7 @@ var ts; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 145 /* Parameter */) { + if (node.kind !== 146 /* Parameter */) { return false; } // See the comment in isReusableVariableDeclaration for why we do this. @@ -16324,7 +16342,7 @@ var ts; if (isListElement(kind, /*inErrorRecovery*/ false)) { result.push(parseListElement(kind, parseElement)); commaStart = scanner.getTokenPos(); - if (parseOptional(25 /* CommaToken */)) { + if (parseOptional(26 /* CommaToken */)) { continue; } commaStart = -1; // Back to the state where the last token was not a comma @@ -16333,13 +16351,13 @@ var ts; } // We didn't get a comma, and the list wasn't terminated, explicitly parse // out a comma so we give a good error message. - parseExpected(25 /* CommaToken */); + parseExpected(26 /* CommaToken */); // If the token was a semicolon, and the caller allows that, then skip it and // continue. This ensures we get back on track and don't result in tons of // parse errors. For example, this can happen when people do things like use // a semicolon to delimit object literal members. Note: we'll have already // reported an error when we called parseExpected above. - if (considerSemicolonAsDelimiter && token() === 24 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { + if (considerSemicolonAsDelimiter && token() === 25 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -16378,8 +16396,8 @@ var ts; // The allowReservedWords parameter controls whether reserved words are permitted after the first dot function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(22 /* DotToken */)) { - var node = createNode(142 /* QualifiedName */, entity.pos); // !!! + while (parseOptional(23 /* DotToken */)) { + var node = createNode(143 /* QualifiedName */, entity.pos); // !!! node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -16412,33 +16430,33 @@ var ts; // Report that we need an identifier. However, report it right after the dot, // and not on the next token. This is because the next token might actually // be an identifier and the error would be quite confusing. - return createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected); + return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected); } } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(195 /* TemplateExpression */); + var template = createNode(196 /* TemplateExpression */); template.head = parseTemplateHead(); - ts.Debug.assert(template.head.kind === 13 /* TemplateHead */, "Template head has wrong token kind"); + ts.Debug.assert(template.head.kind === 14 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = createNodeArray(); do { templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 14 /* TemplateMiddle */); + } while (ts.lastOrUndefined(templateSpans).literal.kind === 15 /* TemplateMiddle */); templateSpans.end = getNodeEnd(); template.templateSpans = templateSpans; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(204 /* TemplateSpan */); + var span = createNode(205 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; - if (token() === 17 /* CloseBraceToken */) { + if (token() === 18 /* CloseBraceToken */) { reScanTemplateToken(); literal = parseTemplateMiddleOrTemplateTail(); } else { - literal = parseExpectedToken(15 /* TemplateTail */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(17 /* CloseBraceToken */)); + literal = parseExpectedToken(16 /* TemplateTail */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(18 /* CloseBraceToken */)); } span.literal = literal; return finishNode(span); @@ -16448,12 +16466,12 @@ var ts; } function parseTemplateHead() { var fragment = parseLiteralLikeNode(token(), /*internName*/ false); - ts.Debug.assert(fragment.kind === 13 /* TemplateHead */, "Template head has wrong token kind"); + ts.Debug.assert(fragment.kind === 14 /* TemplateHead */, "Template head has wrong token kind"); return fragment; } function parseTemplateMiddleOrTemplateTail() { var fragment = parseLiteralLikeNode(token(), /*internName*/ false); - ts.Debug.assert(fragment.kind === 14 /* TemplateMiddle */ || fragment.kind === 15 /* TemplateTail */, "Template fragment has wrong token kind"); + ts.Debug.assert(fragment.kind === 15 /* TemplateMiddle */ || fragment.kind === 16 /* TemplateTail */, "Template fragment has wrong token kind"); return fragment; } function parseLiteralLikeNode(kind, internName) { @@ -16481,35 +16499,35 @@ var ts; } // TYPES function parseTypeReference() { - var node = createNode(158 /* TypeReference */); + var node = createNode(159 /* TypeReference */); node.typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected); - if (!scanner.hasPrecedingLineBreak() && token() === 26 /* LessThanToken */) { - node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (!scanner.hasPrecedingLineBreak() && token() === 27 /* LessThanToken */) { + node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(157 /* TypePredicate */, lhs.pos); + var node = createNode(158 /* TypePredicate */, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(168 /* ThisType */); + var node = createNode(169 /* ThisType */); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(161 /* TypeQuery */); - parseExpected(102 /* TypeOfKeyword */); + var node = createNode(162 /* TypeQuery */); + parseExpected(103 /* TypeOfKeyword */); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(144 /* TypeParameter */); + var node = createNode(145 /* TypeParameter */); node.name = parseIdentifier(); - if (parseOptional(84 /* ExtendsKeyword */)) { + if (parseOptional(85 /* ExtendsKeyword */)) { // It's not uncommon for people to write improper constraints to a generic. If the // user writes a constraint that is an expression and not an actual type, then parse // it out as an expression (so we can recover well), but report that a type is needed @@ -16528,35 +16546,35 @@ var ts; node.expression = parseUnaryExpressionOrHigher(); } } - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { node.default = parseType(); } return finishNode(node); } function parseTypeParameters() { - if (token() === 26 /* LessThanToken */) { - return parseBracketedList(18 /* TypeParameters */, parseTypeParameter, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (token() === 27 /* LessThanToken */) { + return parseBracketedList(18 /* TypeParameters */, parseTypeParameter, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } } function parseParameterType() { - if (parseOptional(55 /* ColonToken */)) { + if (parseOptional(56 /* ColonToken */)) { return parseType(); } return undefined; } function isStartOfParameter() { - return token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 /* AtToken */ || token() === 98 /* ThisKeyword */; + return token() === 24 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 57 /* AtToken */ || token() === 99 /* ThisKeyword */; } function parseParameter() { - var node = createNode(145 /* Parameter */); - if (token() === 98 /* ThisKeyword */) { + var node = createNode(146 /* Parameter */); + if (token() === 99 /* ThisKeyword */) { node.name = createIdentifier(/*isIdentifier*/ true); node.type = parseParameterType(); return finishNode(node); } node.decorators = parseDecorators(); node.modifiers = parseModifiers(); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] node.name = parseIdentifierOrPattern(); @@ -16571,7 +16589,7 @@ var ts; // to avoid this we'll advance cursor to the next token. nextToken(); } - node.questionToken = parseOptionalToken(54 /* QuestionToken */); + node.questionToken = parseOptionalToken(55 /* QuestionToken */); node.type = parseParameterType(); node.initializer = parseBindingElementInitializer(/*inParameter*/ true); // Do not check for initializers in an ambient context for parameters. This is not @@ -16591,7 +16609,7 @@ var ts; return parseInitializer(/*inParameter*/ true); } function fillSignature(returnToken, yieldContext, awaitContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 35 /* EqualsGreaterThanToken */; + var returnTokenRequired = returnToken === 36 /* EqualsGreaterThanToken */; signature.typeParameters = parseTypeParameters(); signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { @@ -16616,7 +16634,7 @@ var ts; // // SingleNameBinding [Yield,Await]: // BindingIdentifier[?Yield,?Await]Initializer [In, ?Yield,?Await] opt - if (parseExpected(18 /* OpenParenToken */)) { + if (parseExpected(19 /* OpenParenToken */)) { var savedYieldContext = inYieldContext(); var savedAwaitContext = inAwaitContext(); setYieldContext(yieldContext); @@ -16624,7 +16642,7 @@ var ts; var result = parseDelimitedList(16 /* Parameters */, parseParameter); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); - if (!parseExpected(19 /* CloseParenToken */) && requireCompleteParameterList) { + if (!parseExpected(20 /* CloseParenToken */) && requireCompleteParameterList) { // Caller insisted that we had to end with a ) We didn't. So just return // undefined here. return undefined; @@ -16639,7 +16657,7 @@ var ts; function parseTypeMemberSemicolon() { // We allow type members to be separated by commas or (possibly ASI) semicolons. // First check if it was a comma. If so, we're done with the member. - if (parseOptional(25 /* CommaToken */)) { + if (parseOptional(26 /* CommaToken */)) { return; } // Didn't have a comma. We must have a (possible ASI) semicolon. @@ -16647,15 +16665,15 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 155 /* ConstructSignature */) { - parseExpected(93 /* NewKeyword */); + if (kind === 156 /* ConstructSignature */) { + parseExpected(94 /* NewKeyword */); } - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(node)); } function isIndexSignature() { - if (token() !== 20 /* OpenBracketToken */) { + if (token() !== 21 /* OpenBracketToken */) { return false; } return lookAhead(isUnambiguouslyIndexSignature); @@ -16678,7 +16696,7 @@ var ts; // [] // nextToken(); - if (token() === 23 /* DotDotDotToken */ || token() === 21 /* CloseBracketToken */) { + if (token() === 24 /* DotDotDotToken */ || token() === 22 /* CloseBracketToken */) { return true; } if (ts.isModifierKind(token())) { @@ -16697,49 +16715,49 @@ var ts; // A colon signifies a well formed indexer // A comma should be a badly formed indexer because comma expressions are not allowed // in computed properties. - if (token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */) { + if (token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */) { return true; } // Question mark could be an indexer with an optional property, // or it could be a conditional expression in a computed property. - if (token() !== 54 /* QuestionToken */) { + if (token() !== 55 /* QuestionToken */) { return false; } // If any of the following tokens are after the question mark, it cannot // be a conditional expression, so treat it as an indexer. nextToken(); - return token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || token() === 21 /* CloseBracketToken */; + return token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */ || token() === 22 /* CloseBracketToken */; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(156 /* IndexSignature */, fullStart); + var node = createNode(157 /* IndexSignature */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */); + node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 21 /* OpenBracketToken */, 22 /* CloseBracketToken */); node.type = parseTypeAnnotation(); parseTypeMemberSemicolon(); return finishNode(node); } function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { - var method = createNode(149 /* MethodSignature */, fullStart); + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { + var method = createNode(150 /* MethodSignature */, fullStart); method.modifiers = modifiers; method.name = name; method.questionToken = questionToken; // Method signatures don't exist in expression contexts. So they have neither // [Yield] nor [Await] - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); parseTypeMemberSemicolon(); return addJSDocComment(finishNode(method)); } else { - var property = createNode(147 /* PropertySignature */, fullStart); + var property = createNode(148 /* PropertySignature */, fullStart); property.modifiers = modifiers; property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token() === 57 /* EqualsToken */) { + if (token() === 58 /* EqualsToken */) { // Although type literal properties cannot not have initializers, we attempt // to parse an initializer so we can report in the checker that an interface // property or type literal property cannot have an initializer. @@ -16751,7 +16769,7 @@ var ts; } function isTypeMemberStart() { // Return true if we have the start of a signature member - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return true; } var idToken; @@ -16761,7 +16779,7 @@ var ts; nextToken(); } // Index signatures and computed property names are type members - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return true; } // Try to get the first property-like token following all modifiers @@ -16772,21 +16790,21 @@ var ts; // If we were able to get any potential identifier, check that it is // the start of a member declaration if (idToken) { - return token() === 18 /* OpenParenToken */ || - token() === 26 /* LessThanToken */ || - token() === 54 /* QuestionToken */ || - token() === 55 /* ColonToken */ || - token() === 25 /* CommaToken */ || + return token() === 19 /* OpenParenToken */ || + token() === 27 /* LessThanToken */ || + token() === 55 /* QuestionToken */ || + token() === 56 /* ColonToken */ || + token() === 26 /* CommaToken */ || canParseSemicolon(); } return false; } function parseTypeMember() { - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { - return parseSignatureMember(154 /* CallSignature */); + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { + return parseSignatureMember(155 /* CallSignature */); } - if (token() === 93 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(155 /* ConstructSignature */); + if (token() === 94 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(156 /* ConstructSignature */); } var fullStart = getNodePos(); var modifiers = parseModifiers(); @@ -16797,18 +16815,18 @@ var ts; } function isStartOfConstructSignature() { nextToken(); - return token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */; + return token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */; } function parseTypeLiteral() { - var node = createNode(162 /* TypeLiteral */); + var node = createNode(163 /* TypeLiteral */); node.members = parseObjectTypeMembers(); return finishNode(node); } function parseObjectTypeMembers() { var members; - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { members = parseList(4 /* TypeMembers */, parseTypeMember); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { members = createMissingList(); @@ -16817,57 +16835,57 @@ var ts; } function isStartOfMappedType() { nextToken(); - if (token() === 130 /* ReadonlyKeyword */) { + if (token() === 131 /* ReadonlyKeyword */) { nextToken(); } - return token() === 20 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 91 /* InKeyword */; + return token() === 21 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 92 /* InKeyword */; } function parseMappedTypeParameter() { - var node = createNode(144 /* TypeParameter */); + var node = createNode(145 /* TypeParameter */); node.name = parseIdentifier(); - parseExpected(91 /* InKeyword */); + parseExpected(92 /* InKeyword */); node.constraint = parseType(); return finishNode(node); } function parseMappedType() { - var node = createNode(171 /* MappedType */); - parseExpected(16 /* OpenBraceToken */); - node.readonlyToken = parseOptionalToken(130 /* ReadonlyKeyword */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(172 /* MappedType */); + parseExpected(17 /* OpenBraceToken */); + node.readonlyToken = parseOptionalToken(131 /* ReadonlyKeyword */); + parseExpected(21 /* OpenBracketToken */); node.typeParameter = parseMappedTypeParameter(); - parseExpected(21 /* CloseBracketToken */); - node.questionToken = parseOptionalToken(54 /* QuestionToken */); + parseExpected(22 /* CloseBracketToken */); + node.questionToken = parseOptionalToken(55 /* QuestionToken */); node.type = parseTypeAnnotation(); parseSemicolon(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseTupleType() { - var node = createNode(164 /* TupleType */); - node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */); + var node = createNode(165 /* TupleType */); + node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 21 /* OpenBracketToken */, 22 /* CloseBracketToken */); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(167 /* ParenthesizedType */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(168 /* ParenthesizedType */); + parseExpected(19 /* OpenParenToken */); node.type = parseType(); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 160 /* ConstructorType */) { - parseExpected(93 /* NewKeyword */); + if (kind === 161 /* ConstructorType */) { + parseExpected(94 /* NewKeyword */); } - fillSignature(35 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(36 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); return finishNode(node); } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token() === 22 /* DotToken */ ? undefined : node; + return token() === 23 /* DotToken */ ? undefined : node; } function parseLiteralTypeNode() { - var node = createNode(172 /* LiteralType */); + var node = createNode(173 /* LiteralType */); node.literal = parseSimpleUnaryExpression(); finishNode(node); return node; @@ -16877,43 +16895,43 @@ var ts; } function parseNonArrayType() { switch (token()) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseLiteralTypeNode(); - case 37 /* MinusToken */: + case 38 /* MinusToken */: return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); - case 104 /* VoidKeyword */: - case 94 /* NullKeyword */: + case 105 /* VoidKeyword */: + case 95 /* NullKeyword */: return parseTokenNode(); - case 98 /* ThisKeyword */: { + case 99 /* ThisKeyword */: { var thisKeyword = parseThisTypeNode(); - if (token() === 125 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 102 /* TypeOfKeyword */: + case 103 /* TypeOfKeyword */: return parseTypeQuery(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseTupleType(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseParenthesizedType(); default: return parseTypeReference(); @@ -16921,32 +16939,32 @@ var ts; } function isStartOfType() { switch (token()) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 98 /* ThisKeyword */: - case 102 /* TypeOfKeyword */: - case 129 /* NeverKeyword */: - case 16 /* OpenBraceToken */: - case 20 /* OpenBracketToken */: - case 26 /* LessThanToken */: - case 48 /* BarToken */: - case 47 /* AmpersandToken */: - case 93 /* NewKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 99 /* ThisKeyword */: + case 103 /* TypeOfKeyword */: + case 130 /* NeverKeyword */: + case 17 /* OpenBraceToken */: + case 21 /* OpenBracketToken */: + case 27 /* LessThanToken */: + case 49 /* BarToken */: + case 48 /* AmpersandToken */: + case 94 /* NewKeyword */: case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 133 /* ObjectKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 134 /* ObjectKeyword */: return true; - case 37 /* MinusToken */: + case 38 /* MinusToken */: return lookAhead(nextTokenIsNumericLiteral); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, // or something that starts a type. We don't want to consider things like '(1)' a type. return lookAhead(isStartOfParenthesizedOrFunctionType); @@ -16956,29 +16974,29 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token() === 19 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); + return token() === 20 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(20 /* OpenBracketToken */)) { + while (!scanner.hasPrecedingLineBreak() && parseOptional(21 /* OpenBracketToken */)) { if (isStartOfType()) { - var node = createNode(170 /* IndexedAccessType */, type.pos); + var node = createNode(171 /* IndexedAccessType */, type.pos); node.objectType = type; node.indexType = parseType(); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(node); } else { - var node = createNode(163 /* ArrayType */, type.pos); + var node = createNode(164 /* ArrayType */, type.pos); node.elementType = type; - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(node); } } return type; } function parseTypeOperator(operator) { - var node = createNode(169 /* TypeOperator */); + var node = createNode(170 /* TypeOperator */); parseExpected(operator); node.operator = operator; node.type = parseTypeOperatorOrHigher(); @@ -16986,8 +17004,8 @@ var ts; } function parseTypeOperatorOrHigher() { switch (token()) { - case 126 /* KeyOfKeyword */: - return parseTypeOperator(126 /* KeyOfKeyword */); + case 127 /* KeyOfKeyword */: + return parseTypeOperator(127 /* KeyOfKeyword */); } return parseArrayTypeOrHigher(); } @@ -17007,27 +17025,27 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(166 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */); + return parseUnionOrIntersectionType(167 /* IntersectionType */, parseTypeOperatorOrHigher, 48 /* AmpersandToken */); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(165 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */); + return parseUnionOrIntersectionType(166 /* UnionType */, parseIntersectionTypeOrHigher, 49 /* BarToken */); } function isStartOfFunctionType() { - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { return true; } - return token() === 18 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 19 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); } function skipParameterStart() { if (ts.isModifierKind(token())) { // Skip modifiers parseModifiers(); } - if (isIdentifier() || token() === 98 /* ThisKeyword */) { + if (isIdentifier() || token() === 99 /* ThisKeyword */) { nextToken(); return true; } - if (token() === 20 /* OpenBracketToken */ || token() === 16 /* OpenBraceToken */) { + if (token() === 21 /* OpenBracketToken */ || token() === 17 /* OpenBraceToken */) { // Return true if we can parse an array or object binding pattern with no errors var previousErrorCount = parseDiagnostics.length; parseIdentifierOrPattern(); @@ -17037,7 +17055,7 @@ var ts; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token() === 19 /* CloseParenToken */ || token() === 23 /* DotDotDotToken */) { + if (token() === 20 /* CloseParenToken */ || token() === 24 /* DotDotDotToken */) { // ( ) // ( ... return true; @@ -17045,17 +17063,17 @@ var ts; if (skipParameterStart()) { // We successfully skipped modifiers (if any) and an identifier or binding pattern, // now see if we have something that indicates a parameter declaration - if (token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || - token() === 54 /* QuestionToken */ || token() === 57 /* EqualsToken */) { + if (token() === 56 /* ColonToken */ || token() === 26 /* CommaToken */ || + token() === 55 /* QuestionToken */ || token() === 58 /* EqualsToken */) { // ( xxx : // ( xxx , // ( xxx ? // ( xxx = return true; } - if (token() === 19 /* CloseParenToken */) { + if (token() === 20 /* CloseParenToken */) { nextToken(); - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { // ( xxx ) => return true; } @@ -17067,7 +17085,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(157 /* TypePredicate */, typePredicateVariable.pos); + var node = createNode(158 /* TypePredicate */, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -17078,7 +17096,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token() === 125 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 126 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -17090,37 +17108,37 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(159 /* FunctionType */); + return parseFunctionOrConstructorType(160 /* FunctionType */); } - if (token() === 93 /* NewKeyword */) { - return parseFunctionOrConstructorType(160 /* ConstructorType */); + if (token() === 94 /* NewKeyword */) { + return parseFunctionOrConstructorType(161 /* ConstructorType */); } return parseUnionTypeOrHigher(); } function parseTypeAnnotation() { - return parseOptional(55 /* ColonToken */) ? parseType() : undefined; + return parseOptional(56 /* ColonToken */) ? parseType() : undefined; } // EXPRESSIONS function isStartOfLeftHandSideExpression() { switch (token()) { - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 18 /* OpenParenToken */: - case 20 /* OpenBracketToken */: - case 16 /* OpenBraceToken */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 93 /* NewKeyword */: - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - case 70 /* Identifier */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 19 /* OpenParenToken */: + case 21 /* OpenBracketToken */: + case 17 /* OpenBraceToken */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 94 /* NewKeyword */: + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + case 71 /* Identifier */: return true; default: return isIdentifier(); @@ -17131,18 +17149,18 @@ var ts; return true; } switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 79 /* DeleteKeyword */: - case 102 /* TypeOfKeyword */: - case 104 /* VoidKeyword */: - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: - case 26 /* LessThanToken */: - case 120 /* AwaitKeyword */: - case 115 /* YieldKeyword */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 80 /* DeleteKeyword */: + case 103 /* TypeOfKeyword */: + case 105 /* VoidKeyword */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: + case 27 /* LessThanToken */: + case 121 /* AwaitKeyword */: + case 116 /* YieldKeyword */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -17160,10 +17178,10 @@ var ts; } function isStartOfExpressionStatement() { // As per the grammar, none of '{' or 'function' or 'class' can start an expression statement. - return token() !== 16 /* OpenBraceToken */ && - token() !== 88 /* FunctionKeyword */ && - token() !== 74 /* ClassKeyword */ && - token() !== 56 /* AtToken */ && + return token() !== 17 /* OpenBraceToken */ && + token() !== 89 /* FunctionKeyword */ && + token() !== 75 /* ClassKeyword */ && + token() !== 57 /* AtToken */ && isStartOfExpression(); } function parseExpression() { @@ -17177,7 +17195,7 @@ var ts; } var expr = parseAssignmentExpressionOrHigher(); var operatorToken; - while ((operatorToken = parseOptionalToken(25 /* CommaToken */))) { + while ((operatorToken = parseOptionalToken(26 /* CommaToken */))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); } if (saveDecoratorContext) { @@ -17186,7 +17204,7 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token() !== 57 /* EqualsToken */) { + if (token() !== 58 /* EqualsToken */) { // It's not uncommon during typing for the user to miss writing the '=' token. Check if // there is no newline after the last token and if we're on an expression. If so, parse // this as an equals-value clause with a missing equals. @@ -17195,7 +17213,7 @@ var ts; // it's more likely that a { would be a allowed (as an object literal). While this // is also allowed for parameters, the risk is that we consume the { as an object // literal when it really will be for the block following the parameter. - if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 16 /* OpenBraceToken */) || !isStartOfExpression()) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 17 /* OpenBraceToken */) || !isStartOfExpression()) { // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - // do not try to parse initializer return undefined; @@ -17203,7 +17221,7 @@ var ts; } // Initializer[In, Yield] : // = AssignmentExpression[?In, ?Yield] - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); return parseAssignmentExpressionOrHigher(); } function parseAssignmentExpressionOrHigher() { @@ -17249,7 +17267,7 @@ var ts; // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single // identifier and the current token is an arrow. - if (expr.kind === 70 /* Identifier */ && token() === 35 /* EqualsGreaterThanToken */) { + if (expr.kind === 71 /* Identifier */ && token() === 36 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression(expr); } // Now see if we might be in cases '2' or '3'. @@ -17265,7 +17283,7 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token() === 115 /* YieldKeyword */) { + if (token() === 116 /* YieldKeyword */) { // If we have a 'yield' keyword, and this is a context where yield expressions are // allowed, then definitely parse out a yield expression. if (inYieldContext()) { @@ -17294,15 +17312,15 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(196 /* YieldExpression */); + var node = createNode(197 /* YieldExpression */); // YieldExpression[In] : // yield // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token() === 38 /* AsteriskToken */ || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + (token() === 39 /* AsteriskToken */ || isStartOfExpression())) { + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17313,21 +17331,21 @@ var ts; } } function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { - ts.Debug.assert(token() === 35 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + ts.Debug.assert(token() === 36 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); var node; if (asyncModifier) { - node = createNode(186 /* ArrowFunction */, asyncModifier.pos); + node = createNode(187 /* ArrowFunction */, asyncModifier.pos); node.modifiers = asyncModifier; } else { - node = createNode(186 /* ArrowFunction */, identifier.pos); + node = createNode(187 /* ArrowFunction */, identifier.pos); } - var parameter = createNode(145 /* Parameter */, identifier.pos); + var parameter = createNode(146 /* Parameter */, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = createNodeArray([parameter], parameter.pos); node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(35 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); + node.equalsGreaterThanToken = parseExpectedToken(36 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); node.body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier); return addJSDocComment(finishNode(node)); } @@ -17352,8 +17370,8 @@ var ts; // If we have an arrow, then try to parse the body. Even if not, try to parse if we // have an opening brace, just in case we're in an error state. var lastToken = token(); - arrowFunction.equalsGreaterThanToken = parseExpectedToken(35 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 35 /* EqualsGreaterThanToken */ || lastToken === 16 /* OpenBraceToken */) + arrowFunction.equalsGreaterThanToken = parseExpectedToken(36 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); + arrowFunction.body = (lastToken === 36 /* EqualsGreaterThanToken */ || lastToken === 17 /* OpenBraceToken */) ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return addJSDocComment(finishNode(arrowFunction)); @@ -17363,10 +17381,10 @@ var ts; // Unknown -> There *might* be a parenthesized arrow function here. // Speculatively look ahead to be sure, and rollback if not. function isParenthesizedArrowFunctionExpression() { - if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */ || token() === 119 /* AsyncKeyword */) { + if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */ || token() === 120 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token() === 35 /* EqualsGreaterThanToken */) { + if (token() === 36 /* EqualsGreaterThanToken */) { // ERROR RECOVERY TWEAK: // If we see a standalone => try to parse it as an arrow function expression as that's // likely what the user intended to write. @@ -17376,28 +17394,28 @@ var ts; return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0 /* False */; } - if (token() !== 18 /* OpenParenToken */ && token() !== 26 /* LessThanToken */) { + if (token() !== 19 /* OpenParenToken */ && token() !== 27 /* LessThanToken */) { return 0 /* False */; } } var first = token(); var second = nextToken(); - if (first === 18 /* OpenParenToken */) { - if (second === 19 /* CloseParenToken */) { + if (first === 19 /* OpenParenToken */) { + if (second === 20 /* CloseParenToken */) { // Simple cases: "() =>", "(): ", and "() {". // This is an arrow function with no parameters. // The last one is not actually an arrow function, // but this is probably what the user intended. var third = nextToken(); switch (third) { - case 35 /* EqualsGreaterThanToken */: - case 55 /* ColonToken */: - case 16 /* OpenBraceToken */: + case 36 /* EqualsGreaterThanToken */: + case 56 /* ColonToken */: + case 17 /* OpenBraceToken */: return 1 /* True */; default: return 0 /* False */; @@ -17409,12 +17427,12 @@ var ts; // ({ x }) => { } // ([ x ]) // ({ x }) - if (second === 20 /* OpenBracketToken */ || second === 16 /* OpenBraceToken */) { + if (second === 21 /* OpenBracketToken */ || second === 17 /* OpenBraceToken */) { return 2 /* Unknown */; } // Simple case: "(..." // This is an arrow function with a rest parameter. - if (second === 23 /* DotDotDotToken */) { + if (second === 24 /* DotDotDotToken */) { return 1 /* True */; } // If we had "(" followed by something that's not an identifier, @@ -17427,7 +17445,7 @@ var ts; } // If we have something like "(a:", then we must have a // type-annotated parameter in an arrow function expression. - if (nextToken() === 55 /* ColonToken */) { + if (nextToken() === 56 /* ColonToken */) { return 1 /* True */; } // This *could* be a parenthesized arrow function. @@ -17435,7 +17453,7 @@ var ts; return 2 /* Unknown */; } else { - ts.Debug.assert(first === 26 /* LessThanToken */); + ts.Debug.assert(first === 27 /* LessThanToken */); // If we have "<" not followed by an identifier, // then this definitely is not an arrow function. if (!isIdentifier()) { @@ -17445,17 +17463,17 @@ var ts; if (sourceFile.languageVariant === 1 /* JSX */) { var isArrowFunctionInJsx = lookAhead(function () { var third = nextToken(); - if (third === 84 /* ExtendsKeyword */) { + if (third === 85 /* ExtendsKeyword */) { var fourth = nextToken(); switch (fourth) { - case 57 /* EqualsToken */: - case 28 /* GreaterThanToken */: + case 58 /* EqualsToken */: + case 29 /* GreaterThanToken */: return false; default: return true; } } - else if (third === 25 /* CommaToken */) { + else if (third === 26 /* CommaToken */) { return true; } return false; @@ -17474,7 +17492,7 @@ var ts; } function tryParseAsyncSimpleArrowFunctionExpression() { // We do a check here so that we won't be doing unnecessarily call to "lookAhead" - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); if (isUnParenthesizedAsyncArrowFunction === 1 /* True */) { var asyncModifier = parseModifiersForArrowFunction(); @@ -17488,23 +17506,23 @@ var ts; // AsyncArrowFunctionExpression: // 1) async[no LineTerminator here]AsyncArrowBindingIdentifier[?Yield][no LineTerminator here]=>AsyncConciseBody[?In] // 2) CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await][no LineTerminator here]=>AsyncConciseBody[?In] - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { nextToken(); // If the "async" is followed by "=>" token then it is not a begining of an async arrow-function // but instead a simple arrow-function which will be parsed inside "parseAssignmentExpressionOrHigher" - if (scanner.hasPrecedingLineBreak() || token() === 35 /* EqualsGreaterThanToken */) { + if (scanner.hasPrecedingLineBreak() || token() === 36 /* EqualsGreaterThanToken */) { return 0 /* False */; } // Check for un-parenthesized AsyncArrowFunction var expr = parseBinaryExpressionOrHigher(/*precedence*/ 0); - if (!scanner.hasPrecedingLineBreak() && expr.kind === 70 /* Identifier */ && token() === 35 /* EqualsGreaterThanToken */) { + if (!scanner.hasPrecedingLineBreak() && expr.kind === 71 /* Identifier */ && token() === 36 /* EqualsGreaterThanToken */) { return 1 /* True */; } } return 0 /* False */; } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(186 /* ArrowFunction */); + var node = createNode(187 /* ArrowFunction */); node.modifiers = parseModifiersForArrowFunction(); var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */); // Arrow functions are never generators. @@ -17514,7 +17532,7 @@ var ts; // a => (b => c) // And think that "(b =>" was actually a parenthesized arrow function with a missing // close paren. - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); // If we couldn't get parameters, we definitely could not parse out an arrow function. if (!node.parameters) { return undefined; @@ -17527,19 +17545,19 @@ var ts; // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation. // // So we need just a bit of lookahead to ensure that it can only be a signature. - if (!allowAmbiguity && token() !== 35 /* EqualsGreaterThanToken */ && token() !== 16 /* OpenBraceToken */) { + if (!allowAmbiguity && token() !== 36 /* EqualsGreaterThanToken */ && token() !== 17 /* OpenBraceToken */) { // Returning undefined here will cause our caller to rewind to where we started from. return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseFunctionBlock(/*allowYield*/ false, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); } - if (token() !== 24 /* SemicolonToken */ && - token() !== 88 /* FunctionKeyword */ && - token() !== 74 /* ClassKeyword */ && + if (token() !== 25 /* SemicolonToken */ && + token() !== 89 /* FunctionKeyword */ && + token() !== 75 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { // Check if we got a plain statement (i.e. no expression-statements, no function/class expressions/declarations) @@ -17564,17 +17582,17 @@ var ts; } function parseConditionalExpressionRest(leftOperand) { // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. - var questionToken = parseOptionalToken(54 /* QuestionToken */); + var questionToken = parseOptionalToken(55 /* QuestionToken */); if (!questionToken) { return leftOperand; } // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - var node = createNode(194 /* ConditionalExpression */, leftOperand.pos); + var node = createNode(195 /* ConditionalExpression */, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(55 /* ColonToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(55 /* ColonToken */)); + node.colonToken = parseExpectedToken(56 /* ColonToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(56 /* ColonToken */)); node.whenFalse = parseAssignmentExpressionOrHigher(); return finishNode(node); } @@ -17583,7 +17601,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 91 /* InKeyword */ || t === 141 /* OfKeyword */; + return t === 92 /* InKeyword */ || t === 142 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -17612,16 +17630,16 @@ var ts; // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand // a ** b - c // ^token; leftOperand = b. Return b to the caller as a rightOperand - var consumeCurrentOperator = token() === 39 /* AsteriskAsteriskToken */ ? + var consumeCurrentOperator = token() === 40 /* AsteriskAsteriskToken */ ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token() === 91 /* InKeyword */ && inDisallowInContext()) { + if (token() === 92 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 117 /* AsKeyword */) { + if (token() === 118 /* AsKeyword */) { // Make sure we *do* perform ASI for constructs like this: // var x = foo // as (Bar) @@ -17642,48 +17660,48 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token() === 91 /* InKeyword */) { + if (inDisallowInContext() && token() === 92 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { switch (token()) { - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return 1; - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return 2; - case 48 /* BarToken */: + case 49 /* BarToken */: return 3; - case 49 /* CaretToken */: + case 50 /* CaretToken */: return 4; - case 47 /* AmpersandToken */: + case 48 /* AmpersandToken */: return 5; - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return 6; - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: - case 92 /* InstanceOfKeyword */: - case 91 /* InKeyword */: - case 117 /* AsKeyword */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: + case 93 /* InstanceOfKeyword */: + case 92 /* InKeyword */: + case 118 /* AsKeyword */: return 7; - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return 8; - case 36 /* PlusToken */: - case 37 /* MinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: return 9; - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: return 10; - case 39 /* AsteriskAsteriskToken */: + case 40 /* AsteriskAsteriskToken */: return 11; } // -1 is lower than all other precedences. Returning it will cause binary expression @@ -17691,45 +17709,45 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(193 /* BinaryExpression */, left.pos); + var node = createNode(194 /* BinaryExpression */, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(201 /* AsExpression */, left.pos); + var node = createNode(202 /* AsExpression */, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(191 /* PrefixUnaryExpression */); + var node = createNode(192 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(187 /* DeleteExpression */); + var node = createNode(188 /* DeleteExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(188 /* TypeOfExpression */); + var node = createNode(189 /* TypeOfExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(189 /* VoidExpression */); + var node = createNode(190 /* VoidExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token() === 120 /* AwaitKeyword */) { + if (token() === 121 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -17739,7 +17757,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(190 /* AwaitExpression */); + var node = createNode(191 /* AwaitExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -17763,7 +17781,7 @@ var ts; */ if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token() === 39 /* AsteriskAsteriskToken */ ? + return token() === 40 /* AsteriskAsteriskToken */ ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } @@ -17780,9 +17798,9 @@ var ts; */ var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 39 /* AsteriskAsteriskToken */) { + if (token() === 40 /* AsteriskAsteriskToken */) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 183 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 184 /* TypeAssertionExpression */) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -17807,23 +17825,23 @@ var ts; */ function parseSimpleUnaryExpression() { switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 79 /* DeleteKeyword */: + case 80 /* DeleteKeyword */: return parseDeleteExpression(); - case 102 /* TypeOfKeyword */: + case 103 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 104 /* VoidKeyword */: + case 105 /* VoidKeyword */: return parseVoidExpression(); - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: // This is modified UnaryExpression grammar in TypeScript // UnaryExpression (modified): // < type > UnaryExpression return parseTypeAssertion(); - case 120 /* AwaitKeyword */: + case 121 /* AwaitKeyword */: if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -17846,16 +17864,16 @@ var ts; // This function is called inside parseUnaryExpression to decide // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly switch (token()) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 79 /* DeleteKeyword */: - case 102 /* TypeOfKeyword */: - case 104 /* VoidKeyword */: - case 120 /* AwaitKeyword */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 80 /* DeleteKeyword */: + case 103 /* TypeOfKeyword */: + case 105 /* VoidKeyword */: + case 121 /* AwaitKeyword */: return false; - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression if (sourceFile.languageVariant !== 1 /* JSX */) { return false; @@ -17878,21 +17896,21 @@ var ts; * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ function parseIncrementExpression() { - if (token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) { - var node = createNode(191 /* PrefixUnaryExpression */); + if (token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) { + var node = createNode(192 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 /* JSX */ && token() === 26 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 /* JSX */ && token() === 27 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { // JSXElement is part of primaryExpression return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(192 /* PostfixUnaryExpression */, expression.pos); + if ((token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(193 /* PostfixUnaryExpression */, expression.pos); node.operand = expression; node.operator = token(); nextToken(); @@ -17931,7 +17949,7 @@ var ts; // the last two CallExpression productions. Or we have a MemberExpression which either // completes the LeftHandSideExpression, or starts the beginning of the first four // CallExpression productions. - var expression = token() === 96 /* SuperKeyword */ + var expression = token() === 97 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); // Now, we *may* be complete. However, we might have consumed the start of a @@ -17991,14 +18009,14 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token() === 18 /* OpenParenToken */ || token() === 22 /* DotToken */ || token() === 20 /* OpenBracketToken */) { + if (token() === 19 /* OpenParenToken */ || token() === 23 /* DotToken */ || token() === 21 /* OpenBracketToken */) { return expression; } // If we have seen "super" it must be followed by '(' or '.'. // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(178 /* PropertyAccessExpression */, expression.pos); + var node = createNode(179 /* PropertyAccessExpression */, expression.pos); node.expression = expression; - parseExpectedToken(22 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(23 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); return finishNode(node); } @@ -18006,10 +18024,10 @@ var ts; if (lhs.kind !== rhs.kind) { return false; } - if (lhs.kind === 70 /* Identifier */) { + if (lhs.kind === 71 /* Identifier */) { return lhs.text === rhs.text; } - if (lhs.kind === 98 /* ThisKeyword */) { + if (lhs.kind === 99 /* ThisKeyword */) { return true; } // If we are at this statement then we must have PropertyAccessExpression and because tag name in Jsx element can only @@ -18021,8 +18039,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 250 /* JsxOpeningElement */) { - var node = createNode(248 /* JsxElement */, opening.pos); + if (opening.kind === 251 /* JsxOpeningElement */) { + var node = createNode(249 /* JsxElement */, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -18032,7 +18050,7 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 249 /* JsxSelfClosingElement */); + ts.Debug.assert(opening.kind === 250 /* JsxSelfClosingElement */); // Nothing else to do for self-closing elements result = opening; } @@ -18043,15 +18061,15 @@ var ts; // does less damage and we can report a better error. // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios // of one sort or another. - if (inExpressionContext && token() === 26 /* LessThanToken */) { + if (inExpressionContext && token() === 27 /* LessThanToken */) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(193 /* BinaryExpression */, result.pos); + var badNode = createNode(194 /* BinaryExpression */, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(25 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); + badNode.operatorToken = createMissingNode(26 /* CommaToken */, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } @@ -18060,16 +18078,18 @@ var ts; } function parseJsxText() { var node = createNode(10 /* JsxText */, scanner.getStartPos()); + node.containsOnlyWhiteSpaces = currentToken === 11 /* JsxTextAllWhiteSpaces */; currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token()) { case 10 /* JsxText */: + case 11 /* JsxTextAllWhiteSpaces */: return parseJsxText(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseJsxExpression(/*inExpressionContext*/ false); - case 26 /* LessThanToken */: + case 27 /* LessThanToken */: return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); } ts.Debug.fail("Unknown JSX child kind " + token()); @@ -18080,7 +18100,7 @@ var ts; parsingContext |= 1 << 14 /* JsxChildren */; while (true) { currentToken = scanner.reScanJsxToken(); - if (token() === 27 /* LessThanSlashToken */) { + if (token() === 28 /* LessThanSlashToken */) { // Closing tag break; } @@ -18093,40 +18113,43 @@ var ts; else if (token() === 7 /* ConflictMarkerTrivia */) { break; } - result.push(parseJsxChild()); + var child = parseJsxChild(); + if (child) { + result.push(child); + } } result.end = scanner.getTokenPos(); parsingContext = saveParsingContext; return result; } function parseJsxAttributes() { - var jsxAttributes = createNode(253 /* JsxAttributes */); + var jsxAttributes = createNode(254 /* JsxAttributes */); jsxAttributes.properties = parseList(13 /* JsxAttributes */, parseJsxAttribute); return finishNode(jsxAttributes); } function parseJsxOpeningOrSelfClosingElement(inExpressionContext) { var fullStart = scanner.getStartPos(); - parseExpected(26 /* LessThanToken */); + parseExpected(27 /* LessThanToken */); var tagName = parseJsxElementName(); var attributes = parseJsxAttributes(); var node; - if (token() === 28 /* GreaterThanToken */) { + if (token() === 29 /* GreaterThanToken */) { // Closing tag, so scan the immediately-following text with the JSX scanning instead // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate // scanning errors - node = createNode(250 /* JsxOpeningElement */, fullStart); + node = createNode(251 /* JsxOpeningElement */, fullStart); scanJsxText(); } else { - parseExpected(40 /* SlashToken */); + parseExpected(41 /* SlashToken */); if (inExpressionContext) { - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); } else { - parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); + parseExpected(29 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } - node = createNode(249 /* JsxSelfClosingElement */, fullStart); + node = createNode(250 /* JsxSelfClosingElement */, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -18139,10 +18162,10 @@ var ts; // primaryExpression in the form of an identifier and "this" keyword // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword // We only want to consider "this" as a primaryExpression - var expression = token() === 98 /* ThisKeyword */ ? + var expression = token() === 99 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); - while (parseOptional(22 /* DotToken */)) { - var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos); + while (parseOptional(23 /* DotToken */)) { + var propertyAccess = createNode(179 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); expression = finishNode(propertyAccess); @@ -18150,29 +18173,29 @@ var ts; return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(255 /* JsxExpression */); - parseExpected(16 /* OpenBraceToken */); - if (token() !== 17 /* CloseBraceToken */) { - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(256 /* JsxExpression */); + parseExpected(17 /* OpenBraceToken */); + if (token() !== 18 /* CloseBraceToken */) { + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { - parseExpected(17 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false); + parseExpected(18 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } return finishNode(node); } function parseJsxAttribute() { - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(252 /* JsxAttribute */); + var node = createNode(253 /* JsxAttribute */); node.name = parseIdentifierName(); - if (token() === 57 /* EqualsToken */) { + if (token() === 58 /* EqualsToken */) { switch (scanJsxAttributeValue()) { case 9 /* StringLiteral */: node.initializer = parseLiteralNode(); @@ -18185,72 +18208,72 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(254 /* JsxSpreadAttribute */); - parseExpected(16 /* OpenBraceToken */); - parseExpected(23 /* DotDotDotToken */); + var node = createNode(255 /* JsxSpreadAttribute */); + parseExpected(17 /* OpenBraceToken */); + parseExpected(24 /* DotDotDotToken */); node.expression = parseExpression(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(251 /* JsxClosingElement */); - parseExpected(27 /* LessThanSlashToken */); + var node = createNode(252 /* JsxClosingElement */); + parseExpected(28 /* LessThanSlashToken */); node.tagName = parseJsxElementName(); if (inExpressionContext) { - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); } else { - parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); + parseExpected(29 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } return finishNode(node); } function parseTypeAssertion() { - var node = createNode(183 /* TypeAssertionExpression */); - parseExpected(26 /* LessThanToken */); + var node = createNode(184 /* TypeAssertionExpression */); + parseExpected(27 /* LessThanToken */); node.type = parseType(); - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseMemberExpressionRest(expression) { while (true) { - var dotToken = parseOptionalToken(22 /* DotToken */); + var dotToken = parseOptionalToken(23 /* DotToken */); if (dotToken) { - var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos); + var propertyAccess = createNode(179 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); expression = finishNode(propertyAccess); continue; } - if (token() === 50 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 51 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); - var nonNullExpression = createNode(202 /* NonNullExpression */, expression.pos); + var nonNullExpression = createNode(203 /* NonNullExpression */, expression.pos); nonNullExpression.expression = expression; expression = finishNode(nonNullExpression); continue; } // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(20 /* OpenBracketToken */)) { - var indexedAccess = createNode(179 /* ElementAccessExpression */, expression.pos); + if (!inDecoratorContext() && parseOptional(21 /* OpenBracketToken */)) { + var indexedAccess = createNode(180 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". // Check for that common pattern and report a better error message. - if (token() !== 21 /* CloseBracketToken */) { + if (token() !== 22 /* CloseBracketToken */) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { var literal = indexedAccess.argumentExpression; literal.text = internIdentifier(literal.text); } } - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); expression = finishNode(indexedAccess); continue; } - if (token() === 12 /* NoSubstitutionTemplateLiteral */ || token() === 13 /* TemplateHead */) { - var tagExpression = createNode(182 /* TaggedTemplateExpression */, expression.pos); + if (token() === 13 /* NoSubstitutionTemplateLiteral */ || token() === 14 /* TemplateHead */) { + var tagExpression = createNode(183 /* TaggedTemplateExpression */, expression.pos); tagExpression.tag = expression; - tagExpression.template = token() === 12 /* NoSubstitutionTemplateLiteral */ + tagExpression.template = token() === 13 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -18262,7 +18285,7 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { // See if this is the start of a generic invocation. If so, consume it and // keep checking for postfix expressions. Otherwise, it's just a '<' that's // part of an arithmetic expression. Break out so we consume it higher in the @@ -18271,15 +18294,15 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(180 /* CallExpression */, expression.pos); + var callExpr = createNode(181 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token() === 18 /* OpenParenToken */) { - var callExpr = createNode(180 /* CallExpression */, expression.pos); + else if (token() === 19 /* OpenParenToken */) { + var callExpr = createNode(181 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -18289,17 +18312,17 @@ var ts; } } function parseArgumentList() { - parseExpected(18 /* OpenParenToken */); + parseExpected(19 /* OpenParenToken */); var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return result; } function parseTypeArgumentsInExpression() { - if (!parseOptional(26 /* LessThanToken */)) { + if (!parseOptional(27 /* LessThanToken */)) { return undefined; } var typeArguments = parseDelimitedList(19 /* TypeArguments */, parseType); - if (!parseExpected(28 /* GreaterThanToken */)) { + if (!parseExpected(29 /* GreaterThanToken */)) { // If it doesn't have the closing > then it's definitely not an type argument list. return undefined; } @@ -18311,32 +18334,32 @@ var ts; } function canFollowTypeArgumentsInExpression() { switch (token()) { - case 18 /* OpenParenToken */: // foo( + case 19 /* OpenParenToken */: // foo( // this case are the only case where this token can legally follow a type argument // list. So we definitely want to treat this as a type arg list. - case 22 /* DotToken */: // foo. - case 19 /* CloseParenToken */: // foo) - case 21 /* CloseBracketToken */: // foo] - case 55 /* ColonToken */: // foo: - case 24 /* SemicolonToken */: // foo; - case 54 /* QuestionToken */: // foo? - case 31 /* EqualsEqualsToken */: // foo == - case 33 /* EqualsEqualsEqualsToken */: // foo === - case 32 /* ExclamationEqualsToken */: // foo != - case 34 /* ExclamationEqualsEqualsToken */: // foo !== - case 52 /* AmpersandAmpersandToken */: // foo && - case 53 /* BarBarToken */: // foo || - case 49 /* CaretToken */: // foo ^ - case 47 /* AmpersandToken */: // foo & - case 48 /* BarToken */: // foo | - case 17 /* CloseBraceToken */: // foo } + case 23 /* DotToken */: // foo. + case 20 /* CloseParenToken */: // foo) + case 22 /* CloseBracketToken */: // foo] + case 56 /* ColonToken */: // foo: + case 25 /* SemicolonToken */: // foo; + case 55 /* QuestionToken */: // foo? + case 32 /* EqualsEqualsToken */: // foo == + case 34 /* EqualsEqualsEqualsToken */: // foo === + case 33 /* ExclamationEqualsToken */: // foo != + case 35 /* ExclamationEqualsEqualsToken */: // foo !== + case 53 /* AmpersandAmpersandToken */: // foo && + case 54 /* BarBarToken */: // foo || + case 50 /* CaretToken */: // foo ^ + case 48 /* AmpersandToken */: // foo & + case 49 /* BarToken */: // foo | + case 18 /* CloseBraceToken */: // foo } case 1 /* EndOfFileToken */: // these cases can't legally follow a type arg list. However, they're not legal // expressions either. The user is probably in the middle of a generic type. So // treat it as such. return true; - case 25 /* CommaToken */: // foo, - case 16 /* OpenBraceToken */: // foo { + case 26 /* CommaToken */: // foo, + case 17 /* OpenBraceToken */: // foo { // We don't want to treat these as type arguments. Otherwise we'll parse this // as an invocation expression. Instead, we want to parse out the expression // in isolation from the type arguments. @@ -18349,21 +18372,21 @@ var ts; switch (token()) { case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 94 /* NullKeyword */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 95 /* NullKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseTokenNode(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseParenthesizedExpression(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseArrayLiteralExpression(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. // If we encounter `async [no LineTerminator here] function` then this is an async // function; otherwise, its an identifier. @@ -18371,68 +18394,68 @@ var ts; break; } return parseFunctionExpression(); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassExpression(); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionExpression(); - case 93 /* NewKeyword */: + case 94 /* NewKeyword */: return parseNewExpression(); - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - if (reScanSlashToken() === 11 /* RegularExpressionLiteral */) { + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + if (reScanSlashToken() === 12 /* RegularExpressionLiteral */) { return parseLiteralNode(); } break; - case 13 /* TemplateHead */: + case 14 /* TemplateHead */: return parseTemplateExpression(); } return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(184 /* ParenthesizedExpression */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(185 /* ParenthesizedExpression */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseSpreadElement() { - var node = createNode(197 /* SpreadElement */); - parseExpected(23 /* DotDotDotToken */); + var node = createNode(198 /* SpreadElement */); + parseExpected(24 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token() === 23 /* DotDotDotToken */ ? parseSpreadElement() : - token() === 25 /* CommaToken */ ? createNode(199 /* OmittedExpression */) : + return token() === 24 /* DotDotDotToken */ ? parseSpreadElement() : + token() === 26 /* CommaToken */ ? createNode(200 /* OmittedExpression */) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(176 /* ArrayLiteralExpression */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(177 /* ArrayLiteralExpression */); + parseExpected(21 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(124 /* GetKeyword */)) { - return parseAccessorDeclaration(152 /* GetAccessor */, fullStart, decorators, modifiers); + if (parseContextualModifier(125 /* GetKeyword */)) { + return parseAccessorDeclaration(153 /* GetAccessor */, fullStart, decorators, modifiers); } - else if (parseContextualModifier(134 /* SetKeyword */)) { - return parseAccessorDeclaration(153 /* SetAccessor */, fullStart, decorators, modifiers); + else if (parseContextualModifier(135 /* SetKeyword */)) { + return parseAccessorDeclaration(154 /* SetAccessor */, fullStart, decorators, modifiers); } return undefined; } function parseObjectLiteralElement() { var fullStart = scanner.getStartPos(); - var dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); if (dotDotDotToken) { - var spreadElement = createNode(262 /* SpreadAssignment */, fullStart); + var spreadElement = createNode(263 /* SpreadAssignment */, fullStart); spreadElement.expression = parseAssignmentExpressionOrHigher(); return addJSDocComment(finishNode(spreadElement)); } @@ -18442,12 +18465,12 @@ var ts; if (accessor) { return accessor; } - var asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + var asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (asteriskToken || token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (asteriskToken || token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } // check if it is short-hand property assignment or normal property assignment @@ -18455,12 +18478,12 @@ var ts; // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 /* CommaToken */ || token() === 17 /* CloseBraceToken */ || token() === 57 /* EqualsToken */); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 26 /* CommaToken */ || token() === 18 /* CloseBraceToken */ || token() === 58 /* EqualsToken */); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(261 /* ShorthandPropertyAssignment */, fullStart); + var shorthandDeclaration = createNode(262 /* ShorthandPropertyAssignment */, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; - var equalsToken = parseOptionalToken(57 /* EqualsToken */); + var equalsToken = parseOptionalToken(58 /* EqualsToken */); if (equalsToken) { shorthandDeclaration.equalsToken = equalsToken; shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); @@ -18468,23 +18491,23 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(260 /* PropertyAssignment */, fullStart); + var propertyAssignment = createNode(261 /* PropertyAssignment */, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); return addJSDocComment(finishNode(propertyAssignment)); } } function parseObjectLiteralExpression() { - var node = createNode(177 /* ObjectLiteralExpression */); - parseExpected(16 /* OpenBraceToken */); + var node = createNode(178 /* ObjectLiteralExpression */); + parseExpected(17 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimiter*/ true); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseFunctionExpression() { @@ -18497,10 +18520,10 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(/*val*/ false); } - var node = createNode(185 /* FunctionExpression */); + var node = createNode(186 /* FunctionExpression */); node.modifiers = parseModifiers(); - parseExpected(88 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + parseExpected(89 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var isGenerator = !!node.asteriskToken; var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */); node.name = @@ -18508,7 +18531,7 @@ var ts; isGenerator ? doInYieldContext(parseOptionalIdentifier) : isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); if (saveDecoratorContext) { setDecoratorContext(/*val*/ true); @@ -18520,30 +18543,30 @@ var ts; } function parseNewExpression() { var fullStart = scanner.getStartPos(); - parseExpected(93 /* NewKeyword */); - if (parseOptional(22 /* DotToken */)) { - var node_1 = createNode(203 /* MetaProperty */, fullStart); - node_1.keywordToken = 93 /* NewKeyword */; + parseExpected(94 /* NewKeyword */); + if (parseOptional(23 /* DotToken */)) { + var node_1 = createNode(204 /* MetaProperty */, fullStart); + node_1.keywordToken = 94 /* NewKeyword */; node_1.name = parseIdentifierName(); return finishNode(node_1); } - var node = createNode(181 /* NewExpression */, fullStart); + var node = createNode(182 /* NewExpression */, fullStart); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token() === 18 /* OpenParenToken */) { + if (node.typeArguments || token() === 19 /* OpenParenToken */) { node.arguments = parseArgumentList(); } return finishNode(node); } // STATEMENTS function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(206 /* Block */); - if (parseExpected(16 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { + var node = createNode(207 /* Block */); + if (parseExpected(17 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { if (scanner.hasPrecedingLineBreak()) { node.multiLine = true; } node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.statements = createMissingList(); @@ -18570,52 +18593,52 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(208 /* EmptyStatement */); - parseExpected(24 /* SemicolonToken */); + var node = createNode(209 /* EmptyStatement */); + parseExpected(25 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(210 /* IfStatement */); - parseExpected(89 /* IfKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(211 /* IfStatement */); + parseExpected(90 /* IfKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(81 /* ElseKeyword */) ? parseStatement() : undefined; + node.elseStatement = parseOptional(82 /* ElseKeyword */) ? parseStatement() : undefined; return finishNode(node); } function parseDoStatement() { - var node = createNode(211 /* DoStatement */); - parseExpected(80 /* DoKeyword */); + var node = createNode(212 /* DoStatement */); + parseExpected(81 /* DoKeyword */); node.statement = parseStatement(); - parseExpected(105 /* WhileKeyword */); - parseExpected(18 /* OpenParenToken */); + parseExpected(106 /* WhileKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby // do;while(0)x will have a semicolon inserted before x. - parseOptional(24 /* SemicolonToken */); + parseOptional(25 /* SemicolonToken */); return finishNode(node); } function parseWhileStatement() { - var node = createNode(212 /* WhileStatement */); - parseExpected(105 /* WhileKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(213 /* WhileStatement */); + parseExpected(106 /* WhileKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.statement = parseStatement(); return finishNode(node); } function parseForOrForInOrForOfStatement() { var pos = getNodePos(); - parseExpected(87 /* ForKeyword */); - var awaitToken = parseOptionalToken(120 /* AwaitKeyword */); - parseExpected(18 /* OpenParenToken */); + parseExpected(88 /* ForKeyword */); + var awaitToken = parseOptionalToken(121 /* AwaitKeyword */); + parseExpected(19 /* OpenParenToken */); var initializer = undefined; - if (token() !== 24 /* SemicolonToken */) { - if (token() === 103 /* VarKeyword */ || token() === 109 /* LetKeyword */ || token() === 75 /* ConstKeyword */) { + if (token() !== 25 /* SemicolonToken */) { + if (token() === 104 /* VarKeyword */ || token() === 110 /* LetKeyword */ || token() === 76 /* ConstKeyword */) { initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } else { @@ -18623,33 +18646,33 @@ var ts; } } var forOrForInOrForOfStatement; - if (awaitToken ? parseExpected(141 /* OfKeyword */) : parseOptional(141 /* OfKeyword */)) { - var forOfStatement = createNode(215 /* ForOfStatement */, pos); + if (awaitToken ? parseExpected(142 /* OfKeyword */) : parseOptional(142 /* OfKeyword */)) { + var forOfStatement = createNode(216 /* ForOfStatement */, pos); forOfStatement.awaitModifier = awaitToken; forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forOfStatement; } - else if (parseOptional(91 /* InKeyword */)) { - var forInStatement = createNode(214 /* ForInStatement */, pos); + else if (parseOptional(92 /* InKeyword */)) { + var forInStatement = createNode(215 /* ForInStatement */, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forInStatement; } else { - var forStatement = createNode(213 /* ForStatement */, pos); + var forStatement = createNode(214 /* ForStatement */, pos); forStatement.initializer = initializer; - parseExpected(24 /* SemicolonToken */); - if (token() !== 24 /* SemicolonToken */ && token() !== 19 /* CloseParenToken */) { + parseExpected(25 /* SemicolonToken */); + if (token() !== 25 /* SemicolonToken */ && token() !== 20 /* CloseParenToken */) { forStatement.condition = allowInAnd(parseExpression); } - parseExpected(24 /* SemicolonToken */); - if (token() !== 19 /* CloseParenToken */) { + parseExpected(25 /* SemicolonToken */); + if (token() !== 20 /* CloseParenToken */) { forStatement.incrementor = allowInAnd(parseExpression); } - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); forOrForInOrForOfStatement = forStatement; } forOrForInOrForOfStatement.statement = parseStatement(); @@ -18657,7 +18680,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 217 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */); + parseExpected(kind === 218 /* BreakStatement */ ? 72 /* BreakKeyword */ : 77 /* ContinueKeyword */); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -18665,8 +18688,8 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(218 /* ReturnStatement */); - parseExpected(95 /* ReturnKeyword */); + var node = createNode(219 /* ReturnStatement */); + parseExpected(96 /* ReturnKeyword */); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); } @@ -18674,42 +18697,42 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(219 /* WithStatement */); - parseExpected(106 /* WithKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(220 /* WithStatement */); + parseExpected(107 /* WithKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); node.statement = parseStatement(); return finishNode(node); } function parseCaseClause() { - var node = createNode(256 /* CaseClause */); - parseExpected(72 /* CaseKeyword */); + var node = createNode(257 /* CaseClause */); + parseExpected(73 /* CaseKeyword */); node.expression = allowInAnd(parseExpression); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(node); } function parseDefaultClause() { - var node = createNode(257 /* DefaultClause */); - parseExpected(78 /* DefaultKeyword */); - parseExpected(55 /* ColonToken */); + var node = createNode(258 /* DefaultClause */); + parseExpected(79 /* DefaultKeyword */); + parseExpected(56 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token() === 72 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 73 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(220 /* SwitchStatement */); - parseExpected(97 /* SwitchKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(221 /* SwitchStatement */); + parseExpected(98 /* SwitchKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); - parseExpected(19 /* CloseParenToken */); - var caseBlock = createNode(234 /* CaseBlock */, scanner.getStartPos()); - parseExpected(16 /* OpenBraceToken */); + parseExpected(20 /* CloseParenToken */); + var caseBlock = createNode(235 /* CaseBlock */, scanner.getStartPos()); + parseExpected(17 /* OpenBraceToken */); caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); node.caseBlock = finishNode(caseBlock); return finishNode(node); } @@ -18721,39 +18744,39 @@ var ts; // directly as that might consume an expression on the following line. // We just return 'undefined' in that case. The actual error will be reported in the // grammar walker. - var node = createNode(222 /* ThrowStatement */); - parseExpected(99 /* ThrowKeyword */); + var node = createNode(223 /* ThrowStatement */); + parseExpected(100 /* ThrowKeyword */); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } // TODO: Review for error recovery function parseTryStatement() { - var node = createNode(223 /* TryStatement */); - parseExpected(101 /* TryKeyword */); + var node = createNode(224 /* TryStatement */); + parseExpected(102 /* TryKeyword */); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - node.catchClause = token() === 73 /* CatchKeyword */ ? parseCatchClause() : undefined; + node.catchClause = token() === 74 /* CatchKeyword */ ? parseCatchClause() : undefined; // If we don't have a catch clause, then we must have a finally clause. Try to parse // one out no matter what. - if (!node.catchClause || token() === 86 /* FinallyKeyword */) { - parseExpected(86 /* FinallyKeyword */); + if (!node.catchClause || token() === 87 /* FinallyKeyword */) { + parseExpected(87 /* FinallyKeyword */); node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(259 /* CatchClause */); - parseExpected(73 /* CatchKeyword */); - if (parseExpected(18 /* OpenParenToken */)) { + var result = createNode(260 /* CatchClause */); + parseExpected(74 /* CatchKeyword */); + if (parseExpected(19 /* OpenParenToken */)) { result.variableDeclaration = parseVariableDeclaration(); } - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); result.block = parseBlock(/*ignoreMissingOpenBrace*/ false); return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(224 /* DebuggerStatement */); - parseExpected(77 /* DebuggerKeyword */); + var node = createNode(225 /* DebuggerStatement */); + parseExpected(78 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); } @@ -18763,14 +18786,14 @@ var ts; // a colon. var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); - if (expression.kind === 70 /* Identifier */ && parseOptional(55 /* ColonToken */)) { - var labeledStatement = createNode(221 /* LabeledStatement */, fullStart); + if (expression.kind === 71 /* Identifier */ && parseOptional(56 /* ColonToken */)) { + var labeledStatement = createNode(222 /* LabeledStatement */, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(209 /* ExpressionStatement */, fullStart); + var expressionStatement = createNode(210 /* ExpressionStatement */, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -18782,11 +18805,11 @@ var ts; } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 74 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 75 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 88 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 89 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); @@ -18795,12 +18818,12 @@ var ts; function isDeclaration() { while (true) { switch (token()) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: return true; // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; // however, an identifier cannot be followed by another identifier on the same line. This is what we @@ -18823,41 +18846,41 @@ var ts; // I {} // // could be legal, it would add complexity for very little gain. - case 108 /* InterfaceKeyword */: - case 137 /* TypeKeyword */: + case 109 /* InterfaceKeyword */: + case 138 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 116 /* AbstractKeyword */: - case 119 /* AsyncKeyword */: - case 123 /* DeclareKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 113 /* PublicKeyword */: - case 130 /* ReadonlyKeyword */: + case 117 /* AbstractKeyword */: + case 120 /* AsyncKeyword */: + case 124 /* DeclareKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 131 /* ReadonlyKeyword */: nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 140 /* GlobalKeyword */: + case 141 /* GlobalKeyword */: nextToken(); - return token() === 16 /* OpenBraceToken */ || token() === 70 /* Identifier */ || token() === 83 /* ExportKeyword */; - case 90 /* ImportKeyword */: + return token() === 17 /* OpenBraceToken */ || token() === 71 /* Identifier */ || token() === 84 /* ExportKeyword */; + case 91 /* ImportKeyword */: nextToken(); - return token() === 9 /* StringLiteral */ || token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token()); - case 83 /* ExportKeyword */: + return token() === 9 /* StringLiteral */ || token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token()); + case 84 /* ExportKeyword */: nextToken(); - if (token() === 57 /* EqualsToken */ || token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */ || token() === 78 /* DefaultKeyword */ || - token() === 117 /* AsKeyword */) { + if (token() === 58 /* EqualsToken */ || token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */ || token() === 79 /* DefaultKeyword */ || + token() === 118 /* AsKeyword */) { return true; } continue; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: nextToken(); continue; default: @@ -18870,49 +18893,49 @@ var ts; } function isStartOfStatement() { switch (token()) { - case 56 /* AtToken */: - case 24 /* SemicolonToken */: - case 16 /* OpenBraceToken */: - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 88 /* FunctionKeyword */: - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: - case 89 /* IfKeyword */: - case 80 /* DoKeyword */: - case 105 /* WhileKeyword */: - case 87 /* ForKeyword */: - case 76 /* ContinueKeyword */: - case 71 /* BreakKeyword */: - case 95 /* ReturnKeyword */: - case 106 /* WithKeyword */: - case 97 /* SwitchKeyword */: - case 99 /* ThrowKeyword */: - case 101 /* TryKeyword */: - case 77 /* DebuggerKeyword */: + case 57 /* AtToken */: + case 25 /* SemicolonToken */: + case 17 /* OpenBraceToken */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 89 /* FunctionKeyword */: + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: + case 90 /* IfKeyword */: + case 81 /* DoKeyword */: + case 106 /* WhileKeyword */: + case 88 /* ForKeyword */: + case 77 /* ContinueKeyword */: + case 72 /* BreakKeyword */: + case 96 /* ReturnKeyword */: + case 107 /* WithKeyword */: + case 98 /* SwitchKeyword */: + case 100 /* ThrowKeyword */: + case 102 /* TryKeyword */: + case 78 /* DebuggerKeyword */: // 'catch' and 'finally' do not actually indicate that the code is part of a statement, // however, we say they are here so that we may gracefully parse them and error later. - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return true; - case 75 /* ConstKeyword */: - case 83 /* ExportKeyword */: - case 90 /* ImportKeyword */: + case 76 /* ConstKeyword */: + case 84 /* ExportKeyword */: + case 91 /* ImportKeyword */: return isStartOfDeclaration(); - case 119 /* AsyncKeyword */: - case 123 /* DeclareKeyword */: - case 108 /* InterfaceKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: - case 137 /* TypeKeyword */: - case 140 /* GlobalKeyword */: + case 120 /* AsyncKeyword */: + case 124 /* DeclareKeyword */: + case 109 /* InterfaceKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: + case 138 /* TypeKeyword */: + case 141 /* GlobalKeyword */: // When these don't start a declaration, they're an identifier in an expression statement return true; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: // When these don't start a declaration, they may be the start of a class member if an identifier // immediately follows. Otherwise they're an identifier in an expression statement. return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); @@ -18922,7 +18945,7 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token() === 16 /* OpenBraceToken */ || token() === 20 /* OpenBracketToken */; + return isIdentifier() || token() === 17 /* OpenBraceToken */ || token() === 21 /* OpenBracketToken */; } function isLetDeclaration() { // In ES6 'let' always starts a lexical declaration if followed by an identifier or { @@ -18931,67 +18954,67 @@ var ts; } function parseStatement() { switch (token()) { - case 24 /* SemicolonToken */: + case 25 /* SemicolonToken */: return parseEmptyStatement(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseBlock(/*ignoreMissingOpenBrace*/ false); - case 103 /* VarKeyword */: + case 104 /* VarKeyword */: return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 109 /* LetKeyword */: + case 110 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); } break; - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined); - case 89 /* IfKeyword */: + case 90 /* IfKeyword */: return parseIfStatement(); - case 80 /* DoKeyword */: + case 81 /* DoKeyword */: return parseDoStatement(); - case 105 /* WhileKeyword */: + case 106 /* WhileKeyword */: return parseWhileStatement(); - case 87 /* ForKeyword */: + case 88 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 76 /* ContinueKeyword */: - return parseBreakOrContinueStatement(216 /* ContinueStatement */); - case 71 /* BreakKeyword */: - return parseBreakOrContinueStatement(217 /* BreakStatement */); - case 95 /* ReturnKeyword */: + case 77 /* ContinueKeyword */: + return parseBreakOrContinueStatement(217 /* ContinueStatement */); + case 72 /* BreakKeyword */: + return parseBreakOrContinueStatement(218 /* BreakStatement */); + case 96 /* ReturnKeyword */: return parseReturnStatement(); - case 106 /* WithKeyword */: + case 107 /* WithKeyword */: return parseWithStatement(); - case 97 /* SwitchKeyword */: + case 98 /* SwitchKeyword */: return parseSwitchStatement(); - case 99 /* ThrowKeyword */: + case 100 /* ThrowKeyword */: return parseThrowStatement(); - case 101 /* TryKeyword */: + case 102 /* TryKeyword */: // Include 'catch' and 'finally' for error recovery. - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return parseTryStatement(); - case 77 /* DebuggerKeyword */: + case 78 /* DebuggerKeyword */: return parseDebuggerStatement(); - case 56 /* AtToken */: + case 57 /* AtToken */: return parseDeclaration(); - case 119 /* AsyncKeyword */: - case 108 /* InterfaceKeyword */: - case 137 /* TypeKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: - case 123 /* DeclareKeyword */: - case 75 /* ConstKeyword */: - case 82 /* EnumKeyword */: - case 83 /* ExportKeyword */: - case 90 /* ImportKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 113 /* PublicKeyword */: - case 116 /* AbstractKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: - case 140 /* GlobalKeyword */: + case 120 /* AsyncKeyword */: + case 109 /* InterfaceKeyword */: + case 138 /* TypeKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: + case 124 /* DeclareKeyword */: + case 76 /* ConstKeyword */: + case 83 /* EnumKeyword */: + case 84 /* ExportKeyword */: + case 91 /* ImportKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 117 /* AbstractKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: + case 141 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -19004,33 +19027,33 @@ var ts; var decorators = parseDecorators(); var modifiers = parseModifiers(); switch (token()) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: return parseVariableStatement(fullStart, decorators, modifiers); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 74 /* ClassKeyword */: + case 75 /* ClassKeyword */: return parseClassDeclaration(fullStart, decorators, modifiers); - case 108 /* InterfaceKeyword */: + case 109 /* InterfaceKeyword */: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 137 /* TypeKeyword */: + case 138 /* TypeKeyword */: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 82 /* EnumKeyword */: + case 83 /* EnumKeyword */: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 140 /* GlobalKeyword */: - case 127 /* ModuleKeyword */: - case 128 /* NamespaceKeyword */: + case 141 /* GlobalKeyword */: + case 128 /* ModuleKeyword */: + case 129 /* NamespaceKeyword */: return parseModuleDeclaration(fullStart, decorators, modifiers); - case 90 /* ImportKeyword */: + case 91 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: nextToken(); switch (token()) { - case 78 /* DefaultKeyword */: - case 57 /* EqualsToken */: + case 79 /* DefaultKeyword */: + case 58 /* EqualsToken */: return parseExportAssignment(fullStart, decorators, modifiers); - case 117 /* AsKeyword */: + case 118 /* AsKeyword */: return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); default: return parseExportDeclaration(fullStart, decorators, modifiers); @@ -19039,7 +19062,7 @@ var ts; if (decorators || modifiers) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(246 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(247 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; node.modifiers = modifiers; @@ -19052,7 +19075,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9 /* StringLiteral */); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token() !== 16 /* OpenBraceToken */ && canParseSemicolon()) { + if (token() !== 17 /* OpenBraceToken */ && canParseSemicolon()) { parseSemicolon(); return; } @@ -19060,25 +19083,25 @@ var ts; } // DECLARATIONS function parseArrayBindingElement() { - if (token() === 25 /* CommaToken */) { - return createNode(199 /* OmittedExpression */); + if (token() === 26 /* CommaToken */) { + return createNode(200 /* OmittedExpression */); } - var node = createNode(175 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(176 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(175 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */); + var node = createNode(176 /* BindingElement */); + node.dotDotDotToken = parseOptionalToken(24 /* DotDotDotToken */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token() !== 55 /* ColonToken */) { + if (tokenIsIdentifier && token() !== 56 /* ColonToken */) { node.name = propertyName; } else { - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } @@ -19086,33 +19109,33 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(173 /* ObjectBindingPattern */); - parseExpected(16 /* OpenBraceToken */); + var node = createNode(174 /* ObjectBindingPattern */); + parseExpected(17 /* OpenBraceToken */); node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(174 /* ArrayBindingPattern */); - parseExpected(20 /* OpenBracketToken */); + var node = createNode(175 /* ArrayBindingPattern */); + parseExpected(21 /* OpenBracketToken */); node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(node); } function isIdentifierOrPattern() { - return token() === 16 /* OpenBraceToken */ || token() === 20 /* OpenBracketToken */ || isIdentifier(); + return token() === 17 /* OpenBraceToken */ || token() === 21 /* OpenBracketToken */ || isIdentifier(); } function parseIdentifierOrPattern() { - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return parseArrayBindingPattern(); } - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(225 /* VariableDeclaration */); + var node = createNode(226 /* VariableDeclaration */); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token())) { @@ -19121,14 +19144,14 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(226 /* VariableDeclarationList */); + var node = createNode(227 /* VariableDeclarationList */); switch (token()) { - case 103 /* VarKeyword */: + case 104 /* VarKeyword */: break; - case 109 /* LetKeyword */: + case 110 /* LetKeyword */: node.flags |= 1 /* Let */; break; - case 75 /* ConstKeyword */: + case 76 /* ConstKeyword */: node.flags |= 2 /* Const */; break; default: @@ -19144,7 +19167,7 @@ var ts; // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - if (token() === 141 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 142 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -19156,10 +19179,10 @@ var ts; return finishNode(node); } function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 19 /* CloseParenToken */; + return nextTokenIsIdentifier() && nextToken() === 20 /* CloseParenToken */; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(207 /* VariableStatement */, fullStart); + var node = createNode(208 /* VariableStatement */, fullStart); node.decorators = decorators; node.modifiers = modifiers; node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); @@ -19167,29 +19190,29 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(227 /* FunctionDeclaration */, fullStart); + var node = createNode(228 /* FunctionDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(88 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + parseExpected(89 /* FunctionKeyword */); + node.asteriskToken = parseOptionalToken(39 /* AsteriskToken */); node.name = ts.hasModifier(node, 512 /* Default */) ? parseOptionalIdentifier() : parseIdentifier(); var isGenerator = !!node.asteriskToken; var isAsync = ts.hasModifier(node, 256 /* Async */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(151 /* Constructor */, pos); + var node = createNode(152 /* Constructor */, pos); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(122 /* ConstructorKeyword */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + parseExpected(123 /* ConstructorKeyword */); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, ts.Diagnostics.or_expected); return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(150 /* MethodDeclaration */, fullStart); + var method = createNode(151 /* MethodDeclaration */, fullStart); method.decorators = decorators; method.modifiers = modifiers; method.asteriskToken = asteriskToken; @@ -19197,12 +19220,12 @@ var ts; method.questionToken = questionToken; var isGenerator = !!asteriskToken; var isAsync = ts.hasModifier(method, 256 /* Async */); - fillSignature(55 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); + fillSignature(56 /* ColonToken */, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(148 /* PropertyDeclaration */, fullStart); + var property = createNode(149 /* PropertyDeclaration */, fullStart); property.decorators = decorators; property.modifiers = modifiers; property.name = name; @@ -19224,12 +19247,12 @@ var ts; return addJSDocComment(finishNode(property)); } function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(38 /* AsteriskToken */); + var asteriskToken = parseOptionalToken(39 /* AsteriskToken */); var name = parsePropertyName(); // Note: this is not legal as per the grammar. But we allow it in the parser and // report an error in the grammar checker. - var questionToken = parseOptionalToken(54 /* QuestionToken */); - if (asteriskToken || token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) { + var questionToken = parseOptionalToken(55 /* QuestionToken */); + if (asteriskToken || token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -19244,17 +19267,17 @@ var ts; node.decorators = decorators; node.modifiers = modifiers; node.name = parsePropertyName(); - fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(56 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return addJSDocComment(finishNode(node)); } function isClassMemberModifier(idToken) { switch (idToken) { - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 114 /* StaticKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 115 /* StaticKeyword */: + case 131 /* ReadonlyKeyword */: return true; default: return false; @@ -19262,7 +19285,7 @@ var ts; } function isClassMemberStart() { var idToken; - if (token() === 56 /* AtToken */) { + if (token() === 57 /* AtToken */) { return true; } // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. @@ -19279,7 +19302,7 @@ var ts; } nextToken(); } - if (token() === 38 /* AsteriskToken */) { + if (token() === 39 /* AsteriskToken */) { return true; } // Try to get the first property-like token following all modifiers. @@ -19289,23 +19312,23 @@ var ts; nextToken(); } // Index signatures and computed properties are class members; we can parse. - if (token() === 20 /* OpenBracketToken */) { + if (token() === 21 /* OpenBracketToken */) { return true; } // If we were able to get any potential identifier... if (idToken !== undefined) { // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 134 /* SetKeyword */ || idToken === 124 /* GetKeyword */) { + if (!ts.isKeyword(idToken) || idToken === 135 /* SetKeyword */ || idToken === 125 /* GetKeyword */) { return true; } // If it *is* a keyword, but not an accessor, check a little farther along // to see if it should actually be parsed as a class member. switch (token()) { - case 18 /* OpenParenToken */: // Method declaration - case 26 /* LessThanToken */: // Generic Method declaration - case 55 /* ColonToken */: // Type Annotation for declaration - case 57 /* EqualsToken */: // Initializer for declaration - case 54 /* QuestionToken */: + case 19 /* OpenParenToken */: // Method declaration + case 27 /* LessThanToken */: // Generic Method declaration + case 56 /* ColonToken */: // Type Annotation for declaration + case 58 /* EqualsToken */: // Initializer for declaration + case 55 /* QuestionToken */: return true; default: // Covers @@ -19322,10 +19345,10 @@ var ts; var decorators; while (true) { var decoratorStart = getNodePos(); - if (!parseOptional(56 /* AtToken */)) { + if (!parseOptional(57 /* AtToken */)) { break; } - var decorator = createNode(146 /* Decorator */, decoratorStart); + var decorator = createNode(147 /* Decorator */, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); finishNode(decorator); if (!decorators) { @@ -19352,7 +19375,7 @@ var ts; while (true) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); - if (token() === 75 /* ConstKeyword */ && permitInvalidConstAsModifier) { + if (token() === 76 /* ConstKeyword */ && permitInvalidConstAsModifier) { // We need to ensure that any subsequent modifiers appear on the same line // so that when 'const' is a standalone declaration, we don't issue an error. if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { @@ -19379,7 +19402,7 @@ var ts; } function parseModifiersForArrowFunction() { var modifiers; - if (token() === 119 /* AsyncKeyword */) { + if (token() === 120 /* AsyncKeyword */) { var modifierStart = scanner.getStartPos(); var modifierKind = token(); nextToken(); @@ -19390,8 +19413,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token() === 24 /* SemicolonToken */) { - var result = createNode(205 /* SemicolonClassElement */); + if (token() === 25 /* SemicolonToken */) { + var result = createNode(206 /* SemicolonClassElement */); nextToken(); return finishNode(result); } @@ -19402,7 +19425,7 @@ var ts; if (accessor) { return accessor; } - if (token() === 122 /* ConstructorKeyword */) { + if (token() === 123 /* ConstructorKeyword */) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -19413,13 +19436,13 @@ var ts; if (ts.tokenIsIdentifierOrKeyword(token()) || token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */ || - token() === 38 /* AsteriskToken */ || - token() === 20 /* OpenBracketToken */) { + token() === 39 /* AsteriskToken */ || + token() === 21 /* OpenBracketToken */) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { // treat this as a property declaration with a missing name. - var name = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var name = createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); return parsePropertyDeclaration(fullStart, decorators, modifiers, name, /*questionToken*/ undefined); } // 'isClassMemberStart' should have hinted not to attempt parsing. @@ -19429,24 +19452,24 @@ var ts; return parseClassDeclarationOrExpression( /*fullStart*/ scanner.getStartPos(), /*decorators*/ undefined, - /*modifiers*/ undefined, 198 /* ClassExpression */); + /*modifiers*/ undefined, 199 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 229 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(74 /* ClassKeyword */); + parseExpected(75 /* ClassKeyword */); node.name = parseNameOfClassDeclarationOrExpression(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { // ClassTail[Yield,Await] : (Modified) See 14.5 // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } node.members = parseClassMembers(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.members = createMissingList(); @@ -19464,7 +19487,7 @@ var ts; : undefined; } function isImplementsClause() { - return token() === 107 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 108 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { // ClassTail[Yield,Await] : (Modified) See 14.5 @@ -19476,8 +19499,8 @@ var ts; } function parseHeritageClause() { var tok = token(); - if (tok === 84 /* ExtendsKeyword */ || tok === 107 /* ImplementsKeyword */) { - var node = createNode(258 /* HeritageClause */); + if (tok === 85 /* ExtendsKeyword */ || tok === 108 /* ImplementsKeyword */) { + var node = createNode(259 /* HeritageClause */); node.token = tok; nextToken(); node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); @@ -19486,24 +19509,24 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(200 /* ExpressionWithTypeArguments */); + var node = createNode(201 /* ExpressionWithTypeArguments */); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token() === 26 /* LessThanToken */) { - node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */); + if (token() === 27 /* LessThanToken */) { + node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 27 /* LessThanToken */, 29 /* GreaterThanToken */); } return finishNode(node); } function isHeritageClause() { - return token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */; + return token() === 85 /* ExtendsKeyword */ || token() === 108 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(229 /* InterfaceDeclaration */, fullStart); + var node = createNode(230 /* InterfaceDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(108 /* InterfaceKeyword */); + parseExpected(109 /* InterfaceKeyword */); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); node.heritageClauses = parseHeritageClauses(); @@ -19511,13 +19534,13 @@ var ts; return addJSDocComment(finishNode(node)); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230 /* TypeAliasDeclaration */, fullStart); + var node = createNode(231 /* TypeAliasDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(137 /* TypeKeyword */); + parseExpected(138 /* TypeKeyword */); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); node.type = parseType(); parseSemicolon(); return addJSDocComment(finishNode(node)); @@ -19527,20 +19550,20 @@ var ts; // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember() { - var node = createNode(263 /* EnumMember */, scanner.getStartPos()); + var node = createNode(264 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return addJSDocComment(finishNode(node)); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231 /* EnumDeclaration */, fullStart); + var node = createNode(232 /* EnumDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - parseExpected(82 /* EnumKeyword */); + parseExpected(83 /* EnumKeyword */); node.name = parseIdentifier(); - if (parseExpected(16 /* OpenBraceToken */)) { + if (parseExpected(17 /* OpenBraceToken */)) { node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.members = createMissingList(); @@ -19548,10 +19571,10 @@ var ts; return addJSDocComment(finishNode(node)); } function parseModuleBlock() { - var node = createNode(233 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(16 /* OpenBraceToken */)) { + var node = createNode(234 /* ModuleBlock */, scanner.getStartPos()); + if (parseExpected(17 /* OpenBraceToken */)) { node.statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); } else { node.statements = createMissingList(); @@ -19559,7 +19582,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(232 /* ModuleDeclaration */, fullStart); + var node = createNode(233 /* ModuleDeclaration */, fullStart); // If we are parsing a dotted namespace name, we want to // propagate the 'Namespace' flag across the names if set. var namespaceFlag = flags & 16 /* Namespace */; @@ -19567,16 +19590,16 @@ var ts; node.modifiers = modifiers; node.flags |= flags; node.name = parseIdentifier(); - node.body = parseOptional(22 /* DotToken */) + node.body = parseOptional(23 /* DotToken */) ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 4 /* NestedNamespace */ | namespaceFlag) : parseModuleBlock(); return addJSDocComment(finishNode(node)); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(232 /* ModuleDeclaration */, fullStart); + var node = createNode(233 /* ModuleDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (token() === 140 /* GlobalKeyword */) { + if (token() === 141 /* GlobalKeyword */) { // parse 'global' as name of global scope augmentation node.name = parseIdentifier(); node.flags |= 512 /* GlobalAugmentation */; @@ -19584,7 +19607,7 @@ var ts; else { node.name = parseLiteralNode(/*internName*/ true); } - if (token() === 16 /* OpenBraceToken */) { + if (token() === 17 /* OpenBraceToken */) { node.body = parseModuleBlock(); } else { @@ -19594,15 +19617,15 @@ var ts; } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = 0; - if (token() === 140 /* GlobalKeyword */) { + if (token() === 141 /* GlobalKeyword */) { // global augmentation return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } - else if (parseOptional(128 /* NamespaceKeyword */)) { + else if (parseOptional(129 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(127 /* ModuleKeyword */); + parseExpected(128 /* ModuleKeyword */); if (token() === 9 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } @@ -19610,58 +19633,58 @@ var ts; return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token() === 131 /* RequireKeyword */ && + return token() === 132 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { - return nextToken() === 18 /* OpenParenToken */; + return nextToken() === 19 /* OpenParenToken */; } function nextTokenIsSlash() { - return nextToken() === 40 /* SlashToken */; + return nextToken() === 41 /* SlashToken */; } function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { - var exportDeclaration = createNode(235 /* NamespaceExportDeclaration */, fullStart); + var exportDeclaration = createNode(236 /* NamespaceExportDeclaration */, fullStart); exportDeclaration.decorators = decorators; exportDeclaration.modifiers = modifiers; - parseExpected(117 /* AsKeyword */); - parseExpected(128 /* NamespaceKeyword */); + parseExpected(118 /* AsKeyword */); + parseExpected(129 /* NamespaceKeyword */); exportDeclaration.name = parseIdentifier(); parseSemicolon(); return finishNode(exportDeclaration); } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(90 /* ImportKeyword */); + parseExpected(91 /* ImportKeyword */); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token() !== 25 /* CommaToken */ && token() !== 139 /* FromKeyword */) { + if (token() !== 26 /* CommaToken */ && token() !== 140 /* FromKeyword */) { return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier); } } // Import statement - var importDeclaration = createNode(237 /* ImportDeclaration */, fullStart); + var importDeclaration = createNode(238 /* ImportDeclaration */, fullStart); importDeclaration.decorators = decorators; importDeclaration.modifiers = modifiers; // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; if (identifier || - token() === 38 /* AsteriskToken */ || - token() === 16 /* OpenBraceToken */) { + token() === 39 /* AsteriskToken */ || + token() === 17 /* OpenBraceToken */) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(139 /* FromKeyword */); + parseExpected(140 /* FromKeyword */); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); return finishNode(importDeclaration); } function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) { - var importEqualsDeclaration = createNode(236 /* ImportEqualsDeclaration */, fullStart); + var importEqualsDeclaration = createNode(237 /* ImportEqualsDeclaration */, fullStart); importEqualsDeclaration.decorators = decorators; importEqualsDeclaration.modifiers = modifiers; importEqualsDeclaration.name = identifier; - parseExpected(57 /* EqualsToken */); + parseExpected(58 /* EqualsToken */); importEqualsDeclaration.moduleReference = parseModuleReference(); parseSemicolon(); return addJSDocComment(finishNode(importEqualsDeclaration)); @@ -19673,7 +19696,7 @@ var ts; // NamedImports // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(238 /* ImportClause */, fullStart); + var importClause = createNode(239 /* ImportClause */, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding @@ -19682,8 +19705,8 @@ var ts; // If there was no default import or if there is comma token after default import // parse namespace or named imports if (!importClause.name || - parseOptional(25 /* CommaToken */)) { - importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(240 /* NamedImports */); + parseOptional(26 /* CommaToken */)) { + importClause.namedBindings = token() === 39 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(241 /* NamedImports */); } return finishNode(importClause); } @@ -19693,11 +19716,11 @@ var ts; : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { - var node = createNode(247 /* ExternalModuleReference */); - parseExpected(131 /* RequireKeyword */); - parseExpected(18 /* OpenParenToken */); + var node = createNode(248 /* ExternalModuleReference */); + parseExpected(132 /* RequireKeyword */); + parseExpected(19 /* OpenParenToken */); node.expression = parseModuleSpecifier(); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(node); } function parseModuleSpecifier() { @@ -19716,9 +19739,9 @@ var ts; function parseNamespaceImport() { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(239 /* NamespaceImport */); - parseExpected(38 /* AsteriskToken */); - parseExpected(117 /* AsKeyword */); + var namespaceImport = createNode(240 /* NamespaceImport */); + parseExpected(39 /* AsteriskToken */); + parseExpected(118 /* AsKeyword */); namespaceImport.name = parseIdentifier(); return finishNode(namespaceImport); } @@ -19731,14 +19754,14 @@ var ts; // ImportsList: // ImportSpecifier // ImportsList, ImportSpecifier - node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 240 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */); + node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 241 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 17 /* OpenBraceToken */, 18 /* CloseBraceToken */); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(245 /* ExportSpecifier */); + return parseImportOrExportSpecifier(246 /* ExportSpecifier */); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(241 /* ImportSpecifier */); + return parseImportOrExportSpecifier(242 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -19752,9 +19775,9 @@ var ts; var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token() === 117 /* AsKeyword */) { + if (token() === 118 /* AsKeyword */) { node.propertyName = identifierName; - parseExpected(117 /* AsKeyword */); + parseExpected(118 /* AsKeyword */); checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); @@ -19763,27 +19786,27 @@ var ts; else { node.name = identifierName; } - if (kind === 241 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 242 /* ImportSpecifier */ && checkIdentifierIsKeyword) { // Report error identifier expected parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(243 /* ExportDeclaration */, fullStart); + var node = createNode(244 /* ExportDeclaration */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(38 /* AsteriskToken */)) { - parseExpected(139 /* FromKeyword */); + if (parseOptional(39 /* AsteriskToken */)) { + parseExpected(140 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(244 /* NamedExports */); + node.exportClause = parseNamedImportsOrExports(245 /* NamedExports */); // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. - if (token() === 139 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { - parseExpected(139 /* FromKeyword */); + if (token() === 140 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { + parseExpected(140 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -19791,14 +19814,14 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(242 /* ExportAssignment */, fullStart); + var node = createNode(243 /* ExportAssignment */, fullStart); node.decorators = decorators; node.modifiers = modifiers; - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { node.isExportEquals = true; } else { - parseExpected(78 /* DefaultKeyword */); + parseExpected(79 /* DefaultKeyword */); } node.expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); @@ -19888,10 +19911,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return ts.hasModifier(node, 1 /* Export */) - || node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */ - || node.kind === 237 /* ImportDeclaration */ - || node.kind === 242 /* ExportAssignment */ - || node.kind === 243 /* ExportDeclaration */ + || node.kind === 237 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 248 /* ExternalModuleReference */ + || node.kind === 238 /* ImportDeclaration */ + || node.kind === 243 /* ExportAssignment */ + || node.kind === 244 /* ExportDeclaration */ ? node : undefined; }); @@ -19937,16 +19960,16 @@ var ts; (function (JSDocParser) { function isJSDocType() { switch (token()) { - case 38 /* AsteriskToken */: - case 54 /* QuestionToken */: - case 18 /* OpenParenToken */: - case 20 /* OpenBracketToken */: - case 50 /* ExclamationToken */: - case 16 /* OpenBraceToken */: - case 88 /* FunctionKeyword */: - case 23 /* DotDotDotToken */: - case 93 /* NewKeyword */: - case 98 /* ThisKeyword */: + case 39 /* AsteriskToken */: + case 55 /* QuestionToken */: + case 19 /* OpenParenToken */: + case 21 /* OpenBracketToken */: + case 51 /* ExclamationToken */: + case 17 /* OpenBraceToken */: + case 89 /* FunctionKeyword */: + case 24 /* DotDotDotToken */: + case 94 /* NewKeyword */: + case 99 /* ThisKeyword */: return true; } return ts.tokenIsIdentifierOrKeyword(token()); @@ -19966,23 +19989,23 @@ var ts; // Parses out a JSDoc type expression. /* @internal */ function parseJSDocTypeExpression() { - var result = createNode(266 /* JSDocTypeExpression */, scanner.getTokenPos()); - parseExpected(16 /* OpenBraceToken */); + var result = createNode(267 /* JSDocTypeExpression */, scanner.getTokenPos()); + parseExpected(17 /* OpenBraceToken */); result.type = parseJSDocTopLevelType(); - parseExpected(17 /* CloseBraceToken */); + parseExpected(18 /* CloseBraceToken */); fixupParentReferences(result); return finishNode(result); } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token() === 48 /* BarToken */) { - var unionType = createNode(270 /* JSDocUnionType */, type.pos); + if (token() === 49 /* BarToken */) { + var unionType = createNode(271 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token() === 57 /* EqualsToken */) { - var optionalType = createNode(277 /* JSDocOptionalType */, type.pos); + if (token() === 58 /* EqualsToken */) { + var optionalType = createNode(278 /* JSDocOptionalType */, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -19992,21 +20015,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token() === 20 /* OpenBracketToken */) { - var arrayType = createNode(269 /* JSDocArrayType */, type.pos); + if (token() === 21 /* OpenBracketToken */) { + var arrayType = createNode(270 /* JSDocArrayType */, type.pos); arrayType.elementType = type; nextToken(); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); type = finishNode(arrayType); } - else if (token() === 54 /* QuestionToken */) { - var nullableType = createNode(272 /* JSDocNullableType */, type.pos); + else if (token() === 55 /* QuestionToken */) { + var nullableType = createNode(273 /* JSDocNullableType */, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token() === 50 /* ExclamationToken */) { - var nonNullableType = createNode(273 /* JSDocNonNullableType */, type.pos); + else if (token() === 51 /* ExclamationToken */) { + var nonNullableType = createNode(274 /* JSDocNonNullableType */, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -20019,96 +20042,96 @@ var ts; } function parseBasicTypeExpression() { switch (token()) { - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: return parseJSDocAllType(); - case 54 /* QuestionToken */: + case 55 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return parseJSDocUnionType(); - case 20 /* OpenBracketToken */: + case 21 /* OpenBracketToken */: return parseJSDocTupleType(); - case 50 /* ExclamationToken */: + case 51 /* ExclamationToken */: return parseJSDocNonNullableType(); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return parseJSDocRecordType(); - case 88 /* FunctionKeyword */: + case 89 /* FunctionKeyword */: return parseJSDocFunctionType(); - case 23 /* DotDotDotToken */: + case 24 /* DotDotDotToken */: return parseJSDocVariadicType(); - case 93 /* NewKeyword */: + case 94 /* NewKeyword */: return parseJSDocConstructorType(); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return parseJSDocThisType(); - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 94 /* NullKeyword */: - case 138 /* UndefinedKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 95 /* NullKeyword */: + case 139 /* UndefinedKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: return parseTokenNode(); case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return parseJSDocLiteralType(); } return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(281 /* JSDocThisType */); + var result = createNode(282 /* JSDocThisType */); nextToken(); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(280 /* JSDocConstructorType */); + var result = createNode(281 /* JSDocConstructorType */); nextToken(); - parseExpected(55 /* ColonToken */); + parseExpected(56 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(279 /* JSDocVariadicType */); + var result = createNode(280 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(278 /* JSDocFunctionType */); + var result = createNode(279 /* JSDocFunctionType */); nextToken(); - parseExpected(18 /* OpenParenToken */); + parseExpected(19 /* OpenParenToken */); result.parameters = parseDelimitedList(23 /* JSDocFunctionParameters */, parseJSDocParameter); checkForTrailingComma(result.parameters); - parseExpected(19 /* CloseParenToken */); - if (token() === 55 /* ColonToken */) { + parseExpected(20 /* CloseParenToken */); + if (token() === 56 /* ColonToken */) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(145 /* Parameter */); + var parameter = createNode(146 /* Parameter */); parameter.type = parseJSDocType(); - if (parseOptional(57 /* EqualsToken */)) { + if (parseOptional(58 /* EqualsToken */)) { // TODO(rbuckton): Can this be changed to SyntaxKind.QuestionToken? - parameter.questionToken = createNode(57 /* EqualsToken */); + parameter.questionToken = createNode(58 /* EqualsToken */); } return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(276 /* JSDocTypeReference */); + var result = createNode(277 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); - if (token() === 26 /* LessThanToken */) { + if (token() === 27 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); } else { - while (parseOptional(22 /* DotToken */)) { - if (token() === 26 /* LessThanToken */) { + while (parseOptional(23 /* DotToken */)) { + if (token() === 27 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); break; } @@ -20125,7 +20148,7 @@ var ts; var typeArguments = parseDelimitedList(24 /* JSDocTypeArguments */, parseJSDocType); checkForTrailingComma(typeArguments); checkForEmptyTypeArgumentList(typeArguments); - parseExpected(28 /* GreaterThanToken */); + parseExpected(29 /* GreaterThanToken */); return typeArguments; } function checkForEmptyTypeArgumentList(typeArguments) { @@ -20136,28 +20159,28 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(142 /* QualifiedName */, left.pos); + var result = createNode(143 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(274 /* JSDocRecordType */); + var result = createNode(275 /* JSDocRecordType */); result.literal = parseTypeLiteral(); return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(273 /* JSDocNonNullableType */); + var result = createNode(274 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(271 /* JSDocTupleType */); + var result = createNode(272 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(26 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); return finishNode(result); } function checkForTrailingComma(list) { @@ -20167,28 +20190,28 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(270 /* JSDocUnionType */); + var result = createNode(271 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(19 /* CloseParenToken */); + parseExpected(20 /* CloseParenToken */); return finishNode(result); } function parseJSDocTypeList(firstType) { ts.Debug.assert(!!firstType); var types = createNodeArray([firstType], firstType.pos); - while (parseOptional(48 /* BarToken */)) { + while (parseOptional(49 /* BarToken */)) { types.push(parseJSDocType()); } types.end = scanner.getStartPos(); return types; } function parseJSDocAllType() { - var result = createNode(267 /* JSDocAllType */); + var result = createNode(268 /* JSDocAllType */); nextToken(); return finishNode(result); } function parseJSDocLiteralType() { - var result = createNode(292 /* JSDocLiteralType */); + var result = createNode(293 /* JSDocLiteralType */); result.literal = parseLiteralTypeNode(); return finishNode(result); } @@ -20205,17 +20228,17 @@ var ts; // Foo // Foo(?= // (?| - if (token() === 25 /* CommaToken */ || - token() === 17 /* CloseBraceToken */ || - token() === 19 /* CloseParenToken */ || - token() === 28 /* GreaterThanToken */ || - token() === 57 /* EqualsToken */ || - token() === 48 /* BarToken */) { - var result = createNode(268 /* JSDocUnknownType */, pos); + if (token() === 26 /* CommaToken */ || + token() === 18 /* CloseBraceToken */ || + token() === 20 /* CloseParenToken */ || + token() === 29 /* GreaterThanToken */ || + token() === 58 /* EqualsToken */ || + token() === 49 /* BarToken */) { + var result = createNode(269 /* JSDocUnknownType */, pos); return finishNode(result); } else { - var result = createNode(272 /* JSDocNullableType */, pos); + var result = createNode(273 /* JSDocNullableType */, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -20291,7 +20314,7 @@ var ts; } while (token() !== 1 /* EndOfFileToken */) { switch (token()) { - case 56 /* AtToken */: + case 57 /* AtToken */: if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { removeTrailingNewlines(comments); parseTag(indent); @@ -20312,7 +20335,7 @@ var ts; state = 0 /* BeginningOfLine */; indent = 0; break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: var asterisk = scanner.getTokenText(); if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { // If we've already seen an asterisk, then we can no longer parse a tag on this line @@ -20325,7 +20348,7 @@ var ts; indent += asterisk.length; } break; - case 70 /* Identifier */: + case 71 /* Identifier */: // Anything else is doc comment text. We just save it. Because it // wasn't a tag, we can no longer parse a tag on this line until we hit the next // line break. @@ -20380,7 +20403,7 @@ var ts; content.charCodeAt(start + 3) !== 42 /* asterisk */; } function createJSDocComment() { - var result = createNode(282 /* JSDocComment */, start); + var result = createNode(283 /* JSDocComment */, start); result.tags = tags; result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -20391,8 +20414,8 @@ var ts; } } function parseTag(indent) { - ts.Debug.assert(token() === 56 /* AtToken */); - var atToken = createNode(56 /* AtToken */, scanner.getTokenPos()); + ts.Debug.assert(token() === 57 /* AtToken */); + var atToken = createNode(57 /* AtToken */, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -20447,7 +20470,7 @@ var ts; comments.push(text); indent += text.length; } - while (token() !== 56 /* AtToken */ && token() !== 1 /* EndOfFileToken */) { + while (token() !== 57 /* AtToken */ && token() !== 1 /* EndOfFileToken */) { switch (token()) { case 4 /* NewLineTrivia */: if (state >= 1 /* SawAsterisk */) { @@ -20456,7 +20479,7 @@ var ts; } indent = 0; break; - case 56 /* AtToken */: + case 57 /* AtToken */: // Done break; case 5 /* WhitespaceTrivia */: @@ -20472,7 +20495,7 @@ var ts; indent += whitespace.length; } break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { // leading asterisks start recording on the *next* (non-whitespace) token state = 1 /* SawAsterisk */; @@ -20486,7 +20509,7 @@ var ts; pushComment(scanner.getTokenText()); break; } - if (token() === 56 /* AtToken */) { + if (token() === 57 /* AtToken */) { // Done break; } @@ -20497,7 +20520,7 @@ var ts; return comments; } function parseUnknownTag(atToken, tagName) { - var result = createNode(283 /* JSDocTag */, atToken.pos); + var result = createNode(284 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -20515,7 +20538,7 @@ var ts; function tryParseTypeExpression() { return tryParse(function () { skipWhitespace(); - if (token() !== 16 /* OpenBraceToken */) { + if (token() !== 17 /* OpenBraceToken */) { return undefined; } return parseJSDocTypeExpression(); @@ -20527,15 +20550,15 @@ var ts; var name; var isBracketed; // Looking for something like '[foo]' or 'foo' - if (parseOptionalToken(20 /* OpenBracketToken */)) { + if (parseOptionalToken(21 /* OpenBracketToken */)) { name = parseJSDocIdentifierName(); skipWhitespace(); isBracketed = true; // May have an optional default, e.g. '[foo = 42]' - if (parseOptionalToken(57 /* EqualsToken */)) { + if (parseOptionalToken(58 /* EqualsToken */)) { parseExpression(); } - parseExpected(21 /* CloseBracketToken */); + parseExpected(22 /* CloseBracketToken */); } else if (ts.tokenIsIdentifierOrKeyword(token())) { name = parseJSDocIdentifierName(); @@ -20554,7 +20577,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(285 /* JSDocParameterTag */, atToken.pos); + var result = createNode(286 /* JSDocParameterTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -20565,20 +20588,20 @@ var ts; return finishNode(result); } function parseReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 286 /* JSDocReturnTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(286 /* JSDocReturnTag */, atToken.pos); + var result = createNode(287 /* JSDocReturnTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function parseTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocTypeTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(287 /* JSDocTypeTag */, atToken.pos); + var result = createNode(288 /* JSDocTypeTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); @@ -20593,7 +20616,7 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected); return undefined; } - var result = createNode(290 /* JSDocPropertyTag */, atToken.pos); + var result = createNode(291 /* JSDocPropertyTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.name = name; @@ -20602,7 +20625,7 @@ var ts; } function parseAugmentsTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); - var result = createNode(284 /* JSDocAugmentsTag */, atToken.pos); + var result = createNode(285 /* JSDocAugmentsTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = typeExpression; @@ -20611,17 +20634,17 @@ var ts; function parseTypedefTag(atToken, tagName) { var typeExpression = tryParseTypeExpression(); skipWhitespace(); - var typedefTag = createNode(289 /* JSDocTypedefTag */, atToken.pos); + var typedefTag = createNode(290 /* JSDocTypedefTag */, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0); if (typedefTag.fullName) { var rightNode = typedefTag.fullName; while (true) { - if (rightNode.kind === 70 /* Identifier */ || !rightNode.body) { + if (rightNode.kind === 71 /* Identifier */ || !rightNode.body) { // if node is identifier - use it as name // otherwise use name of the rightmost part that we were able to parse - typedefTag.name = rightNode.kind === 70 /* Identifier */ ? rightNode : rightNode.name; + typedefTag.name = rightNode.kind === 71 /* Identifier */ ? rightNode : rightNode.name; break; } rightNode = rightNode.body; @@ -20630,9 +20653,9 @@ var ts; typedefTag.typeExpression = typeExpression; skipWhitespace(); if (typeExpression) { - if (typeExpression.type.kind === 276 /* JSDocTypeReference */) { + if (typeExpression.type.kind === 277 /* JSDocTypeReference */) { var jsDocTypeReference = typeExpression.type; - if (jsDocTypeReference.name.kind === 70 /* Identifier */) { + if (jsDocTypeReference.name.kind === 71 /* Identifier */) { var name = jsDocTypeReference.name; if (name.text === "Object") { typedefTag.jsDocTypeLiteral = scanChildTags(); @@ -20648,7 +20671,7 @@ var ts; } return finishNode(typedefTag); function scanChildTags() { - var jsDocTypeLiteral = createNode(291 /* JSDocTypeLiteral */, scanner.getStartPos()); + var jsDocTypeLiteral = createNode(292 /* JSDocTypeLiteral */, scanner.getStartPos()); var resumePos = scanner.getStartPos(); var canParseTag = true; var seenAsterisk = false; @@ -20656,7 +20679,7 @@ var ts; while (token() !== 1 /* EndOfFileToken */ && !parentTagTerminated) { nextJSDocToken(); switch (token()) { - case 56 /* AtToken */: + case 57 /* AtToken */: if (canParseTag) { parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); if (!parentTagTerminated) { @@ -20670,13 +20693,13 @@ var ts; canParseTag = true; seenAsterisk = false; break; - case 38 /* AsteriskToken */: + case 39 /* AsteriskToken */: if (seenAsterisk) { canParseTag = false; } seenAsterisk = true; break; - case 70 /* Identifier */: + case 71 /* Identifier */: canParseTag = false; break; case 1 /* EndOfFileToken */: @@ -20689,8 +20712,8 @@ var ts; function parseJSDocTypeNameWithNamespace(flags) { var pos = scanner.getTokenPos(); var typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (typeNameOrNamespaceName && parseOptional(22 /* DotToken */)) { - var jsDocNamespaceNode = createNode(232 /* ModuleDeclaration */, pos); + if (typeNameOrNamespaceName && parseOptional(23 /* DotToken */)) { + var jsDocNamespaceNode = createNode(233 /* ModuleDeclaration */, pos); jsDocNamespaceNode.flags |= flags; jsDocNamespaceNode.name = typeNameOrNamespaceName; jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */); @@ -20703,8 +20726,8 @@ var ts; } } function tryParseChildTag(parentTag) { - ts.Debug.assert(token() === 56 /* AtToken */); - var atToken = createNode(56 /* AtToken */, scanner.getStartPos()); + ts.Debug.assert(token() === 57 /* AtToken */); + var atToken = createNode(57 /* AtToken */, scanner.getStartPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); var tagName = parseJSDocIdentifierName(); @@ -20736,7 +20759,7 @@ var ts; return false; } function parseTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTemplateTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } // Type parameter list looks like '@template T,U,V' @@ -20748,11 +20771,11 @@ var ts; parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(144 /* TypeParameter */, name.pos); + var typeParameter = createNode(145 /* TypeParameter */, name.pos); typeParameter.name = name; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token() === 25 /* CommaToken */) { + if (token() === 26 /* CommaToken */) { nextJSDocToken(); skipWhitespace(); } @@ -20760,7 +20783,7 @@ var ts; break; } } - var result = createNode(288 /* JSDocTemplateTag */, atToken.pos); + var result = createNode(289 /* JSDocTemplateTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -20781,7 +20804,7 @@ var ts; } var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); - var result = createNode(70 /* Identifier */, pos); + var result = createNode(71 /* Identifier */, pos); result.text = content.substring(pos, end); finishNode(result, end); nextJSDocToken(); @@ -20909,7 +20932,7 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 70 /* Identifier */: + case 71 /* Identifier */: return true; } return false; @@ -21280,16 +21303,16 @@ var ts; function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations - if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 230 /* TypeAliasDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */ || node.kind === 231 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; } else if (ts.isConstEnumDeclaration(node)) { return 2 /* ConstEnumOnly */; } - else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) { + else if ((node.kind === 238 /* ImportDeclaration */ || node.kind === 237 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) { return 0 /* NonInstantiated */; } - else if (node.kind === 233 /* ModuleBlock */) { + else if (node.kind === 234 /* ModuleBlock */) { var state_1 = 0 /* NonInstantiated */; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -21308,11 +21331,11 @@ var ts; }); return state_1; } - else if (node.kind === 232 /* ModuleDeclaration */) { + else if (node.kind === 233 /* ModuleDeclaration */) { var body = node.body; return body ? getModuleInstanceState(body) : 1 /* Instantiated */; } - else if (node.kind === 70 /* Identifier */ && node.isInJSDocNamespace) { + else if (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace) { return 0 /* NonInstantiated */; } else { @@ -21449,7 +21472,7 @@ var ts; if (symbolFlags & 107455 /* Value */) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232 /* ModuleDeclaration */)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 233 /* ModuleDeclaration */)) { // other kinds of value declarations take precedence over modules symbol.valueDeclaration = node; } @@ -21462,7 +21485,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression)) { @@ -21474,21 +21497,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: return "__constructor"; - case 159 /* FunctionType */: - case 154 /* CallSignature */: + case 160 /* FunctionType */: + case 155 /* CallSignature */: return "__call"; - case 160 /* ConstructorType */: - case 155 /* ConstructSignature */: + case 161 /* ConstructorType */: + case 156 /* ConstructSignature */: return "__new"; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return "__index"; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return "__export"; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return node.isExportEquals ? "export=" : "default"; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2 /* ModuleExports */: // module.exports = ... @@ -21504,25 +21527,25 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 227 /* FunctionDeclaration */: - case 228 /* ClassDeclaration */: + case 228 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: return ts.hasModifier(node, 512 /* Default */) ? "default" : undefined; - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 145 /* Parameter */: + case 146 /* Parameter */: // Parameters with names are handled at the top of this function. Parameters // without names can only come from JSDocFunctionTypes. - ts.Debug.assert(node.parent.kind === 278 /* JSDocFunctionType */); + ts.Debug.assert(node.parent.kind === 279 /* JSDocFunctionType */); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "arg" + index; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: var parentNode = node.parent && node.parent.parent; var nameFromParentNode = void 0; - if (parentNode && parentNode.kind === 207 /* VariableStatement */) { + if (parentNode && parentNode.kind === 208 /* VariableStatement */) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70 /* Identifier */) { + if (nameIdentifier.kind === 71 /* Identifier */) { nameFromParentNode = nameIdentifier.text; } } @@ -21609,7 +21632,7 @@ var ts; // 1. multiple export default of class declaration or function declaration by checking NodeFlags.Default // 2. multiple export default of export assignment. This one doesn't have NodeFlags.Default on (as export default doesn't considered as modifiers) if (symbol.declarations && symbol.declarations.length && - (isDefaultExport || (node.kind === 242 /* ExportAssignment */ && !node.isExportEquals))) { + (isDefaultExport || (node.kind === 243 /* ExportAssignment */ && !node.isExportEquals))) { message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; } } @@ -21629,7 +21652,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedModifierFlags(node) & 1 /* Export */; if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 245 /* ExportSpecifier */ || (node.kind === 236 /* ImportEqualsDeclaration */ && hasExportModifier)) { + if (node.kind === 246 /* ExportSpecifier */ || (node.kind === 237 /* ImportEqualsDeclaration */ && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -21652,9 +21675,9 @@ var ts; // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. - var isJSDocTypedefInJSDocNamespace = node.kind === 289 /* JSDocTypedefTag */ && + var isJSDocTypedefInJSDocNamespace = node.kind === 290 /* JSDocTypedefTag */ && node.name && - node.name.kind === 70 /* Identifier */ && + node.name.kind === 71 /* Identifier */ && node.name.isInJSDocNamespace; if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32 /* ExportContext */)) || isJSDocTypedefInJSDocNamespace) { var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | @@ -21739,7 +21762,7 @@ var ts; if (hasExplicitReturn) node.flags |= 256 /* HasExplicitReturn */; } - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { node.flags |= emitFlags; } if (isIIFE) { @@ -21818,70 +21841,70 @@ var ts; return; } switch (node.kind) { - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: bindWhileStatement(node); break; - case 211 /* DoStatement */: + case 212 /* DoStatement */: bindDoStatement(node); break; - case 213 /* ForStatement */: + case 214 /* ForStatement */: bindForStatement(node); break; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 210 /* IfStatement */: + case 211 /* IfStatement */: bindIfStatement(node); break; - case 218 /* ReturnStatement */: - case 222 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 223 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 223 /* TryStatement */: + case 224 /* TryStatement */: bindTryStatement(node); break; - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: bindSwitchStatement(node); break; - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: bindCaseBlock(node); break; - case 256 /* CaseClause */: + case 257 /* CaseClause */: bindCaseClause(node); break; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: bindLabeledStatement(node); break; - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: bindBinaryExpressionFlow(node); break; - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 180 /* CallExpression */: + case 181 /* CallExpression */: bindCallExpressionFlow(node); break; - case 282 /* JSDocComment */: + case 283 /* JSDocComment */: bindJSDocComment(node); break; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: bindJSDocTypedefTag(node); break; default: @@ -21891,26 +21914,26 @@ var ts; } function isNarrowingExpression(expr) { switch (expr.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: + case 179 /* PropertyAccessExpression */: return isNarrowableReference(expr); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return hasNarrowableArgument(expr); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isNarrowingExpression(expr.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 191 /* PrefixUnaryExpression */: - return expr.operator === 50 /* ExclamationToken */ && isNarrowingExpression(expr.operand); + case 192 /* PrefixUnaryExpression */: + return expr.operator === 51 /* ExclamationToken */ && isNarrowingExpression(expr.operand); } return false; } function isNarrowableReference(expr) { - return expr.kind === 70 /* Identifier */ || - expr.kind === 98 /* ThisKeyword */ || - expr.kind === 96 /* SuperKeyword */ || - expr.kind === 178 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression); + return expr.kind === 71 /* Identifier */ || + expr.kind === 99 /* ThisKeyword */ || + expr.kind === 97 /* SuperKeyword */ || + expr.kind === 179 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -21921,41 +21944,41 @@ var ts; } } } - if (expr.expression.kind === 178 /* PropertyAccessExpression */ && + if (expr.expression.kind === 179 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression.expression)) { return true; } return false; } function isNarrowingTypeofOperands(expr1, expr2) { - return expr1.kind === 188 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */; + return expr1.kind === 189 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */; } function isNarrowingBinaryExpression(expr) { switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return isNarrowableReference(expr.left); - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return isNarrowingExpression(expr.right); } return false; } function isNarrowableOperand(expr) { switch (expr.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return isNarrowableOperand(expr.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return isNarrowableOperand(expr.right); } } @@ -21990,8 +22013,8 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 100 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 85 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { + if (expression.kind === 101 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 86 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -22046,34 +22069,34 @@ var ts; function isStatementCondition(node) { var parent = node.parent; switch (parent.kind) { - case 210 /* IfStatement */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: + case 211 /* IfStatement */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: return parent.expression === node; - case 213 /* ForStatement */: - case 194 /* ConditionalExpression */: + case 214 /* ForStatement */: + case 195 /* ConditionalExpression */: return parent.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 184 /* ParenthesizedExpression */) { + if (node.kind === 185 /* ParenthesizedExpression */) { node = node.expression; } - else if (node.kind === 191 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) { + else if (node.kind === 192 /* PrefixUnaryExpression */ && node.operator === 51 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 193 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ || - node.operatorToken.kind === 53 /* BarBarToken */); + return node.kind === 194 /* BinaryExpression */ && (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */ || + node.operatorToken.kind === 54 /* BarBarToken */); } } } function isTopLevelLogicalExpression(node) { - while (node.parent.kind === 184 /* ParenthesizedExpression */ || - node.parent.kind === 191 /* PrefixUnaryExpression */ && - node.parent.operator === 50 /* ExclamationToken */) { + while (node.parent.kind === 185 /* ParenthesizedExpression */ || + node.parent.kind === 192 /* PrefixUnaryExpression */ && + node.parent.operator === 51 /* ExclamationToken */) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent); @@ -22114,7 +22137,7 @@ var ts; } function bindDoStatement(node) { var preDoLabel = createLoopLabel(); - var enclosingLabeledStatement = node.parent.kind === 221 /* LabeledStatement */ + var enclosingLabeledStatement = node.parent.kind === 222 /* LabeledStatement */ ? ts.lastOrUndefined(activeLabels) : undefined; // if do statement is wrapped in labeled statement then target labels for break/continue with or without @@ -22148,13 +22171,13 @@ var ts; var postLoopLabel = createBranchLabel(); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 215 /* ForOfStatement */) { + if (node.kind === 216 /* ForOfStatement */) { bind(node.awaitModifier); } bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 226 /* VariableDeclarationList */) { + if (node.initializer.kind !== 227 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -22176,7 +22199,7 @@ var ts; } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 218 /* ReturnStatement */) { + if (node.kind === 219 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -22196,7 +22219,7 @@ var ts; return undefined; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - var flowLabel = node.kind === 217 /* BreakStatement */ ? breakTarget : continueTarget; + var flowLabel = node.kind === 218 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -22292,7 +22315,7 @@ var ts; preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257 /* DefaultClause */; }); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 258 /* DefaultClause */; }); // We mark a switch statement as possibly exhaustive if it has no default clause and if all // case clauses have unreachable end points (e.g. they all return). node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; @@ -22359,14 +22382,14 @@ var ts; if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); } - if (!node.statement || node.statement.kind !== 211 /* DoStatement */) { + if (!node.statement || node.statement.kind !== 212 /* DoStatement */) { // do statement sets current flow inside bindDoStatement addAntecedent(postStatementLabel, currentFlow); currentFlow = finishFlowLabel(postStatementLabel); } } function bindDestructuringTargetFlow(node) { - if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) { + if (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 58 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { @@ -22377,10 +22400,10 @@ var ts; if (isNarrowableReference(node)) { currentFlow = createFlowAssignment(currentFlow, node); } - else if (node.kind === 176 /* ArrayLiteralExpression */) { + else if (node.kind === 177 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { var e = _a[_i]; - if (e.kind === 197 /* SpreadElement */) { + if (e.kind === 198 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { @@ -22388,16 +22411,16 @@ var ts; } } } - else if (node.kind === 177 /* ObjectLiteralExpression */) { + else if (node.kind === 178 /* ObjectLiteralExpression */) { for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { var p = _c[_b]; - if (p.kind === 260 /* PropertyAssignment */) { + if (p.kind === 261 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); } - else if (p.kind === 261 /* ShorthandPropertyAssignment */) { + else if (p.kind === 262 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); } - else if (p.kind === 262 /* SpreadAssignment */) { + else if (p.kind === 263 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -22405,7 +22428,7 @@ var ts; } function bindLogicalExpression(node, trueTarget, falseTarget) { var preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */) { + if (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */) { bindCondition(node.left, preRightLabel, falseTarget); } else { @@ -22416,7 +22439,7 @@ var ts; bindCondition(node.right, trueTarget, falseTarget); } function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 50 /* ExclamationToken */) { + if (node.operator === 51 /* ExclamationToken */) { var saveTrueTarget = currentTrueTarget; currentTrueTarget = currentFalseTarget; currentFalseTarget = saveTrueTarget; @@ -22426,20 +22449,20 @@ var ts; } else { bindEachChild(node); - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { bindAssignmentTargetFlow(node.operand); } } } function bindPostfixUnaryExpressionFlow(node) { bindEachChild(node); - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { bindAssignmentTargetFlow(node.operand); } } function bindBinaryExpressionFlow(node) { var operator = node.operatorToken.kind; - if (operator === 52 /* AmpersandAmpersandToken */ || operator === 53 /* BarBarToken */) { + if (operator === 53 /* AmpersandAmpersandToken */ || operator === 54 /* BarBarToken */) { if (isTopLevelLogicalExpression(node)) { var postExpressionLabel = createBranchLabel(); bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); @@ -22453,7 +22476,7 @@ var ts; bindEachChild(node); if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 57 /* EqualsToken */ && node.left.kind === 179 /* ElementAccessExpression */) { + if (operator === 58 /* EqualsToken */ && node.left.kind === 180 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -22464,7 +22487,7 @@ var ts; } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 178 /* PropertyAccessExpression */) { + if (node.expression.kind === 179 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -22497,13 +22520,13 @@ var ts; } function bindVariableDeclarationFlow(node) { bindEachChild(node); - if (node.initializer || node.parent.parent.kind === 214 /* ForInStatement */ || node.parent.parent.kind === 215 /* ForOfStatement */) { + if (node.initializer || node.parent.parent.kind === 215 /* ForInStatement */ || node.parent.parent.kind === 216 /* ForOfStatement */) { bindInitializedVariableFlow(node); } } function bindJSDocComment(node) { ts.forEachChild(node, function (n) { - if (n.kind !== 289 /* JSDocTypedefTag */) { + if (n.kind !== 290 /* JSDocTypedefTag */) { bind(n); } }); @@ -22513,7 +22536,7 @@ var ts; // if the node has a fullName "A.B.C", that means symbol "C" was already bound // when we visit "fullName"; so when we visit the name "C" as the next child of // the jsDocTypedefTag, we should skip binding it. - if (node.fullName && n === node.name && node.fullName.kind !== 70 /* Identifier */) { + if (node.fullName && n === node.name && node.fullName.kind !== 71 /* Identifier */) { return; } bind(n); @@ -22524,10 +22547,10 @@ var ts; // an immediately invoked function expression (IIFE). Initialize the flowNode property to // the current control flow (which includes evaluation of the IIFE arguments). var expr = node.expression; - while (expr.kind === 184 /* ParenthesizedExpression */) { + while (expr.kind === 185 /* ParenthesizedExpression */) { expr = expr.expression; } - if (expr.kind === 185 /* FunctionExpression */ || expr.kind === 186 /* ArrowFunction */) { + if (expr.kind === 186 /* FunctionExpression */ || expr.kind === 187 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -22535,7 +22558,7 @@ var ts; else { bindEachChild(node); } - if (node.expression.kind === 178 /* PropertyAccessExpression */) { + if (node.expression.kind === 179 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowArrayMutation(currentFlow, node); @@ -22544,54 +22567,54 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 162 /* TypeLiteral */: - case 291 /* JSDocTypeLiteral */: - case 274 /* JSDocRecordType */: - case 253 /* JsxAttributes */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 163 /* TypeLiteral */: + case 292 /* JSDocTypeLiteral */: + case 275 /* JSDocRecordType */: + case 254 /* JsxAttributes */: return 1 /* IsContainer */; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 278 /* JSDocFunctionType */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 171 /* MappedType */: + case 279 /* JSDocFunctionType */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 172 /* MappedType */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 264 /* SourceFile */: + case 265 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: if (ts.isObjectLiteralOrClassExpressionMethod(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethod */; } // falls through - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 259 /* CatchClause */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 234 /* CaseBlock */: + case 260 /* CatchClause */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 235 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 206 /* Block */: + case 207 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. // Locals that reside in this block should go to the function locals. Otherwise 'x' // would not appear to be a redeclaration of a block scoped local in the following @@ -22628,43 +22651,43 @@ var ts; // members are declared (for example, a member of a class will go into a specific // symbol table depending on if it is static or not). We defer to specialized // handlers to take care of declaring these child members. - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 162 /* TypeLiteral */: - case 177 /* ObjectLiteralExpression */: - case 229 /* InterfaceDeclaration */: - case 274 /* JSDocRecordType */: - case 291 /* JSDocTypeLiteral */: - case 253 /* JsxAttributes */: + case 163 /* TypeLiteral */: + case 178 /* ObjectLiteralExpression */: + case 230 /* InterfaceDeclaration */: + case 275 /* JSDocRecordType */: + case 292 /* JSDocTypeLiteral */: + case 254 /* JsxAttributes */: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the // object / type / interface declaring them). An exception is type parameters, // which are in scope without qualification (similar to 'locals'). return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 278 /* JSDocFunctionType */: - case 230 /* TypeAliasDeclaration */: - case 171 /* MappedType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 279 /* JSDocFunctionType */: + case 231 /* TypeAliasDeclaration */: + case 172 /* MappedType */: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, // they're only accessed 'lexically' (i.e. from code that exists underneath @@ -22685,11 +22708,11 @@ var ts; : declareSymbol(file.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 264 /* SourceFile */ ? node : node.body; - if (body && (body.kind === 264 /* SourceFile */ || body.kind === 233 /* ModuleBlock */)) { + var body = node.kind === 265 /* SourceFile */ ? node : node.body; + if (body && (body.kind === 265 /* SourceFile */ || body.kind === 234 /* ModuleBlock */)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 243 /* ExportDeclaration */ || stat.kind === 242 /* ExportAssignment */) { + if (stat.kind === 244 /* ExportDeclaration */ || stat.kind === 243 /* ExportAssignment */) { return true; } } @@ -22784,7 +22807,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) { + if (prop.kind === 263 /* SpreadAssignment */ || prop.name.kind !== 71 /* Identifier */) { continue; } var identifier = prop.name; @@ -22796,7 +22819,7 @@ var ts; // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */ || prop.kind === 150 /* MethodDeclaration */ + var currentKind = prop.kind === 261 /* PropertyAssignment */ || prop.kind === 262 /* ShorthandPropertyAssignment */ || prop.kind === 151 /* MethodDeclaration */ ? 1 /* Property */ : 2 /* Accessor */; var existingKind = seen.get(identifier.text); @@ -22824,10 +22847,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -22848,8 +22871,8 @@ var ts; // check for reserved words used as identifiers in strict mode code. function checkStrictModeIdentifier(node) { if (inStrictMode && - node.originalKeywordKind >= 107 /* FirstFutureReservedWord */ && - node.originalKeywordKind <= 115 /* LastFutureReservedWord */ && + node.originalKeywordKind >= 108 /* FirstFutureReservedWord */ && + node.originalKeywordKind <= 116 /* LastFutureReservedWord */ && !ts.isIdentifierName(node) && !ts.isInAmbientContext(node)) { // Report error only if there are no parse errors in file @@ -22885,7 +22908,7 @@ var ts; } function checkStrictModeDeleteExpression(node) { // Grammar checking - if (inStrictMode && node.expression.kind === 70 /* Identifier */) { + if (inStrictMode && node.expression.kind === 71 /* Identifier */) { // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its // UnaryExpression is a direct reference to a variable, function argument, or function name var span_2 = ts.getErrorSpanForNode(file, node.expression); @@ -22893,11 +22916,11 @@ var ts; } } function isEvalOrArgumentsIdentifier(node) { - return node.kind === 70 /* Identifier */ && + return node.kind === 71 /* Identifier */ && (node.text === "eval" || node.text === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 70 /* Identifier */) { + if (name && name.kind === 71 /* Identifier */) { var identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { // We check first if the name is inside class declaration or class expression; if so give explicit message @@ -22938,8 +22961,8 @@ var ts; function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { // Report error if function is not top level function declaration - if (blockScopeContainer.kind !== 264 /* SourceFile */ && - blockScopeContainer.kind !== 232 /* ModuleDeclaration */ && + if (blockScopeContainer.kind !== 265 /* SourceFile */ && + blockScopeContainer.kind !== 233 /* ModuleDeclaration */ && !ts.isFunctionLike(blockScopeContainer)) { // We check first if the name is inside class declaration or class expression; if so give explicit message // otherwise report generic error message. @@ -22965,7 +22988,7 @@ var ts; function checkStrictModePrefixUnaryExpression(node) { // Grammar checking if (inStrictMode) { - if (node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) { + if (node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) { checkStrictModeEvalOrArguments(node, node.operand); } } @@ -23017,7 +23040,7 @@ var ts; // the current 'container' node when it changes. This helps us know which symbol table // a local should go into for example. Since terminal nodes are known not to have // children, as an optimization we don't process those. - if (node.kind > 141 /* LastToken */) { + if (node.kind > 142 /* LastToken */) { var saveParent = parent; parent = node; var containerFlags = getContainerFlags(node); @@ -23045,7 +23068,7 @@ var ts; } for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) { var tag = _c[_b]; - if (tag.kind === 289 /* JSDocTypedefTag */) { + if (tag.kind === 290 /* JSDocTypedefTag */) { var savedParent = parent; parent = jsDoc; bind(tag); @@ -23078,30 +23101,30 @@ var ts; function bindWorker(node) { switch (node.kind) { /* Strict mode checks */ - case 70 /* Identifier */: + case 71 /* Identifier */: // for typedef type names with namespaces, bind the new jsdoc type symbol here // because it requires all containing namespaces to be in effect, namely the // current "blockScopeContainer" needs to be set to its immediate namespace parent. if (node.isInJSDocNamespace) { var parentNode = node.parent; - while (parentNode && parentNode.kind !== 289 /* JSDocTypedefTag */) { + while (parentNode && parentNode.kind !== 290 /* JSDocTypedefTag */) { parentNode = parentNode.parent; } bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); break; } // falls through - case 98 /* ThisKeyword */: - if (currentFlow && (ts.isExpression(node) || parent.kind === 261 /* ShorthandPropertyAssignment */)) { + case 99 /* ThisKeyword */: + if (currentFlow && (ts.isExpression(node) || parent.kind === 262 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkStrictModeIdentifier(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: if (currentFlow && isNarrowableReference(node)) { node.flowNode = currentFlow; } break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -23126,49 +23149,49 @@ var ts; ts.Debug.fail("Unknown special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return checkStrictModeCatchClause(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return checkStrictModeWithStatement(node); - case 168 /* ThisType */: + case 169 /* ThisType */: seenThisKeyword = true; return; - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return checkTypePredicate(node); - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530920 /* TypeParameterExcludes */); - case 145 /* Parameter */: + case 146 /* Parameter */: return bindParameter(node); - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: return bindVariableDeclarationOrBindingElement(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 275 /* JSDocRecordMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 276 /* JSDocRecordMember */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); - case 290 /* JSDocPropertyTag */: + case 291 /* JSDocPropertyTag */: return bindJSDocProperty(node); - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 262 /* SpreadAssignment */: - case 254 /* JsxSpreadAttribute */: + case 263 /* SpreadAssignment */: + case 255 /* JsxSpreadAttribute */: var root = container; var hasRest = false; while (root.parent) { - if (root.kind === 177 /* ObjectLiteralExpression */ && - root.parent.kind === 193 /* BinaryExpression */ && - root.parent.operatorToken.kind === 57 /* EqualsToken */ && + if (root.kind === 178 /* ObjectLiteralExpression */ && + root.parent.kind === 194 /* BinaryExpression */ && + root.parent.operatorToken.kind === 58 /* EqualsToken */ && root.parent.left === root) { hasRest = true; break; @@ -23176,100 +23199,100 @@ var ts; root = root.parent; } return; - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: // If this is an ObjectLiteralExpression method, then it sits in the same space // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 279 /* JSDocFunctionType */: return bindFunctionOrConstructorType(node); - case 162 /* TypeLiteral */: - case 171 /* MappedType */: - case 291 /* JSDocTypeLiteral */: - case 274 /* JSDocRecordType */: + case 163 /* TypeLiteral */: + case 172 /* MappedType */: + case 292 /* JSDocTypeLiteral */: + case 275 /* JSDocRecordType */: return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return bindFunctionExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; // Members of classes, interfaces, and modules - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: // All classes are automatically in strict mode in ES6. inStrictMode = true; return bindClassLikeDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */); - case 289 /* JSDocTypedefTag */: - if (!node.fullName || node.fullName.kind === 70 /* Identifier */) { + case 290 /* JSDocTypedefTag */: + if (!node.fullName || node.fullName.kind === 71 /* Identifier */) { return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); } break; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return bindModuleDeclaration(node); // Jsx-attributes - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return bindJsxAttributes(node); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); // Imports and exports - case 236 /* ImportEqualsDeclaration */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return bindImportClause(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return bindExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return bindExportAssignment(node); - case 264 /* SourceFile */: + case 265 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 206 /* Block */: + case 207 /* Block */: if (!ts.isFunctionLike(node.parent)) { return; } // falls through - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { var parameterName = node.parameterName, type = node.type; - if (parameterName && parameterName.kind === 70 /* Identifier */) { + if (parameterName && parameterName.kind === 71 /* Identifier */) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 168 /* ThisType */) { + if (parameterName && parameterName.kind === 169 /* ThisType */) { seenThisKeyword = true; } bind(type); @@ -23292,7 +23315,7 @@ var ts; // An export default clause with an expression exports a value // We want to exclude both class and function here, this is necessary to issue an error when there are both // default export-assignment and default export function and class declaration. - var flags = node.kind === 242 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) + var flags = node.kind === 243 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) ? 8388608 /* Alias */ : 4 /* Property */; declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 /* Property */ | 8388608 /* AliasExcludes */ | 32 /* Class */ | 16 /* Function */); @@ -23302,7 +23325,7 @@ var ts; if (node.modifiers && node.modifiers.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); } - if (node.parent.kind !== 264 /* SourceFile */) { + if (node.parent.kind !== 265 /* SourceFile */) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); return; } @@ -23355,9 +23378,9 @@ var ts; isNameOfExportsOrModuleExportsAliasDeclaration(node); } function isNameOfExportsOrModuleExportsAliasDeclaration(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = lookupSymbolForName(node.text); - if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225 /* VariableDeclaration */) { + if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 226 /* VariableDeclaration */) { var declaration = symbol.valueDeclaration; if (declaration.initializer) { return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer); @@ -23389,18 +23412,18 @@ var ts; ts.Debug.assert(ts.isInJavaScriptFile(node)); var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); switch (container.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: // Declare a 'member' if the container is an ES5 class or ES6 constructor container.symbol.members = container.symbol.members || ts.createMap(); // It's acceptable for multiple 'this' assignments of the same identifier to occur declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */); break; - case 151 /* Constructor */: - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 152 /* Constructor */: + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // this.foo assignment in a JavaScript class // Bind this property to the containing class var containingClass = container.parent; @@ -23470,7 +23493,7 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); } else { @@ -23607,13 +23630,13 @@ var ts; if (currentFlow === unreachableFlow) { var reportError = // report error on all statements except empty ones - (ts.isStatementButNotDeclaration(node) && node.kind !== 208 /* EmptyStatement */) || + (ts.isStatementButNotDeclaration(node) && node.kind !== 209 /* EmptyStatement */) || // report error on class declarations - node.kind === 228 /* ClassDeclaration */ || + node.kind === 229 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 232 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 233 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 231 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + (node.kind === 232 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentFlow = reportedUnreachableFlow; // unreachable code is reported if @@ -23627,7 +23650,7 @@ var ts; // On the other side we do want to report errors on non-initialized 'lets' because of TDZ var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 207 /* VariableStatement */ || + (node.kind !== 208 /* VariableStatement */ || ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */ || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -23647,56 +23670,56 @@ var ts; function computeTransformFlagsForNode(node, subtreeFlags) { var kind = node.kind; switch (kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return computeCallExpression(node, subtreeFlags); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return computeNewExpression(node, subtreeFlags); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return computeModuleDeclaration(node, subtreeFlags); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return computeParenthesizedExpression(node, subtreeFlags); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return computeBinaryExpression(node, subtreeFlags); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return computeExpressionStatement(node, subtreeFlags); - case 145 /* Parameter */: + case 146 /* Parameter */: return computeParameter(node, subtreeFlags); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return computeArrowFunction(node, subtreeFlags); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return computeFunctionExpression(node, subtreeFlags); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return computeFunctionDeclaration(node, subtreeFlags); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return computeVariableDeclaration(node, subtreeFlags); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return computeVariableDeclarationList(node, subtreeFlags); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return computeVariableStatement(node, subtreeFlags); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return computeLabeledStatement(node, subtreeFlags); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return computeClassDeclaration(node, subtreeFlags); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return computeClassExpression(node, subtreeFlags); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return computeHeritageClause(node, subtreeFlags); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return computeCatchClause(node, subtreeFlags); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return computeExpressionWithTypeArguments(node, subtreeFlags); - case 151 /* Constructor */: + case 152 /* Constructor */: return computeConstructor(node, subtreeFlags); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return computePropertyDeclaration(node, subtreeFlags); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return computeMethod(node, subtreeFlags); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return computeAccessor(node, subtreeFlags); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return computeImportEquals(node, subtreeFlags); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return computePropertyAccess(node, subtreeFlags); default: return computeOther(node, kind, subtreeFlags); @@ -23721,13 +23744,13 @@ var ts; } function isSuperOrSuperProperty(node, kind) { switch (kind) { - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return true; - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: var expression = node.expression; var expressionKind = expression.kind; - return expressionKind === 96 /* SuperKeyword */; + return expressionKind === 97 /* SuperKeyword */; } return false; } @@ -23748,17 +23771,17 @@ var ts; var transformFlags = subtreeFlags; var operatorTokenKind = node.operatorToken.kind; var leftKind = node.left.kind; - if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 177 /* ObjectLiteralExpression */) { + if (operatorTokenKind === 58 /* EqualsToken */ && leftKind === 178 /* ObjectLiteralExpression */) { // Destructuring object assignments with are ES2015 syntax // and possibly ESNext if they contain rest transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */; } - else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ArrayLiteralExpression */) { + else if (operatorTokenKind === 58 /* EqualsToken */ && leftKind === 177 /* ArrayLiteralExpression */) { // Destructuring assignments are ES2015 syntax. transformFlags |= 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */; } - else if (operatorTokenKind === 39 /* AsteriskAsteriskToken */ - || operatorTokenKind === 61 /* AsteriskAsteriskEqualsToken */) { + else if (operatorTokenKind === 40 /* AsteriskAsteriskToken */ + || operatorTokenKind === 62 /* AsteriskAsteriskEqualsToken */) { // Exponentiation is ES2016 syntax. transformFlags |= 32 /* AssertES2016 */; } @@ -23803,8 +23826,8 @@ var ts; // If the node is synthesized, it means the emitter put the parentheses there, // not the user. If we didn't want them, the emitter would not have put them // there. - if (expressionKind === 201 /* AsExpression */ - || expressionKind === 183 /* TypeAssertionExpression */) { + if (expressionKind === 202 /* AsExpression */ + || expressionKind === 184 /* TypeAssertionExpression */) { transformFlags |= 3 /* AssertTypeScript */; } // If the expression of a ParenthesizedExpression is a destructuring assignment, @@ -23862,11 +23885,11 @@ var ts; function computeHeritageClause(node, subtreeFlags) { var transformFlags = subtreeFlags; switch (node.token) { - case 84 /* ExtendsKeyword */: + case 85 /* ExtendsKeyword */: // An `extends` HeritageClause is ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; - case 107 /* ImplementsKeyword */: + case 108 /* ImplementsKeyword */: // An `implements` HeritageClause is TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */; break; @@ -24072,7 +24095,7 @@ var ts; var expressionKind = expression.kind; // If a PropertyAccessExpression starts with a super keyword, then it is // ES6 syntax, and requires a lexical `this` binding. - if (expressionKind === 96 /* SuperKeyword */) { + if (expressionKind === 97 /* SuperKeyword */) { transformFlags |= 16384 /* ContainsLexicalThis */; } node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */; @@ -24165,47 +24188,47 @@ var ts; var transformFlags = subtreeFlags; var excludeFlags = 536872257 /* NodeExcludes */; switch (kind) { - case 119 /* AsyncKeyword */: - case 190 /* AwaitExpression */: + case 120 /* AsyncKeyword */: + case 191 /* AwaitExpression */: // async/await is ES2017 syntax, but may be ESNext syntax (for async generators) transformFlags |= 8 /* AssertESNext */ | 16 /* AssertES2017 */; break; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 116 /* AbstractKeyword */: - case 123 /* DeclareKeyword */: - case 75 /* ConstKeyword */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: - case 202 /* NonNullExpression */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 117 /* AbstractKeyword */: + case 124 /* DeclareKeyword */: + case 76 /* ConstKeyword */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: + case 203 /* NonNullExpression */: + case 131 /* ReadonlyKeyword */: // These nodes are TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */; break; - case 248 /* JsxElement */: - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 249 /* JsxElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: case 10 /* JsxText */: - case 251 /* JsxClosingElement */: - case 252 /* JsxAttribute */: - case 253 /* JsxAttributes */: - case 254 /* JsxSpreadAttribute */: - case 255 /* JsxExpression */: + case 252 /* JsxClosingElement */: + case 253 /* JsxAttribute */: + case 254 /* JsxAttributes */: + case 255 /* JsxSpreadAttribute */: + case 256 /* JsxExpression */: // These nodes are Jsx syntax. transformFlags |= 4 /* AssertJsx */; break; - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: - case 195 /* TemplateExpression */: - case 182 /* TaggedTemplateExpression */: - case 261 /* ShorthandPropertyAssignment */: - case 114 /* StaticKeyword */: - case 203 /* MetaProperty */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: + case 196 /* TemplateExpression */: + case 183 /* TaggedTemplateExpression */: + case 262 /* ShorthandPropertyAssignment */: + case 115 /* StaticKeyword */: + case 204 /* MetaProperty */: // These nodes are ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; @@ -24219,55 +24242,55 @@ var ts; transformFlags |= 192 /* AssertES2015 */; } break; - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: // This node is either ES2015 syntax or ES2017 syntax (if it is a for-await-of). if (node.awaitModifier) { transformFlags |= 8 /* AssertESNext */; } transformFlags |= 192 /* AssertES2015 */; break; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: // This node is either ES2015 syntax (in a generator) or ES2017 syntax (in an async // generator). transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 16777216 /* ContainsYield */; break; - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 133 /* ObjectKeyword */: - case 135 /* StringKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 144 /* TypeParameter */: - case 147 /* PropertySignature */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 157 /* TypePredicate */: - case 158 /* TypeReference */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 161 /* TypeQuery */: - case 162 /* TypeLiteral */: - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 168 /* ThisType */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 134 /* ObjectKeyword */: + case 136 /* StringKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 145 /* TypeParameter */: + case 148 /* PropertySignature */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 158 /* TypePredicate */: + case 159 /* TypeReference */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 162 /* TypeQuery */: + case 163 /* TypeLiteral */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 169 /* ThisType */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 173 /* LiteralType */: // Types and signatures are TypeScript syntax, and exclude all other facts. transformFlags = 3 /* AssertTypeScript */; excludeFlags = -3 /* TypeExcludes */; break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: // Even though computed property names are ES6, we don't treat them as such. // This is so that they can flow through PropertyName transforms unaffected. // Instead, we mark the container as ES6, so that it can properly handle the transform. @@ -24284,42 +24307,42 @@ var ts; transformFlags |= 65536 /* ContainsLexicalThisInComputedPropertyName */; } break; - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: transformFlags |= 192 /* AssertES2015 */ | 524288 /* ContainsSpread */; break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectSpread */; break; - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: // This node is ES6 syntax. transformFlags |= 192 /* AssertES2015 */; break; - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: // Mark this node and its ancestors as containing a lexical `this` keyword. transformFlags |= 16384 /* ContainsLexicalThis */; break; - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */; if (subtreeFlags & 524288 /* ContainsRest */) { transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectRest */; } excludeFlags = 537396545 /* BindingPatternExcludes */; break; - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */; excludeFlags = 537396545 /* BindingPatternExcludes */; break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: transformFlags |= 192 /* AssertES2015 */; if (node.dotDotDotToken) { transformFlags |= 524288 /* ContainsRest */; } break; - case 146 /* Decorator */: + case 147 /* Decorator */: // This node is TypeScript syntax, and marks its container as also being TypeScript syntax. transformFlags |= 3 /* AssertTypeScript */ | 4096 /* ContainsDecorators */; break; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: excludeFlags = 540087617 /* ObjectLiteralExcludes */; if (subtreeFlags & 2097152 /* ContainsComputedPropertyName */) { // If an ObjectLiteralExpression contains a ComputedPropertyName, then it @@ -24337,8 +24360,8 @@ var ts; transformFlags |= 8 /* AssertESNext */; } break; - case 176 /* ArrayLiteralExpression */: - case 181 /* NewExpression */: + case 177 /* ArrayLiteralExpression */: + case 182 /* NewExpression */: excludeFlags = 537396545 /* ArrayLiteralOrCallOrNewExcludes */; if (subtreeFlags & 524288 /* ContainsSpread */) { // If the this node contains a SpreadExpression, then it is an ES6 @@ -24346,23 +24369,23 @@ var ts; transformFlags |= 192 /* AssertES2015 */; } break; - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: // A loop containing a block scoped binding *may* need to be transformed from ES6. if (subtreeFlags & 4194304 /* ContainsBlockScopedBinding */) { transformFlags |= 192 /* AssertES2015 */; } break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (subtreeFlags & 32768 /* ContainsCapturedLexicalThis */) { transformFlags |= 192 /* AssertES2015 */; } break; - case 218 /* ReturnStatement */: - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 219 /* ReturnStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: transformFlags |= 33554432 /* ContainsHoistedDeclarationOrCompletion */; break; } @@ -24378,57 +24401,57 @@ var ts; */ /* @internal */ function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) { + if (kind >= 158 /* FirstTypeNode */ && kind <= 173 /* LastTypeNode */) { return -3 /* TypeExcludes */; } switch (kind) { - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 176 /* ArrayLiteralExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 177 /* ArrayLiteralExpression */: return 537396545 /* ArrayLiteralOrCallOrNewExcludes */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return 574674241 /* ModuleExcludes */; - case 145 /* Parameter */: + case 146 /* Parameter */: return 536872257 /* ParameterExcludes */; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return 601249089 /* ArrowFunctionExcludes */; - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: return 601281857 /* FunctionExcludes */; - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return 546309441 /* VariableDeclarationListExcludes */; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return 539358529 /* ClassExcludes */; - case 151 /* Constructor */: + case 152 /* Constructor */: return 601015617 /* ConstructorExcludes */; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return 601015617 /* MethodOrAccessorExcludes */; - case 118 /* AnyKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 135 /* StringKeyword */: - case 133 /* ObjectKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 144 /* TypeParameter */: - case 147 /* PropertySignature */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 119 /* AnyKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 136 /* StringKeyword */: + case 134 /* ObjectKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 145 /* TypeParameter */: + case 148 /* PropertySignature */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: return -3 /* TypeExcludes */; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return 540087617 /* ObjectLiteralExcludes */; - case 259 /* CatchClause */: + case 260 /* CatchClause */: return 537920833 /* CatchClauseExcludes */; - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return 537396545 /* BindingPatternExcludes */; default: return 536872257 /* NodeExcludes */; @@ -25752,6 +25775,10 @@ var ts; var typeofType = createTypeofType(); var _jsxNamespace; var _jsxFactoryEntity; + var _jsxElementPropertiesName; + var _hasComputedJsxElementPropertiesName = false; + var _jsxElementChildrenPropertyName; + var _hasComputedJsxElementChildrenPropertyName = false; /** Things we lazy load from the JSX namespace */ var jsxTypes = ts.createMap(); var JsxNames = { @@ -25759,6 +25786,7 @@ var ts; IntrinsicElements: "IntrinsicElements", ElementClass: "ElementClass", ElementAttributesPropertyNameContainer: "ElementAttributesProperty", + ElementChildrenAttributeNameContainer: "ElementChildrenAttribute", Element: "Element", IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" @@ -25788,7 +25816,7 @@ var ts; initializeTypeChecker(); return checker; function getJsxNamespace() { - if (_jsxNamespace === undefined) { + if (!_jsxNamespace) { _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); @@ -25890,7 +25918,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 232 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 232 /* ModuleDeclaration */))) { + (target.valueDeclaration.kind === 233 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 233 /* ModuleDeclaration */))) { // other kinds of value declarations take precedence over modules target.valueDeclaration = source.valueDeclaration; } @@ -26003,7 +26031,7 @@ var ts; return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0; } function isGlobalSourceFile(node) { - return node.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); + return node.kind === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -26059,17 +26087,17 @@ var ts; } if (declaration.pos <= usage.pos) { // declaration is before usage - if (declaration.kind === 175 /* BindingElement */) { + if (declaration.kind === 176 /* BindingElement */) { // still might be illegal if declaration and usage are both binding elements (eg var [a = b, b = b] = [1, 2]) - var errorBindingElement = ts.getAncestor(usage, 175 /* BindingElement */); + var errorBindingElement = ts.getAncestor(usage, 176 /* BindingElement */); if (errorBindingElement) { return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) || declaration.pos < errorBindingElement.pos; } // or it might be illegal if usage happens before parent variable is declared (eg var [a] = a) - return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225 /* VariableDeclaration */), usage); + return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 226 /* VariableDeclaration */), usage); } - else if (declaration.kind === 225 /* VariableDeclaration */) { + else if (declaration.kind === 226 /* VariableDeclaration */) { // still might be illegal if usage is in the initializer of the variable declaration (eg var a = a) return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } @@ -26082,7 +26110,7 @@ var ts; // 4. inside a static property initializer, a reference to a static method in the same class // or if usage is in a type context: // 1. inside a type query (typeof in type position) - if (usage.parent.kind === 245 /* ExportSpecifier */) { + if (usage.parent.kind === 246 /* ExportSpecifier */) { // export specifiers do not use the variable, they only make it available for use return true; } @@ -26091,9 +26119,9 @@ var ts; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { - case 207 /* VariableStatement */: - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 208 /* VariableStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: // variable statement/for/for-of statement case, // use site should not be inside variable declaration (initializer of declaration or binding element) if (isSameScopeDescendentOf(usage, declaration, container)) { @@ -26102,8 +26130,8 @@ var ts; break; } switch (declaration.parent.parent.kind) { - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: // ForIn/ForOf case - use site should not be used in expression part if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { return true; @@ -26120,16 +26148,16 @@ var ts; return true; } var initializerOfProperty = current.parent && - current.parent.kind === 148 /* PropertyDeclaration */ && + current.parent.kind === 149 /* PropertyDeclaration */ && current.parent.initializer === current; if (initializerOfProperty) { if (ts.getModifierFlags(current.parent) & 32 /* Static */) { - if (declaration.kind === 150 /* MethodDeclaration */) { + if (declaration.kind === 151 /* MethodDeclaration */) { return true; } } else { - var isDeclarationInstanceProperty = declaration.kind === 148 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */); + var isDeclarationInstanceProperty = declaration.kind === 149 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */); if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) { return true; } @@ -26160,11 +26188,11 @@ var ts; // - parameters are only in the scope of function body // This restriction does not apply to JSDoc comment types because they are parented // at a higher level than type parameters would normally be - if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 282 /* JSDocComment */) { + if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 283 /* JSDocComment */) { useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || - lastLocation.kind === 145 /* Parameter */ || - lastLocation.kind === 144 /* TypeParameter */ + lastLocation.kind === 146 /* Parameter */ || + lastLocation.kind === 145 /* TypeParameter */ : false; } if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) { @@ -26173,9 +26201,9 @@ var ts; // however it is detected separately when checking initializers of parameters // to make sure that they reference no variables declared after them. useResult = - lastLocation.kind === 145 /* Parameter */ || + lastLocation.kind === 146 /* Parameter */ || (lastLocation === location.type && - result.valueDeclaration.kind === 145 /* Parameter */); + result.valueDeclaration.kind === 146 /* Parameter */); } } if (useResult) { @@ -26187,14 +26215,14 @@ var ts; } } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) break; isInExternalModule = true; // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 264 /* SourceFile */ || ts.isAmbientModule(location)) { + if (location.kind === 265 /* SourceFile */ || ts.isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. if (result = moduleExports.get("default")) { @@ -26218,7 +26246,7 @@ var ts; var moduleExport = moduleExports.get(name); if (moduleExport && moduleExport.flags === 8388608 /* Alias */ && - ts.getDeclarationOfKind(moduleExport, 245 /* ExportSpecifier */)) { + ts.getDeclarationOfKind(moduleExport, 246 /* ExportSpecifier */)) { break; } } @@ -26226,13 +26254,13 @@ var ts; break loop; } break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: // TypeScript 1.0 spec (April 2014): 8.4.1 // Initializer expressions for instance member variables are evaluated in the scope // of the class constructor body but are not permitted to reference parameters or @@ -26249,9 +26277,9 @@ var ts; } } break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { // ignore type parameters not declared in this container @@ -26267,7 +26295,7 @@ var ts; } break loop; } - if (location.kind === 198 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 199 /* ClassExpression */ && meaning & 32 /* Class */) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -26283,9 +26311,9 @@ var ts; // [foo()]() { } // <-- Reference to T from class's own computed property // } // - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 229 /* InterfaceDeclaration */) { + if (ts.isClassLike(grandparent) || grandparent.kind === 230 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -26293,19 +26321,19 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -26318,7 +26346,7 @@ var ts; } } break; - case 146 /* Decorator */: + case 147 /* Decorator */: // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // @@ -26327,7 +26355,7 @@ var ts; // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. // } // - if (location.parent && location.parent.kind === 145 /* Parameter */) { + if (location.parent && location.parent.kind === 146 /* Parameter */) { location = location.parent; } // @@ -26393,7 +26421,7 @@ var ts; // If we're in an external module, we can't reference value symbols created from UMD export declarations if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) { var decls = result.declarations; - if (decls && decls.length === 1 && decls[0].kind === 235 /* NamespaceExportDeclaration */) { + if (decls && decls.length === 1 && decls[0].kind === 236 /* NamespaceExportDeclaration */) { error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name); } } @@ -26403,14 +26431,14 @@ var ts; function isTypeParameterSymbolDeclaredInContainer(symbol, container) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - if (decl.kind === 144 /* TypeParameter */ && decl.parent === container) { + if (decl.kind === 145 /* TypeParameter */ && decl.parent === container) { return true; } } return false; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if ((errorLocation.kind === 70 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 71 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, /*includeArrowFunctions*/ true); @@ -26455,10 +26483,10 @@ var ts; */ function getEntityNameForExtendingInterface(node) { switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: ts.Debug.assert(ts.isEntityNameExpression(node.expression)); return node.expression; default: @@ -26505,7 +26533,7 @@ var ts; function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */)); // Block-scoped variables cannot be used before their definition - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231 /* EnumDeclaration */) ? d : undefined; }); + var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 232 /* EnumDeclaration */) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined"); if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { if (result.flags & 2 /* BlockScopedVariable */) { @@ -26528,17 +26556,17 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } - return ts.findAncestor(node, function (n) { return n.kind === 237 /* ImportDeclaration */; }); + return ts.findAncestor(node, function (n) { return n.kind === 238 /* ImportDeclaration */; }); } } function getDeclarationOfAliasSymbol(symbol) { return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - if (node.moduleReference.kind === 247 /* ExternalModuleReference */) { + if (node.moduleReference.kind === 248 /* ExternalModuleReference */) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); @@ -26665,19 +26693,19 @@ var ts; } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, dontRecursivelyResolve); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 235 /* NamespaceExportDeclaration */: + case 236 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); } } @@ -26725,11 +26753,11 @@ var ts; links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); ts.Debug.assert(!!node); - if (node.kind === 242 /* ExportAssignment */) { + if (node.kind === 243 /* ExportAssignment */) { // export default checkExpressionCached(node.expression); } - else if (node.kind === 245 /* ExportSpecifier */) { + else if (node.kind === 246 /* ExportSpecifier */) { // export { } or export { as foo } checkExpressionCached(node.propertyName || node.name); } @@ -26747,17 +26775,17 @@ var ts; // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (entityName.kind === 70 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { + if (entityName.kind === 71 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } // Check for case 1 and 3 in the above example - if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 142 /* QualifiedName */) { + if (entityName.kind === 71 /* Identifier */ || entityName.parent.kind === 143 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 236 /* ImportEqualsDeclaration */); + ts.Debug.assert(entityName.parent.kind === 237 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } } @@ -26772,20 +26800,20 @@ var ts; return undefined; } var symbol; - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { var message = meaning === 1920 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(location || name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 142 /* QualifiedName */ || name.kind === 178 /* PropertyAccessExpression */) { + else if (name.kind === 143 /* QualifiedName */ || name.kind === 179 /* PropertyAccessExpression */) { var left = void 0; - if (name.kind === 142 /* QualifiedName */) { + if (name.kind === 143 /* QualifiedName */) { left = name.left; } - else if (name.kind === 178 /* PropertyAccessExpression */ && - (name.expression.kind === 184 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) { + else if (name.kind === 179 /* PropertyAccessExpression */ && + (name.expression.kind === 185 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) { left = name.expression; } else { @@ -26795,7 +26823,7 @@ var ts; // i.e class C extends foo()./*do language service operation here*/B {} return undefined; } - var right = name.kind === 142 /* QualifiedName */ ? name.right : name.name; + var right = name.kind === 143 /* QualifiedName */ ? name.right : name.name; var namespace = resolveEntityName(left, 1920 /* Namespace */, ignoreErrors, /*dontResolveAlias*/ false, location); if (!namespace || ts.nodeIsMissing(right)) { return undefined; @@ -26811,7 +26839,7 @@ var ts; return undefined; } } - else if (name.kind === 184 /* ParenthesizedExpression */) { + else if (name.kind === 185 /* ParenthesizedExpression */) { // If the expression in parenthesizedExpression is not an entity-name (e.g. it is a call expression), it won't be able to successfully resolve the name. // This is the case when we are trying to do any language service operation in heritage clauses. // By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression will attempt to checkPropertyAccessExpression to resolve symbol. @@ -26831,7 +26859,7 @@ var ts; } function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) { if (isForAugmentation === void 0) { isForAugmentation = false; } - if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 12 /* NoSubstitutionTemplateLiteral */) { + if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 13 /* NoSubstitutionTemplateLiteral */) { return; } var moduleReferenceLiteral = moduleReferenceExpression; @@ -27033,7 +27061,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 151 /* Constructor */ && ts.nodeIsPresent(member.body)) { + if (member.kind === 152 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } } @@ -27111,12 +27139,12 @@ var ts; } } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location).exports)) { return result; } @@ -27168,7 +27196,7 @@ var ts; return ts.forEachEntry(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246 /* ExportSpecifier */)) { if (!useOnlyExternalAliasing || // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { @@ -27208,7 +27236,7 @@ var ts; return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 246 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -27223,10 +27251,10 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: continue; default: return false; @@ -27304,7 +27332,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; @@ -27345,12 +27373,12 @@ var ts; function isEntityNameVisible(entityName, enclosingDeclaration) { // get symbol of the first identifier of the entityName var meaning; - if (entityName.parent.kind === 161 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { + if (entityName.parent.kind === 162 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { // Typeof value meaning = 107455 /* Value */ | 1048576 /* ExportValue */; } - else if (entityName.kind === 142 /* QualifiedName */ || entityName.kind === 178 /* PropertyAccessExpression */ || - entityName.parent.kind === 236 /* ImportEqualsDeclaration */) { + else if (entityName.kind === 143 /* QualifiedName */ || entityName.kind === 179 /* PropertyAccessExpression */ || + entityName.parent.kind === 237 /* ImportEqualsDeclaration */) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration meaning = 1920 /* Namespace */; @@ -27441,16 +27469,16 @@ var ts; return undefined; } if (type.flags & 1 /* Any */) { - return ts.createKeywordTypeNode(118 /* AnyKeyword */); + return ts.createKeywordTypeNode(119 /* AnyKeyword */); } if (type.flags & 2 /* String */) { - return ts.createKeywordTypeNode(135 /* StringKeyword */); + return ts.createKeywordTypeNode(136 /* StringKeyword */); } if (type.flags & 4 /* Number */) { - return ts.createKeywordTypeNode(132 /* NumberKeyword */); + return ts.createKeywordTypeNode(133 /* NumberKeyword */); } if (type.flags & 8 /* Boolean */) { - return ts.createKeywordTypeNode(121 /* BooleanKeyword */); + return ts.createKeywordTypeNode(122 /* BooleanKeyword */); } if (type.flags & 16 /* Enum */) { var name = symbolToName(type.symbol, /*expectsIdentifier*/ false); @@ -27470,22 +27498,22 @@ var ts; return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined); } if (type.flags & 1024 /* Void */) { - return ts.createKeywordTypeNode(104 /* VoidKeyword */); + return ts.createKeywordTypeNode(105 /* VoidKeyword */); } if (type.flags & 2048 /* Undefined */) { - return ts.createKeywordTypeNode(138 /* UndefinedKeyword */); + return ts.createKeywordTypeNode(139 /* UndefinedKeyword */); } if (type.flags & 4096 /* Null */) { - return ts.createKeywordTypeNode(94 /* NullKeyword */); + return ts.createKeywordTypeNode(95 /* NullKeyword */); } if (type.flags & 8192 /* Never */) { - return ts.createKeywordTypeNode(129 /* NeverKeyword */); + return ts.createKeywordTypeNode(130 /* NeverKeyword */); } if (type.flags & 512 /* ESSymbol */) { - return ts.createKeywordTypeNode(136 /* SymbolKeyword */); + return ts.createKeywordTypeNode(137 /* SymbolKeyword */); } if (type.flags & 16777216 /* NonPrimitive */) { - return ts.createKeywordTypeNode(133 /* ObjectKeyword */); + return ts.createKeywordTypeNode(134 /* ObjectKeyword */); } if (type.flags & 16384 /* TypeParameter */ && type.isThisType) { if (context.inObjectTypeLiteral) { @@ -27521,7 +27549,7 @@ var ts; var formattedUnionTypes = formatUnionTypes(type.types); var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes); if (unionTypeNodes && unionTypeNodes.length > 0) { - return ts.createUnionOrIntersectionTypeNode(165 /* UnionType */, unionTypeNodes); + return ts.createUnionOrIntersectionTypeNode(166 /* UnionType */, unionTypeNodes); } else { if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) { @@ -27531,7 +27559,7 @@ var ts; } } if (type.flags & 131072 /* Intersection */) { - return ts.createUnionOrIntersectionTypeNode(166 /* IntersectionType */, mapToTypeNodeArray(type.types)); + return ts.createUnionOrIntersectionTypeNode(167 /* IntersectionType */, mapToTypeNodeArray(type.types)); } if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) { ts.Debug.assert(!!(type.flags & 32768 /* Object */)); @@ -27566,8 +27594,8 @@ var ts; var typeParameterNode = typeParameterToDeclaration(typeParameter); var templateType = getTemplateTypeFromMappedType(type); var templateTypeNode = typeToTypeNodeHelper(templateType); - var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130 /* ReadonlyKeyword */) : undefined; - var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54 /* QuestionToken */) : undefined; + var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(131 /* ReadonlyKeyword */) : undefined; + var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55 /* QuestionToken */) : undefined; return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); } function createAnonymousTypeNode(type) { @@ -27588,7 +27616,7 @@ var ts; return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined); } else { - return ts.createKeywordTypeNode(118 /* AnyKeyword */); + return ts.createKeywordTypeNode(119 /* AnyKeyword */); } } else { @@ -27613,7 +27641,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */; + return declaration.parent.kind === 265 /* SourceFile */ || declaration.parent.kind === 234 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -27634,11 +27662,11 @@ var ts; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var signature = resolved.callSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 159 /* FunctionType */); + return signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */); } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { var signature = resolved.constructSignatures[0]; - return signatureToSignatureDeclarationHelper(signature, 160 /* ConstructorType */); + return signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */); } } var saveInObjectTypeLiteral = context.inObjectTypeLiteral; @@ -27716,11 +27744,11 @@ var ts; var typeElements = []; for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 154 /* CallSignature */)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */)); } for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* ConstructSignature */)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */)); } if (resolvedType.stringIndexInfo) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */)); @@ -27740,12 +27768,12 @@ var ts; return; } var propertyName = oldDeclaration.name; - var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(54 /* QuestionToken */) : undefined; + var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(55 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length) { var signatures = getSignaturesOfType(propertyType, 0 /* Call */); for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) { var signature = signatures_1[_e]; - var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149 /* MethodSignature */); + var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150 /* MethodSignature */); methodDeclaration.name = propertyName; methodDeclaration.questionToken = optionalToken; typeElements.push(methodDeclaration); @@ -27753,7 +27781,7 @@ var ts; } else { // TODO(aozgaa): should we create a node with explicit or implict any? - var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118 /* AnyKeyword */); + var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119 /* AnyKeyword */); typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, /*initializer*/ undefined)); } @@ -27762,7 +27790,7 @@ var ts; } } function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) { - var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 135 /* StringKeyword */ : 132 /* NumberKeyword */); + var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 136 /* StringKeyword */ : 133 /* NumberKeyword */); var name = ts.getNameFromIndexInfo(indexInfo); var indexingParameter = ts.createParameter( /*decorators*/ undefined, @@ -27772,7 +27800,7 @@ var ts; /*initializer*/ undefined); var typeNode = typeToTypeNodeHelper(indexInfo.type); return ts.createIndexSignatureDeclaration( - /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(130 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode); + /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(131 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode); } function signatureToSignatureDeclarationHelper(signature, kind) { var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); }); @@ -27788,7 +27816,7 @@ var ts; var returnType = getReturnTypeOfSignature(signature); returnTypeNode = returnType && typeToTypeNodeHelper(returnType); } - var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 /* AnyKeyword */ ? returnTypeNode : undefined; + var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 /* AnyKeyword */ ? returnTypeNode : undefined; return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny); } function typeParameterToDeclaration(type) { @@ -27800,13 +27828,13 @@ var ts; return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode); } function symbolToParameterDeclaration(parameterSymbol) { - var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145 /* Parameter */); + var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146 /* Parameter */); var parameterType = getTypeOfSymbol(parameterSymbol); var parameterTypeNode = typeToTypeNodeHelper(parameterType); // TODO(aozgaa): In the future, check initializer accessibility. - var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23 /* DotDotDotToken */), + var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24 /* DotDotDotToken */), // Clone name to remove trivia. - ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer); + ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer); return parameterNode; } function symbolToName(symbol, expectsIdentifier) { @@ -27894,17 +27922,17 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(declaration.parent.name); } if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) { context.encounteredError = true; } switch (declaration.kind) { - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return "(Anonymous class)"; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -27955,8 +27983,8 @@ var ts; } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { - var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167 /* ParenthesizedType */; }); - if (node.kind === 230 /* TypeAliasDeclaration */) { + var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 168 /* ParenthesizedType */; }); + if (node.kind === 231 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } @@ -27964,7 +27992,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 233 /* ModuleBlock */ && + node.parent.kind === 234 /* ModuleBlock */ && ts.isExternalModuleAugmentation(node.parent.parent); } function literalTypeToString(type) { @@ -27976,14 +28004,14 @@ var ts; if (declaration.name) { return ts.declarationNameToString(declaration.name); } - if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return "(Anonymous class)"; - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -28007,17 +28035,17 @@ var ts; var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); if (ts.isSingleOrDoubleQuote(firstChar)) { writer.writeStringLiteral(symbolName); } else { writer.writeSymbol(symbolName, symbol); } - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); writer.writeSymbol(symbolName, symbol); } } @@ -28116,7 +28144,7 @@ var ts; } else if (type.flags & 256 /* EnumLiteral */) { buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags); - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); appendSymbolNameOnly(type.symbol, writer); } else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (16 /* Enum */ | 16384 /* TypeParameter */)) { @@ -28144,30 +28172,30 @@ var ts; } else if (type.flags & 524288 /* IndexedAccess */) { writeType(type.objectType, 64 /* InElementType */); - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); writeType(type.indexType, 0 /* None */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { // Should never get here // { ... } - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writeSpace(writer); - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); writeSpace(writer); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } } function writeTypeList(types, delimiter) { for (var i = 0; i < types.length; i++) { if (i > 0) { - if (delimiter !== 25 /* CommaToken */) { + if (delimiter !== 26 /* CommaToken */) { writeSpace(writer); } writePunctuation(writer, delimiter); writeSpace(writer); } - writeType(types[i], delimiter === 25 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */); + writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */); } } function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { @@ -28176,29 +28204,29 @@ var ts; buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, flags); } if (pos < end) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); writeType(typeArguments[pos], 256 /* InFirstTypeArgument */); pos++; while (pos < end) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); writeType(typeArguments[pos], 0 /* None */); pos++; } - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function writeTypeReference(type, flags) { var typeArguments = type.typeArguments || emptyArray; if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) { writeType(typeArguments[0], 64 /* InElementType */); - writePunctuation(writer, 20 /* OpenBracketToken */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else if (type.target.objectFlags & 8 /* Tuple */) { - writePunctuation(writer, 20 /* OpenBracketToken */); - writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 25 /* CommaToken */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26 /* CommaToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } else { // Write the type reference in the format f
.g.C where A and B are type arguments @@ -28219,7 +28247,7 @@ var ts; // the default outer type arguments), we don't show the group. if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { writeSymbolTypeReference(parent, typeArguments, start, i, flags); - writePunctuation(writer, 22 /* DotToken */); + writePunctuation(writer, 23 /* DotToken */); } } } @@ -28229,16 +28257,16 @@ var ts; } function writeUnionOrIntersectionType(type, flags) { if (flags & 64 /* InElementType */) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } if (type.flags & 65536 /* Union */) { - writeTypeList(formatUnionTypes(type.types), 48 /* BarToken */); + writeTypeList(formatUnionTypes(type.types), 49 /* BarToken */); } else { - writeTypeList(type.types, 47 /* AmpersandToken */); + writeTypeList(type.types, 48 /* AmpersandToken */); } if (flags & 64 /* InElementType */) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } } function writeAnonymousType(type, flags) { @@ -28261,7 +28289,7 @@ var ts; } else { // Recursive usage, use any - writeKeyword(writer, 118 /* AnyKeyword */); + writeKeyword(writer, 119 /* AnyKeyword */); } } else { @@ -28285,7 +28313,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */; + return declaration.parent.kind === 265 /* SourceFile */ || declaration.parent.kind === 234 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -28295,18 +28323,18 @@ var ts; } } function writeTypeOfSymbol(type, typeFormatFlags) { - writeKeyword(writer, 102 /* TypeOfKeyword */); + writeKeyword(writer, 103 /* TypeOfKeyword */); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags); } function writePropertyWithModifiers(prop) { if (isReadonlySymbol(prop)) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } buildSymbolDisplay(prop, writer); if (prop.flags & 67108864 /* Optional */) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } } function shouldAddParenthesisAroundFunctionType(callSignature, flags) { @@ -28331,55 +28359,55 @@ var ts; var resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 16 /* OpenBraceToken */); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); if (parenthesizeSignature) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack); if (parenthesizeSignature) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } return; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { if (flags & 64 /* InElementType */) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); } - writeKeyword(writer, 93 /* NewKeyword */); + writeKeyword(writer, 94 /* NewKeyword */); writeSpace(writer); buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack); if (flags & 64 /* InElementType */) { - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } return; } } var saveInObjectTypeLiteral = inObjectTypeLiteral; inObjectTypeLiteral = true; - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writer.writeLine(); writer.increaseIndent(); writeObjectLiteralType(resolved); writer.decreaseIndent(); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); inObjectTypeLiteral = saveInObjectTypeLiteral; } function writeObjectLiteralType(resolved) { for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { var signature = _a[_i]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { var signature = _c[_b]; buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, 1 /* Construct */, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0 /* String */, enclosingDeclaration, globalFlags, symbolStack); @@ -28393,45 +28421,45 @@ var ts; var signature = signatures_2[_f]; writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } else { writePropertyWithModifiers(p); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); writeType(t, 0 /* None */); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } } function writeMappedType(type) { - writePunctuation(writer, 16 /* OpenBraceToken */); + writePunctuation(writer, 17 /* OpenBraceToken */); writer.writeLine(); writer.increaseIndent(); if (type.declaration.readonlyToken) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); appendSymbolNameOnly(getTypeParameterFromMappedType(type).symbol, writer); writeSpace(writer); - writeKeyword(writer, 91 /* InKeyword */); + writeKeyword(writer, 92 /* InKeyword */); writeSpace(writer); writeType(getConstraintTypeFromMappedType(type), 0 /* None */); - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); if (type.declaration.questionToken) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); writeType(getTemplateTypeFromMappedType(type), 0 /* None */); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); writer.decreaseIndent(); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } } function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration, flags) { @@ -28445,14 +28473,14 @@ var ts; var constraint = getConstraintOfTypeParameter(tp); if (constraint) { writeSpace(writer); - writeKeyword(writer, 84 /* ExtendsKeyword */); + writeKeyword(writer, 85 /* ExtendsKeyword */); writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } var defaultType = getDefaultFromTypeParameter(tp); if (defaultType) { writeSpace(writer); - writePunctuation(writer, 57 /* EqualsToken */); + writePunctuation(writer, 58 /* EqualsToken */); writeSpace(writer); buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); } @@ -28460,7 +28488,7 @@ var ts; function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { var parameterNode = p.valueDeclaration; if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); } if (parameterNode && ts.isBindingPattern(parameterNode.name)) { buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); @@ -28469,9 +28497,9 @@ var ts; appendSymbolNameOnly(p, writer); } if (parameterNode && isOptionalParameter(parameterNode)) { - writePunctuation(writer, 54 /* QuestionToken */); + writePunctuation(writer, 55 /* QuestionToken */); } - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); var type = getTypeOfSymbol(p); if (parameterNode && isRequiredInitializedParameter(parameterNode)) { @@ -28481,29 +28509,29 @@ var ts; } function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { // We have to explicitly emit square bracket and bracket because these tokens are not stored inside the node. - if (bindingPattern.kind === 173 /* ObjectBindingPattern */) { - writePunctuation(writer, 16 /* OpenBraceToken */); + if (bindingPattern.kind === 174 /* ObjectBindingPattern */) { + writePunctuation(writer, 17 /* OpenBraceToken */); buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 17 /* CloseBraceToken */); + writePunctuation(writer, 18 /* CloseBraceToken */); } - else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) { - writePunctuation(writer, 20 /* OpenBracketToken */); + else if (bindingPattern.kind === 175 /* ArrayBindingPattern */) { + writePunctuation(writer, 21 /* OpenBracketToken */); var elements = bindingPattern.elements; buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); if (elements && elements.hasTrailingComma) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); } - writePunctuation(writer, 21 /* CloseBracketToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); } } function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isOmittedExpression(bindingElement)) { return; } - ts.Debug.assert(bindingElement.kind === 175 /* BindingElement */); + ts.Debug.assert(bindingElement.kind === 176 /* BindingElement */); if (bindingElement.propertyName) { writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName)); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); } if (ts.isBindingPattern(bindingElement.name)) { @@ -28511,22 +28539,22 @@ var ts; } else { if (bindingElement.dotDotDotToken) { - writePunctuation(writer, 23 /* DotDotDotToken */); + writePunctuation(writer, 24 /* DotDotDotToken */); } appendSymbolNameOnly(bindingElement.symbol, writer); } } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function buildDisplayForCommaSeparatedList(list, writer, action) { for (var i = 0; i < list.length; i++) { if (i > 0) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); } action(list[i]); @@ -28534,42 +28562,42 @@ var ts; } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) { if (typeParameters && typeParameters.length) { - writePunctuation(writer, 26 /* LessThanToken */); + writePunctuation(writer, 27 /* LessThanToken */); var flags = 256 /* InFirstTypeArgument */; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); flags = 0 /* None */; } buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags); } - writePunctuation(writer, 28 /* GreaterThanToken */); + writePunctuation(writer, 29 /* GreaterThanToken */); } } function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 18 /* OpenParenToken */); + writePunctuation(writer, 19 /* OpenParenToken */); if (thisParameter) { buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); } for (var i = 0; i < parameters.length; i++) { if (i > 0 || thisParameter) { - writePunctuation(writer, 25 /* CommaToken */); + writePunctuation(writer, 26 /* CommaToken */); writeSpace(writer); } buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); } - writePunctuation(writer, 19 /* CloseParenToken */); + writePunctuation(writer, 20 /* CloseParenToken */); } function buildTypePredicateDisplay(predicate, writer, enclosingDeclaration, flags, symbolStack) { if (ts.isIdentifierTypePredicate(predicate)) { writer.writeParameter(predicate.parameterName); } else { - writeKeyword(writer, 98 /* ThisKeyword */); + writeKeyword(writer, 99 /* ThisKeyword */); } writeSpace(writer); - writeKeyword(writer, 125 /* IsKeyword */); + writeKeyword(writer, 126 /* IsKeyword */); writeSpace(writer); buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack); } @@ -28580,10 +28608,10 @@ var ts; } if (flags & 8 /* WriteArrowStyleSignature */) { writeSpace(writer); - writePunctuation(writer, 35 /* EqualsGreaterThanToken */); + writePunctuation(writer, 36 /* EqualsGreaterThanToken */); } else { - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); } writeSpace(writer); if (signature.typePredicate) { @@ -28595,7 +28623,7 @@ var ts; } function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, kind, symbolStack) { if (kind === 1 /* Construct */) { - writeKeyword(writer, 93 /* NewKeyword */); + writeKeyword(writer, 94 /* NewKeyword */); writeSpace(writer); } if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) { @@ -28612,26 +28640,26 @@ var ts; function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) { if (info) { if (info.isReadonly) { - writeKeyword(writer, 130 /* ReadonlyKeyword */); + writeKeyword(writer, 131 /* ReadonlyKeyword */); writeSpace(writer); } - writePunctuation(writer, 20 /* OpenBracketToken */); + writePunctuation(writer, 21 /* OpenBracketToken */); writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); switch (kind) { case 1 /* Number */: - writeKeyword(writer, 132 /* NumberKeyword */); + writeKeyword(writer, 133 /* NumberKeyword */); break; case 0 /* String */: - writeKeyword(writer, 135 /* StringKeyword */); + writeKeyword(writer, 136 /* StringKeyword */); break; } - writePunctuation(writer, 21 /* CloseBracketToken */); - writePunctuation(writer, 55 /* ColonToken */); + writePunctuation(writer, 22 /* CloseBracketToken */); + writePunctuation(writer, 56 /* ColonToken */); writeSpace(writer); buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack); - writePunctuation(writer, 24 /* SemicolonToken */); + writePunctuation(writer, 25 /* SemicolonToken */); writer.writeLine(); } } @@ -28660,22 +28688,22 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 175 /* BindingElement */: + case 176 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { // If the binding pattern is empty, this variable declaration is not visible return false; } // falls through - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 227 /* FunctionDeclaration */: - case 231 /* EnumDeclaration */: - case 236 /* ImportEqualsDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + case 232 /* EnumDeclaration */: + case 237 /* ImportEqualsDeclaration */: // external module augmentation is always visible if (ts.isExternalModuleAugmentation(node)) { return true; @@ -28683,53 +28711,53 @@ var ts; var parent = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(ts.getCombinedModifierFlags(node) & 1 /* Export */) && - !(node.kind !== 236 /* ImportEqualsDeclaration */ && parent.kind !== 264 /* SourceFile */ && ts.isInAmbientContext(parent))) { + !(node.kind !== 237 /* ImportEqualsDeclaration */ && parent.kind !== 265 /* SourceFile */ && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible return isDeclarationVisible(parent); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.getModifierFlags(node) & (8 /* Private */ | 16 /* Protected */)) { // Private/protected properties/methods are not visible return false; } // Public properties/methods are visible if its parents are visible, so: // falls through - case 151 /* Constructor */: - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 156 /* IndexSignature */: - case 145 /* Parameter */: - case 233 /* ModuleBlock */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 162 /* TypeLiteral */: - case 158 /* TypeReference */: - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: + case 152 /* Constructor */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 157 /* IndexSignature */: + case 146 /* Parameter */: + case 234 /* ModuleBlock */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 163 /* TypeLiteral */: + case 159 /* TypeReference */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: return isDeclarationVisible(node.parent); // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: return false; // Type parameters are always visible - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: // Source file and namespace export are always visible - case 264 /* SourceFile */: - case 235 /* NamespaceExportDeclaration */: + case 265 /* SourceFile */: + case 236 /* NamespaceExportDeclaration */: return true; // Export assignments do not create name bindings outside the module - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return false; default: return false; @@ -28738,10 +28766,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 242 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 243 /* ExportAssignment */) { exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 245 /* ExportSpecifier */) { + else if (node.parent.kind === 246 /* ExportSpecifier */) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -28833,12 +28861,12 @@ var ts; function getDeclarationContainer(node) { node = ts.findAncestor(ts.getRootDeclaration(node), function (node) { switch (node.kind) { - case 225 /* VariableDeclaration */: - case 226 /* VariableDeclarationList */: - case 241 /* ImportSpecifier */: - case 240 /* NamedImports */: - case 239 /* NamespaceImport */: - case 238 /* ImportClause */: + case 226 /* VariableDeclaration */: + case 227 /* VariableDeclarationList */: + case 242 /* ImportSpecifier */: + case 241 /* NamedImports */: + case 240 /* NamespaceImport */: + case 239 /* ImportClause */: return false; default: return true; @@ -28869,7 +28897,7 @@ var ts; return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false); } function isComputedNonLiteralName(name) { - return name.kind === 143 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression); + return name.kind === 144 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression); } function getRestType(source, properties, symbol) { source = filterType(source, function (t) { return !(t.flags & 6144 /* Nullable */); }); @@ -28916,7 +28944,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 173 /* ObjectBindingPattern */) { + if (pattern.kind === 174 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { if (!isValidSpreadType(parentType)) { error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types); @@ -28997,11 +29025,11 @@ var ts; } function isNullOrUndefined(node) { var expr = ts.skipParentheses(node); - return expr.kind === 94 /* NullKeyword */ || expr.kind === 70 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 95 /* NullKeyword */ || expr.kind === 71 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral(node) { var expr = ts.skipParentheses(node); - return expr.kind === 176 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 177 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, optional) { return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type; @@ -29019,11 +29047,11 @@ var ts; } // A variable declared in a for..in statement is of type string, or of type keyof T when the // right hand expression is of a type parameter type. - if (declaration.parent.parent.kind === 214 /* ForInStatement */) { + if (declaration.parent.parent.kind === 215 /* ForInStatement */) { var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression)); return indexType.flags & (16384 /* TypeParameter */ | 262144 /* Index */) ? indexType : stringType; } - if (declaration.parent.parent.kind === 215 /* ForOfStatement */) { + if (declaration.parent.parent.kind === 216 /* ForOfStatement */) { // checkRightHandSideOfForOf will return undefined if the for-of expression type was // missing properties/signatures required to get its iteratedType (like // [Symbol.iterator] or next). This may be because we accessed properties from anyType, @@ -29040,7 +29068,7 @@ var ts; return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality); } if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) && - declaration.kind === 225 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) && + declaration.kind === 226 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) && !(ts.getCombinedModifierFlags(declaration) & 1 /* Export */) && !ts.isInAmbientContext(declaration)) { // If --noImplicitAny is on or the declaration is in a Javascript file, // use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no @@ -29054,11 +29082,11 @@ var ts; return autoArrayType; } } - if (declaration.kind === 145 /* Parameter */) { + if (declaration.kind === 146 /* Parameter */) { var func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 153 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152 /* GetAccessor */); + if (func.kind === 154 /* SetAccessor */ && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 153 /* GetAccessor */); if (getter) { var getterSignature = getSignatureFromDeclaration(getter); var thisParameter = getAccessorThisParameter(func); @@ -29093,7 +29121,7 @@ var ts; return trueType; } // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 261 /* ShorthandPropertyAssignment */) { + if (declaration.kind === 262 /* ShorthandPropertyAssignment */) { return checkIdentifier(declaration.name); } // If the declaration specifies a binding pattern, use the type implied by the binding pattern @@ -29109,14 +29137,14 @@ var ts; var definedInMethod = false; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - var expression = declaration.kind === 193 /* BinaryExpression */ ? declaration : - declaration.kind === 178 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 193 /* BinaryExpression */) : + var expression = declaration.kind === 194 /* BinaryExpression */ ? declaration : + declaration.kind === 179 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 194 /* BinaryExpression */) : undefined; if (!expression) { return unknownType; } - if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98 /* ThisKeyword */) { - if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 151 /* Constructor */) { + if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 99 /* ThisKeyword */) { + if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 152 /* Constructor */) { definedInConstructor = true; } else { @@ -29206,7 +29234,7 @@ var ts; // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of // the parameter. function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { - return pattern.kind === 173 /* ObjectBindingPattern */ + return pattern.kind === 174 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } @@ -29228,7 +29256,7 @@ var ts; // During a normal type check we'll never get to here with a property assignment (the check of the containing // object literal uses a different path). We exclude widening only so that language services and type verification // tools see the actual type. - if (declaration.kind === 260 /* PropertyAssignment */) { + if (declaration.kind === 261 /* PropertyAssignment */) { return type; } return getWidenedType(type); @@ -29245,7 +29273,7 @@ var ts; } function declarationBelongsToPrivateAmbientMember(declaration) { var root = ts.getRootDeclaration(declaration); - var memberDeclaration = root.kind === 145 /* Parameter */ ? root.parent : root; + var memberDeclaration = root.kind === 146 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -29261,10 +29289,10 @@ var ts; return links.type = anyType; } // Handle export default expressions - if (declaration.kind === 242 /* ExportAssignment */) { + if (declaration.kind === 243 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } - if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 290 /* JSDocPropertyTag */ && declaration.typeExpression) { + if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 291 /* JSDocPropertyTag */ && declaration.typeExpression) { return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } // Handle variable, parameter or property @@ -29277,8 +29305,8 @@ var ts; // * exports.p = expr // * this.p = expr // * className.prototype.method = expr - if (declaration.kind === 193 /* BinaryExpression */ || - declaration.kind === 178 /* PropertyAccessExpression */ && declaration.parent.kind === 193 /* BinaryExpression */) { + if (declaration.kind === 194 /* BinaryExpression */ || + declaration.kind === 179 /* PropertyAccessExpression */ && declaration.parent.kind === 194 /* BinaryExpression */) { type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol); } else { @@ -29293,7 +29321,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 152 /* GetAccessor */) { + if (accessor.kind === 153 /* GetAccessor */) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -29313,8 +29341,8 @@ var ts; function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - var getter = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 153 /* SetAccessor */); + var getter = ts.getDeclarationOfKind(symbol, 153 /* GetAccessor */); + var setter = ts.getDeclarationOfKind(symbol, 154 /* SetAccessor */); if (getter && getter.flags & 65536 /* JavaScriptFile */) { var jsDocType = getTypeForDeclarationFromJSDocComment(getter); if (jsDocType) { @@ -29358,7 +29386,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */); + var getter_1 = ts.getDeclarationOfKind(symbol, 153 /* GetAccessor */); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -29512,9 +29540,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */ || - node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */ || - node.kind === 150 /* MethodDeclaration */ || node.kind === 186 /* ArrowFunction */) { + if (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */ || + node.kind === 228 /* FunctionDeclaration */ || node.kind === 186 /* FunctionExpression */ || + node.kind === 151 /* MethodDeclaration */ || node.kind === 187 /* ArrowFunction */) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -29524,7 +29552,7 @@ var ts; } // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */); + var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 230 /* InterfaceDeclaration */); return appendOuterTypeParameters(/*typeParameters*/ undefined, declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -29533,8 +29561,8 @@ var ts; var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 228 /* ClassDeclaration */ || - node.kind === 198 /* ClassExpression */ || node.kind === 230 /* TypeAliasDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */ || node.kind === 229 /* ClassDeclaration */ || + node.kind === 199 /* ClassExpression */ || node.kind === 231 /* TypeAliasDeclaration */) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -29715,7 +29743,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 230 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -29747,7 +29775,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 229 /* InterfaceDeclaration */) { + if (declaration.kind === 230 /* InterfaceDeclaration */) { if (declaration.flags & 64 /* ContainsThis */) { return false; } @@ -29804,7 +29832,7 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 289 /* JSDocTypedefTag */); + var declaration = ts.getDeclarationOfKind(symbol, 290 /* JSDocTypedefTag */); var type = void 0; if (declaration) { if (declaration.jsDocTypeLiteral) { @@ -29815,7 +29843,7 @@ var ts; } } else { - declaration = ts.getDeclarationOfKind(symbol, 230 /* TypeAliasDeclaration */); + declaration = ts.getDeclarationOfKind(symbol, 231 /* TypeAliasDeclaration */); type = getTypeFromTypeNode(declaration.type); } if (popTypeResolution()) { @@ -29842,14 +29870,14 @@ var ts; return !ts.isInAmbientContext(member); } return expr.kind === 8 /* NumericLiteral */ || - expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ && + expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */ || - expr.kind === 70 /* Identifier */ && !!symbol.exports.get(expr.text); + expr.kind === 71 /* Identifier */ && !!symbol.exports.get(expr.text); } function enumHasLiteralMembers(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231 /* EnumDeclaration */) { + if (declaration.kind === 232 /* EnumDeclaration */) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; if (!isLiteralEnumMember(symbol, member)) { @@ -29877,7 +29905,7 @@ var ts; var memberTypes = []; for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 231 /* EnumDeclaration */) { + if (declaration.kind === 232 /* EnumDeclaration */) { computeEnumMemberValues(declaration); for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; @@ -29964,21 +29992,21 @@ var ts; // considered independent. function isIndependentType(node) { switch (node.kind) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 136 /* SymbolKeyword */: - case 133 /* ObjectKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 137 /* SymbolKeyword */: + case 134 /* ObjectKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: + case 173 /* LiteralType */: return true; - case 163 /* ArrayType */: + case 164 /* ArrayType */: return isIndependentType(node.elementType); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return isIndependentTypeReference(node); } return false; @@ -29991,7 +30019,7 @@ var ts; // A function-like declaration is considered independent (free of this references) if it has a return type // annotation that is considered independent and if each parameter is considered independent. function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 151 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 152 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -30012,12 +30040,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return isIndependentVariableLikeDeclaration(declaration); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -30386,7 +30414,7 @@ var ts; var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); // The 'T' in 'keyof T' var templateReadonly = !!type.declaration.readonlyToken; var templateOptional = !!type.declaration.questionToken; - if (type.declaration.typeParameter.constraint.kind === 169 /* TypeOperator */) { + if (type.declaration.typeParameter.constraint.kind === 170 /* TypeOperator */) { // We have a { [P in keyof T]: X } for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) { var propertySymbol = _a[_i]; @@ -30448,7 +30476,7 @@ var ts; function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { var constraintDeclaration = type.declaration.typeParameter.constraint; - if (constraintDeclaration.kind === 169 /* TypeOperator */) { + if (constraintDeclaration.kind === 170 /* TypeOperator */) { // If the constraint declaration is a 'keyof T' node, the modifiers type is T. We check // AST nodes here because, when T is a non-generic type, the logic below eagerly resolves // 'keyof T' to a literal union type and we can't recover T from that type. @@ -30869,7 +30897,7 @@ var ts; } function isJSDocOptionalParameter(node) { if (node.flags & 65536 /* JavaScriptFile */) { - if (node.type && node.type.kind === 277 /* JSDocOptionalType */) { + if (node.type && node.type.kind === 278 /* JSDocOptionalType */) { return true; } var paramTags = ts.getJSDocParameterTags(node); @@ -30880,7 +30908,7 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 277 /* JSDocOptionalType */; + return paramTag.typeExpression.type.kind === 278 /* JSDocOptionalType */; } } } @@ -30914,7 +30942,7 @@ var ts; return false; } function createTypePredicateFromTypePredicateNode(node) { - if (node.parameterName.kind === 70 /* Identifier */) { + if (node.parameterName.kind === 71 /* Identifier */) { var parameterName = node.parameterName; return { kind: 1 /* Identifier */, @@ -31006,7 +31034,7 @@ var ts; else { parameters.push(paramSymbol); } - if (param.type && param.type.kind === 172 /* LiteralType */) { + if (param.type && param.type.kind === 173 /* LiteralType */) { hasLiteralTypes = true; } // Record a new minimum argument count if this is not an optional parameter @@ -31019,23 +31047,23 @@ var ts; } } // If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation - if ((declaration.kind === 152 /* GetAccessor */ || declaration.kind === 153 /* SetAccessor */) && + if ((declaration.kind === 153 /* GetAccessor */ || declaration.kind === 154 /* SetAccessor */) && !ts.hasDynamicName(declaration) && (!hasThisParameter || !thisParameter)) { - var otherKind = declaration.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */; + var otherKind = declaration.kind === 153 /* GetAccessor */ ? 154 /* SetAccessor */ : 153 /* GetAccessor */; var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - var classType = declaration.kind === 151 /* Constructor */ ? + var classType = declaration.kind === 152 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : getTypeParametersFromJSDocTemplate(declaration); var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType); - var typePredicate = declaration.type && declaration.type.kind === 157 /* TypePredicate */ ? + var typePredicate = declaration.type && declaration.type.kind === 158 /* TypePredicate */ ? createTypePredicateFromTypePredicateNode(declaration.type) : undefined; links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); @@ -31060,8 +31088,8 @@ var ts; } // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 152 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 153 /* SetAccessor */); + if (declaration.kind === 153 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 154 /* SetAccessor */); return getAnnotatedAccessorType(setter); } if (ts.nodeIsMissing(declaration.body)) { @@ -31083,13 +31111,13 @@ var ts; if (!node) return false; switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node.text === "arguments" && ts.isPartOfExpression(node); - case 148 /* PropertyDeclaration */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - return node.name.kind === 143 /* ComputedPropertyName */ + case 149 /* PropertyDeclaration */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + return node.name.kind === 144 /* ComputedPropertyName */ && traverse(node.name); default: return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse); @@ -31103,20 +31131,20 @@ var ts; for (var i = 0; i < symbol.declarations.length; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 279 /* JSDocFunctionType */: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -31213,7 +31241,7 @@ var ts; // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 151 /* Constructor */ || signature.declaration.kind === 155 /* ConstructSignature */; + var isConstructor = signature.declaration.kind === 152 /* Constructor */ || signature.declaration.kind === 156 /* ConstructSignature */; var type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -31227,7 +31255,7 @@ var ts; return symbol.members.get("__index"); } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 135 /* StringKeyword */; + var syntaxKind = kind === 1 /* Number */ ? 133 /* NumberKeyword */ : 136 /* StringKeyword */; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -31254,7 +31282,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 144 /* TypeParameter */).constraint; + return ts.getDeclarationOfKind(type.symbol, 145 /* TypeParameter */).constraint; } function getConstraintFromTypeParameter(typeParameter) { if (!typeParameter.constraint) { @@ -31270,7 +31298,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144 /* TypeParameter */).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 145 /* TypeParameter */).parent); } function getTypeListId(types) { var result = ""; @@ -31402,11 +31430,11 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 158 /* TypeReference */: + case 159 /* TypeReference */: return node.typeName; - case 276 /* JSDocTypeReference */: + case 277 /* JSDocTypeReference */: return node.name; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: // We only support expressions that are simple qualified names. For other // expressions this produces undefined. var expr = node.expression; @@ -31432,7 +31460,7 @@ var ts; if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 /* Value */ && node.kind === 276 /* JSDocTypeReference */) { + if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* JSDocTypeReference */) { // A JSDocTypeReference may have resolved to a value (as opposed to a type). In // that case, the type of this reference is just the type of the value we resolved // to. @@ -31477,7 +31505,7 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 276 /* JSDocTypeReference */) { + if (node.kind === 277 /* JSDocTypeReference */) { type = getPrimitiveTypeFromJSDocTypeReference(node); if (!type) { var typeReferenceName = getTypeReferenceName(node); @@ -31487,7 +31515,7 @@ var ts; } else { // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 158 /* TypeReference */ + var typeNameOrExpression = node.kind === 159 /* TypeReference */ ? node.typeName : ts.isEntityNameExpression(node.expression) ? node.expression @@ -31522,9 +31550,9 @@ var ts; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var declaration = declarations_4[_i]; switch (declaration.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: return declaration; } } @@ -31989,7 +32017,7 @@ var ts; return type; } function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) { - var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined; var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ? indexType.text : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ? @@ -32037,7 +32065,7 @@ var ts; } } if (accessNode) { - var indexNode = accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType; + var indexNode = accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType; if (indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */)) { error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType)); } @@ -32052,7 +32080,7 @@ var ts; return anyType; } function getIndexedAccessForMappedType(type, indexType, accessNode) { - var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined; + var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined; if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) { error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type)); return unknownType; @@ -32069,7 +32097,7 @@ var ts; // preserve backwards compatibility. For example, an element access 'this["foo"]' has always been resolved // eagerly using the constraint type of 'this' at the given location. if (maybeTypeOfKind(indexType, 540672 /* TypeVariable */ | 262144 /* Index */) || - maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 179 /* ElementAccessExpression */) || + maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 180 /* ElementAccessExpression */) || isGenericMappedType(objectType)) { if (objectType.flags & 1 /* Any */) { return objectType; @@ -32143,7 +32171,7 @@ var ts; return links.resolvedType; } function getAliasSymbolForTypeNode(node) { - return node.parent.kind === 230 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined; + return node.parent.kind === 231 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined; } function getAliasTypeArgumentsForTypeNode(node) { var symbol = getAliasSymbolForTypeNode(node); @@ -32293,9 +32321,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 229 /* InterfaceDeclaration */)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 230 /* InterfaceDeclaration */)) { if (!(ts.getModifierFlags(container) & 32 /* Static */) && - (container.kind !== 151 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) { + (container.kind !== 152 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -32311,85 +32339,85 @@ var ts; } function getTypeFromTypeNode(node) { switch (node.kind) { - case 118 /* AnyKeyword */: - case 267 /* JSDocAllType */: - case 268 /* JSDocUnknownType */: + case 119 /* AnyKeyword */: + case 268 /* JSDocAllType */: + case 269 /* JSDocUnknownType */: return anyType; - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: return stringType; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: return numberType; - case 121 /* BooleanKeyword */: + case 122 /* BooleanKeyword */: return booleanType; - case 136 /* SymbolKeyword */: + case 137 /* SymbolKeyword */: return esSymbolType; - case 104 /* VoidKeyword */: + case 105 /* VoidKeyword */: return voidType; - case 138 /* UndefinedKeyword */: + case 139 /* UndefinedKeyword */: return undefinedType; - case 94 /* NullKeyword */: + case 95 /* NullKeyword */: return nullType; - case 129 /* NeverKeyword */: + case 130 /* NeverKeyword */: return neverType; - case 133 /* ObjectKeyword */: + case 134 /* ObjectKeyword */: return nonPrimitiveType; - case 168 /* ThisType */: - case 98 /* ThisKeyword */: + case 169 /* ThisType */: + case 99 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 292 /* JSDocLiteralType */: + case 293 /* JSDocLiteralType */: return getTypeFromLiteralTypeNode(node.literal); - case 158 /* TypeReference */: - case 276 /* JSDocTypeReference */: + case 159 /* TypeReference */: + case 277 /* JSDocTypeReference */: return getTypeFromTypeReference(node); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return booleanType; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 163 /* ArrayType */: - case 269 /* JSDocArrayType */: + case 164 /* ArrayType */: + case 270 /* JSDocArrayType */: return getTypeFromArrayTypeNode(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 165 /* UnionType */: - case 270 /* JSDocUnionType */: + case 166 /* UnionType */: + case 271 /* JSDocUnionType */: return getTypeFromUnionTypeNode(node); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 272 /* JSDocNullableType */: + case 273 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 167 /* ParenthesizedType */: - case 273 /* JSDocNonNullableType */: - case 280 /* JSDocConstructorType */: - case 281 /* JSDocThisType */: - case 277 /* JSDocOptionalType */: + case 168 /* ParenthesizedType */: + case 274 /* JSDocNonNullableType */: + case 281 /* JSDocConstructorType */: + case 282 /* JSDocThisType */: + case 278 /* JSDocOptionalType */: return getTypeFromTypeNode(node.type); - case 274 /* JSDocRecordType */: + case 275 /* JSDocRecordType */: return getTypeFromTypeNode(node.literal); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 162 /* TypeLiteral */: - case 291 /* JSDocTypeLiteral */: - case 278 /* JSDocFunctionType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 163 /* TypeLiteral */: + case 292 /* JSDocTypeLiteral */: + case 279 /* JSDocFunctionType */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return getTypeFromMappedTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode - case 70 /* Identifier */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 143 /* QualifiedName */: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 271 /* JSDocTupleType */: + case 272 /* JSDocTupleType */: return getTypeFromJSDocTupleType(node); - case 279 /* JSDocVariadicType */: + case 280 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -32599,27 +32627,27 @@ var ts; // the type parameters introduced by enclosing declarations. We just pick the first // declaration since multiple declarations will all have the same parent anyway. return !!ts.findAncestor(symbol.declarations[0], function (node) { - if (node.kind === 232 /* ModuleDeclaration */ || node.kind === 264 /* SourceFile */) { + if (node.kind === 233 /* ModuleDeclaration */ || node.kind === 265 /* SourceFile */) { return "quit"; } switch (node.kind) { - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: var declaration = node; if (declaration.typeParameters) { for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { @@ -32629,19 +32657,19 @@ var ts; } } } - if (ts.isClassLike(node) || node.kind === 229 /* InterfaceDeclaration */) { + if (ts.isClassLike(node) || node.kind === 230 /* InterfaceDeclaration */) { var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; if (thisType && ts.contains(mappedTypes, thisType)) { return true; } } break; - case 171 /* MappedType */: + case 172 /* MappedType */: if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) { return true; } break; - case 278 /* JSDocFunctionType */: + case 279 /* JSDocFunctionType */: var func = node; for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) { var p = _c[_b]; @@ -32656,7 +32684,7 @@ var ts; function isTopLevelTypeAlias(symbol) { if (symbol.declarations && symbol.declarations.length) { var parentKind = symbol.declarations[0].parent.kind; - return parentKind === 264 /* SourceFile */ || parentKind === 233 /* ModuleBlock */; + return parentKind === 265 /* SourceFile */ || parentKind === 234 /* ModuleBlock */; } return false; } @@ -32733,34 +32761,34 @@ var ts; // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return isContextSensitiveFunctionLikeDeclaration(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return ts.forEach(node.properties, isContextSensitive); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return ts.forEach(node.elements, isContextSensitive); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 193 /* BinaryExpression */: - return node.operatorToken.kind === 53 /* BarBarToken */ && + case 194 /* BinaryExpression */: + return node.operatorToken.kind === 54 /* BarBarToken */ && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return isContextSensitiveFunctionLikeDeclaration(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return ts.forEach(node.properties, isContextSensitive); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: // If there is no initializer, JSX attribute has a boolean value of true which is not context sensitive. return node.initializer && isContextSensitive(node.initializer); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: // It is possible to that node.expression is undefined (e.g
) return node.expression && isContextSensitive(node.expression); } @@ -32776,7 +32804,7 @@ var ts; return true; } // For arrow functions we now know we're not context sensitive. - if (node.kind === 186 /* ArrowFunction */) { + if (node.kind === 187 /* ArrowFunction */) { return false; } // If the first parameter is not an explicit 'this' parameter, then the function has @@ -33350,7 +33378,7 @@ var ts; // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. ts.Debug.assert(!!errorNode); - if (ts.isJsxAttributes(errorNode)) { + if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode)) { // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); @@ -34443,25 +34471,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 145 /* Parameter */: + case 146 /* Parameter */: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; break; - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -34947,21 +34975,21 @@ var ts; // TypeScript 1.0 spec (April 2014): 3.6.3 // A type query consists of the keyword typeof followed by an expression. // The expression is restricted to a single identifier or a sequence of identifiers separated by periods - return !!ts.findAncestor(node, function (n) { return n.kind === 161 /* TypeQuery */ ? true : n.kind === 70 /* Identifier */ || n.kind === 142 /* QualifiedName */ ? false : "quit"; }); + return !!ts.findAncestor(node, function (n) { return n.kind === 162 /* TypeQuery */ ? true : n.kind === 71 /* Identifier */ || n.kind === 143 /* QualifiedName */ ? false : "quit"; }); } // Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers // separated by dots). The key consists of the id of the symbol referenced by the // leftmost identifier followed by zero or more property names separated by dots. // The result is undefined if the reference isn't a dotted name. function getFlowCacheKey(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; } - if (node.kind === 98 /* ThisKeyword */) { + if (node.kind === 99 /* ThisKeyword */) { return "0"; } - if (node.kind === 178 /* PropertyAccessExpression */) { + if (node.kind === 179 /* PropertyAccessExpression */) { var key = getFlowCacheKey(node.expression); return key && key + "." + node.name.text; } @@ -34969,33 +34997,33 @@ var ts; } function getLeftmostIdentifierOrThis(node) { switch (node.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: return node; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return getLeftmostIdentifierOrThis(node.expression); } return undefined; } function isMatchingReference(source, target) { switch (source.kind) { - case 70 /* Identifier */: - return target.kind === 70 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || - (target.kind === 225 /* VariableDeclaration */ || target.kind === 175 /* BindingElement */) && + case 71 /* Identifier */: + return target.kind === 71 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 226 /* VariableDeclaration */ || target.kind === 176 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); - case 98 /* ThisKeyword */: - return target.kind === 98 /* ThisKeyword */; - case 96 /* SuperKeyword */: - return target.kind === 96 /* SuperKeyword */; - case 178 /* PropertyAccessExpression */: - return target.kind === 178 /* PropertyAccessExpression */ && + case 99 /* ThisKeyword */: + return target.kind === 99 /* ThisKeyword */; + case 97 /* SuperKeyword */: + return target.kind === 97 /* SuperKeyword */; + case 179 /* PropertyAccessExpression */: + return target.kind === 179 /* PropertyAccessExpression */ && source.name.text === target.name.text && isMatchingReference(source.expression, target.expression); } return false; } function containsMatchingReference(source, target) { - while (source.kind === 178 /* PropertyAccessExpression */) { + while (source.kind === 179 /* PropertyAccessExpression */) { source = source.expression; if (isMatchingReference(source, target)) { return true; @@ -35008,15 +35036,15 @@ var ts; // a possible discriminant if its type differs in the constituents of containing union type, and if every // choice is a unit type or a union of unit types. function containsMatchingReferenceDiscriminant(source, target) { - return target.kind === 178 /* PropertyAccessExpression */ && + return target.kind === 179 /* PropertyAccessExpression */ && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); } function getDeclaredTypeOfReference(expr) { - if (expr.kind === 70 /* Identifier */) { + if (expr.kind === 71 /* Identifier */) { return getTypeOfSymbol(getResolvedSymbol(expr)); } - if (expr.kind === 178 /* PropertyAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */) { var type = getDeclaredTypeOfReference(expr.expression); return type && getTypeOfPropertyOfType(type, expr.name.text); } @@ -35046,7 +35074,7 @@ var ts; } } } - if (callExpression.expression.kind === 178 /* PropertyAccessExpression */ && + if (callExpression.expression.kind === 179 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, callExpression.expression.expression)) { return true; } @@ -35179,15 +35207,15 @@ var ts; return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType); } function getAssignedTypeOfBinaryExpression(node) { - var isDestructuringDefaultAssignment = node.parent.kind === 176 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || - node.parent.kind === 260 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + var isDestructuringDefaultAssignment = node.parent.kind === 177 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || + node.parent.kind === 261 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 193 /* BinaryExpression */ && parent.parent.left === parent || - parent.parent.kind === 215 /* ForOfStatement */ && parent.parent.initializer === parent; + return parent.parent.kind === 194 /* BinaryExpression */ && parent.parent.left === parent || + parent.parent.kind === 216 /* ForOfStatement */ && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); @@ -35204,21 +35232,21 @@ var ts; function getAssignedType(node) { var parent = node.parent; switch (parent.kind) { - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return stringType; - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return undefinedType; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent); - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return unknownType; @@ -35226,7 +35254,7 @@ var ts; function getInitialTypeOfBindingElement(node) { var pattern = node.parent; var parentType = getInitialType(pattern.parent); - var type = pattern.kind === 173 /* ObjectBindingPattern */ ? + var type = pattern.kind === 174 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : @@ -35244,39 +35272,39 @@ var ts; if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 214 /* ForInStatement */) { + if (node.parent.parent.kind === 215 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 215 /* ForOfStatement */) { + if (node.parent.parent.kind === 216 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType; } return unknownType; } function getInitialType(node) { - return node.kind === 225 /* VariableDeclaration */ ? + return node.kind === 226 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function getInitialOrAssignedType(node) { - return node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */ ? + return node.kind === 226 /* VariableDeclaration */ || node.kind === 176 /* BindingElement */ ? getInitialType(node) : getAssignedType(node); } function isEmptyArrayAssignment(node) { - return node.kind === 225 /* VariableDeclaration */ && node.initializer && + return node.kind === 226 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral(node.initializer) || - node.kind !== 175 /* BindingElement */ && node.parent.kind === 193 /* BinaryExpression */ && + node.kind !== 176 /* BindingElement */ && node.parent.kind === 194 /* BinaryExpression */ && isEmptyArrayLiteral(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: switch (node.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return getReferenceCandidate(node.left); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return getReferenceCandidate(node.right); } } @@ -35284,13 +35312,13 @@ var ts; } function getReferenceRoot(node) { var parent = node.parent; - return parent.kind === 184 /* ParenthesizedExpression */ || - parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node || - parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ? + return parent.kind === 185 /* ParenthesizedExpression */ || + parent.kind === 194 /* BinaryExpression */ && parent.operatorToken.kind === 58 /* EqualsToken */ && parent.left === node || + parent.kind === 194 /* BinaryExpression */ && parent.operatorToken.kind === 26 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 256 /* CaseClause */) { + if (clause.kind === 257 /* CaseClause */) { var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); return isUnitType(caseType) ? caseType : undefined; } @@ -35453,12 +35481,12 @@ var ts; function isEvolvingArrayOperationTarget(node) { var root = getReferenceRoot(node); var parent = root.parent; - var isLengthPushOrUnshift = parent.kind === 178 /* PropertyAccessExpression */ && (parent.name.text === "length" || - parent.parent.kind === 180 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name)); - var isElementAssignment = parent.kind === 179 /* ElementAccessExpression */ && + var isLengthPushOrUnshift = parent.kind === 179 /* PropertyAccessExpression */ && (parent.name.text === "length" || + parent.parent.kind === 181 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name)); + var isElementAssignment = parent.kind === 180 /* ElementAccessExpression */ && parent.expression === root && - parent.parent.kind === 193 /* BinaryExpression */ && - parent.parent.operatorToken.kind === 57 /* EqualsToken */ && + parent.parent.kind === 194 /* BinaryExpression */ && + parent.parent.operatorToken.kind === 58 /* EqualsToken */ && parent.parent.left === parent && !ts.isAssignmentTarget(parent.parent) && isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 /* NumberLike */ | 2048 /* Undefined */); @@ -35472,7 +35500,7 @@ var ts; return links.maybeTypePredicate; } function getMaybeTypePredicate(node) { - if (node.expression.kind !== 96 /* SuperKeyword */) { + if (node.expression.kind !== 97 /* SuperKeyword */) { var funcType = checkNonNullExpression(node.expression); if (funcType !== silentNeverType) { var apparentType = getApparentType(funcType); @@ -35498,7 +35526,7 @@ var ts; // on empty arrays are possible without implicit any errors and new element types can be inferred without // type mismatch errors. var resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType); - if (reference.parent.kind === 202 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) { + if (reference.parent.kind === 203 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) { return declaredType; } return resultType; @@ -35559,7 +35587,7 @@ var ts; else if (flow.flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.container; - if (container && container !== flowContainer && reference.kind !== 178 /* PropertyAccessExpression */ && reference.kind !== 98 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 179 /* PropertyAccessExpression */ && reference.kind !== 99 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -35613,7 +35641,7 @@ var ts; } function getTypeAtFlowArrayMutation(flow) { var node = flow.node; - var expr = node.kind === 180 /* CallExpression */ ? + var expr = node.kind === 181 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { @@ -35621,7 +35649,7 @@ var ts; var type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { var evolvedType_1 = type; - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) { var arg = _a[_i]; evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg); @@ -35785,7 +35813,7 @@ var ts; return result; } function isMatchingReferenceDiscriminant(expr) { - return expr.kind === 178 /* PropertyAccessExpression */ && + return expr.kind === 179 /* PropertyAccessExpression */ && declaredType.flags & 65536 /* Union */ && isMatchingReference(reference, expr.expression) && isDiscriminantProperty(declaredType, expr.name.text); @@ -35810,19 +35838,19 @@ var ts; } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: return narrowTypeByTruthiness(type, expr.left, assumeTrue); - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: var operator_1 = expr.operatorToken.kind; var left_1 = getReferenceCandidate(expr.left); var right_1 = getReferenceCandidate(expr.right); - if (left_1.kind === 188 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) { + if (left_1.kind === 189 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) { return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); } - if (right_1.kind === 188 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) { + if (right_1.kind === 189 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) { return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); } if (isMatchingReference(reference, left_1)) { @@ -35841,9 +35869,9 @@ var ts; return declaredType; } break; - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return narrowType(type, expr.right, assumeTrue); } return type; @@ -35852,7 +35880,7 @@ var ts; if (type.flags & 1 /* Any */) { return type; } - if (operator === 32 /* ExclamationEqualsToken */ || operator === 34 /* ExclamationEqualsEqualsToken */) { + if (operator === 33 /* ExclamationEqualsToken */ || operator === 35 /* ExclamationEqualsEqualsToken */) { assumeTrue = !assumeTrue; } var valueType = getTypeOfExpression(value); @@ -35860,10 +35888,10 @@ var ts; if (!strictNullChecks) { return type; } - var doubleEquals = operator === 31 /* EqualsEqualsToken */ || operator === 32 /* ExclamationEqualsToken */; + var doubleEquals = operator === 32 /* EqualsEqualsToken */ || operator === 33 /* ExclamationEqualsToken */; var facts = doubleEquals ? assumeTrue ? 65536 /* EQUndefinedOrNull */ : 524288 /* NEUndefinedOrNull */ : - value.kind === 94 /* NullKeyword */ ? + value.kind === 95 /* NullKeyword */ ? assumeTrue ? 32768 /* EQNull */ : 262144 /* NENull */ : assumeTrue ? 16384 /* EQUndefined */ : 131072 /* NEUndefined */; return getTypeWithFacts(type, facts); @@ -35892,7 +35920,7 @@ var ts; } return type; } - if (operator === 32 /* ExclamationEqualsToken */ || operator === 34 /* ExclamationEqualsEqualsToken */) { + if (operator === 33 /* ExclamationEqualsToken */ || operator === 35 /* ExclamationEqualsEqualsToken */) { assumeTrue = !assumeTrue; } if (assumeTrue && !(type.flags & 65536 /* Union */)) { @@ -36016,7 +36044,7 @@ var ts; return type; } if (ts.isIdentifierTypePredicate(predicate)) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + var predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)]; if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); @@ -36028,7 +36056,7 @@ var ts; } else { var invokedExpression = ts.skipParentheses(callExpression.expression); - if (invokedExpression.kind === 179 /* ElementAccessExpression */ || invokedExpression.kind === 178 /* PropertyAccessExpression */) { + if (invokedExpression.kind === 180 /* ElementAccessExpression */ || invokedExpression.kind === 179 /* PropertyAccessExpression */) { var accessExpression = invokedExpression; var possibleReference = ts.skipParentheses(accessExpression.expression); if (isMatchingReference(reference, possibleReference)) { @@ -36045,19 +36073,19 @@ var ts; // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 70 /* Identifier */: - case 98 /* ThisKeyword */: - case 96 /* SuperKeyword */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 99 /* ThisKeyword */: + case 97 /* SuperKeyword */: + case 179 /* PropertyAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return narrowType(type, expr.expression, assumeTrue); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 191 /* PrefixUnaryExpression */: - if (expr.operator === 50 /* ExclamationToken */) { + case 192 /* PrefixUnaryExpression */: + if (expr.operator === 51 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } break; @@ -36070,7 +36098,7 @@ var ts; // an dotted name expression, and if the location is not an assignment target, obtain the type // of the expression (which will reflect control flow analysis). If the expression indeed // resolved to the given symbol, return the narrowed type. - if (location.kind === 70 /* Identifier */) { + if (location.kind === 71 /* Identifier */) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { location = location.parent; } @@ -36091,9 +36119,9 @@ var ts; function getControlFlowContainer(node) { return ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || - node.kind === 233 /* ModuleBlock */ || - node.kind === 264 /* SourceFile */ || - node.kind === 148 /* PropertyDeclaration */; + node.kind === 234 /* ModuleBlock */ || + node.kind === 265 /* SourceFile */ || + node.kind === 149 /* PropertyDeclaration */; }); } // Check if a parameter is assigned anywhere within its declaring function. @@ -36112,10 +36140,10 @@ var ts; return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */); }); } function markParameterAssignments(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { if (ts.isAssignmentTarget(node)) { var symbol = getResolvedSymbol(node); - if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145 /* Parameter */) { + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 146 /* Parameter */) { symbol.isAssigned = true; } } @@ -36130,7 +36158,7 @@ var ts; /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 145 /* Parameter */ && + declaration.kind === 146 /* Parameter */ && declaration.initializer && getFalsyFlags(declaredType) & 2048 /* Undefined */ && !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */); @@ -36150,7 +36178,7 @@ var ts; if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 186 /* ArrowFunction */) { + if (container.kind === 187 /* ArrowFunction */) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (ts.hasModifier(container, 256 /* Async */)) { @@ -36169,7 +36197,7 @@ var ts; // Due to the emit for class decorators, any reference to the class from inside of the class body // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind // behavior of class names in ES6. - if (declaration_1.kind === 228 /* ClassDeclaration */ + if (declaration_1.kind === 229 /* ClassDeclaration */ && ts.nodeIsDecorated(declaration_1)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -36181,14 +36209,14 @@ var ts; container = ts.getContainingClass(container); } } - else if (declaration_1.kind === 198 /* ClassExpression */) { + else if (declaration_1.kind === 199 /* ClassExpression */) { // When we emit a class expression with static members that contain a reference // to the constructor in the initializer, we will need to substitute that // binding with an alias as the class name is not in scope. var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); while (container !== undefined) { if (container.parent === declaration_1) { - if (container.kind === 148 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) { + if (container.kind === 149 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) { getNodeLinks(declaration_1).flags |= 8388608 /* ClassWithConstructorReference */; getNodeLinks(node).flags |= 16777216 /* ConstructorReferenceInClass */; } @@ -36223,15 +36251,15 @@ var ts; // The declaration container is the innermost function that encloses the declaration of the variable // or parameter. The flow container is the innermost function starting with which we analyze the control // flow graph to determine the control flow based type. - var isParameter = ts.getRootDeclaration(declaration).kind === 145 /* Parameter */; + var isParameter = ts.getRootDeclaration(declaration).kind === 146 /* Parameter */; var declarationContainer = getControlFlowContainer(declaration); var flowContainer = getControlFlowContainer(node); var isOuterVariable = flowContainer !== declarationContainer; // When the control flow originates in a function expression or arrow function and we are referencing // a const variable or parameter from an outer function, we extend the origin of the control flow // analysis to include the immediately enclosing function. - while (flowContainer !== declarationContainer && (flowContainer.kind === 185 /* FunctionExpression */ || - flowContainer.kind === 186 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && + while (flowContainer !== declarationContainer && (flowContainer.kind === 186 /* FunctionExpression */ || + flowContainer.kind === 187 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) && (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } @@ -36239,7 +36267,7 @@ var ts; // the entire control flow graph from the variable's declaration (i.e. when the flow container and // declaration container are the same). var assumeInitialized = isParameter || isOuterVariable || - type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node)) || + type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node) || node.parent.kind === 246 /* ExportSpecifier */) || ts.isInAmbientContext(declaration); var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) : type === autoType || type === autoArrayType ? undefinedType : @@ -36270,7 +36298,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || - symbol.valueDeclaration.parent.kind === 259 /* CatchClause */) { + symbol.valueDeclaration.parent.kind === 260 /* CatchClause */) { return; } // 1. walk from the use site up to the declaration and check @@ -36295,8 +36323,8 @@ var ts; } // mark variables that are declared in loop initializer and reassigned inside the body of ForStatement. // if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back. - if (container.kind === 213 /* ForStatement */ && - ts.getAncestor(symbol.valueDeclaration, 226 /* VariableDeclarationList */).parent === container && + if (container.kind === 214 /* ForStatement */ && + ts.getAncestor(symbol.valueDeclaration, 227 /* VariableDeclarationList */).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152 /* NeedsLoopOutParameter */; } @@ -36310,7 +36338,7 @@ var ts; function isAssignedInBodyOfForStatement(node, container) { // skip parenthesized nodes var current = node; - while (current.parent.kind === 184 /* ParenthesizedExpression */) { + while (current.parent.kind === 185 /* ParenthesizedExpression */) { current = current.parent; } // check if node is used as LHS in some assignment expression @@ -36318,9 +36346,9 @@ var ts; if (ts.isAssignmentTarget(current)) { isAssigned = true; } - else if ((current.parent.kind === 191 /* PrefixUnaryExpression */ || current.parent.kind === 192 /* PostfixUnaryExpression */)) { + else if ((current.parent.kind === 192 /* PrefixUnaryExpression */ || current.parent.kind === 193 /* PostfixUnaryExpression */)) { var expr = current.parent; - isAssigned = expr.operator === 42 /* PlusPlusToken */ || expr.operator === 43 /* MinusMinusToken */; + isAssigned = expr.operator === 43 /* PlusPlusToken */ || expr.operator === 44 /* MinusMinusToken */; } if (!isAssigned) { return false; @@ -36331,7 +36359,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 148 /* PropertyDeclaration */ || container.kind === 151 /* Constructor */) { + if (container.kind === 149 /* PropertyDeclaration */ || container.kind === 152 /* Constructor */) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } @@ -36399,38 +36427,38 @@ var ts; // tell whether 'this' needs to be captured. var container = ts.getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; - if (container.kind === 151 /* Constructor */) { + if (container.kind === 152 /* Constructor */) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 186 /* ArrowFunction */) { + if (container.kind === 187 /* ArrowFunction */) { container = ts.getThisContainer(container, /* includeArrowFunctions */ false); // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < 2 /* ES2015 */); } switch (container.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 151 /* Constructor */: + case 152 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: if (ts.getModifierFlags(container) & 32 /* Static */) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -36442,8 +36470,8 @@ var ts; // Note: a parameter initializer should refer to class-this unless function-this is explicitly annotated. // If this is a function in a JS file, it might be a class method. Check if it's the RHS // of a x.prototype.y = function [name]() { .... } - if (container.kind === 185 /* FunctionExpression */ && - container.parent.kind === 193 /* BinaryExpression */ && + if (container.kind === 186 /* FunctionExpression */ && + container.parent.kind === 194 /* BinaryExpression */ && ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') var className = container.parent // x.prototype.y = f @@ -36479,23 +36507,23 @@ var ts; } function getTypeForThisExpressionFromJSDoc(node) { var jsdocType = ts.getJSDocType(node); - if (jsdocType && jsdocType.kind === 278 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 279 /* JSDocFunctionType */) { var jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281 /* JSDocThisType */) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 282 /* JSDocThisType */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145 /* Parameter */; }); + return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 146 /* Parameter */; }); } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 180 /* CallExpression */ && node.parent.expression === node; + var isCallExpression = node.parent.kind === 181 /* CallExpression */ && node.parent.expression === node; var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true); var needToCaptureLexicalThis = false; // adjust the container reference in case if super is used inside arrow functions with arbitrarily deep nesting if (!isCallExpression) { - while (container && container.kind === 186 /* ArrowFunction */) { + while (container && container.kind === 187 /* ArrowFunction */) { container = ts.getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; } @@ -36508,14 +36536,14 @@ var ts; // class B { // [super.foo()]() {} // } - var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143 /* ComputedPropertyName */; }); - if (current && current.kind === 143 /* ComputedPropertyName */) { + var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 144 /* ComputedPropertyName */; }); + if (current && current.kind === 144 /* ComputedPropertyName */) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 178 /* ObjectLiteralExpression */)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -36523,7 +36551,7 @@ var ts; } return unknownType; } - if (!isCallExpression && container.kind === 151 /* Constructor */) { + if (!isCallExpression && container.kind === 152 /* Constructor */) { checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if ((ts.getModifierFlags(container) & 32 /* Static */) || isCallExpression) { @@ -36589,7 +36617,7 @@ var ts; // This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set. // This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment // while a property access can. - if (container.kind === 150 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) { + if (container.kind === 151 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) { if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* AsyncMethodWithSuperBinding */; } @@ -36603,7 +36631,7 @@ var ts; // in this case they should also use correct lexical this captureLexicalThis(node.parent, container); } - if (container.parent.kind === 177 /* ObjectLiteralExpression */) { + if (container.parent.kind === 178 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -36623,7 +36651,7 @@ var ts; } return unknownType; } - if (container.kind === 151 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 152 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; @@ -36638,7 +36666,7 @@ var ts; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes - return container.kind === 151 /* Constructor */; + return container.kind === 152 /* Constructor */; } else { // TS 1.0 SPEC (April 2014) @@ -36646,21 +36674,21 @@ var ts; // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance // - In a static member function or static member accessor // topmost container must be something that is directly nested in the class declaration\object literal expression - if (ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */) { + if (ts.isClassLike(container.parent) || container.parent.kind === 178 /* ObjectLiteralExpression */) { if (ts.getModifierFlags(container) & 32 /* Static */) { - return container.kind === 150 /* MethodDeclaration */ || - container.kind === 149 /* MethodSignature */ || - container.kind === 152 /* GetAccessor */ || - container.kind === 153 /* SetAccessor */; + return container.kind === 151 /* MethodDeclaration */ || + container.kind === 150 /* MethodSignature */ || + container.kind === 153 /* GetAccessor */ || + container.kind === 154 /* SetAccessor */; } else { - return container.kind === 150 /* MethodDeclaration */ || - container.kind === 149 /* MethodSignature */ || - container.kind === 152 /* GetAccessor */ || - container.kind === 153 /* SetAccessor */ || - container.kind === 148 /* PropertyDeclaration */ || - container.kind === 147 /* PropertySignature */ || - container.kind === 151 /* Constructor */; + return container.kind === 151 /* MethodDeclaration */ || + container.kind === 150 /* MethodSignature */ || + container.kind === 153 /* GetAccessor */ || + container.kind === 154 /* SetAccessor */ || + container.kind === 149 /* PropertyDeclaration */ || + container.kind === 148 /* PropertySignature */ || + container.kind === 152 /* Constructor */; } } } @@ -36668,10 +36696,10 @@ var ts; } } function getContainingObjectLiteral(func) { - return (func.kind === 150 /* MethodDeclaration */ || - func.kind === 152 /* GetAccessor */ || - func.kind === 153 /* SetAccessor */) && func.parent.kind === 177 /* ObjectLiteralExpression */ ? func.parent : - func.kind === 185 /* FunctionExpression */ && func.parent.kind === 260 /* PropertyAssignment */ ? func.parent.parent : + return (func.kind === 151 /* MethodDeclaration */ || + func.kind === 153 /* GetAccessor */ || + func.kind === 154 /* SetAccessor */) && func.parent.kind === 178 /* ObjectLiteralExpression */ ? func.parent : + func.kind === 186 /* FunctionExpression */ && func.parent.kind === 261 /* PropertyAssignment */ ? func.parent.parent : undefined; } function getThisTypeArgument(type) { @@ -36683,7 +36711,7 @@ var ts; }); } function getContextualThisParameterType(func) { - if (func.kind === 186 /* ArrowFunction */) { + if (func.kind === 187 /* ArrowFunction */) { return undefined; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -36709,7 +36737,7 @@ var ts; if (thisType) { return instantiateType(thisType, getContextualMapper(containingLiteral)); } - if (literal.parent.kind !== 260 /* PropertyAssignment */) { + if (literal.parent.kind !== 261 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -36722,9 +36750,9 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - if (func.parent.kind === 193 /* BinaryExpression */ && func.parent.operatorToken.kind === 57 /* EqualsToken */) { + if (func.parent.kind === 194 /* BinaryExpression */ && func.parent.operatorToken.kind === 58 /* EqualsToken */) { var target = func.parent.left; - if (target.kind === 178 /* PropertyAccessExpression */ || target.kind === 179 /* ElementAccessExpression */) { + if (target.kind === 179 /* PropertyAccessExpression */ || target.kind === 180 /* ElementAccessExpression */) { return checkExpressionCached(target.expression); } } @@ -36786,7 +36814,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 145 /* Parameter */) { + if (declaration.kind === 146 /* Parameter */) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -36798,7 +36826,7 @@ var ts; if (ts.isBindingPattern(declaration.parent)) { var parentDeclaration = declaration.parent.parent; var name = declaration.propertyName || declaration.name; - if (parentDeclaration.kind !== 175 /* BindingElement */ && + if (parentDeclaration.kind !== 176 /* BindingElement */ && parentDeclaration.type && !ts.isBindingPattern(name)) { var text = ts.getTextOfPropertyName(name); @@ -36839,7 +36867,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 145 /* Parameter */ && node.parent.initializer === node) { + if (node.parent.kind === 146 /* Parameter */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -36850,8 +36878,8 @@ var ts; // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed if (functionDecl.type || - functionDecl.kind === 151 /* Constructor */ || - functionDecl.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153 /* SetAccessor */))) { + functionDecl.kind === 152 /* Constructor */ || + functionDecl.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154 /* SetAccessor */))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature @@ -36873,7 +36901,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 182 /* TaggedTemplateExpression */) { + if (template.parent.kind === 183 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -36881,7 +36909,7 @@ var ts; function getContextualTypeForBinaryOperand(node) { var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; - if (operator >= 57 /* FirstAssignment */ && operator <= 69 /* LastAssignment */) { + if (operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) { // Don't do this for special property assignments to avoid circularity if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0 /* None */) { return undefined; @@ -36891,7 +36919,7 @@ var ts; return getTypeOfExpression(binaryExpression.left); } } - else if (operator === 53 /* BarBarToken */) { + else if (operator === 54 /* BarBarToken */) { // When an || expression has a contextual type, the operands are contextually typed by that type. When an || // expression has no contextual type, the right operand is contextually typed by the type of the left operand. var type = getContextualType(binaryExpression); @@ -36900,7 +36928,7 @@ var ts; } return type; } - else if (operator === 52 /* AmpersandAmpersandToken */ || operator === 25 /* CommaToken */) { + else if (operator === 53 /* AmpersandAmpersandToken */ || operator === 26 /* CommaToken */) { if (node === binaryExpression.right) { return getContextualType(binaryExpression); } @@ -36970,6 +36998,32 @@ var ts; var conditional = node.parent; return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; } + function getContextualTypeForJsxExpression(node) { + // JSX expression can appear in two position : JSX Element's children or JSX attribute + var jsxAttributes = ts.isJsxAttributeLike(node.parent) ? + node.parent.parent : + node.parent.openingElement.attributes; // node.parent is JsxElement + // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type + // which is a type of the parameter of the signature we are trying out. + // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName + var attributesType = getContextualType(jsxAttributes); + if (!attributesType || isTypeAny(attributesType)) { + return undefined; + } + if (ts.isJsxAttribute(node.parent)) { + // JSX expression is in JSX attribute + return getTypeOfPropertyOfType(attributesType, node.parent.name.text); + } + else if (node.parent.kind === 249 /* JsxElement */) { + // JSX expression is in children of JSX Element, we will look for an "children" atttribute (we get the name from JSX.ElementAttributesProperty) + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + return jsxChildrenPropertyName && jsxChildrenPropertyName !== "" ? getTypeOfPropertyOfType(attributesType, jsxChildrenPropertyName) : anyType; + } + else { + // JSX expression is in JSX spread attribute + return attributesType; + } + } function getContextualTypeForJsxAttribute(attribute) { // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type // which is a type of the parameter of the signature we are trying out. @@ -37018,44 +37072,44 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 225 /* VariableDeclaration */: - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 175 /* BindingElement */: + case 226 /* VariableDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 176 /* BindingElement */: return getContextualTypeForInitializerExpression(node); - case 186 /* ArrowFunction */: - case 218 /* ReturnStatement */: + case 187 /* ArrowFunction */: + case 219 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return getContextualTypeForYieldOperand(parent); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return getTypeFromTypeNode(parent.type); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return getContextualTypeForElementExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); - case 204 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 195 /* TemplateExpression */); + case 205 /* TemplateSpan */: + ts.Debug.assert(parent.parent.kind === 196 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 184 /* ParenthesizedExpression */: - return getContextualType(parent); - case 255 /* JsxExpression */: + case 185 /* ParenthesizedExpression */: return getContextualType(parent); - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: + case 256 /* JsxExpression */: + return getContextualTypeForJsxExpression(parent); + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent); - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: return getAttributesTypeFromJsxOpeningLikeElement(parent); } return undefined; @@ -37091,7 +37145,7 @@ var ts; return sourceLength < targetParameterCount; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */; + return node.kind === 186 /* FunctionExpression */ || node.kind === 187 /* ArrowFunction */; } function getContextualSignatureForFunctionLikeDeclaration(node) { // Only function expressions, arrow functions, and object literal methods are contextually typed. @@ -37110,7 +37164,7 @@ var ts; // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; @@ -37156,8 +37210,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false); } function hasDefaultValue(node) { - return (node.kind === 175 /* BindingElement */ && !!node.initializer) || - (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */); + return (node.kind === 176 /* BindingElement */ && !!node.initializer) || + (node.kind === 194 /* BinaryExpression */ && node.operatorToken.kind === 58 /* EqualsToken */); } function checkArrayLiteral(node, checkMode) { var elements = node.elements; @@ -37166,7 +37220,7 @@ var ts; var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 197 /* SpreadElement */) { + if (inDestructuringPattern && e.kind === 198 /* SpreadElement */) { // Given the following situation: // var c: {}; // [...c] = ["", 0]; @@ -37190,7 +37244,7 @@ var ts; var type = checkExpressionForMutableLocation(e, checkMode); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 197 /* SpreadElement */; + hasSpreadElement = hasSpreadElement || e.kind === 198 /* SpreadElement */; } if (!hasSpreadElement) { // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such @@ -37205,7 +37259,7 @@ var ts; var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (pattern && (pattern.kind === 174 /* ArrayBindingPattern */ || pattern.kind === 176 /* ArrayLiteralExpression */)) { + if (pattern && (pattern.kind === 175 /* ArrayBindingPattern */ || pattern.kind === 177 /* ArrayLiteralExpression */)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -37213,7 +37267,7 @@ var ts; elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 199 /* OmittedExpression */) { + if (patternElement.kind !== 200 /* OmittedExpression */) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -37230,7 +37284,7 @@ var ts; strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 143 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 144 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { // It seems odd to consider an expression of type Any to result in a numeric name, @@ -37302,7 +37356,7 @@ var ts; var propagatedFlags = 0; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 173 /* ObjectBindingPattern */ || contextualType.pattern.kind === 177 /* ObjectLiteralExpression */); + (contextualType.pattern.kind === 174 /* ObjectBindingPattern */ || contextualType.pattern.kind === 178 /* ObjectLiteralExpression */); var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node); var typeFlags = 0; var patternWithComputedProperties = false; @@ -37312,18 +37366,18 @@ var ts; for (var i = 0; i < node.properties.length; i++) { var memberDecl = node.properties[i]; var member = memberDecl.symbol; - if (memberDecl.kind === 260 /* PropertyAssignment */ || - memberDecl.kind === 261 /* ShorthandPropertyAssignment */ || + if (memberDecl.kind === 261 /* PropertyAssignment */ || + memberDecl.kind === 262 /* ShorthandPropertyAssignment */ || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 260 /* PropertyAssignment */) { + if (memberDecl.kind === 261 /* PropertyAssignment */) { type = checkPropertyAssignment(memberDecl, checkMode); } - else if (memberDecl.kind === 150 /* MethodDeclaration */) { + else if (memberDecl.kind === 151 /* MethodDeclaration */) { type = checkObjectLiteralMethod(memberDecl, checkMode); } else { - ts.Debug.assert(memberDecl.kind === 261 /* ShorthandPropertyAssignment */); + ts.Debug.assert(memberDecl.kind === 262 /* ShorthandPropertyAssignment */); type = checkExpressionForMutableLocation(memberDecl.name, checkMode); } typeFlags |= type.flags; @@ -37331,8 +37385,8 @@ var ts; if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - var isOptional = (memberDecl.kind === 260 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 261 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 261 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 262 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 67108864 /* Optional */; } @@ -37360,7 +37414,7 @@ var ts; prop.target = member; member = prop; } - else if (memberDecl.kind === 262 /* SpreadAssignment */) { + else if (memberDecl.kind === 263 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -37387,7 +37441,7 @@ var ts; // an ordinary function declaration(section 6.1) with no parameters. // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 152 /* GetAccessor */ || memberDecl.kind === 153 /* SetAccessor */); + ts.Debug.assert(memberDecl.kind === 153 /* GetAccessor */ || memberDecl.kind === 154 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (ts.hasDynamicName(memberDecl)) { @@ -37467,21 +37521,6 @@ var ts; else { checkExpression(node.closingElement.tagName); } - // Check children - for (var _i = 0, _a = node.children; _i < _a.length; _i++) { - var child = _a[_i]; - switch (child.kind) { - case 255 /* JsxExpression */: - checkJsxExpression(child); - break; - case 248 /* JsxElement */: - checkJsxElement(child); - break; - case 249 /* JsxSelfClosingElement */: - checkJsxSelfClosingElement(child); - break; - } - } return getJsxGlobalElementType() || anyType; } /** @@ -37496,7 +37535,7 @@ var ts; */ function isJsxIntrinsicIdentifier(tagName) { // TODO (yuisu): comment - if (tagName.kind === 178 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) { + if (tagName.kind === 179 /* PropertyAccessExpression */ || tagName.kind === 99 /* ThisKeyword */) { return false; } else { @@ -37536,7 +37575,7 @@ var ts; attributesArray.push(attributeSymbol); } else { - ts.Debug.assert(attributeDecl.kind === 254 /* JsxSpreadAttribute */); + ts.Debug.assert(attributeDecl.kind === 255 /* JsxSpreadAttribute */); if (attributesArray.length > 0) { spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); attributesArray = []; @@ -37569,6 +37608,39 @@ var ts; } }); } + // Handle children attribute + var parent = openingLikeElement.parent.kind === 249 /* JsxElement */ ? openingLikeElement.parent : undefined; + // We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement + if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + var childrenTypes = []; + for (var _b = 0, _c = parent.children; _b < _c.length; _b++) { + var child = _c[_b]; + // In React, JSX text that contains only whitespaces will be ignored so we don't want to type-check that + // because then type of children property will have constituent of string type. + if (child.kind === 10 /* JsxText */) { + if (!child.containsOnlyWhiteSpaces) { + childrenTypes.push(stringType); + } + } + else { + childrenTypes.push(checkExpression(child, checkMode)); + } + } + // Error if there is a attribute named "children" and children element. + // This is because children element will overwrite the value from attributes + var jsxChildrenPropertyName = getJsxElementChildrenPropertyname(); + if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { + if (attributesTable.has(jsxChildrenPropertyName)) { + error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName); + } + // If there are children in the body of JSX element, create dummy attribute "children" with anyType so that it will pass the attribute checking process + var childrenPropSymbol = createSymbol(4 /* Property */ | 134217728 /* Transient */, jsxChildrenPropertyName); + childrenPropSymbol.type = childrenTypes.length === 1 ? + childrenTypes[0] : + createArrayType(getUnionType(childrenTypes, /*subtypeReduction*/ false)); + attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol); + } + } return createJsxAttributesType(attributes.symbol, attributesTable); /** * Create anonymous type from given attributes symbol table. @@ -37658,37 +37730,55 @@ var ts; } return getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true); } - /// e.g. "props" for React.d.ts, - /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all - /// non-intrinsic elements' attributes type is 'any'), - /// or '' if it has 0 properties (which means every - /// non-intrinsic elements' attributes type is the element instance type) - function getJsxElementPropertiesName() { + /** + * Look into JSX namespace and then look for container with matching name as nameOfAttribPropContainer. + * Get a single property from that container if existed. Report an error if there are more than one property. + * + * @param nameOfAttribPropContainer a string of value JsxNames.ElementAttributesPropertyNameContainer or JsxNames.ElementChildrenAttributeNameContainer + * if other string is given or the container doesn't exist, return undefined. + */ + function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) { // JSX var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920 /* Namespace */, /*diagnosticMessage*/ undefined); - // JSX.ElementAttributesProperty [symbol] - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064 /* Type */); - // JSX.ElementAttributesProperty [type] - var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - // The properties of JSX.ElementAttributesProperty - var attribProperties = attribPropType && getPropertiesOfType(attribPropType); - if (attribProperties) { + // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [symbol] + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 793064 /* Type */); + // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [type] + var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); + // The properties of JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute + var propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); + if (propertiesOfJsxElementAttribPropInterface) { // Element Attributes has zero properties, so the element attributes type will be the class instance type - if (attribProperties.length === 0) { + if (propertiesOfJsxElementAttribPropInterface.length === 0) { return ""; } - else if (attribProperties.length === 1) { - return attribProperties[0].name; + else if (propertiesOfJsxElementAttribPropInterface.length === 1) { + return propertiesOfJsxElementAttribPropInterface[0].name; } - else { - error(attribsPropTypeSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, JsxNames.ElementAttributesPropertyNameContainer); - return undefined; + else if (propertiesOfJsxElementAttribPropInterface.length > 1) { + // More than one property on ElementAttributesProperty is an error + error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, nameOfAttribPropContainer); } } - else { - // No interface exists, so the element attributes type will be an implicit any - return undefined; + return undefined; + } + /// e.g. "props" for React.d.ts, + /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all + /// non-intrinsic elements' attributes type is 'any'), + /// or '' if it has 0 properties (which means every + /// non-intrinsic elements' attributes type is the element instance type) + function getJsxElementPropertiesName() { + if (!_hasComputedJsxElementPropertiesName) { + _hasComputedJsxElementPropertiesName = true; + _jsxElementPropertiesName = getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer); + } + return _jsxElementPropertiesName; + } + function getJsxElementChildrenPropertyname() { + if (!_hasComputedJsxElementChildrenPropertyName) { + _hasComputedJsxElementChildrenPropertyName = true; + _jsxElementChildrenPropertyName = getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer); } + return _jsxElementChildrenPropertyName; } /** * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component. @@ -38068,7 +38158,7 @@ var ts; // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized // '.prototype' property as well as synthesized tuple index properties. function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 148 /* PropertyDeclaration */; + return s.valueDeclaration ? s.valueDeclaration.kind : 149 /* PropertyDeclaration */; } function getDeclarationModifierFlagsFromSymbol(s) { if (s.valueDeclaration) { @@ -38104,7 +38194,7 @@ var ts; */ function checkPropertyAccessibility(node, left, type, prop) { var flags = getDeclarationModifierFlagsFromSymbol(prop); - var errorNode = node.kind === 178 /* PropertyAccessExpression */ || node.kind === 225 /* VariableDeclaration */ ? + var errorNode = node.kind === 179 /* PropertyAccessExpression */ || node.kind === 226 /* VariableDeclaration */ ? node.name : node.right; if (getCheckFlags(prop) & 256 /* ContainsPrivate */) { @@ -38112,7 +38202,7 @@ var ts; error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type)); return false; } - if (left.kind === 96 /* SuperKeyword */) { + if (left.kind === 97 /* SuperKeyword */) { // TS 1.0 spec (April 2014): 4.8.2 // - In a constructor, instance member function, instance member accessor, or // instance member variable initializer where this references a derived class instance, @@ -38123,7 +38213,7 @@ var ts; if (languageVersion < 2 /* ES2015 */) { var hasNonMethodDeclaration = forEachProperty(prop, function (p) { var propKind = getDeclarationKindFromSymbol(p); - return propKind !== 150 /* MethodDeclaration */ && propKind !== 149 /* MethodSignature */; + return propKind !== 151 /* MethodDeclaration */ && propKind !== 150 /* MethodSignature */; }); if (hasNonMethodDeclaration) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -38155,7 +38245,7 @@ var ts; } // Property is known to be protected at this point // All protected properties of a supertype are accessible in a super access - if (left.kind === 96 /* SuperKeyword */) { + if (left.kind === 97 /* SuperKeyword */) { return true; } // Find the first enclosing class that has the declaring classes of the protected constituents @@ -38234,7 +38324,7 @@ var ts; } function isInPropertyInitializer(node) { while (node) { - if (node.parent && node.parent.kind === 148 /* PropertyDeclaration */ && node.parent.initializer === node) { + if (node.parent && node.parent.kind === 149 /* PropertyDeclaration */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -38267,8 +38357,8 @@ var ts; !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text); } - if (prop.valueDeclaration.kind === 228 /* ClassDeclaration */ && - node.parent && node.parent.kind !== 158 /* TypeReference */ && + if (prop.valueDeclaration.kind === 229 /* ClassDeclaration */ && + node.parent && node.parent.kind !== 159 /* TypeReference */ && !ts.isInAmbientContext(prop.valueDeclaration) && !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) { error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text); @@ -38288,7 +38378,7 @@ var ts; // Only compute control flow type if this is a property access expression that isn't an // assignment target, and the referenced property was declared as a variable, property, // accessor, or optional method. - if (node.kind !== 178 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ || + if (node.kind !== 179 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ || !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && !(prop.flags & 8192 /* Method */ && propType.flags & 65536 /* Union */)) { return propType; @@ -38297,7 +38387,7 @@ var ts; return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 178 /* PropertyAccessExpression */ + var left = node.kind === 179 /* PropertyAccessExpression */ ? node.expression : node.left; var type = checkExpression(left); @@ -38314,13 +38404,13 @@ var ts; */ function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 226 /* VariableDeclarationList */) { + if (initializer.kind === 227 /* VariableDeclarationList */) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); } } - else if (initializer.kind === 70 /* Identifier */) { + else if (initializer.kind === 71 /* Identifier */) { return getResolvedSymbol(initializer); } return undefined; @@ -38337,13 +38427,13 @@ var ts; */ function isForInVariableForNumericPropertyNames(expr) { var e = ts.skipParentheses(expr); - if (e.kind === 70 /* Identifier */) { + if (e.kind === 71 /* Identifier */) { var symbol = getResolvedSymbol(e); if (symbol.flags & 3 /* Variable */) { var child = expr; var node = expr.parent; while (node) { - if (node.kind === 214 /* ForInStatement */ && + if (node.kind === 215 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { @@ -38361,7 +38451,7 @@ var ts; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 181 /* NewExpression */ && node.parent.expression === node) { + if (node.parent.kind === 182 /* NewExpression */ && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -38419,10 +38509,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { checkExpression(node.template); } - else if (node.kind !== 146 /* Decorator */) { + else if (node.kind !== 147 /* Decorator */) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -38488,7 +38578,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 197 /* SpreadElement */) { + if (arg && arg.kind === 198 /* SpreadElement */) { return i; } } @@ -38505,13 +38595,13 @@ var ts; // The arity check will be done in "checkApplicableSignatureForJsxOpeningLikeElement". return true; } - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { var tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 195 /* TemplateExpression */) { + if (tagExpression.template.kind === 196 /* TemplateExpression */) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. var templateExpression = tagExpression.template; @@ -38524,11 +38614,11 @@ var ts; // then this might actually turn out to be a TemplateHead in the future; // so we consider the call to be incomplete. var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 12 /* NoSubstitutionTemplateLiteral */); + ts.Debug.assert(templateLiteral.kind === 13 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 146 /* Decorator */) { + else if (node.kind === 147 /* Decorator */) { isDecorator = true; typeArguments = undefined; argCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); @@ -38537,7 +38627,7 @@ var ts; var callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 181 /* NewExpression */); + ts.Debug.assert(callExpression.kind === 182 /* NewExpression */); return signature.minArgumentCount === 0; } argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -38623,7 +38713,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 200 /* OmittedExpression */) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); // If the effective argument type is 'undefined', there is no synthetic type @@ -38715,7 +38805,7 @@ var ts; return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation); } var thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 181 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 182 /* NewExpression */) { // If the called expression is not of the form `x.f` or `x["f"]`, then sourceType = voidType // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. @@ -38732,7 +38822,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 200 /* OmittedExpression */) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i); @@ -38754,12 +38844,12 @@ var ts; * Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise. */ function getThisArgumentOfCall(node) { - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { var callee = node.expression; - if (callee.kind === 178 /* PropertyAccessExpression */) { + if (callee.kind === 179 /* PropertyAccessExpression */) { return callee.expression; } - else if (callee.kind === 179 /* ElementAccessExpression */) { + else if (callee.kind === 180 /* ElementAccessExpression */) { return callee.expression; } } @@ -38775,16 +38865,16 @@ var ts; */ function getEffectiveCallArguments(node) { var args; - if (node.kind === 182 /* TaggedTemplateExpression */) { + if (node.kind === 183 /* TaggedTemplateExpression */) { var template = node.template; args = [undefined]; - if (template.kind === 195 /* TemplateExpression */) { + if (template.kind === 196 /* TemplateExpression */) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 146 /* Decorator */) { + else if (node.kind === 147 /* Decorator */) { // For a decorator, we return undefined as we will determine // the number and types of arguments for a decorator using // `getEffectiveArgumentCount` and `getEffectiveArgumentType` below. @@ -38812,19 +38902,19 @@ var ts; * Otherwise, the argument count is the length of the 'args' array. */ function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { switch (node.parent.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: // A class decorator will have one argument (see `ClassDecorator` in core.d.ts) return 1; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // A property declaration decorator will have two arguments (see // `PropertyDecorator` in core.d.ts) return 2; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) // If we are emitting decorators for ES3, we will only pass two arguments. @@ -38834,7 +38924,7 @@ var ts; // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; - case 145 /* Parameter */: + case 146 /* Parameter */: // A parameter declaration decorator will have three arguments (see // `ParameterDecorator` in core.d.ts) return 3; @@ -38858,25 +38948,25 @@ var ts; */ function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" side of the class) var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { // For a parameter decorator, the `target` is the parent type of the // parameter's containing method. node = node.parent; - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // For a property or method decorator, the `target` is the // "static"-side type of the parent of the member if the member is // declared "static"; otherwise, it is the "instance"-side type of the @@ -38903,34 +38993,34 @@ var ts; */ function getEffectiveDecoratorSecondArgumentType(node) { // The second argument to a decorator is its `propertyKey` - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { node = node.parent; - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { // For a constructor parameter decorator, the `propertyKey` will be `undefined`. return anyType; } // For a non-constructor parameter decorator, the `propertyKey` will be either // a string or a symbol, based on the name of the parameter's containing method. } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // The `propertyKey` for a property or method decorator will be a // string literal type if the member name is an identifier, number, or string; // otherwise, if the member name is a computed property name it will // be either string or symbol. var element = node; switch (element.name.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return getLiteralTypeForText(32 /* StringLiteral */, element.name.text); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: var nameType = checkComputedPropertyName(element.name); if (isTypeOfKind(nameType, 512 /* ESSymbol */)) { return nameType; @@ -38956,21 +39046,21 @@ var ts; function getEffectiveDecoratorThirdArgumentType(node) { // The third argument to a decorator is either its `descriptor` for a method decorator // or its `parameterIndex` for a parameter decorator - if (node.kind === 228 /* ClassDeclaration */) { + if (node.kind === 229 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { // The `parameterIndex` for a parameter decorator is always a number return numberType; } - if (node.kind === 148 /* PropertyDeclaration */) { + if (node.kind === 149 /* PropertyDeclaration */) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 150 /* MethodDeclaration */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 151 /* MethodDeclaration */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // The `descriptor` for a method decorator will be a `TypedPropertyDescriptor` // for the type of the member. var propertyType = getTypeOfNode(node); @@ -39002,10 +39092,10 @@ var ts; // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */) { return getGlobalTemplateStringsArrayType(); } // This is not a synthetic argument, so we return 'undefined' @@ -39017,8 +39107,8 @@ var ts; */ function getEffectiveArgument(node, args, argIndex) { // For a decorator or the first argument of a tagged template expression we return undefined. - if (node.kind === 146 /* Decorator */ || - (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */)) { + if (node.kind === 147 /* Decorator */ || + (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */)) { return undefined; } return args[argIndex]; @@ -39027,11 +39117,11 @@ var ts; * Gets the error node to use when reporting errors for an effective argument. */ function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 146 /* Decorator */) { + if (node.kind === 147 /* Decorator */) { // For a decorator, we use the expression of the decorator for error reporting. return node.expression; } - else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 183 /* TaggedTemplateExpression */) { // For a the first argument of a tagged template expression, we use the template of the tag for error reporting. return node.template; } @@ -39040,14 +39130,14 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 182 /* TaggedTemplateExpression */; - var isDecorator = node.kind === 146 /* Decorator */; + var isTaggedTemplate = node.kind === 183 /* TaggedTemplateExpression */; + var isDecorator = node.kind === 147 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); var typeArguments; if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) { typeArguments = node.typeArguments; // We already perform checking on the type arguments on the class declaration itself. - if (node.expression.kind !== 96 /* SuperKeyword */) { + if (node.expression.kind !== 97 /* SuperKeyword */) { ts.forEach(typeArguments, checkSourceElement); } } @@ -39127,7 +39217,7 @@ var ts; var result; // If we are in signature help, a trailing comma indicates that we intend to provide another argument, // so we will only accept overloads with arity at least 1 higher than the current number of provided arguments. - var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 /* CallExpression */ && node.arguments.hasTrailingComma; + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 /* CallExpression */ && node.arguments.hasTrailingComma; // Section 4.12.1: // if the candidate list contains one or more signatures for which the type of each argument // expression is a subtype of each corresponding parameter type, the return type of the first @@ -39277,7 +39367,7 @@ var ts; } } function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { var superType = checkSuperExpression(node.expression); if (superType !== unknownType) { // In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated @@ -39480,16 +39570,16 @@ var ts; */ function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 145 /* Parameter */: + case 146 /* Parameter */: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -39562,16 +39652,16 @@ var ts; } function resolveSignature(node, candidatesOutArray) { switch (node.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray); - case 146 /* Decorator */: + case 147 /* Decorator */: return resolveDecorator(node, candidatesOutArray); - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: // This code-path is called by language service return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray); } @@ -39623,22 +39713,22 @@ var ts; // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return voidType; } - if (node.kind === 181 /* NewExpression */) { + if (node.kind === 182 /* NewExpression */) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 151 /* Constructor */ && - declaration.kind !== 155 /* ConstructSignature */ && - declaration.kind !== 160 /* ConstructorType */ && + declaration.kind !== 152 /* Constructor */ && + declaration.kind !== 156 /* ConstructSignature */ && + declaration.kind !== 161 /* ConstructorType */ && !ts.isJSDocConstructSignature(declaration)) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations // in a JS file // Note:JS inferred classes might come from a variable declaration instead of a function declaration. // In this case, using getResolvedSymbol directly is required to avoid losing the members from the declaration. - var funcSymbol = node.expression.kind === 70 /* Identifier */ ? + var funcSymbol = node.expression.kind === 71 /* Identifier */ ? getResolvedSymbol(node.expression) : checkExpression(node.expression).symbol; if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) { @@ -39674,9 +39764,9 @@ var ts; return false; } var targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ - ? 227 /* FunctionDeclaration */ + ? 228 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ - ? 225 /* VariableDeclaration */ + ? 226 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind); @@ -39710,7 +39800,7 @@ var ts; error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return unknownType; } - else if (container.kind === 151 /* Constructor */) { + else if (container.kind === 152 /* Constructor */) { var symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } @@ -39778,7 +39868,7 @@ var ts; for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; if (!ts.isOmittedExpression(element)) { - if (element.name.kind === 70 /* Identifier */) { + if (element.name.kind === 71 /* Identifier */) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } assignBindingElementTypes(element); @@ -39792,8 +39882,8 @@ var ts; links.type = instantiateType(contextualType, mapper); // if inference didn't come up with anything but {}, fall back to the binding pattern if present. if (links.type === emptyObjectType && - (parameter.valueDeclaration.name.kind === 173 /* ObjectBindingPattern */ || - parameter.valueDeclaration.name.kind === 174 /* ArrayBindingPattern */)) { + (parameter.valueDeclaration.name.kind === 174 /* ObjectBindingPattern */ || + parameter.valueDeclaration.name.kind === 175 /* ArrayBindingPattern */)) { links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); } assignBindingElementTypes(parameter.valueDeclaration); @@ -39866,7 +39956,7 @@ var ts; } var functionFlags = ts.getFunctionFlags(func); var type; - if (func.body.kind !== 206 /* Block */) { + if (func.body.kind !== 207 /* Block */) { type = checkExpressionCached(func.body, checkMode); if (functionFlags & 2 /* Async */) { // From within an async function you can return either a non-promise value or a promise. Any @@ -39971,7 +40061,7 @@ var ts; return false; } var lastStatement = ts.lastOrUndefined(func.body.statements); - if (lastStatement && lastStatement.kind === 220 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) { + if (lastStatement && lastStatement.kind === 221 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) { return false; } return true; @@ -40004,7 +40094,7 @@ var ts; } }); if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || - func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */)) { + func.kind === 186 /* FunctionExpression */ || func.kind === 187 /* ArrowFunction */)) { return undefined; } if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { @@ -40033,7 +40123,7 @@ var ts; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw - if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 /* Block */ || !functionHasImplicitReturn(func)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 207 /* Block */ || !functionHasImplicitReturn(func)) { return; } var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */; @@ -40066,10 +40156,10 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); // Grammar checking var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 185 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 186 /* FunctionExpression */) { checkGrammarForGenerator(node); } // The identityMapper object is used to indicate that function expressions are wildcards @@ -40110,7 +40200,7 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 150 /* MethodDeclaration */) { + if (produceDiagnostics && node.kind !== 151 /* MethodDeclaration */) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithCapturedNewTargetVariable(node, node.name); @@ -40118,7 +40208,7 @@ var ts; return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); var returnOrPromisedType = node.type && ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ? @@ -40137,7 +40227,7 @@ var ts; // checkFunctionExpressionBodies). So it must be done now. getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 206 /* Block */) { + if (node.body.kind === 207 /* Block */) { checkSourceElement(node.body); } else { @@ -40184,11 +40274,11 @@ var ts; if (isReadonlySymbol(symbol)) { // Allow assignments to readonly properties within constructors of the same class declaration. if (symbol.flags & 4 /* Property */ && - (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) && - expr.expression.kind === 98 /* ThisKeyword */) { + (expr.kind === 179 /* PropertyAccessExpression */ || expr.kind === 180 /* ElementAccessExpression */) && + expr.expression.kind === 99 /* ThisKeyword */) { // Look for if this is the constructor for the class that `symbol` is a property of. var func = ts.getContainingFunction(expr); - if (!(func && func.kind === 151 /* Constructor */)) + if (!(func && func.kind === 152 /* Constructor */)) return true; // If func.parent is a class and symbol is a (readonly) property of that class, or // if func is a constructor and symbol is a (readonly) parameter property declared in it, @@ -40200,13 +40290,13 @@ var ts; return false; } function isReferenceThroughNamespaceImport(expr) { - if (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */ || expr.kind === 180 /* ElementAccessExpression */) { var node = ts.skipParentheses(expr.expression); - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol.flags & 8388608 /* Alias */) { var declaration = getDeclarationOfAliasSymbol(symbol); - return declaration && declaration.kind === 239 /* NamespaceImport */; + return declaration && declaration.kind === 240 /* NamespaceImport */; } } } @@ -40215,7 +40305,7 @@ var ts; function checkReferenceExpression(expr, invalidReferenceMessage) { // References are combinations of identifiers, parentheses, and property accesses. var node = ts.skipParentheses(expr); - if (node.kind !== 70 /* Identifier */ && node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) { + if (node.kind !== 71 /* Identifier */ && node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) { error(expr, invalidReferenceMessage); return false; } @@ -40224,7 +40314,7 @@ var ts; function checkDeleteExpression(node) { checkExpression(node.expression); var expr = ts.skipParentheses(node.expression); - if (expr.kind !== 178 /* PropertyAccessExpression */ && expr.kind !== 179 /* ElementAccessExpression */) { + if (expr.kind !== 179 /* PropertyAccessExpression */ && expr.kind !== 180 /* ElementAccessExpression */) { error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } @@ -40261,25 +40351,25 @@ var ts; if (operandType === silentNeverType) { return silentNeverType; } - if (node.operator === 37 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) { + if (node.operator === 38 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) { return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, "" + -node.operand.text)); } switch (node.operator) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: checkNonNullType(operandType, node.operand); if (maybeTypeOfKind(operandType, 512 /* ESSymbol */)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; - case 50 /* ExclamationToken */: + case 51 /* ExclamationToken */: var facts = getTypeFacts(operandType) & (1048576 /* Truthy */ | 2097152 /* Falsy */); return facts === 1048576 /* Truthy */ ? falseType : facts === 2097152 /* Falsy */ ? trueType : booleanType; - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors @@ -40401,9 +40491,9 @@ var ts; } /** Note: If property cannot be a SpreadAssignment, then allProperties does not need to be provided */ function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) { - if (property.kind === 260 /* PropertyAssignment */ || property.kind === 261 /* ShorthandPropertyAssignment */) { + if (property.kind === 261 /* PropertyAssignment */ || property.kind === 262 /* ShorthandPropertyAssignment */) { var name = property.name; - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(name); } if (isComputedNonLiteralName(name)) { @@ -40416,7 +40506,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1 /* Number */) || getIndexTypeOfType(objectLiteralType, 0 /* String */); if (type) { - if (property.kind === 261 /* ShorthandPropertyAssignment */) { + if (property.kind === 262 /* ShorthandPropertyAssignment */) { return checkDestructuringAssignment(property, type); } else { @@ -40428,7 +40518,7 @@ var ts; error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name)); } } - else if (property.kind === 262 /* SpreadAssignment */) { + else if (property.kind === 263 /* SpreadAssignment */) { if (languageVersion < 5 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); } @@ -40462,8 +40552,8 @@ var ts; function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { var elements = node.elements; var element = elements[elementIndex]; - if (element.kind !== 199 /* OmittedExpression */) { - if (element.kind !== 197 /* SpreadElement */) { + if (element.kind !== 200 /* OmittedExpression */) { + if (element.kind !== 198 /* SpreadElement */) { var propName = "" + elementIndex; var type = isTypeAny(sourceType) ? sourceType @@ -40491,7 +40581,7 @@ var ts; } else { var restExpression = element.expression; - if (restExpression.kind === 193 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) { + if (restExpression.kind === 194 /* BinaryExpression */ && restExpression.operatorToken.kind === 58 /* EqualsToken */) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -40504,7 +40594,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) { var target; - if (exprOrAssignment.kind === 261 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 262 /* ShorthandPropertyAssignment */) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { // In strict null checking mode, if a default value of a non-undefined type is specified, remove @@ -40520,21 +40610,21 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 193 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) { + if (target.kind === 194 /* BinaryExpression */ && target.operatorToken.kind === 58 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; } - if (target.kind === 177 /* ObjectLiteralExpression */) { + if (target.kind === 178 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType); } - if (target.kind === 176 /* ArrayLiteralExpression */) { + if (target.kind === 177 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { var targetType = checkExpression(target, checkMode); - var error = target.parent.kind === 262 /* SpreadAssignment */ ? + var error = target.parent.kind === 263 /* SpreadAssignment */ ? ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; if (checkReferenceExpression(target, error)) { @@ -40553,52 +40643,52 @@ var ts; function isSideEffectFree(node) { node = ts.skipParentheses(node); switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: case 9 /* StringLiteral */: - case 11 /* RegularExpressionLiteral */: - case 182 /* TaggedTemplateExpression */: - case 195 /* TemplateExpression */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 12 /* RegularExpressionLiteral */: + case 183 /* TaggedTemplateExpression */: + case 196 /* TemplateExpression */: + case 13 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: - case 94 /* NullKeyword */: - case 138 /* UndefinedKeyword */: - case 185 /* FunctionExpression */: - case 198 /* ClassExpression */: - case 186 /* ArrowFunction */: - case 176 /* ArrayLiteralExpression */: - case 177 /* ObjectLiteralExpression */: - case 188 /* TypeOfExpression */: - case 202 /* NonNullExpression */: - case 249 /* JsxSelfClosingElement */: - case 248 /* JsxElement */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: + case 95 /* NullKeyword */: + case 139 /* UndefinedKeyword */: + case 186 /* FunctionExpression */: + case 199 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 177 /* ArrayLiteralExpression */: + case 178 /* ObjectLiteralExpression */: + case 189 /* TypeOfExpression */: + case 203 /* NonNullExpression */: + case 250 /* JsxSelfClosingElement */: + case 249 /* JsxElement */: return true; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: if (ts.isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: // Unary operators ~, !, +, and - have no side effects. // The rest do. switch (node.operator) { - case 50 /* ExclamationToken */: - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: + case 51 /* ExclamationToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: return true; } return false; // Some forms listed here for clarity - case 189 /* VoidExpression */: // Explicit opt-out - case 183 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings - case 201 /* AsExpression */: // Not SEF, but can produce useful type warnings + case 190 /* VoidExpression */: // Explicit opt-out + case 184 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings + case 202 /* AsExpression */: // Not SEF, but can produce useful type warnings default: return false; } @@ -40618,34 +40708,34 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; - if (operator === 57 /* EqualsToken */ && (left.kind === 177 /* ObjectLiteralExpression */ || left.kind === 176 /* ArrayLiteralExpression */)) { + if (operator === 58 /* EqualsToken */ && (left.kind === 178 /* ObjectLiteralExpression */ || left.kind === 177 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode); } var leftType = checkExpression(left, checkMode); var rightType = checkExpression(right, checkMode); switch (operator) { - case 38 /* AsteriskToken */: - case 39 /* AsteriskAsteriskToken */: - case 60 /* AsteriskEqualsToken */: - case 61 /* AsteriskAsteriskEqualsToken */: - case 40 /* SlashToken */: - case 62 /* SlashEqualsToken */: - case 41 /* PercentToken */: - case 63 /* PercentEqualsToken */: - case 37 /* MinusToken */: - case 59 /* MinusEqualsToken */: - case 44 /* LessThanLessThanToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 48 /* BarToken */: - case 68 /* BarEqualsToken */: - case 49 /* CaretToken */: - case 69 /* CaretEqualsToken */: - case 47 /* AmpersandToken */: - case 67 /* AmpersandEqualsToken */: + case 39 /* AsteriskToken */: + case 40 /* AsteriskAsteriskToken */: + case 61 /* AsteriskEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: + case 41 /* SlashToken */: + case 63 /* SlashEqualsToken */: + case 42 /* PercentToken */: + case 64 /* PercentEqualsToken */: + case 38 /* MinusToken */: + case 60 /* MinusEqualsToken */: + case 45 /* LessThanLessThanToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 49 /* BarToken */: + case 69 /* BarEqualsToken */: + case 50 /* CaretToken */: + case 70 /* CaretEqualsToken */: + case 48 /* AmpersandToken */: + case 68 /* AmpersandEqualsToken */: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -40668,8 +40758,8 @@ var ts; } } return numberType; - case 36 /* PlusToken */: - case 58 /* PlusEqualsToken */: + case 37 /* PlusToken */: + case 59 /* PlusEqualsToken */: if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } @@ -40702,14 +40792,14 @@ var ts; reportOperatorError(); return anyType; } - if (operator === 58 /* PlusEqualsToken */) { + if (operator === 59 /* PlusEqualsToken */) { checkAssignmentOperator(resultType); } return resultType; - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); @@ -40718,10 +40808,10 @@ var ts; } } return booleanType; - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: var leftIsLiteral = isLiteralType(leftType); var rightIsLiteral = isLiteralType(rightType); if (!leftIsLiteral || !rightIsLiteral) { @@ -40732,29 +40822,29 @@ var ts; reportOperatorError(); } return booleanType; - case 92 /* InstanceOfKeyword */: + case 93 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 91 /* InKeyword */: + case 92 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); - case 52 /* AmpersandAmpersandToken */: + case 53 /* AmpersandAmpersandToken */: return getTypeFacts(leftType) & 1048576 /* Truthy */ ? includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) : leftType; - case 53 /* BarBarToken */: + case 54 /* BarBarToken */: return getTypeFacts(leftType) & 2097152 /* Falsy */ ? getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : leftType; - case 57 /* EqualsToken */: + case 58 /* EqualsToken */: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); - case 25 /* CommaToken */: + case 26 /* CommaToken */: if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } function isEvalNode(node) { - return node.kind === 70 /* Identifier */ && node.text === "eval"; + return node.kind === 71 /* Identifier */ && node.text === "eval"; } // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator) { @@ -40769,21 +40859,21 @@ var ts; } function getSuggestedBooleanOperator(operator) { switch (operator) { - case 48 /* BarToken */: - case 68 /* BarEqualsToken */: - return 53 /* BarBarToken */; - case 49 /* CaretToken */: - case 69 /* CaretEqualsToken */: - return 34 /* ExclamationEqualsEqualsToken */; - case 47 /* AmpersandToken */: - case 67 /* AmpersandEqualsToken */: - return 52 /* AmpersandAmpersandToken */; + case 49 /* BarToken */: + case 69 /* BarEqualsToken */: + return 54 /* BarBarToken */; + case 50 /* CaretToken */: + case 70 /* CaretEqualsToken */: + return 35 /* ExclamationEqualsEqualsToken */; + case 48 /* AmpersandToken */: + case 68 /* AmpersandEqualsToken */: + return 53 /* AmpersandAmpersandToken */; default: return undefined; } } function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 57 /* FirstAssignment */ && operator <= 69 /* LastAssignment */) { + if (produceDiagnostics && operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) { // TypeScript 1.0 spec (April 2014): 4.17 // An assignment of the form // VarExpr = ValueExpr @@ -40885,9 +40975,9 @@ var ts; return getFreshTypeOfLiteralType(getLiteralTypeForText(32 /* StringLiteral */, node.text)); case 8 /* NumericLiteral */: return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, node.text)); - case 100 /* TrueKeyword */: + case 101 /* TrueKeyword */: return trueType; - case 85 /* FalseKeyword */: + case 86 /* FalseKeyword */: return falseType; } } @@ -40929,7 +41019,7 @@ var ts; } function isTypeAssertion(node) { node = ts.skipParentheses(node); - return node.kind === 183 /* TypeAssertionExpression */ || node.kind === 201 /* AsExpression */; + return node.kind === 184 /* TypeAssertionExpression */ || node.kind === 202 /* AsExpression */; } function checkDeclarationInitializer(declaration) { var type = getTypeOfExpression(declaration.initializer, /*cache*/ true); @@ -40961,7 +41051,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); @@ -40972,7 +41062,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -41002,7 +41092,7 @@ var ts; function getTypeOfExpression(node, cache) { // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. - if (node.kind === 180 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { + if (node.kind === 181 /* CallExpression */ && node.expression.kind !== 97 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { var funcType = checkNonNullExpression(node.expression); var signature = getSingleCallSignature(funcType); if (signature && !signature.typeParameters) { @@ -41037,7 +41127,7 @@ var ts; // contextually typed function and arrow expressions in the initial phase. function checkExpression(node, checkMode) { var type; - if (node.kind === 142 /* QualifiedName */) { + if (node.kind === 143 /* QualifiedName */) { type = checkQualifiedName(node); } else { @@ -41049,9 +41139,9 @@ var ts; // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.expression === node) || + (node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.expression === node) || + ((node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -41060,83 +41150,83 @@ var ts; } function checkExpressionWorker(node, checkMode) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return checkIdentifier(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return checkThisExpression(node); - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return checkSuperExpression(node); - case 94 /* NullKeyword */: + case 95 /* NullKeyword */: return nullWideningType; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return checkLiteralExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return checkTemplateExpression(node); - case 12 /* NoSubstitutionTemplateLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return stringType; - case 11 /* RegularExpressionLiteral */: + case 12 /* RegularExpressionLiteral */: return globalRegExpType; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return checkIndexedAccess(node); - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: return checkCallExpression(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return checkExpression(node.expression, checkMode); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return checkClassExpression(node); - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: return checkAssertion(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return checkNonNullAssertion(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return checkMetaProperty(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return checkDeleteExpression(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return checkVoidExpression(node); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return checkAwaitExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 199 /* OmittedExpression */: + case 200 /* OmittedExpression */: return undefinedWideningType; - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return checkYieldExpression(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return checkJsxElement(node); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -41173,7 +41263,7 @@ var ts; var func = ts.getContainingFunction(node); if (ts.getModifierFlags(node) & 92 /* ParameterPropertyModifier */) { func = ts.getContainingFunction(node); - if (!(func.kind === 151 /* Constructor */ && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 152 /* Constructor */ && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -41184,7 +41274,7 @@ var ts; if (ts.indexOf(func.parameters, node) !== 0) { error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); } - if (func.kind === 151 /* Constructor */ || func.kind === 155 /* ConstructSignature */ || func.kind === 160 /* ConstructorType */) { + if (func.kind === 152 /* Constructor */ || func.kind === 156 /* ConstructSignature */ || func.kind === 161 /* ConstructorType */) { error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); } } @@ -41198,7 +41288,7 @@ var ts; if (parameterList) { for (var i = 0; i < parameterList.length; i++) { var param = parameterList[i]; - if (param.name.kind === 70 /* Identifier */ && + if (param.name.kind === 71 /* Identifier */ && param.name.text === parameter.text) { return i; } @@ -41250,13 +41340,13 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 186 /* ArrowFunction */: - case 154 /* CallSignature */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 159 /* FunctionType */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 187 /* ArrowFunction */: + case 155 /* CallSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 160 /* FunctionType */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: var parent = node.parent; if (node === parent.type) { return parent; @@ -41270,13 +41360,13 @@ var ts; continue; } var name = element.name; - if (name.kind === 70 /* Identifier */ && + if (name.kind === 71 /* Identifier */ && name.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name.kind === 174 /* ArrayBindingPattern */ || - name.kind === 173 /* ObjectBindingPattern */) { + else if (name.kind === 175 /* ArrayBindingPattern */ || + name.kind === 174 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) { return true; } @@ -41285,12 +41375,12 @@ var ts; } function checkSignatureDeclaration(node) { // Grammar checking - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { checkGrammarIndexSignature(node); } - else if (node.kind === 159 /* FunctionType */ || node.kind === 227 /* FunctionDeclaration */ || node.kind === 160 /* ConstructorType */ || - node.kind === 154 /* CallSignature */ || node.kind === 151 /* Constructor */ || - node.kind === 155 /* ConstructSignature */) { + else if (node.kind === 160 /* FunctionType */ || node.kind === 228 /* FunctionDeclaration */ || node.kind === 161 /* ConstructorType */ || + node.kind === 155 /* CallSignature */ || node.kind === 152 /* Constructor */ || + node.kind === 156 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } var functionFlags = ts.getFunctionFlags(node); @@ -41317,10 +41407,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (noImplicitAny && !node.type) { switch (node.kind) { - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -41367,7 +41457,7 @@ var ts; var staticNames = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151 /* Constructor */) { + if (member.kind === 152 /* Constructor */) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; if (ts.isParameterPropertyDeclaration(param)) { @@ -41381,16 +41471,16 @@ var ts; var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); if (memberName) { switch (member.kind) { - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: addName(names, member.name, memberName, 1 /* Getter */); break; - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: addName(names, member.name, memberName, 2 /* Setter */); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: addName(names, member.name, memberName, 3 /* Property */); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: addName(names, member.name, memberName, 4 /* Method */); break; } @@ -41453,12 +41543,12 @@ var ts; var names = ts.createMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 147 /* PropertySignature */) { + if (member.kind === 148 /* PropertySignature */) { var memberName = void 0; switch (member.name.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - case 70 /* Identifier */: + case 71 /* Identifier */: memberName = member.name.text; break; default: @@ -41475,7 +41565,7 @@ var ts; } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 229 /* InterfaceDeclaration */) { + if (node.kind === 230 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind @@ -41495,7 +41585,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -41503,7 +41593,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -41568,15 +41658,15 @@ var ts; return ts.forEachChild(n, containsSuperCall); } function markThisReferencesAsErrors(n) { - if (n.kind === 98 /* ThisKeyword */) { + if (n.kind === 99 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 185 /* FunctionExpression */ && n.kind !== 227 /* FunctionDeclaration */) { + else if (n.kind !== 186 /* FunctionExpression */ && n.kind !== 228 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 148 /* PropertyDeclaration */ && + return n.kind === 149 /* PropertyDeclaration */ && !(ts.getModifierFlags(n) & 32 /* Static */) && !!n.initializer; } @@ -41606,7 +41696,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) { var statement = statements_3[_i]; - if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { superCallStatement = statement; break; } @@ -41630,7 +41720,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 152 /* GetAccessor */) { + if (node.kind === 153 /* GetAccessor */) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128 /* HasImplicitReturn */)) { if (!(node.flags & 256 /* HasExplicitReturn */)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); @@ -41640,13 +41730,13 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */; + var otherKind = node.kind === 153 /* GetAccessor */ ? 154 /* SetAccessor */ : 153 /* GetAccessor */; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if ((ts.getModifierFlags(node) & 28 /* AccessibilityModifier */) !== (ts.getModifierFlags(otherAccessor) & 28 /* AccessibilityModifier */)) { @@ -41662,7 +41752,7 @@ var ts; } } var returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 152 /* GetAccessor */) { + if (node.kind === 153 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -41779,9 +41869,9 @@ var ts; var flags = ts.getCombinedModifierFlags(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. - if (n.parent.kind !== 229 /* InterfaceDeclaration */ && - n.parent.kind !== 228 /* ClassDeclaration */ && - n.parent.kind !== 198 /* ClassExpression */ && + if (n.parent.kind !== 230 /* InterfaceDeclaration */ && + n.parent.kind !== 229 /* ClassDeclaration */ && + n.parent.kind !== 199 /* ClassExpression */ && ts.isInAmbientContext(n)) { if (!(flags & 2 /* Ambient */)) { // It is nested in an ambient context, which means it is automatically exported @@ -41869,7 +41959,7 @@ var ts; var errorNode_1 = subsequentNode.name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */) && + var reportError = (node.kind === 151 /* MethodDeclaration */ || node.kind === 150 /* MethodSignature */) && (ts.getModifierFlags(node) & 32 /* Static */) !== (ts.getModifierFlags(subsequentNode) & 32 /* Static */); // we can get here in two cases // 1. mixed static and instance class members @@ -41908,7 +41998,7 @@ var ts; var current = declarations_5[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 229 /* InterfaceDeclaration */ || node.parent.kind === 162 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 230 /* InterfaceDeclaration */ || node.parent.kind === 163 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -41919,7 +42009,7 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } - if (node.kind === 227 /* FunctionDeclaration */ || node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */ || node.kind === 151 /* Constructor */) { + if (node.kind === 228 /* FunctionDeclaration */ || node.kind === 151 /* MethodDeclaration */ || node.kind === 150 /* MethodSignature */ || node.kind === 152 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -42041,16 +42131,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return 2097152 /* ExportType */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ : 4194304 /* ExportNamespace */; - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: var result_3 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); }); @@ -42282,7 +42372,7 @@ var ts; var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; if (promiseConstructorType === unknownType) { - if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { + if (promiseConstructorName.kind === 71 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { @@ -42322,22 +42412,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 145 /* Parameter */: + case 146 /* Parameter */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -42352,7 +42442,7 @@ var ts; function markTypeNodeAsReferenced(node) { var typeName = node && ts.getEntityNameFromTypeNode(node); var rootName = typeName && getFirstIdentifier(typeName); - var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 70 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); if (rootSymbol && rootSymbol.flags & 8388608 /* Alias */ && symbolIsValue(rootSymbol) @@ -42378,14 +42468,14 @@ var ts; } var firstDecorator = node.decorators[0]; checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 145 /* Parameter */) { + if (node.kind === 146 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. switch (node.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) { @@ -42394,19 +42484,19 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markTypeNodeAsReferenced(node.type); break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); break; - case 145 /* Parameter */: + case 146 /* Parameter */: markTypeNodeAsReferenced(node.type); break; } @@ -42430,7 +42520,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name && node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 144 /* ComputedPropertyName */) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -42492,43 +42582,43 @@ var ts; for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { var node = deferredUnusedIdentifierNodes_1[_i]; switch (node.kind) { - case 264 /* SourceFile */: - case 232 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 233 /* ModuleDeclaration */: checkUnusedModuleMembers(node); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: checkUnusedClassMembers(node); checkUnusedTypeParameters(node); break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: checkUnusedTypeParameters(node); break; - case 206 /* Block */: - case 234 /* CaseBlock */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: checkUnusedLocalsAndParameters(node); break; - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node); } checkUnusedTypeParameters(node); break; - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 156 /* IndexSignature */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 157 /* IndexSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: checkUnusedTypeParameters(node); break; } @@ -42536,10 +42626,10 @@ var ts; } } function checkUnusedLocalsAndParameters(node) { - if (node.parent.kind !== 229 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + if (node.parent.kind !== 230 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { node.locals.forEach(function (local) { if (!local.isReferenced) { - if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145 /* Parameter */) { + if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146 /* Parameter */) { var parameter = ts.getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !ts.isParameterPropertyDeclaration(parameter) && @@ -42565,13 +42655,13 @@ var ts; function errorUnusedLocal(node, name) { if (isIdentifierThatStartsWithUnderScore(node)) { var declaration = ts.getRootDeclaration(node.parent); - if (declaration.kind === 225 /* VariableDeclaration */ && - (declaration.parent.parent.kind === 214 /* ForInStatement */ || - declaration.parent.parent.kind === 215 /* ForOfStatement */)) { + if (declaration.kind === 226 /* VariableDeclaration */ && + (declaration.parent.parent.kind === 215 /* ForInStatement */ || + declaration.parent.parent.kind === 216 /* ForOfStatement */)) { return; } } - if (!isRemovedPropertyFromObjectSpread(node.kind === 70 /* Identifier */ ? node.parent : node)) { + if (!isRemovedPropertyFromObjectSpread(node.kind === 71 /* Identifier */ ? node.parent : node)) { error(node, ts.Diagnostics._0_is_declared_but_never_used, name); } } @@ -42579,19 +42669,19 @@ var ts; return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node) { - return node.kind === 70 /* Identifier */ && node.text.charCodeAt(0) === 95 /* _ */; + return node.kind === 71 /* Identifier */ && node.text.charCodeAt(0) === 95 /* _ */; } function checkUnusedClassMembers(node) { if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { if (node.members) { for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 150 /* MethodDeclaration */ || member.kind === 148 /* PropertyDeclaration */) { + if (member.kind === 151 /* MethodDeclaration */ || member.kind === 149 /* PropertyDeclaration */) { if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8 /* Private */) { error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); } } - else if (member.kind === 151 /* Constructor */) { + else if (member.kind === 152 /* Constructor */) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var parameter = _c[_b]; if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8 /* Private */) { @@ -42638,7 +42728,7 @@ var ts; } function checkBlock(node) { // Grammar checking for SyntaxKind.Block - if (node.kind === 206 /* Block */) { + if (node.kind === 207 /* Block */) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -42661,12 +42751,12 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 148 /* PropertyDeclaration */ || - node.kind === 147 /* PropertySignature */ || - node.kind === 150 /* MethodDeclaration */ || - node.kind === 149 /* MethodSignature */ || - node.kind === 152 /* GetAccessor */ || - node.kind === 153 /* SetAccessor */) { + if (node.kind === 149 /* PropertyDeclaration */ || + node.kind === 148 /* PropertySignature */ || + node.kind === 151 /* MethodDeclaration */ || + node.kind === 150 /* MethodSignature */ || + node.kind === 153 /* GetAccessor */ || + node.kind === 154 /* SetAccessor */) { // it is ok to have member named '_super' or '_this' - member access is always qualified return false; } @@ -42675,7 +42765,7 @@ var ts; return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 145 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 146 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { // just an overload - no codegen impact return false; } @@ -42695,7 +42785,7 @@ var ts; function checkIfThisIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { - var isDeclaration_1 = node.kind !== 70 /* Identifier */; + var isDeclaration_1 = node.kind !== 71 /* Identifier */; if (isDeclaration_1) { error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } @@ -42709,7 +42799,7 @@ var ts; function checkIfNewTargetIsCapturedInEnclosingScope(node) { ts.findAncestor(node, function (current) { if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { - var isDeclaration_2 = node.kind !== 70 /* Identifier */; + var isDeclaration_2 = node.kind !== 71 /* Identifier */; if (isDeclaration_2) { error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } @@ -42731,7 +42821,7 @@ var ts; return; } if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_3 = node.kind !== 70 /* Identifier */; + var isDeclaration_3 = node.kind !== 71 /* Identifier */; if (isDeclaration_3) { error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); } @@ -42749,12 +42839,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -42764,12 +42854,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) { + if (parent.kind === 265 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) { // If the declaration happens to be in external module, report error that Promise is a reserved identifier. error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -42804,7 +42894,7 @@ var ts; // skip variable declarations that don't have initializers // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern // so we'll always treat binding elements as initialized - if (node.kind === 225 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 226 /* VariableDeclaration */ && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -42814,17 +42904,17 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 207 /* VariableStatement */ && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 227 /* VariableDeclarationList */); + var container = varDeclList.parent.kind === 208 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; // names of block-scoped and function scoped variables can collide only // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) var namesShareScope = container && - (container.kind === 206 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 233 /* ModuleBlock */ || - container.kind === 232 /* ModuleDeclaration */ || - container.kind === 264 /* SourceFile */); + (container.kind === 207 /* Block */ && ts.isFunctionLike(container.parent) || + container.kind === 234 /* ModuleBlock */ || + container.kind === 233 /* ModuleDeclaration */ || + container.kind === 265 /* SourceFile */); // here we know that function scoped variable is shadowed by block scoped one // if they are defined in the same scope - binder has already reported redeclaration error // otherwise if variable has an initializer - show error that initialization will fail @@ -42839,7 +42929,7 @@ var ts; } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 145 /* Parameter */) { + if (ts.getRootDeclaration(node).kind !== 146 /* Parameter */) { return; } var func = ts.getContainingFunction(node); @@ -42850,11 +42940,11 @@ var ts; // skip declaration names (i.e. in object literal expressions) return; } - if (n.kind === 178 /* PropertyAccessExpression */) { + if (n.kind === 179 /* PropertyAccessExpression */) { // skip property names in property access expression return visit(n.expression); } - else if (n.kind === 70 /* Identifier */) { + else if (n.kind === 71 /* Identifier */) { // check FunctionLikeDeclaration.locals (stores parameters\function local variable) // if it contains entry with a specified name var symbol = resolveName(n, n.text, 107455 /* Value */ | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); @@ -42869,8 +42959,8 @@ var ts; // so we need to do a bit of extra work to check if reference is legal var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (enclosingContainer === func) { - if (symbol.valueDeclaration.kind === 145 /* Parameter */ || - symbol.valueDeclaration.kind === 175 /* BindingElement */) { + if (symbol.valueDeclaration.kind === 146 /* Parameter */ || + symbol.valueDeclaration.kind === 176 /* BindingElement */) { // it is ok to reference parameter in initializer if either // - parameter is located strictly on the left of current parameter declaration if (symbol.valueDeclaration.pos < node.pos) { @@ -42884,7 +42974,7 @@ var ts; return ts.isFunctionLike(current.parent) || // computed property names/initializers in instance property declaration of class like entities // are executed in constructor and thus deferred - (current.parent.kind === 148 /* PropertyDeclaration */ && + (current.parent.kind === 149 /* PropertyDeclaration */ && !(ts.hasModifier(current.parent, 32 /* Static */)) && ts.isClassLike(current.parent.parent)); })) { @@ -42911,18 +43001,18 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 175 /* BindingElement */) { - if (node.parent.kind === 173 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) { + if (node.kind === 176 /* BindingElement */) { + if (node.parent.kind === 174 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) { checkExternalEmitHelpers(node, 4 /* Rest */); } // check computed properties inside property names of binding elements - if (node.propertyName && node.propertyName.kind === 143 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 144 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } // check private/protected variable access @@ -42937,20 +43027,20 @@ var ts; } // For a binding pattern, check contained binding elements if (ts.isBindingPattern(node.name)) { - if (node.name.kind === 174 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 175 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } ts.forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 145 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 146 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } // For a binding pattern, validate the initializer and exit if (ts.isBindingPattern(node.name)) { // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 215 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -42961,7 +43051,7 @@ var ts; if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 215 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -42981,10 +43071,10 @@ var ts; error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); } } - if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */) { + if (node.kind !== 149 /* PropertyDeclaration */ && node.kind !== 148 /* PropertySignature */) { // We know we don't have a binding pattern or computed name here checkExportsOnMergedDeclarations(node); - if (node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */) { + if (node.kind === 226 /* VariableDeclaration */ || node.kind === 176 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -42995,8 +43085,8 @@ var ts; } } function areDeclarationFlagsIdentical(left, right) { - if ((left.kind === 145 /* Parameter */ && right.kind === 225 /* VariableDeclaration */) || - (left.kind === 225 /* VariableDeclaration */ && right.kind === 145 /* Parameter */)) { + if ((left.kind === 146 /* Parameter */ && right.kind === 226 /* VariableDeclaration */) || + (left.kind === 226 /* VariableDeclaration */ && right.kind === 146 /* Parameter */)) { // Differences in optionality between parameters and variables are allowed. return true; } @@ -43026,7 +43116,7 @@ var ts; } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { // We only disallow modifier on a method declaration if it is a property of object-literal-expression - if (node.modifiers && node.parent.kind === 177 /* ObjectLiteralExpression */) { + if (node.modifiers && node.parent.kind === 178 /* ObjectLiteralExpression */) { if (ts.getFunctionFlags(node) & 2 /* Async */) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -43047,7 +43137,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 208 /* EmptyStatement */) { + if (node.thenStatement.kind === 209 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -43067,12 +43157,12 @@ var ts; function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 227 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -43090,7 +43180,7 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.kind === 215 /* ForOfStatement */) { + if (node.kind === 216 /* ForOfStatement */) { if (node.awaitModifier) { if (languageVersion < 4 /* ES2017 */) { checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */); @@ -43105,14 +43195,14 @@ var ts; // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier); // There may be a destructuring assignment on the left side - if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) { + if (varExpr.kind === 177 /* ArrayLiteralExpression */ || varExpr.kind === 178 /* ObjectLiteralExpression */) { // iteratedType may be undefined. In this case, we still want to check the structure of // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like // to short circuit the type relation checking as much as possible, so we pass the unknownType. @@ -43144,7 +43234,7 @@ var ts; // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 226 /* VariableDeclarationList */) { + if (node.initializer.kind === 227 /* VariableDeclarationList */) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -43158,7 +43248,7 @@ var ts; // and Expr must be an expression of type Any, an object type, or a type parameter type. var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) { + if (varExpr.kind === 177 /* ArrayLiteralExpression */ || varExpr.kind === 178 /* ObjectLiteralExpression */) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { @@ -43476,7 +43566,7 @@ var ts; // TODO: Check that target label is valid } function isGetAccessorWithAnnotatedSetAccessor(node) { - return !!(node.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153 /* SetAccessor */))); + return !!(node.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */))); } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ @@ -43506,12 +43596,12 @@ var ts; // for generators. return; } - if (func.kind === 153 /* SetAccessor */) { + if (func.kind === 154 /* SetAccessor */) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } } - else if (func.kind === 151 /* Constructor */) { + else if (func.kind === 152 /* Constructor */) { if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) { error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -43532,7 +43622,7 @@ var ts; } } } - else if (func.kind !== 151 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + else if (func.kind !== 152 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { // The function has a return type, but the return statement doesn't have an expression. error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } @@ -43562,7 +43652,7 @@ var ts; var expressionIsLiteral = isLiteralType(expressionType); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 257 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 258 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -43574,7 +43664,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 256 /* CaseClause */) { + if (produceDiagnostics && clause.kind === 257 /* CaseClause */) { var caseClause = clause; // TypeScript 1.0 spec (April 2014): 5.9 // In a 'switch' statement, each 'case' expression must be of a type that is comparable @@ -43604,7 +43694,7 @@ var ts; if (ts.isFunctionLike(current)) { return "quit"; } - if (current.kind === 221 /* LabeledStatement */ && current.label.text === node.label.text) { + if (current.kind === 222 /* LabeledStatement */ && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); return true; @@ -43707,7 +43797,7 @@ var ts; // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class var errorNode; - if (propDeclaration && (propDeclaration.name.kind === 143 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) { + if (propDeclaration && (propDeclaration.name.kind === 144 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) { errorNode = propDeclaration; } else if (indexDeclaration) { @@ -43953,7 +44043,7 @@ var ts; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { return ts.filter(symbol.declarations, function (d) { - return d.kind === 228 /* ClassDeclaration */ || d.kind === 229 /* InterfaceDeclaration */; + return d.kind === 229 /* ClassDeclaration */ || d.kind === 230 /* InterfaceDeclaration */; }); } function checkKindsOfPropertyMemberOverrides(type, baseType) { @@ -43992,7 +44082,7 @@ var ts; // If there is no declaration for the derived class (as in the case of class expressions), // then the class cannot be declared abstract. if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128 /* Abstract */))) { - if (derivedClassDecl.kind === 198 /* ClassExpression */) { + if (derivedClassDecl.kind === 199 /* ClassExpression */) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -44036,7 +44126,7 @@ var ts; } } function isAccessor(kind) { - return kind === 152 /* GetAccessor */ || kind === 153 /* SetAccessor */; + return kind === 153 /* GetAccessor */ || kind === 154 /* SetAccessor */; } function checkInheritedPropertiesAreIdentical(type, typeNode) { var baseTypes = getBaseTypes(type); @@ -44080,7 +44170,7 @@ var ts; var symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); // Only check this symbol once - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 230 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -44187,18 +44277,18 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; } switch (e.operator) { - case 36 /* PlusToken */: return value_1; - case 37 /* MinusToken */: return -value_1; - case 51 /* TildeToken */: return ~value_1; + case 37 /* PlusToken */: return value_1; + case 38 /* MinusToken */: return -value_1; + case 52 /* TildeToken */: return ~value_1; } return undefined; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -44208,32 +44298,32 @@ var ts; return undefined; } switch (e.operatorToken.kind) { - case 48 /* BarToken */: return left | right; - case 47 /* AmpersandToken */: return left & right; - case 45 /* GreaterThanGreaterThanToken */: return left >> right; - case 46 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; - case 44 /* LessThanLessThanToken */: return left << right; - case 49 /* CaretToken */: return left ^ right; - case 38 /* AsteriskToken */: return left * right; - case 40 /* SlashToken */: return left / right; - case 36 /* PlusToken */: return left + right; - case 37 /* MinusToken */: return left - right; - case 41 /* PercentToken */: return left % right; + case 49 /* BarToken */: return left | right; + case 48 /* AmpersandToken */: return left & right; + case 46 /* GreaterThanGreaterThanToken */: return left >> right; + case 47 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; + case 45 /* LessThanLessThanToken */: return left << right; + case 50 /* CaretToken */: return left ^ right; + case 39 /* AsteriskToken */: return left * right; + case 41 /* SlashToken */: return left / right; + case 37 /* PlusToken */: return left + right; + case 38 /* MinusToken */: return left - right; + case 42 /* PercentToken */: return left % right; } return undefined; case 8 /* NumericLiteral */: checkGrammarNumericLiteral(e); return +e.text; - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return evalConstant(e.expression); - case 70 /* Identifier */: - case 179 /* ElementAccessExpression */: - case 178 /* PropertyAccessExpression */: + case 71 /* Identifier */: + case 180 /* ElementAccessExpression */: + case 179 /* PropertyAccessExpression */: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; var propertyName = void 0; - if (e.kind === 70 /* Identifier */) { + if (e.kind === 71 /* Identifier */) { // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work. // instead pick current enum type and later try to fetch member from the type enumType_1 = currentType; @@ -44241,7 +44331,7 @@ var ts; } else { var expression = void 0; - if (e.kind === 179 /* ElementAccessExpression */) { + if (e.kind === 180 /* ElementAccessExpression */) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9 /* StringLiteral */) { return undefined; @@ -44256,10 +44346,10 @@ var ts; // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName var current = expression; while (current) { - if (current.kind === 70 /* Identifier */) { + if (current.kind === 71 /* Identifier */) { break; } - else if (current.kind === 178 /* PropertyAccessExpression */) { + else if (current.kind === 179 /* PropertyAccessExpression */) { current = current.expression; } else { @@ -44332,7 +44422,7 @@ var ts; var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 231 /* EnumDeclaration */) { + if (declaration.kind !== 232 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -44355,8 +44445,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { var declaration = declarations_8[_i]; - if ((declaration.kind === 228 /* ClassDeclaration */ || - (declaration.kind === 227 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 229 /* ClassDeclaration */ || + (declaration.kind === 228 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -44420,7 +44510,7 @@ var ts; } // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 228 /* ClassDeclaration */); + var mergedClass = ts.getDeclarationOfKind(symbol, 229 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; @@ -44471,23 +44561,23 @@ var ts; } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // error each individual name in variable statement instead of marking the entire variable statement for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 242 /* ExportAssignment */: - case 243 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 244 /* ExportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 236 /* ImportEqualsDeclaration */: - case 237 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 238 /* ImportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 175 /* BindingElement */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 226 /* VariableDeclaration */: var name = node.name; if (ts.isBindingPattern(name)) { for (var _b = 0, _c = name.elements; _b < _c.length; _b++) { @@ -44498,12 +44588,12 @@ var ts; break; } // falls through - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 227 /* FunctionDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 228 /* FunctionDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 231 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -44524,17 +44614,17 @@ var ts; } function getFirstIdentifier(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: do { node = node.left; - } while (node.kind !== 70 /* Identifier */); + } while (node.kind !== 71 /* Identifier */); return node; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: do { node = node.expression; - } while (node.kind !== 70 /* Identifier */); + } while (node.kind !== 71 /* Identifier */); return node; } } @@ -44544,9 +44634,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 243 /* ExportDeclaration */ ? + var inAmbientExternalModule = node.parent.kind === 234 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 265 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 244 /* ExportDeclaration */ ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -44579,7 +44669,7 @@ var ts; (symbol.flags & 793064 /* Type */ ? 793064 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 245 /* ExportSpecifier */ ? + var message = node.kind === 246 /* ExportSpecifier */ ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -44607,7 +44697,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 240 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); } else { @@ -44664,10 +44754,10 @@ var ts; // export { x, y } // export { x, y } from "foo" ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ && + var inAmbientExternalModule = node.parent.kind === 234 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 234 /* ModuleBlock */ && !node.moduleSpecifier && ts.isInAmbientContext(node); - if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + if (node.parent.kind !== 265 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -44681,7 +44771,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - var isInAppropriateContext = node.parent.kind === 264 /* SourceFile */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 232 /* ModuleDeclaration */; + var isInAppropriateContext = node.parent.kind === 265 /* SourceFile */ || node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 233 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -44707,8 +44797,8 @@ var ts; // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. return; } - var container = node.parent.kind === 264 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 232 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 265 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 233 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { if (node.isExportEquals) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } @@ -44721,7 +44811,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { markExportAsReferenced(node); } else { @@ -44783,7 +44873,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return (declaration.kind !== 227 /* FunctionDeclaration */ && declaration.kind !== 150 /* MethodDeclaration */) || + return (declaration.kind !== 228 /* FunctionDeclaration */ && declaration.kind !== 151 /* MethodDeclaration */) || !!declaration.body; } } @@ -44796,123 +44886,123 @@ var ts; // Only bother checking on a few construct kinds. We don't want to be excessively // hitting the cancellation token on every node we check. switch (kind) { - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return checkTypeParameter(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return checkParameter(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return checkPropertyDeclaration(node); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: return checkSignatureDeclaration(node); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return checkSignatureDeclaration(node); - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return checkMethodDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return checkConstructorDeclaration(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return checkAccessorDeclaration(node); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return checkTypeReferenceNode(node); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return checkTypePredicate(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return checkTypeQuery(node); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return checkTypeLiteral(node); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return checkArrayType(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return checkTupleType(node); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 167 /* ParenthesizedType */: - case 169 /* TypeOperator */: + case 168 /* ParenthesizedType */: + case 170 /* TypeOperator */: return checkSourceElement(node.type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return checkMappedType(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 206 /* Block */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return checkBlock(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return checkVariableStatement(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return checkExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return checkIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return checkDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return checkWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return checkForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return checkForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return checkForOfStatement(node); - case 216 /* ContinueStatement */: - case 217 /* BreakStatement */: + case 217 /* ContinueStatement */: + case 218 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return checkReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return checkWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return checkSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return checkLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return checkThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return checkTryStatement(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return checkBindingElement(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return checkClassDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return checkImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return checkExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return checkExportAssignment(node); - case 208 /* EmptyStatement */: + case 209 /* EmptyStatement */: checkGrammarStatementInAmbientContext(node); return; - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -44934,17 +45024,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: checkClassExpressionDeferred(node); break; } @@ -45050,7 +45140,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 219 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 220 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -45073,18 +45163,18 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } // falls through - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: var className = location.name; if (className) { copySymbol(location.symbol, meaning); @@ -45092,8 +45182,8 @@ var ts; // falls through // this fall-through is necessary because we would like to handle // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: // If we didn't come from static member of class or interface, // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. @@ -45102,7 +45192,7 @@ var ts; copySymbols(getSymbolOfNode(location).members, meaning & 793064 /* Type */); } break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -45144,34 +45234,34 @@ var ts; } } function isTypeDeclarationName(name) { - return name.kind === 70 /* Identifier */ && + return name.kind === 71 /* Identifier */ && isTypeDeclaration(name.parent) && name.parent.name === name; } function isTypeDeclaration(node) { switch (node.kind) { - case 144 /* TypeParameter */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: + case 145 /* TypeParameter */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: return true; } } // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 142 /* QualifiedName */) { + while (node.parent && node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } - return node.parent && (node.parent.kind === 158 /* TypeReference */ || node.parent.kind === 276 /* JSDocTypeReference */); + return node.parent && (node.parent.kind === 159 /* TypeReference */ || node.parent.kind === 277 /* JSDocTypeReference */); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 178 /* PropertyAccessExpression */) { + while (node.parent && node.parent.kind === 179 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent && node.parent.kind === 200 /* ExpressionWithTypeArguments */; + return node.parent && node.parent.kind === 201 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { var result; @@ -45188,13 +45278,13 @@ var ts; return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 142 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 143 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 236 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 237 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 242 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 243 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -45219,7 +45309,7 @@ var ts; return getSymbolOfNode(entityName.parent); } if (ts.isInJavaScriptFile(entityName) && - entityName.parent.kind === 178 /* PropertyAccessExpression */ && + entityName.parent.kind === 179 /* PropertyAccessExpression */ && entityName.parent === entityName.parent.parent.left) { // Check if this is a special property assignment var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); @@ -45227,13 +45317,13 @@ var ts; return specialPropertyAssignmentSymbol; } } - if (entityName.parent.kind === 242 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { + if (entityName.parent.kind === 243 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */); } - if (entityName.kind !== 178 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) { + if (entityName.kind !== 179 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) { // Since we already checked for ExportAssignment, this really could only be an Import - var importEqualsDeclaration = ts.getAncestor(entityName, 236 /* ImportEqualsDeclaration */); + var importEqualsDeclaration = ts.getAncestor(entityName, 237 /* ImportEqualsDeclaration */); ts.Debug.assert(importEqualsDeclaration !== undefined); return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, /*dontResolveAlias*/ true); } @@ -45243,7 +45333,7 @@ var ts; if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. - if (entityName.parent.kind === 200 /* ExpressionWithTypeArguments */) { + if (entityName.parent.kind === 201 /* ExpressionWithTypeArguments */) { meaning = 793064 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { @@ -45264,20 +45354,20 @@ var ts; // Missing entity name. return undefined; } - if (entityName.kind === 70 /* Identifier */) { + if (entityName.kind === 71 /* Identifier */) { if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { return getIntrinsicTagSymbol(entityName.parent); } return resolveEntityName(entityName, 107455 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.kind === 178 /* PropertyAccessExpression */) { + else if (entityName.kind === 179 /* PropertyAccessExpression */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 142 /* QualifiedName */) { + else if (entityName.kind === 143 /* QualifiedName */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -45286,20 +45376,20 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = (entityName.parent.kind === 158 /* TypeReference */ || entityName.parent.kind === 276 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */; + var meaning = (entityName.parent.kind === 159 /* TypeReference */ || entityName.parent.kind === 277 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */; return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.parent.kind === 252 /* JsxAttribute */) { + else if (entityName.parent.kind === 253 /* JsxAttribute */) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 157 /* TypePredicate */) { + if (entityName.parent.kind === 158 /* TypePredicate */) { return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */); } // Do we want to return undefined here? return undefined; } function getSymbolAtLocation(node) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } if (isInsideWithStatementBody(node)) { @@ -45313,12 +45403,12 @@ var ts; else if (ts.isLiteralComputedPropertyDeclarationName(node)) { return getSymbolOfNode(node.parent.parent); } - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 175 /* BindingElement */ && - node.parent.parent.kind === 173 /* ObjectBindingPattern */ && + else if (node.parent.kind === 176 /* BindingElement */ && + node.parent.parent.kind === 174 /* ObjectBindingPattern */ && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -45328,11 +45418,11 @@ var ts; } } switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); if (ts.isFunctionLike(container)) { var sig = getSignatureFromDeclaration(container); @@ -45341,15 +45431,15 @@ var ts; } } // falls through - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 168 /* ThisType */: + case 169 /* ThisType */: return getTypeFromTypeNode(node).symbol; - case 122 /* ConstructorKeyword */: + case 123 /* ConstructorKeyword */: // constructor keyword for an overload, should take us to the definition if it exist var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 151 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 152 /* Constructor */) { return constructorDeclaration.parent.symbol; } return undefined; @@ -45357,7 +45447,7 @@ var ts; // External module name in an import declaration if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 237 /* ImportDeclaration */ || node.parent.kind === 243 /* ExportDeclaration */) && + ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } @@ -45367,7 +45457,7 @@ var ts; // falls through case 8 /* NumericLiteral */: // index access - if (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { + if (node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { var objectType = getTypeOfExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -45384,7 +45474,7 @@ var ts; // The function returns a value symbol of an identifier in the short-hand property assignment. // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. - if (location && location.kind === 261 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 262 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */); } return undefined; @@ -45455,28 +45545,28 @@ var ts; // [ a ] from // [a] = [ some array ...] function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { - ts.Debug.assert(expr.kind === 177 /* ObjectLiteralExpression */ || expr.kind === 176 /* ArrayLiteralExpression */); + ts.Debug.assert(expr.kind === 178 /* ObjectLiteralExpression */ || expr.kind === 177 /* ArrayLiteralExpression */); // If this is from "for of" // for ( { a } of elems) { // } - if (expr.parent.kind === 215 /* ForOfStatement */) { + if (expr.parent.kind === 216 /* ForOfStatement */) { var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier); return checkDestructuringAssignment(expr, iteratedType || unknownType); } // If this is from "for" initializer // for ({a } = elems[0];.....) { } - if (expr.parent.kind === 193 /* BinaryExpression */) { + if (expr.parent.kind === 194 /* BinaryExpression */) { var iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || unknownType); } // If this is from nested object binding pattern // for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { - if (expr.parent.kind === 260 /* PropertyAssignment */) { + if (expr.parent.kind === 261 /* PropertyAssignment */) { var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); } // Array literal assignment - array destructuring pattern - ts.Debug.assert(expr.parent.kind === 176 /* ArrayLiteralExpression */); + ts.Debug.assert(expr.parent.kind === 177 /* ArrayLiteralExpression */); // [{ property1: p1, property2 }] = elems; var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType; @@ -45559,7 +45649,7 @@ var ts; if (!ts.isGeneratedIdentifier(node)) { node = ts.getParseTreeNode(node, ts.isIdentifier); if (node) { - var isPropertyName_1 = node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node; + var isPropertyName_1 = node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node; return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol; } } @@ -45616,7 +45706,7 @@ var ts; } var parentSymbol_1 = getParentOfSymbol(symbol); if (parentSymbol_1) { - if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 264 /* SourceFile */) { + if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 265 /* SourceFile */) { var symbolFile = parentSymbol_1.valueDeclaration; var referenceFile = ts.getSourceFileOfNode(node); // If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined. @@ -45669,7 +45759,7 @@ var ts; // they will not collide with anything var isDeclaredInLoop = nodeLinks_1.flags & 262144 /* BlockScopedBindingInLoop */; var inLoopInitializer = ts.isIterationStatement(container, /*lookInLabeledStatements*/ false); - var inLoopBodyBlock = container.kind === 206 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); + var inLoopBodyBlock = container.kind === 207 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { @@ -45710,18 +45800,18 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return node.expression - && node.expression.kind === 70 /* Identifier */ + && node.expression.kind === 71 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) : true; } @@ -45729,7 +45819,7 @@ var ts; } function isTopLevelValueImportEqualsWithEntityName(node) { node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration); - if (node === undefined || node.parent.kind !== 264 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node === undefined || node.parent.kind !== 265 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { // parent is not source file or it is not reference to internal module return false; } @@ -45796,15 +45886,15 @@ var ts; } function canHaveConstantValue(node) { switch (node.kind) { - case 263 /* EnumMember */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 264 /* EnumMember */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: return true; } return false; } function getConstantValue(node) { - if (node.kind === 263 /* EnumMember */) { + if (node.kind === 264 /* EnumMember */) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -46015,7 +46105,7 @@ var ts; // property access can only be used as values // qualified names can only be used as types\namespaces // identifiers are treated as values only if they appear in type queries - var meaning = (node.kind === 178 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node)) + var meaning = (node.kind === 179 /* PropertyAccessExpression */) || (node.kind === 71 /* Identifier */ && isInTypeQuery(node)) ? 107455 /* Value */ | 1048576 /* ExportValue */ : 793064 /* Type */ | 1920 /* Namespace */; var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true); @@ -46066,7 +46156,7 @@ var ts; break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 264 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 265 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } // check that at least one declaration of top level symbol originates from type declaration file @@ -46086,7 +46176,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 264 /* SourceFile */); + return ts.getDeclarationOfKind(moduleSymbol, 265 /* SourceFile */); } function initializeTypeChecker() { // Bind all source files and propagate errors @@ -46199,14 +46289,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 150 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { + if (node.kind === 151 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */) { + else if (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -46223,28 +46313,28 @@ var ts; var flags = 0 /* None */; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 130 /* ReadonlyKeyword */) { - if (node.kind === 147 /* PropertySignature */ || node.kind === 149 /* MethodSignature */) { + if (modifier.kind !== 131 /* ReadonlyKeyword */) { + if (node.kind === 148 /* PropertySignature */ || node.kind === 150 /* MethodSignature */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); } - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 75 /* ConstKeyword */: - if (node.kind !== 231 /* EnumDeclaration */ && node.parent.kind === 228 /* ClassDeclaration */) { - return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75 /* ConstKeyword */)); + case 76 /* ConstKeyword */: + if (node.kind !== 232 /* EnumDeclaration */ && node.parent.kind === 229 /* ClassDeclaration */) { + return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(76 /* ConstKeyword */)); } break; - case 113 /* PublicKeyword */: - case 112 /* ProtectedKeyword */: - case 111 /* PrivateKeyword */: + case 114 /* PublicKeyword */: + case 113 /* ProtectedKeyword */: + case 112 /* PrivateKeyword */: var text = visibilityToString(ts.modifierToFlag(modifier.kind)); - if (modifier.kind === 112 /* ProtectedKeyword */) { + if (modifier.kind === 113 /* ProtectedKeyword */) { lastProtected = modifier; } - else if (modifier.kind === 111 /* PrivateKeyword */) { + else if (modifier.kind === 112 /* PrivateKeyword */) { lastPrivate = modifier; } if (flags & 28 /* AccessibilityModifier */) { @@ -46259,11 +46349,11 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + else if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128 /* Abstract */) { - if (modifier.kind === 111 /* PrivateKeyword */) { + if (modifier.kind === 112 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -46272,7 +46362,7 @@ var ts; } flags |= ts.modifierToFlag(modifier.kind); break; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } @@ -46282,10 +46372,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + else if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128 /* Abstract */) { @@ -46294,18 +46384,18 @@ var ts; flags |= 32 /* Static */; lastStatic = modifier; break; - case 130 /* ReadonlyKeyword */: + case 131 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); } - else if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */ && node.kind !== 156 /* IndexSignature */ && node.kind !== 145 /* Parameter */) { + else if (node.kind !== 149 /* PropertyDeclaration */ && node.kind !== 148 /* PropertySignature */ && node.kind !== 157 /* IndexSignature */ && node.kind !== 146 /* Parameter */) { // If node.kind === SyntaxKind.Parameter, checkParameter report an error if it's not a parameter property. return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; lastReadonly = modifier; break; - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: if (flags & 1 /* Export */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } @@ -46318,45 +46408,45 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 123 /* DeclareKeyword */: + case 124 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233 /* ModuleBlock */) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 234 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 116 /* AbstractKeyword */: + case 117 /* AbstractKeyword */: if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 228 /* ClassDeclaration */) { - if (node.kind !== 150 /* MethodDeclaration */ && - node.kind !== 148 /* PropertyDeclaration */ && - node.kind !== 152 /* GetAccessor */ && - node.kind !== 153 /* SetAccessor */) { + if (node.kind !== 229 /* ClassDeclaration */) { + if (node.kind !== 151 /* MethodDeclaration */ && + node.kind !== 149 /* PropertyDeclaration */ && + node.kind !== 153 /* GetAccessor */ && + node.kind !== 154 /* SetAccessor */) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 228 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) { + if (!(node.parent.kind === 229 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -46368,14 +46458,14 @@ var ts; } flags |= 128 /* Abstract */; break; - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 145 /* Parameter */) { + else if (node.kind === 146 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256 /* Async */; @@ -46383,7 +46473,7 @@ var ts; break; } } - if (node.kind === 151 /* Constructor */) { + if (node.kind === 152 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -46398,13 +46488,13 @@ var ts; } return; } - else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + else if ((node.kind === 238 /* ImportDeclaration */ || node.kind === 237 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) { + else if (node.kind === 146 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); } - else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { + else if (node.kind === 146 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256 /* Async */) { @@ -46424,38 +46514,38 @@ var ts; } function shouldReportBadModifier(node) { switch (node.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 156 /* IndexSignature */: - case 232 /* ModuleDeclaration */: - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: - case 242 /* ExportAssignment */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 145 /* Parameter */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 157 /* IndexSignature */: + case 233 /* ModuleDeclaration */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: + case 243 /* ExportAssignment */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 146 /* Parameter */: return false; default: - if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { return false; } switch (node.kind) { - case 227 /* FunctionDeclaration */: - return nodeHasAnyModifiersExcept(node, 119 /* AsyncKeyword */); - case 228 /* ClassDeclaration */: - return nodeHasAnyModifiersExcept(node, 116 /* AbstractKeyword */); - case 229 /* InterfaceDeclaration */: - case 207 /* VariableStatement */: - case 230 /* TypeAliasDeclaration */: + case 228 /* FunctionDeclaration */: + return nodeHasAnyModifiersExcept(node, 120 /* AsyncKeyword */); + case 229 /* ClassDeclaration */: + return nodeHasAnyModifiersExcept(node, 117 /* AbstractKeyword */); + case 230 /* InterfaceDeclaration */: + case 208 /* VariableStatement */: + case 231 /* TypeAliasDeclaration */: return true; - case 231 /* EnumDeclaration */: - return nodeHasAnyModifiersExcept(node, 75 /* ConstKeyword */); + case 232 /* EnumDeclaration */: + return nodeHasAnyModifiersExcept(node, 76 /* ConstKeyword */); default: ts.Debug.fail(); return false; @@ -46467,10 +46557,10 @@ var ts; } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 150 /* MethodDeclaration */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -46534,7 +46624,7 @@ var ts; return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 186 /* ArrowFunction */) { + if (node.kind === 187 /* ArrowFunction */) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -46569,7 +46659,7 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 135 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) { + if (parameter.type.kind !== 136 /* StringKeyword */ && parameter.type.kind !== 133 /* NumberKeyword */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { @@ -46597,7 +46687,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_4 = args; _i < args_4.length; _i++) { var arg = args_4[_i]; - if (arg.kind === 199 /* OmittedExpression */) { + if (arg.kind === 200 /* OmittedExpression */) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -46623,7 +46713,7 @@ var ts; if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84 /* ExtendsKeyword */) { + if (heritageClause.token === 85 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } @@ -46636,7 +46726,7 @@ var ts; seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107 /* ImplementsKeyword */); + ts.Debug.assert(heritageClause.token === 108 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); } @@ -46652,14 +46742,14 @@ var ts; if (node.heritageClauses) { for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { var heritageClause = _a[_i]; - if (heritageClause.token === 84 /* ExtendsKeyword */) { + if (heritageClause.token === 85 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - ts.Debug.assert(heritageClause.token === 107 /* ImplementsKeyword */); + ts.Debug.assert(heritageClause.token === 108 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); } // Grammar checking heritageClause inside class declaration @@ -46670,19 +46760,19 @@ var ts; } function checkGrammarComputedPropertyName(node) { // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 143 /* ComputedPropertyName */) { + if (node.kind !== 144 /* ComputedPropertyName */) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 193 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) { + if (computedPropertyName.expression.kind === 194 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 26 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 227 /* FunctionDeclaration */ || - node.kind === 185 /* FunctionExpression */ || - node.kind === 150 /* MethodDeclaration */); + ts.Debug.assert(node.kind === 228 /* FunctionDeclaration */ || + node.kind === 186 /* FunctionExpression */ || + node.kind === 151 /* MethodDeclaration */); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -46704,15 +46794,15 @@ var ts; var GetOrSetAccessor = GetAccessor | SetAccessor; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - if (prop.kind === 262 /* SpreadAssignment */) { + if (prop.kind === 263 /* SpreadAssignment */) { continue; } var name = prop.name; - if (name.kind === 143 /* ComputedPropertyName */) { + if (name.kind === 144 /* ComputedPropertyName */) { // If the name is not a ComputedPropertyName, the grammar checking will skip it checkGrammarComputedPropertyName(name); } - if (prop.kind === 261 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 262 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); @@ -46721,7 +46811,7 @@ var ts; if (prop.modifiers) { for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { var mod = _c[_b]; - if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 150 /* MethodDeclaration */) { + if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 151 /* MethodDeclaration */) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } } @@ -46735,7 +46825,7 @@ var ts; // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields var currentKind = void 0; - if (prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */) { + if (prop.kind === 261 /* PropertyAssignment */ || prop.kind === 262 /* ShorthandPropertyAssignment */) { // Grammar checking for computedPropertyName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -46743,13 +46833,13 @@ var ts; } currentKind = Property; } - else if (prop.kind === 150 /* MethodDeclaration */) { + else if (prop.kind === 151 /* MethodDeclaration */) { currentKind = Property; } - else if (prop.kind === 152 /* GetAccessor */) { + else if (prop.kind === 153 /* GetAccessor */) { currentKind = GetAccessor; } - else if (prop.kind === 153 /* SetAccessor */) { + else if (prop.kind === 154 /* SetAccessor */) { currentKind = SetAccessor; } else { @@ -46785,7 +46875,7 @@ var ts; var seen = ts.createMap(); for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 254 /* JsxSpreadAttribute */) { + if (attr.kind === 255 /* JsxSpreadAttribute */) { continue; } var jsxAttr = attr; @@ -46797,7 +46887,7 @@ var ts; return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 255 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 256 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -46806,12 +46896,12 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 215 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 216 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & 16384 /* AwaitContext */) === 0 /* None */) { return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); } } - if (forInOrOfStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 227 /* VariableDeclarationList */) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -46826,20 +46916,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 215 /* ForInStatement */ ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -46866,11 +46956,11 @@ var ts; return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 152 /* GetAccessor */ ? + return grammarErrorOnNode(accessor.name, kind === 153 /* GetAccessor */ ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 153 /* SetAccessor */) { + else if (kind === 154 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -46893,10 +46983,10 @@ var ts; * A set accessor has one parameter or a `this` parameter and one more parameter. */ function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 153 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 153 /* GetAccessor */ ? 1 : 2)) { return ts.getThisParameter(accessor); } } @@ -46911,7 +47001,7 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 177 /* ObjectLiteralExpression */) { + if (node.parent.kind === 178 /* ObjectLiteralExpression */) { if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } @@ -46932,10 +47022,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 229 /* InterfaceDeclaration */) { + else if (node.parent.kind === 230 /* InterfaceDeclaration */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 162 /* TypeLiteral */) { + else if (node.parent.kind === 163 /* TypeLiteral */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -46946,11 +47036,11 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: if (node.label && current.label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 216 /* ContinueStatement */ + var isMisplacedContinueLabel = node.kind === 217 /* ContinueStatement */ && !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -46958,8 +47048,8 @@ var ts; return false; } break; - case 220 /* SwitchStatement */: - if (node.kind === 217 /* BreakStatement */ && !node.label) { + case 221 /* SwitchStatement */: + if (node.kind === 218 /* BreakStatement */ && !node.label) { // unlabeled break within switch statement - ok return false; } @@ -46974,13 +47064,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 217 /* BreakStatement */ + var message = node.kind === 218 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 217 /* BreakStatement */ + var message = node.kind === 218 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -46992,7 +47082,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } - if (node.name.kind === 174 /* ArrayBindingPattern */ || node.name.kind === 173 /* ObjectBindingPattern */) { + if (node.name.kind === 175 /* ArrayBindingPattern */ || node.name.kind === 174 /* ObjectBindingPattern */) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -47003,11 +47093,11 @@ var ts; } function isStringOrNumberLiteralExpression(expr) { return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ || - expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ && + expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 214 /* ForInStatement */ && node.parent.parent.kind !== 215 /* ForOfStatement */) { + if (node.parent.parent.kind !== 215 /* ForInStatement */ && node.parent.parent.kind !== 216 /* ForOfStatement */) { if (ts.isInAmbientContext(node)) { if (node.initializer) { if (ts.isConst(node) && !node.type) { @@ -47050,7 +47140,7 @@ var ts; return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { if (ts.unescapeIdentifier(name.text) === "__esModule") { return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); } @@ -47066,8 +47156,8 @@ var ts; } } function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 70 /* Identifier */) { - if (name.originalKeywordKind === 109 /* LetKeyword */) { + if (name.kind === 71 /* Identifier */) { + if (name.originalKeywordKind === 110 /* LetKeyword */) { return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); } } @@ -47092,15 +47182,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 210 /* IfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 219 /* WithStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 211 /* IfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: return false; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -47116,7 +47206,7 @@ var ts; } } function checkGrammarMetaProperty(node) { - if (node.keywordToken === 93 /* NewKeyword */) { + if (node.keywordToken === 94 /* NewKeyword */) { if (node.name.text !== "target") { return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target"); } @@ -47162,7 +47252,7 @@ var ts; return true; } } - else if (node.parent.kind === 229 /* InterfaceDeclaration */) { + else if (node.parent.kind === 230 /* InterfaceDeclaration */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -47170,7 +47260,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 162 /* TypeLiteral */) { + else if (node.parent.kind === 163 /* TypeLiteral */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -47195,13 +47285,13 @@ var ts; // export_opt AmbientDeclaration // // TODO: The spec needs to be amended to reflect this grammar. - if (node.kind === 229 /* InterfaceDeclaration */ || - node.kind === 230 /* TypeAliasDeclaration */ || - node.kind === 237 /* ImportDeclaration */ || - node.kind === 236 /* ImportEqualsDeclaration */ || - node.kind === 243 /* ExportDeclaration */ || - node.kind === 242 /* ExportAssignment */ || - node.kind === 235 /* NamespaceExportDeclaration */ || + if (node.kind === 230 /* InterfaceDeclaration */ || + node.kind === 231 /* TypeAliasDeclaration */ || + node.kind === 238 /* ImportDeclaration */ || + node.kind === 237 /* ImportEqualsDeclaration */ || + node.kind === 244 /* ExportDeclaration */ || + node.kind === 243 /* ExportAssignment */ || + node.kind === 236 /* NamespaceExportDeclaration */ || ts.getModifierFlags(node) & (2 /* Ambient */ | 1 /* Export */ | 512 /* Default */)) { return false; } @@ -47210,7 +47300,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 207 /* VariableStatement */) { + if (ts.isDeclaration(decl) || decl.kind === 208 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -47236,7 +47326,7 @@ var ts; // to prevent noisiness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // - if (node.parent.kind === 206 /* Block */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 207 /* Block */ || node.parent.kind === 234 /* ModuleBlock */ || node.parent.kind === 265 /* SourceFile */) { var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links_1.hasReportedStatementInAmbientContext) { @@ -47257,14 +47347,14 @@ var ts; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 172 /* LiteralType */)) { + else if (ts.isChildOfNodeWithKind(node, 173 /* LiteralType */)) { diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; } - else if (ts.isChildOfNodeWithKind(node, 263 /* EnumMember */)) { + else if (ts.isChildOfNodeWithKind(node, 264 /* EnumMember */)) { diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { - var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37 /* MinusToken */; + var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 38 /* MinusToken */; var literal = (withMinus ? "-" : "") + "0o" + node.text; return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal); } @@ -47423,260 +47513,260 @@ var ts; } var kind = node.kind; // No need to visit nodes with no children. - if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */) || kind === 168 /* ThisType */) { + if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */) || kind === 169 /* ThisType */) { return node; } switch (node.kind) { - case 205 /* SemicolonClassElement */: - case 208 /* EmptyStatement */: - case 199 /* OmittedExpression */: - case 224 /* DebuggerStatement */: - case 297 /* EndOfDeclarationMarker */: - case 246 /* MissingDeclaration */: + case 206 /* SemicolonClassElement */: + case 209 /* EmptyStatement */: + case 200 /* OmittedExpression */: + case 225 /* DebuggerStatement */: + case 298 /* EndOfDeclarationMarker */: + case 247 /* MissingDeclaration */: // No need to visit nodes with no children. return node; // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier)); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression)); // Signatures and Signature Elements - case 159 /* FunctionType */: + case 160 /* FunctionType */: return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 160 /* ConstructorType */: + case 161 /* ConstructorType */: return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 154 /* CallSignature */: + case 155 /* CallSignature */: return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 149 /* MethodSignature */: + case 150 /* MethodSignature */: return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken)); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 145 /* Parameter */: + case 146 /* Parameter */: return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 146 /* Decorator */: + case 147 /* Decorator */: return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression)); // Types - case 158 /* TypeReference */: + case 159 /* TypeReference */: return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode)); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode)); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName)); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor)); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode)); - case 164 /* TupleType */: + case 165 /* TupleType */: return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode)); - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode)); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: throw ts.Debug.fail("not implemented."); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode)); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode)); - case 171 /* MappedType */: + case 172 /* MappedType */: return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode)); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression)); // Type Declarations - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode)); // Type members - case 147 /* PropertySignature */: + case 148 /* PropertySignature */: return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 151 /* Constructor */: + case 152 /* Constructor */: return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context)); // Binding patterns - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement)); - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement)); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression)); // Expression - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression)); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike)); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier)); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression)); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral)); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression)); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression)); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression)); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression)); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression)); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression)); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression)); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan)); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression)); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression)); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression)); - case 201 /* AsExpression */: + case 202 /* AsExpression */: return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode)); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression)); // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail)); // Element - case 206 /* Block */: + case 207 /* Block */: return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList)); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression)); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock)); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression)); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier)); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier)); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression)); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock)); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression)); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock)); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression)); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration)); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context)); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement)); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember)); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody)); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause)); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference)); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings)); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier)); - case 240 /* NamedImports */: + case 241 /* NamedImports */: return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier)); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression)); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression)); - case 244 /* NamedExports */: + case 245 /* NamedExports */: return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier)); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier)); // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression)); // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement)); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike)); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes)); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression)); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression)); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression)); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression)); // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement)); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement)); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments)); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock)); // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression)); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression)); // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); // Top-level nodes - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); default: return node; @@ -47717,51 +47807,51 @@ var ts; var cbNodes = cbNodeArray || cbNode; var kind = node.kind; // No need to visit nodes with no children. - if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */)) { + if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */)) { return initial; } // We do not yet support types. - if ((kind >= 157 /* TypePredicate */ && kind <= 172 /* LiteralType */)) { + if ((kind >= 158 /* TypePredicate */ && kind <= 173 /* LiteralType */)) { return initial; } var result = initial; switch (node.kind) { // Leaf nodes - case 205 /* SemicolonClassElement */: - case 208 /* EmptyStatement */: - case 199 /* OmittedExpression */: - case 224 /* DebuggerStatement */: - case 294 /* NotEmittedStatement */: + case 206 /* SemicolonClassElement */: + case 209 /* EmptyStatement */: + case 200 /* OmittedExpression */: + case 225 /* DebuggerStatement */: + case 295 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: result = reduceNode(node.expression, cbNode, result); break; // Signature elements - case 145 /* Parameter */: + case 146 /* Parameter */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 146 /* Decorator */: + case 147 /* Decorator */: result = reduceNode(node.expression, cbNode, result); break; // Type member - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47770,12 +47860,12 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 151 /* Constructor */: + case 152 /* Constructor */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.body, cbNode, result); break; - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47783,7 +47873,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47791,49 +47881,49 @@ var ts; result = reduceNode(node.body, cbNode, result); break; // Binding patterns - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: result = reduceNodes(node.elements, cbNodes, result); break; - case 175 /* BindingElement */: + case 176 /* BindingElement */: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; // Expression - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: result = reduceNodes(node.elements, cbNodes, result); break; - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: result = reduceNodes(node.properties, cbNodes, result); break; - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.argumentExpression, cbNode, result); break; - case 180 /* CallExpression */: + case 181 /* CallExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 181 /* NewExpression */: + case 182 /* NewExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); result = reduceNodes(node.arguments, cbNodes, result); break; - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: result = reduceNode(node.tag, cbNode, result); result = reduceNode(node.template, cbNode, result); break; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: result = reduceNode(node.type, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); @@ -47841,126 +47931,126 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.parameters, cbNodes, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 184 /* ParenthesizedExpression */: - case 187 /* DeleteExpression */: - case 188 /* TypeOfExpression */: - case 189 /* VoidExpression */: - case 190 /* AwaitExpression */: - case 196 /* YieldExpression */: - case 197 /* SpreadElement */: - case 202 /* NonNullExpression */: + case 185 /* ParenthesizedExpression */: + case 188 /* DeleteExpression */: + case 189 /* TypeOfExpression */: + case 190 /* VoidExpression */: + case 191 /* AwaitExpression */: + case 197 /* YieldExpression */: + case 198 /* SpreadElement */: + case 203 /* NonNullExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: result = reduceNode(node.operand, cbNode, result); break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: result = reduceNode(node.left, cbNode, result); result = reduceNode(node.right, cbNode, result); break; - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.whenTrue, cbNode, result); result = reduceNode(node.whenFalse, cbNode, result); break; - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: result = reduceNode(node.head, cbNode, result); result = reduceNodes(node.templateSpans, cbNodes, result); break; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.typeParameters, cbNodes, result); result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: result = reduceNode(node.expression, cbNode, result); result = reduceNodes(node.typeArguments, cbNodes, result); break; - case 201 /* AsExpression */: + case 202 /* AsExpression */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.type, cbNode, result); break; - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: result = reduceNode(node.expression, cbNode, result); break; // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.literal, cbNode, result); break; // Element - case 206 /* Block */: + case 207 /* Block */: result = reduceNodes(node.statements, cbNodes, result); break; - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.declarationList, cbNode, result); break; - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: result = reduceNode(node.expression, cbNode, result); break; - case 210 /* IfStatement */: + case 211 /* IfStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.thenStatement, cbNode, result); result = reduceNode(node.elseStatement, cbNode, result); break; - case 211 /* DoStatement */: + case 212 /* DoStatement */: result = reduceNode(node.statement, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 212 /* WhileStatement */: - case 219 /* WithStatement */: + case 213 /* WhileStatement */: + case 220 /* WithStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 213 /* ForStatement */: + case 214 /* ForStatement */: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.condition, cbNode, result); result = reduceNode(node.incrementor, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: result = reduceNode(node.initializer, cbNode, result); result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 218 /* ReturnStatement */: - case 222 /* ThrowStatement */: + case 219 /* ReturnStatement */: + case 223 /* ThrowStatement */: result = reduceNode(node.expression, cbNode, result); break; - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: result = reduceNode(node.expression, cbNode, result); result = reduceNode(node.caseBlock, cbNode, result); break; - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: result = reduceNode(node.label, cbNode, result); result = reduceNode(node.statement, cbNode, result); break; - case 223 /* TryStatement */: + case 224 /* TryStatement */: result = reduceNode(node.tryBlock, cbNode, result); result = reduceNode(node.catchClause, cbNode, result); result = reduceNode(node.finallyBlock, cbNode, result); break; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.type, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: result = reduceNodes(node.declarations, cbNodes, result); break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47969,7 +48059,7 @@ var ts; result = reduceNode(node.type, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); @@ -47977,131 +48067,131 @@ var ts; result = reduceNodes(node.heritageClauses, cbNodes, result); result = reduceNodes(node.members, cbNodes, result); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNodes(node.members, cbNodes, result); break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.body, cbNode, result); break; - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: result = reduceNodes(node.statements, cbNodes, result); break; - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: result = reduceNodes(node.clauses, cbNodes, result); break; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.name, cbNode, result); result = reduceNode(node.moduleReference, cbNode, result); break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: result = reduceNodes(node.decorators, cbNodes, result); result = reduceNodes(node.modifiers, cbNodes, result); result = reduceNode(node.importClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; - case 238 /* ImportClause */: + case 239 /* ImportClause */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.namedBindings, cbNode, result); break; - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: result = reduceNode(node.name, cbNode, result); break; - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: result = reduceNodes(node.elements, cbNodes, result); break; - case 241 /* ImportSpecifier */: - case 245 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 246 /* ExportSpecifier */: result = reduceNode(node.propertyName, cbNode, result); result = reduceNode(node.name, cbNode, result); break; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.expression, cbNode, result); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: result = ts.reduceLeft(node.decorators, cbNode, result); result = ts.reduceLeft(node.modifiers, cbNode, result); result = reduceNode(node.exportClause, cbNode, result); result = reduceNode(node.moduleSpecifier, cbNode, result); break; // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: result = reduceNode(node.expression, cbNode, result); break; // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: result = reduceNode(node.openingElement, cbNode, result); result = ts.reduceLeft(node.children, cbNode, result); result = reduceNode(node.closingElement, cbNode, result); break; - case 249 /* JsxSelfClosingElement */: - case 250 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: result = reduceNode(node.tagName, cbNode, result); result = reduceNode(node.attributes, cbNode, result); break; - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: result = reduceNodes(node.properties, cbNodes, result); break; - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: result = reduceNode(node.tagName, cbNode, result); break; - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: result = reduceNode(node.expression, cbNode, result); break; - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: result = reduceNode(node.expression, cbNode, result); break; // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: result = reduceNode(node.expression, cbNode, result); // falls through - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: result = reduceNodes(node.statements, cbNodes, result); break; - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: result = reduceNodes(node.types, cbNodes, result); break; - case 259 /* CatchClause */: + case 260 /* CatchClause */: result = reduceNode(node.variableDeclaration, cbNode, result); result = reduceNode(node.block, cbNode, result); break; // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.objectAssignmentInitializer, cbNode, result); break; - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: result = reduceNode(node.expression, cbNode, result); break; // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: result = reduceNode(node.name, cbNode, result); result = reduceNode(node.initializer, cbNode, result); break; // Top-level nodes - case 264 /* SourceFile */: + case 265 /* SourceFile */: result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; default: @@ -48174,7 +48264,7 @@ var ts; function aggregateTransformFlagsForSubtree(node) { // We do not transform ambient declarations or types, so there is no need to // recursively aggregate transform flags. - if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 200 /* ExpressionWithTypeArguments */)) { + if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 201 /* ExpressionWithTypeArguments */)) { return 0 /* None */; } // Aggregate the transform flags of each child. @@ -48696,8 +48786,8 @@ var ts; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; // Enable substitution for property/element access to emit const enum values. - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // These variables contain state that changes as we descend into the tree. var currentSourceFile; var currentNamespace; @@ -48761,15 +48851,15 @@ var ts; */ function onBeforeVisitNode(node) { switch (node.kind) { - case 264 /* SourceFile */: - case 234 /* CaseBlock */: - case 233 /* ModuleBlock */: - case 206 /* Block */: + case 265 /* SourceFile */: + case 235 /* CaseBlock */: + case 234 /* ModuleBlock */: + case 207 /* Block */: currentScope = node; currentScopeFirstDeclarationsOfName = undefined; break; - case 228 /* ClassDeclaration */: - case 227 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 228 /* FunctionDeclaration */: if (ts.hasModifier(node, 2 /* Ambient */)) { break; } @@ -48816,13 +48906,13 @@ var ts; */ function sourceElementVisitorWorker(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitExportDeclaration(node); default: return visitorWorker(node); @@ -48842,11 +48932,11 @@ var ts; * @param node The node to visit. */ function namespaceElementVisitorWorker(node) { - if (node.kind === 243 /* ExportDeclaration */ || - node.kind === 237 /* ImportDeclaration */ || - node.kind === 238 /* ImportClause */ || - (node.kind === 236 /* ImportEqualsDeclaration */ && - node.moduleReference.kind === 247 /* ExternalModuleReference */)) { + if (node.kind === 244 /* ExportDeclaration */ || + node.kind === 238 /* ImportDeclaration */ || + node.kind === 239 /* ImportClause */ || + (node.kind === 237 /* ImportEqualsDeclaration */ && + node.moduleReference.kind === 248 /* ExternalModuleReference */)) { // do not emit ES6 imports and exports since they are illegal inside a namespace return undefined; } @@ -48876,19 +48966,19 @@ var ts; */ function classElementVisitorWorker(node) { switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: // TypeScript constructors are transformed in `visitClassDeclaration`. // We elide them here as `visitorWorker` checks transform flags, which could // erronously include an ES6 constructor without TypeScript syntax. return undefined; - case 148 /* PropertyDeclaration */: - case 156 /* IndexSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 150 /* MethodDeclaration */: + case 149 /* PropertyDeclaration */: + case 157 /* IndexSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 151 /* MethodDeclaration */: // Fallback to the default visit behavior. return visitorWorker(node); - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: return node; default: ts.Debug.failBadSyntaxKind(node); @@ -48899,7 +48989,7 @@ var ts; if (ts.modifierToFlag(node.kind) & 2270 /* TypeScriptModifier */) { return undefined; } - else if (currentNamespace && node.kind === 83 /* ExportKeyword */) { + else if (currentNamespace && node.kind === 84 /* ExportKeyword */) { return undefined; } return node; @@ -48916,59 +49006,59 @@ var ts; return ts.createNotEmittedStatement(node); } switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: // ES6 export and default modifiers are elided when inside a namespace. return currentNamespace ? undefined : node; - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 116 /* AbstractKeyword */: - case 75 /* ConstKeyword */: - case 123 /* DeclareKeyword */: - case 130 /* ReadonlyKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 117 /* AbstractKeyword */: + case 76 /* ConstKeyword */: + case 124 /* DeclareKeyword */: + case 131 /* ReadonlyKeyword */: // TypeScript accessibility and readonly modifiers are elided. - case 163 /* ArrayType */: - case 164 /* TupleType */: - case 162 /* TypeLiteral */: - case 157 /* TypePredicate */: - case 144 /* TypeParameter */: - case 118 /* AnyKeyword */: - case 121 /* BooleanKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 129 /* NeverKeyword */: - case 104 /* VoidKeyword */: - case 136 /* SymbolKeyword */: - case 160 /* ConstructorType */: - case 159 /* FunctionType */: - case 161 /* TypeQuery */: - case 158 /* TypeReference */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: - case 167 /* ParenthesizedType */: - case 168 /* ThisType */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 172 /* LiteralType */: + case 164 /* ArrayType */: + case 165 /* TupleType */: + case 163 /* TypeLiteral */: + case 158 /* TypePredicate */: + case 145 /* TypeParameter */: + case 119 /* AnyKeyword */: + case 122 /* BooleanKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 130 /* NeverKeyword */: + case 105 /* VoidKeyword */: + case 137 /* SymbolKeyword */: + case 161 /* ConstructorType */: + case 160 /* FunctionType */: + case 162 /* TypeQuery */: + case 159 /* TypeReference */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: + case 168 /* ParenthesizedType */: + case 169 /* ThisType */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 173 /* LiteralType */: // TypeScript type nodes are elided. - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // TypeScript index signatures are elided. - case 146 /* Decorator */: + case 147 /* Decorator */: // TypeScript decorators are elided. They will be emitted as part of visitClassDeclaration. - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: // TypeScript type-only declarations are elided. - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // TypeScript property declarations are elided. return undefined; - case 151 /* Constructor */: + case 152 /* Constructor */: return visitConstructor(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: // TypeScript interfaces are elided, but some comments may be preserved. // See the implementation of `getLeadingComments` in comments.ts for more details. return ts.createNotEmittedStatement(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: // This is a class declaration with TypeScript syntax extensions. // // TypeScript class syntax extensions include: @@ -48979,7 +49069,7 @@ var ts; // - index signatures // - method overload signatures return visitClassDeclaration(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: // This is a class expression with TypeScript syntax extensions. // // TypeScript class syntax extensions include: @@ -48990,35 +49080,35 @@ var ts; // - index signatures // - method overload signatures return visitClassExpression(node); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: // This is a heritage clause with TypeScript syntax extensions. // // TypeScript heritage clause extensions include: // - `implements` clause return visitHeritageClause(node); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: // TypeScript supports type arguments on an expression in an `extends` heritage clause. return visitExpressionWithTypeArguments(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: // TypeScript method declarations may have decorators, modifiers // or type annotations. return visitMethodDeclaration(node); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: // Get Accessors can have TypeScript modifiers, decorators, and type annotations. return visitGetAccessor(node); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: // Set Accessors can have TypeScript modifiers and type annotations. return visitSetAccessor(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: // Typescript function declarations can have modifiers, decorators, and type annotations. return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: // TypeScript function expressions can have modifiers and type annotations. return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: // TypeScript arrow functions can have modifiers and type annotations. return visitArrowFunction(node); - case 145 /* Parameter */: + case 146 /* Parameter */: // This is a parameter declaration with TypeScript syntax extensions. // // TypeScript parameter declaration syntax extensions include: @@ -49028,33 +49118,33 @@ var ts; // - type annotations // - this parameters return visitParameter(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: // ParenthesizedExpressions are TypeScript if their expression is a // TypeAssertion or AsExpression return visitParenthesizedExpression(node); - case 183 /* TypeAssertionExpression */: - case 201 /* AsExpression */: + case 184 /* TypeAssertionExpression */: + case 202 /* AsExpression */: // TypeScript type assertions are removed, but their subtrees are preserved. return visitAssertionExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: // TypeScript non-null expressions are removed, but their subtrees are preserved. return visitNonNullExpression(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: // TypeScript enum declarations do not exist in ES6 and must be rewritten. return visitEnumDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // TypeScript namespace exports for variable statements must be transformed. return visitVariableStatement(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // TypeScript namespace declarations must be transformed. return visitModuleDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // TypeScript namespace or external module import. return visitImportEqualsDeclaration(node); default: @@ -49303,7 +49393,7 @@ var ts; function visitClassExpression(node) { var staticProperties = getInitializedProperties(node, /*isStatic*/ true); var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84 /* ExtendsKeyword */; })); + var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 85 /* ExtendsKeyword */; })); var classExpression = ts.createClassExpression( /*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, heritageClauses, members); @@ -49471,7 +49561,7 @@ var ts; return index; } var statement = statements[index]; - if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { + if (statement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { result.push(ts.visitNode(statement, visitor, ts.isStatement)); return index + 1; } @@ -49542,7 +49632,7 @@ var ts; * @param isStatic A value indicating whether the member should be a static or instance member. */ function isInitializedProperty(member, isStatic) { - return member.kind === 148 /* PropertyDeclaration */ + return member.kind === 149 /* PropertyDeclaration */ && isStatic === ts.hasModifier(member, 32 /* Static */) && member.initializer !== undefined; } @@ -49677,12 +49767,12 @@ var ts; */ function getAllDecoratorsOfClassElement(node, member) { switch (member.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return getAllDecoratorsOfAccessors(node, member); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return undefined; @@ -49835,7 +49925,7 @@ var ts; var prefix = getClassMemberPrefix(node, member); var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true); var descriptor = languageVersion > 0 /* ES3 */ - ? member.kind === 148 /* PropertyDeclaration */ + ? member.kind === 149 /* PropertyDeclaration */ ? ts.createVoidZero() : ts.createNull() : undefined; @@ -49932,13 +50022,13 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { var properties = void 0; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(36 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node)))); } if (properties) { decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*multiLine*/ true))); @@ -49954,10 +50044,10 @@ var ts; */ function shouldAddTypeMetadata(node) { var kind = node.kind; - return kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */ - || kind === 148 /* PropertyDeclaration */; + return kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */ + || kind === 149 /* PropertyDeclaration */; } /** * Determines whether to emit the "design:returntype" metadata based on the node's kind. @@ -49967,7 +50057,7 @@ var ts; * @param node The node to test. */ function shouldAddReturnTypeMetadata(node) { - return node.kind === 150 /* MethodDeclaration */; + return node.kind === 151 /* MethodDeclaration */; } /** * Determines whether to emit the "design:paramtypes" metadata based on the node's kind. @@ -49978,12 +50068,12 @@ var ts; */ function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.getFirstConstructorWithBody(node) !== undefined; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return true; } return false; @@ -49995,15 +50085,15 @@ var ts; */ function serializeTypeOfNode(node) { switch (node.kind) { - case 148 /* PropertyDeclaration */: - case 145 /* Parameter */: - case 152 /* GetAccessor */: + case 149 /* PropertyDeclaration */: + case 146 /* Parameter */: + case 153 /* GetAccessor */: return serializeTypeNode(node.type); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 150 /* MethodDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 151 /* MethodDeclaration */: return ts.createIdentifier("Function"); default: return ts.createVoidZero(); @@ -50040,7 +50130,7 @@ var ts; return ts.createArrayLiteral(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 152 /* GetAccessor */) { + if (container && node.kind === 153 /* GetAccessor */) { var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor; if (setAccessor) { return setAccessor.parameters; @@ -50085,58 +50175,58 @@ var ts; return ts.createIdentifier("Object"); } switch (node.kind) { - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: return ts.createVoidZero(); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return serializeTypeNode(node.type); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return ts.createIdentifier("Function"); - case 163 /* ArrayType */: - case 164 /* TupleType */: + case 164 /* ArrayType */: + case 165 /* TupleType */: return ts.createIdentifier("Array"); - case 157 /* TypePredicate */: - case 121 /* BooleanKeyword */: + case 158 /* TypePredicate */: + case 122 /* BooleanKeyword */: return ts.createIdentifier("Boolean"); - case 135 /* StringKeyword */: + case 136 /* StringKeyword */: return ts.createIdentifier("String"); - case 133 /* ObjectKeyword */: + case 134 /* ObjectKeyword */: return ts.createIdentifier("Object"); - case 172 /* LiteralType */: + case 173 /* LiteralType */: switch (node.literal.kind) { case 9 /* StringLiteral */: return ts.createIdentifier("String"); case 8 /* NumericLiteral */: return ts.createIdentifier("Number"); - case 100 /* TrueKeyword */: - case 85 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 86 /* FalseKeyword */: return ts.createIdentifier("Boolean"); default: ts.Debug.failBadSyntaxKind(node.literal); break; } break; - case 132 /* NumberKeyword */: + case 133 /* NumberKeyword */: return ts.createIdentifier("Number"); - case 136 /* SymbolKeyword */: + case 137 /* SymbolKeyword */: return languageVersion < 2 /* ES2015 */ ? getGlobalSymbolNameWithFallback() : ts.createIdentifier("Symbol"); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return serializeTypeReferenceNode(node); - case 166 /* IntersectionType */: - case 165 /* UnionType */: + case 167 /* IntersectionType */: + case 166 /* UnionType */: return serializeUnionOrIntersectionType(node); - case 161 /* TypeQuery */: - case 169 /* TypeOperator */: - case 170 /* IndexedAccessType */: - case 171 /* MappedType */: - case 162 /* TypeLiteral */: - case 118 /* AnyKeyword */: - case 168 /* ThisType */: + case 162 /* TypeQuery */: + case 170 /* TypeOperator */: + case 171 /* IndexedAccessType */: + case 172 /* MappedType */: + case 163 /* TypeLiteral */: + case 119 /* AnyKeyword */: + case 169 /* ThisType */: break; default: ts.Debug.failBadSyntaxKind(node); @@ -50221,7 +50311,7 @@ var ts; */ function serializeEntityNameAsExpression(node, useFallback) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: // Create a clone of the name with a new parent, and treat it as if it were // a source tree node for the purposes of the checker. var name = ts.getMutableClone(node); @@ -50232,7 +50322,7 @@ var ts; return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name); } return name; - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return serializeQualifiedNameAsExpression(node, useFallback); } } @@ -50245,7 +50335,7 @@ var ts; */ function serializeQualifiedNameAsExpression(node, useFallback) { var left; - if (node.left.kind === 70 /* Identifier */) { + if (node.left.kind === 71 /* Identifier */) { left = serializeEntityNameAsExpression(node.left, useFallback); } else if (useFallback) { @@ -50316,9 +50406,9 @@ var ts; * @param node The HeritageClause to transform. */ function visitHeritageClause(node) { - if (node.token === 84 /* ExtendsKeyword */) { + if (node.token === 85 /* ExtendsKeyword */) { var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1); - return ts.setTextRange(ts.createHeritageClause(84 /* ExtendsKeyword */, types), node); + return ts.setTextRange(ts.createHeritageClause(85 /* ExtendsKeyword */, types), node); } return undefined; } @@ -50772,7 +50862,7 @@ var ts; recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { // Adjust the source map emit to match the old emitter. - if (node.kind === 231 /* EnumDeclaration */) { + if (node.kind === 232 /* EnumDeclaration */) { ts.setSourceMapRange(statement.declarationList, node); } else { @@ -50891,7 +50981,7 @@ var ts; var statementsLocation; var blockLocation; var body = node.body; - if (body.kind === 233 /* ModuleBlock */) { + if (body.kind === 234 /* ModuleBlock */) { saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); }); statementsLocation = body.statements; blockLocation = body; @@ -50937,13 +51027,13 @@ var ts; // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); // We only want to emit comment on the namespace which contains block body itself, not the containing namespaces. - if (body.kind !== 233 /* ModuleBlock */) { + if (body.kind !== 234 /* ModuleBlock */) { ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 233 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -50984,7 +51074,7 @@ var ts; * @param node The named import bindings node. */ function visitNamedImportBindings(node) { - if (node.kind === 239 /* NamespaceImport */) { + if (node.kind === 240 /* NamespaceImport */) { // Elide a namespace import if it is not referenced. return resolver.isReferencedAliasDeclaration(node) ? node : undefined; } @@ -51197,7 +51287,7 @@ var ts; function enableSubstitutionForNonQualifiedEnumMembers() { if ((enabledSubstitutions & 8 /* NonQualifiedEnumMembers */) === 0) { enabledSubstitutions |= 8 /* NonQualifiedEnumMembers */; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } } function enableSubstitutionForClassAliases() { @@ -51205,7 +51295,7 @@ var ts; enabledSubstitutions |= 1 /* ClassAliases */; // We need to enable substitutions for identifiers. This allows us to // substitute class names inside of a class declaration. - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); // Keep track of class aliases. classAliases = []; } @@ -51215,17 +51305,17 @@ var ts; enabledSubstitutions |= 2 /* NamespaceExports */; // We need to enable substitutions for identifiers and shorthand property assignments. This allows us to // substitute the names of exported members of a namespace. - context.enableSubstitution(70 /* Identifier */); - context.enableSubstitution(261 /* ShorthandPropertyAssignment */); + context.enableSubstitution(71 /* Identifier */); + context.enableSubstitution(262 /* ShorthandPropertyAssignment */); // We need to be notified when entering and exiting namespaces. - context.enableEmitNotification(232 /* ModuleDeclaration */); + context.enableEmitNotification(233 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return ts.getOriginalNode(node).kind === 232 /* ModuleDeclaration */; + return ts.getOriginalNode(node).kind === 233 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return ts.getOriginalNode(node).kind === 231 /* EnumDeclaration */; + return ts.getOriginalNode(node).kind === 232 /* EnumDeclaration */; } /** * Hook for node emit. @@ -51284,11 +51374,11 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -51326,9 +51416,9 @@ var ts; // If we are nested within a namespace declaration, we may need to qualifiy // an identifier that is exported from a merged namespace. var container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false); - if (container && container.kind !== 264 /* SourceFile */) { - var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 232 /* ModuleDeclaration */) || - (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 231 /* EnumDeclaration */); + if (container && container.kind !== 265 /* SourceFile */) { + var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 233 /* ModuleDeclaration */) || + (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 232 /* EnumDeclaration */); if (substitute) { return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), /*location*/ node); @@ -51467,18 +51557,18 @@ var ts; return node; } switch (node.kind) { - case 119 /* AsyncKeyword */: + case 120 /* AsyncKeyword */: // ES2017 async modifier should be elided for targets < ES2017 return undefined; - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitAwaitExpression(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); default: return ts.visitEachChild(node, visitor, context); @@ -51563,7 +51653,7 @@ var ts; var original = ts.getOriginalNode(node, ts.isFunctionLike); var nodeType = original.type; var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined; - var isArrowFunction = node.kind === 186 /* ArrowFunction */; + var isArrowFunction = node.kind === 187 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current @@ -51628,15 +51718,15 @@ var ts; enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; // We need to enable substitutions for call, property access, and element access // if we need to rewrite super calls. - context.enableSubstitution(180 /* CallExpression */); - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(181 /* CallExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // We need to be notified when entering and exiting declarations that bind super. - context.enableEmitNotification(228 /* ClassDeclaration */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(151 /* Constructor */); + context.enableEmitNotification(229 /* ClassDeclaration */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(152 /* Constructor */); } } /** @@ -51676,23 +51766,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -51712,11 +51802,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 /* ClassDeclaration */ - || kind === 151 /* Constructor */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */; + return kind === 229 /* ClassDeclaration */ + || kind === 152 /* Constructor */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) { @@ -51739,7 +51829,7 @@ var ts; function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(awaiterHelper); var generatorFunc = ts.createFunctionExpression( - /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), + /*modifiers*/ undefined, ts.createToken(39 /* AsteriskToken */), /*name*/ undefined, /*typeParameters*/ undefined, /*parameters*/ [], @@ -51804,7 +51894,7 @@ var ts; return visitorWorker(node, /*noDestructuringValue*/ true); } function visitorNoAsyncModifier(node) { - if (node.kind === 119 /* AsyncKeyword */) { + if (node.kind === 120 /* AsyncKeyword */) { return undefined; } return node; @@ -51814,43 +51904,43 @@ var ts; return node; } switch (node.kind) { - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return visitAwaitExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node, noDestructuringValue); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return visitVoidExpression(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return visitConstructorDeclaration(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 152 /* GetAccessor */: + case 153 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 153 /* SetAccessor */: + case 154 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return visitParameter(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitExpressionStatement(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); default: return ts.visitEachChild(node, visitor, context); @@ -51879,7 +51969,7 @@ var ts; function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { var statement = ts.unwrapInnermostStatementOfLabel(node); - if (statement.kind === 215 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 216 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node); @@ -51891,7 +51981,7 @@ var ts; var objects = []; for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) { var e = elements_4[_i]; - if (e.kind === 262 /* SpreadAssignment */) { + if (e.kind === 263 /* SpreadAssignment */) { if (chunkObject) { objects.push(ts.createObjectLiteral(chunkObject)); chunkObject = undefined; @@ -51903,7 +51993,7 @@ var ts; if (!chunkObject) { chunkObject = []; } - if (e.kind === 260 /* PropertyAssignment */) { + if (e.kind === 261 /* PropertyAssignment */) { var p = e; chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression))); } @@ -51925,7 +52015,7 @@ var ts; // If the first element is a spread element, then the first argument to __assign is {}: // { ...o, a, b, ...o2 } => __assign({}, o, {a, b}, o2) var objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 177 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 178 /* ObjectLiteralExpression */) { objects.unshift(ts.createObjectLiteral()); } return createAssignHelper(context, objects); @@ -51947,7 +52037,7 @@ var ts; if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 1048576 /* ContainsObjectRest */) { return ts.flattenDestructuringAssignment(node, visitor, context, 1 /* ObjectRest */, !noDestructuringValue); } - else if (node.operatorToken.kind === 25 /* CommaToken */) { + else if (node.operatorToken.kind === 26 /* CommaToken */) { return ts.updateBinary(node, ts.visitNode(node.left, visitorNoDestructuringValue, ts.isExpression), ts.visitNode(node.right, noDestructuringValue ? visitorNoDestructuringValue : visitor, ts.isExpression)); } return ts.visitEachChild(node, visitor, context); @@ -52170,7 +52260,7 @@ var ts; var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor); appendObjectRestAssignmentsIfNeeded(statements, node); statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression( - /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name), + /*modifiers*/ undefined, ts.createToken(39 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name), /*typeParameters*/ undefined, /*parameters*/ [], /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)))))); @@ -52231,15 +52321,15 @@ var ts; enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; // We need to enable substitutions for call, property access, and element access // if we need to rewrite super calls. - context.enableSubstitution(180 /* CallExpression */); - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(179 /* ElementAccessExpression */); + context.enableSubstitution(181 /* CallExpression */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(180 /* ElementAccessExpression */); // We need to be notified when entering and exiting declarations that bind super. - context.enableEmitNotification(228 /* ClassDeclaration */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(151 /* Constructor */); + context.enableEmitNotification(229 /* ClassDeclaration */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(152 /* Constructor */); } } /** @@ -52279,23 +52369,23 @@ var ts; } function substituteExpression(node) { switch (node.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node); } return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { return createSuperAccessInAsyncMethod(node.argumentExpression, node); } return node; @@ -52315,11 +52405,11 @@ var ts; } function isSuperContainer(node) { var kind = node.kind; - return kind === 228 /* ClassDeclaration */ - || kind === 151 /* Constructor */ - || kind === 150 /* MethodDeclaration */ - || kind === 152 /* GetAccessor */ - || kind === 153 /* SetAccessor */; + return kind === 229 /* ClassDeclaration */ + || kind === 152 /* Constructor */ + || kind === 151 /* MethodDeclaration */ + || kind === 153 /* GetAccessor */ + || kind === 154 /* SetAccessor */; } function createSuperAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) { @@ -52419,11 +52509,11 @@ var ts; } function visitorWorker(node) { switch (node.kind) { - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitJsxElement(node, /*isChild*/ false); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, /*isChild*/ false); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitJsxExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -52433,11 +52523,11 @@ var ts; switch (node.kind) { case 10 /* JsxText */: return visitJsxText(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return visitJsxExpression(node); - case 248 /* JsxElement */: + case 249 /* JsxElement */: return visitJsxElement(node, /*isChild*/ true); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, /*isChild*/ true); default: ts.Debug.failBadSyntaxKind(node); @@ -52498,7 +52588,7 @@ var ts; var decoded = tryDecodeEntities(node.text); return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node; } - else if (node.kind === 255 /* JsxExpression */) { + else if (node.kind === 256 /* JsxExpression */) { if (node.expression === undefined) { return ts.createTrue(); } @@ -52590,7 +52680,7 @@ var ts; return decoded === text ? undefined : decoded; } function getTagName(node) { - if (node.kind === 248 /* JsxElement */) { + if (node.kind === 249 /* JsxElement */) { return getTagName(node.openingElement); } else { @@ -52897,7 +52987,7 @@ var ts; return node; } switch (node.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -52905,9 +52995,9 @@ var ts; } function visitBinaryExpression(node) { switch (node.operatorToken.kind) { - case 61 /* AsteriskAsteriskEqualsToken */: + case 62 /* AsteriskAsteriskEqualsToken */: return visitExponentiationAssignmentExpression(node); - case 39 /* AsteriskAsteriskToken */: + case 40 /* AsteriskAsteriskToken */: return visitExponentiationExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -53128,7 +53218,7 @@ var ts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { return hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ - && node.kind === 218 /* ReturnStatement */ + && node.kind === 219 /* ReturnStatement */ && !node.expression; } function shouldVisitNode(node) { @@ -53152,104 +53242,104 @@ var ts; return node; } function callExpressionVisitor(node) { - if (node.kind === 96 /* SuperKeyword */) { + if (node.kind === 97 /* SuperKeyword */) { return visitSuperKeyword(/*isExpressionOfCall*/ true); } return visitor(node); } function visitJavaScript(node) { switch (node.kind) { - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: return undefined; // elide static keyword - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return visitClassExpression(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return visitParameter(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return visitArrowFunction(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 70 /* Identifier */: + case 71 /* Identifier */: return visitIdentifier(node); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitCaseBlock(node); - case 206 /* Block */: + case 207 /* Block */: return visitBlock(node, /*isFunctionBody*/ false); - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return visitDoOrWhileStatement(node, /*outermostLabeledStatement*/ undefined); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node, /*outermostLabeledStatement*/ undefined); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node, /*outermostLabeledStatement*/ undefined); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return visitExpressionStatement(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitCatchClause(node); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, /*needsDestructuringValue*/ true); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node, /*needsDestructuringValue*/ true); - case 12 /* NoSubstitutionTemplateLiteral */: - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: + case 13 /* NoSubstitutionTemplateLiteral */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: return visitTemplateLiteral(node); case 9 /* StringLiteral */: return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return visitTemplateExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return visitSpreadElement(node); - case 96 /* SuperKeyword */: + case 97 /* SuperKeyword */: return visitSuperKeyword(/*isExpressionOfCall*/ false); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return visitThisKeyword(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return visitMetaProperty(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return visitAccessorDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitReturnStatement(node); default: return ts.visitEachChild(node, visitor, context); @@ -53333,13 +53423,13 @@ var ts; // it is possible if either // - break/continue is labeled and label is located inside the converted loop // - break/continue is non-labeled and located in non-converted loop/switch statement - var jump = node.kind === 217 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + var jump = node.kind === 218 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { var labelMarker = void 0; if (!node.label) { - if (node.kind === 217 /* BreakStatement */) { + if (node.kind === 218 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } @@ -53350,7 +53440,7 @@ var ts; } } else { - if (node.kind === 217 /* BreakStatement */) { + if (node.kind === 218 /* BreakStatement */) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } @@ -53369,10 +53459,10 @@ var ts; expr = copyExpr; } else { - expr = ts.createBinary(expr, 25 /* CommaToken */, copyExpr); + expr = ts.createBinary(expr, 26 /* CommaToken */, copyExpr); } } - returnExpression = ts.createBinary(expr, 25 /* CommaToken */, returnExpression); + returnExpression = ts.createBinary(expr, 26 /* CommaToken */, returnExpression); } return ts.createReturn(returnExpression); } @@ -53506,7 +53596,7 @@ var ts; addConstructor(statements, node, extendsClauseElement); addClassMembers(statements, node); // Create a synthetic text range for the return statement. - var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 17 /* CloseBraceToken */); + var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18 /* CloseBraceToken */); var localName = ts.getLocalName(node); // The following partially-emitted expression exists purely to align our sourcemap // emit with the original emitter. @@ -53611,7 +53701,7 @@ var ts; } // determine whether the class is known syntactically to be a derived class (e.g. a // class that extends a value that is not syntactically known to be `null`). - var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94 /* NullKeyword */; + var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 95 /* NullKeyword */; var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset); // The last statement expression was replaced. Skip it. if (superCaptureStatus === 1 /* ReplaceSuperCapture */ || superCaptureStatus === 2 /* ReplaceWithReturn */) { @@ -53650,17 +53740,17 @@ var ts; */ function isSufficientlyCoveredByReturnStatements(statement) { // A return statement is considered covered. - if (statement.kind === 218 /* ReturnStatement */) { + if (statement.kind === 219 /* ReturnStatement */) { return true; } - else if (statement.kind === 210 /* IfStatement */) { + else if (statement.kind === 211 /* IfStatement */) { var ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } } - else if (statement.kind === 206 /* Block */) { + else if (statement.kind === 207 /* Block */) { var lastStatement = ts.lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -53718,7 +53808,7 @@ var ts; var ctorStatements = ctor.body.statements; if (statementOffset < ctorStatements.length) { firstStatement = ctorStatements[statementOffset]; - if (firstStatement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) { + if (firstStatement.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) { superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -53728,8 +53818,8 @@ var ts; && statementOffset === ctorStatements.length - 1 && !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) { var returnStatement = ts.createReturn(superCallExpression); - if (superCallExpression.kind !== 193 /* BinaryExpression */ - || superCallExpression.left.kind !== 180 /* CallExpression */) { + if (superCallExpression.kind !== 194 /* BinaryExpression */ + || superCallExpression.left.kind !== 181 /* CallExpression */) { ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'."); } // Shift comments from the original super call to the return statement. @@ -53874,7 +53964,7 @@ var ts; * synthesized call to `super` */ function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return node && node.dotDotDotToken && node.name.kind === 70 /* Identifier */ && !inConstructorWithSynthesizedSuper; + return node && node.dotDotDotToken && node.name.kind === 71 /* Identifier */ && !inConstructorWithSynthesizedSuper; } /** * Adds statements to the body of a function-like node if it contains a rest parameter. @@ -53926,7 +54016,7 @@ var ts; * @param node A node. */ function addCaptureThisForNodeIfNeeded(statements, node) { - if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 186 /* ArrowFunction */) { + if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 187 /* ArrowFunction */) { captureThisForNode(statements, node, ts.createThis()); } } @@ -53946,25 +54036,25 @@ var ts; if (hierarchyFacts & 16384 /* NewTarget */) { var newTarget = void 0; switch (node.kind) { - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return statements; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // Methods and accessors cannot be constructors, so 'new.target' will // always return 'undefined'. newTarget = ts.createVoidZero(); break; - case 151 /* Constructor */: + case 152 /* Constructor */: // Class constructors can only be called with `new`, so `this.constructor` // should be relatively safe to use. newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"); break; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: // Functions can be called or constructed, and may have a `this` due to // being a member or when calling an imported function via `other_1.f()`. - newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 92 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero()); + newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 93 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero()); break; default: ts.Debug.failBadSyntaxKind(node); @@ -53993,20 +54083,20 @@ var ts; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; switch (member.kind) { - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 151 /* Constructor */: + case 152 /* Constructor */: // Constructors are handled in visitClassExpression/visitClassDeclaration break; default: @@ -54198,7 +54288,7 @@ var ts; : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */); var parameters = ts.visitParameterList(node.parameters, visitor, context); var body = transformFunctionBody(node); - if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */)) { + if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 228 /* FunctionDeclaration */ || node.kind === 186 /* FunctionExpression */)) { name = ts.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */); @@ -54246,7 +54336,7 @@ var ts; } } else { - ts.Debug.assert(node.kind === 186 /* ArrowFunction */); + ts.Debug.assert(node.kind === 187 /* ArrowFunction */); // To align with the old emitter, we use a synthetic end position on the location // for the statement list we synthesize when we down-level an arrow function with // an expression function body. This prevents both comments and source maps from @@ -54283,7 +54373,7 @@ var ts; ts.setEmitFlags(block, 1 /* SingleLine */); } if (closeBraceLocation) { - ts.setTokenSourceMapRange(block, 17 /* CloseBraceToken */, closeBraceLocation); + ts.setTokenSourceMapRange(block, 18 /* CloseBraceToken */, closeBraceLocation); } ts.setOriginalNode(block, node.body); return block; @@ -54313,9 +54403,9 @@ var ts; function visitExpressionStatement(node) { // If we are here it is most likely because our expression is a destructuring assignment. switch (node.expression.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateStatement(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateStatement(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false)); } return ts.visitEachChild(node, visitor, context); @@ -54334,9 +54424,9 @@ var ts; // expression. If we are in a state where we do not need the destructuring value, // we pass that information along to the children that care about it. switch (node.expression.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return ts.updateParen(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false)); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return ts.updateParen(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false)); } } @@ -54371,13 +54461,13 @@ var ts; assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0 /* All */); } else { - assignment = ts.createBinary(decl.name, 57 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression)); + assignment = ts.createBinary(decl.name, 58 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression)); } assignments = ts.append(assignments, assignment); } } if (assignments) { - updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); })), node); + updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26 /* CommaToken */, acc); })), node); } else { // none of declarations has initializer - the entire variable statement can be deleted @@ -54536,14 +54626,14 @@ var ts; } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -54731,7 +54821,7 @@ var ts; && i < numInitialPropertiesWithoutYield) { numInitialPropertiesWithoutYield = i; } - if (property.name.kind === 143 /* ComputedPropertyName */) { + if (property.name.kind === 144 /* ComputedPropertyName */) { numInitialProperties = i; break; } @@ -54770,7 +54860,7 @@ var ts; } visit(node.name); function visit(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { state.hoistedLocalVariables.push(node); } else { @@ -54803,11 +54893,11 @@ var ts; var functionName = ts.createUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: var initializer = node.initializer; - if (initializer && initializer.kind === 226 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 227 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -54875,7 +54965,7 @@ var ts; /*modifiers*/ undefined, ts.setEmitFlags(ts.createVariableDeclarationList([ ts.createVariableDeclaration(functionName, /*type*/ undefined, ts.setEmitFlags(ts.createFunctionExpression( - /*modifiers*/ undefined, containsYield ? ts.createToken(38 /* AsteriskToken */) : undefined, + /*modifiers*/ undefined, containsYield ? ts.createToken(39 /* AsteriskToken */) : undefined, /*name*/ undefined, /*typeParameters*/ undefined, loopParameters, /*type*/ undefined, loopBody), loopBodyFlags)) @@ -54966,7 +55056,7 @@ var ts; function copyOutParameter(outParam, copyDirection) { var source = copyDirection === 0 /* ToOriginal */ ? outParam.outParamName : outParam.originalName; var target = copyDirection === 0 /* ToOriginal */ ? outParam.originalName : outParam.outParamName; - return ts.createBinary(target, 57 /* EqualsToken */, source); + return ts.createBinary(target, 58 /* EqualsToken */, source); } function copyOutParameters(outParams, copyDirection, statements) { for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) { @@ -54985,7 +55075,7 @@ var ts; !state.labeledNonLocalContinues; var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; })); var callResult = isAsyncBlockContainingAwait - ? ts.createYield(ts.createToken(38 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */)) + ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */)) : call; if (isSimpleLoop) { statements.push(ts.createStatement(callResult)); @@ -55006,10 +55096,10 @@ var ts; else { returnStatement = ts.createReturn(ts.createPropertyAccess(loopResultName, "value")); } - statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 33 /* EqualsEqualsEqualsToken */, ts.createLiteral("object")), returnStatement)); + statements.push(ts.createIf(ts.createBinary(ts.createTypeOf(loopResultName), 34 /* EqualsEqualsEqualsToken */, ts.createLiteral("object")), returnStatement)); } if (state.nonLocalJumps & 2 /* Break */) { - statements.push(ts.createIf(ts.createBinary(loopResultName, 33 /* EqualsEqualsEqualsToken */, ts.createLiteral("break")), ts.createBreak())); + statements.push(ts.createIf(ts.createBinary(loopResultName, 34 /* EqualsEqualsEqualsToken */, ts.createLiteral("break")), ts.createBreak())); } if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { var caseClauses = []; @@ -55087,20 +55177,20 @@ var ts; for (var i = start; i < numProperties; i++) { var property = properties[i]; switch (property.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine)); } break; - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -55265,7 +55355,7 @@ var ts; // We are here either because SuperKeyword was used somewhere in the expression, or // because we contain a SpreadElementExpression. var _a = ts.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { ts.setEmitFlags(thisArg, 4 /* NoSubstitution */); } var resultingCall; @@ -55298,7 +55388,7 @@ var ts; resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), /*location*/ node); } - if (node.expression.kind === 96 /* SuperKeyword */) { + if (node.expression.kind === 97 /* SuperKeyword */) { var actualThis = ts.createThis(); ts.setEmitFlags(actualThis, 4 /* NoSubstitution */); var initializer = ts.createLogicalOr(resultingCall, actualThis); @@ -55361,7 +55451,7 @@ var ts; else { if (segments.length === 1) { var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 /* ArrayLiteralExpression */ + return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */ ? ts.createArraySlice(segments[0]) : segments[0]; } @@ -55473,7 +55563,7 @@ var ts; // thus we need to remove those characters. // First template piece starts with "`", others with "}" // Last template piece ends with "`", others with "${" - var isLast = node.kind === 12 /* NoSubstitutionTemplateLiteral */ || node.kind === 15 /* TemplateTail */; + var isLast = node.kind === 13 /* NoSubstitutionTemplateLiteral */ || node.kind === 16 /* TemplateTail */; text = text.substring(1, text.length - (isLast ? 1 : 2)); // Newline normalization: // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's @@ -55571,7 +55661,7 @@ var ts; : ts.createIdentifier("_super"); } function visitMetaProperty(node) { - if (node.keywordToken === 93 /* NewKeyword */ && node.name.text === "target") { + if (node.keywordToken === 94 /* NewKeyword */ && node.name.text === "target") { if (hierarchyFacts & 8192 /* ComputedPropertyName */) { hierarchyFacts |= 32768 /* NewTargetInComputedPropertyName */; } @@ -55608,7 +55698,7 @@ var ts; function enableSubstitutionsForBlockScopedBindings() { if ((enabledSubstitutions & 2 /* BlockScopedBindings */) === 0) { enabledSubstitutions |= 2 /* BlockScopedBindings */; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } } /** @@ -55618,14 +55708,14 @@ var ts; function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(98 /* ThisKeyword */); - context.enableEmitNotification(151 /* Constructor */); - context.enableEmitNotification(150 /* MethodDeclaration */); - context.enableEmitNotification(152 /* GetAccessor */); - context.enableEmitNotification(153 /* SetAccessor */); - context.enableEmitNotification(186 /* ArrowFunction */); - context.enableEmitNotification(185 /* FunctionExpression */); - context.enableEmitNotification(227 /* FunctionDeclaration */); + context.enableSubstitution(99 /* ThisKeyword */); + context.enableEmitNotification(152 /* Constructor */); + context.enableEmitNotification(151 /* MethodDeclaration */); + context.enableEmitNotification(153 /* GetAccessor */); + context.enableEmitNotification(154 /* SetAccessor */); + context.enableEmitNotification(187 /* ArrowFunction */); + context.enableEmitNotification(186 /* FunctionExpression */); + context.enableEmitNotification(228 /* FunctionDeclaration */); } } /** @@ -55667,10 +55757,10 @@ var ts; function isNameOfDeclarationWithCollidingName(node) { var parent = node.parent; switch (parent.kind) { - case 175 /* BindingElement */: - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 226 /* VariableDeclaration */: return parent.name === node && resolver.isDeclarationWithCollidingName(parent); } @@ -55683,9 +55773,9 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -55728,19 +55818,19 @@ var ts; return false; } var statement = ts.firstOrUndefined(constructor.body.statements); - if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209 /* ExpressionStatement */) { + if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 210 /* ExpressionStatement */) { return false; } var statementExpression = statement.expression; - if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180 /* CallExpression */) { + if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 181 /* CallExpression */) { return false; } var callTarget = statementExpression.expression; - if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 96 /* SuperKeyword */) { + if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 97 /* SuperKeyword */) { return false; } var callArgument = ts.singleOrUndefined(statementExpression.arguments); - if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197 /* SpreadElement */) { + if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 198 /* SpreadElement */) { return false; } var expression = callArgument.expression; @@ -55781,15 +55871,15 @@ var ts; if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(250 /* JsxOpeningElement */); - context.enableEmitNotification(251 /* JsxClosingElement */); - context.enableEmitNotification(249 /* JsxSelfClosingElement */); + context.enableEmitNotification(251 /* JsxOpeningElement */); + context.enableEmitNotification(252 /* JsxClosingElement */); + context.enableEmitNotification(250 /* JsxSelfClosingElement */); noSubstitution = []; } var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(178 /* PropertyAccessExpression */); - context.enableSubstitution(260 /* PropertyAssignment */); + context.enableSubstitution(179 /* PropertyAccessExpression */); + context.enableSubstitution(261 /* PropertyAssignment */); return transformSourceFile; /** * Transforms an ES5 source file to ES3. @@ -55808,9 +55898,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 250 /* JsxOpeningElement */: - case 251 /* JsxClosingElement */: - case 249 /* JsxSelfClosingElement */: + case 251 /* JsxOpeningElement */: + case 252 /* JsxClosingElement */: + case 250 /* JsxSelfClosingElement */: var tagName = node.tagName; noSubstitution[ts.getOriginalNodeId(tagName)] = true; break; @@ -55867,7 +55957,7 @@ var ts; */ function trySubstituteReservedName(name) { var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined); - if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) { + if (token >= 72 /* FirstReservedWord */ && token <= 107 /* LastReservedWord */) { return ts.setTextRange(ts.createLiteral(name), name); } return undefined; @@ -56147,13 +56237,13 @@ var ts; */ function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitWhileStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -56166,24 +56256,24 @@ var ts; */ function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return visitAccessorDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return visitBreakStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return visitContinueStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 16777216 /* ContainsYield */) { @@ -56204,21 +56294,21 @@ var ts; */ function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return visitBinaryExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return visitConditionalExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return visitYieldExpression(node); - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return visitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return visitNewExpression(node); default: return ts.visitEachChild(node, visitor, context); @@ -56231,9 +56321,9 @@ var ts; */ function visitGenerator(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return visitFunctionExpression(node); default: ts.Debug.failBadSyntaxKind(node); @@ -56432,23 +56522,23 @@ var ts; } } function isCompoundAssignment(kind) { - return kind >= 58 /* FirstCompoundAssignment */ - && kind <= 69 /* LastCompoundAssignment */; + return kind >= 59 /* FirstCompoundAssignment */ + && kind <= 70 /* LastCompoundAssignment */; } function getOperatorForCompoundAssignment(kind) { switch (kind) { - case 58 /* PlusEqualsToken */: return 36 /* PlusToken */; - case 59 /* MinusEqualsToken */: return 37 /* MinusToken */; - case 60 /* AsteriskEqualsToken */: return 38 /* AsteriskToken */; - case 61 /* AsteriskAsteriskEqualsToken */: return 39 /* AsteriskAsteriskToken */; - case 62 /* SlashEqualsToken */: return 40 /* SlashToken */; - case 63 /* PercentEqualsToken */: return 41 /* PercentToken */; - case 64 /* LessThanLessThanEqualsToken */: return 44 /* LessThanLessThanToken */; - case 65 /* GreaterThanGreaterThanEqualsToken */: return 45 /* GreaterThanGreaterThanToken */; - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 46 /* GreaterThanGreaterThanGreaterThanToken */; - case 67 /* AmpersandEqualsToken */: return 47 /* AmpersandToken */; - case 68 /* BarEqualsToken */: return 48 /* BarToken */; - case 69 /* CaretEqualsToken */: return 49 /* CaretToken */; + case 59 /* PlusEqualsToken */: return 37 /* PlusToken */; + case 60 /* MinusEqualsToken */: return 38 /* MinusToken */; + case 61 /* AsteriskEqualsToken */: return 39 /* AsteriskToken */; + case 62 /* AsteriskAsteriskEqualsToken */: return 40 /* AsteriskAsteriskToken */; + case 63 /* SlashEqualsToken */: return 41 /* SlashToken */; + case 64 /* PercentEqualsToken */: return 42 /* PercentToken */; + case 65 /* LessThanLessThanEqualsToken */: return 45 /* LessThanLessThanToken */; + case 66 /* GreaterThanGreaterThanEqualsToken */: return 46 /* GreaterThanGreaterThanToken */; + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 47 /* GreaterThanGreaterThanGreaterThanToken */; + case 68 /* AmpersandEqualsToken */: return 48 /* AmpersandToken */; + case 69 /* BarEqualsToken */: return 49 /* BarToken */; + case 70 /* CaretEqualsToken */: return 50 /* CaretToken */; } } /** @@ -56461,7 +56551,7 @@ var ts; if (containsYield(right)) { var target = void 0; switch (left.kind) { - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: // [source] // a.b = yield; // @@ -56473,7 +56563,7 @@ var ts; // _a.b = %sent%; target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name); break; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: // [source] // a[b] = yield; // @@ -56505,7 +56595,7 @@ var ts; if (ts.isLogicalOperator(node.operatorToken.kind)) { return visitLogicalBinaryExpression(node); } - else if (node.operatorToken.kind === 25 /* CommaToken */) { + else if (node.operatorToken.kind === 26 /* CommaToken */) { return visitCommaExpression(node); } // [source] @@ -56560,7 +56650,7 @@ var ts; var resultLabel = defineLabel(); var resultLocal = declareLocal(); emitAssignment(resultLocal, ts.visitNode(node.left, visitor, ts.isExpression), /*location*/ node.left); - if (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */) { + if (node.operatorToken.kind === 53 /* AmpersandAmpersandToken */) { // Logical `&&` shortcuts when the left-hand operand is falsey. emitBreakWhenFalse(resultLabel, resultLocal, /*location*/ node.left); } @@ -56591,7 +56681,7 @@ var ts; visit(node.right); return ts.inlineExpressions(pendingExpressions); function visit(node) { - if (ts.isBinaryExpression(node) && node.operatorToken.kind === 25 /* CommaToken */) { + if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26 /* CommaToken */) { visit(node.left); visit(node.right); } @@ -56849,35 +56939,35 @@ var ts; } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 206 /* Block */: + case 207 /* Block */: return transformAndEmitBlock(node); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return transformAndEmitIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return transformAndEmitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return transformAndEmitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return transformAndEmitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(ts.visitNode(node, visitor, ts.isStatement)); @@ -57297,7 +57387,7 @@ var ts; for (var i = 0; i < numClauses; i++) { var clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 257 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 258 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -57310,7 +57400,7 @@ var ts; var defaultClausesSkipped = 0; for (var i = clausesWritten; i < numClauses; i++) { var clause = caseBlock.clauses[i]; - if (clause.kind === 256 /* CaseClause */) { + if (clause.kind === 257 /* CaseClause */) { var caseClause = clause; if (containsYield(caseClause.expression) && pendingClauses.length > 0) { break; @@ -57625,7 +57715,7 @@ var ts; if (!renamedCatchVariables) { renamedCatchVariables = ts.createMap(); renamedCatchVariableDeclarations = []; - context.enableSubstitution(70 /* Identifier */); + context.enableSubstitution(71 /* Identifier */); } renamedCatchVariables.set(text, true); renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name; @@ -58543,12 +58633,12 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols. - context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols. - context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(261 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols. - context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file. + context.enableSubstitution(71 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols. + context.enableSubstitution(194 /* BinaryExpression */); // Substitutes assignments to exported symbols. + context.enableSubstitution(192 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(193 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(262 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols. + context.enableEmitNotification(265 /* SourceFile */); // Restore state when substituting nodes in a file. var moduleInfoMap = []; // The ExternalModuleInfo for each file. var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found. var currentSourceFile; // The current file. @@ -58842,23 +58932,23 @@ var ts; */ function sourceElementVisitor(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return visitExportDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 296 /* MergeDeclarationMarker */: + case 297 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 297 /* EndOfDeclarationMarker */: + case 298 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: // This visitor does not descend into the tree, as export/import statements @@ -59160,7 +59250,7 @@ var ts; // // To balance the declaration, add the exports of the elided variable // statement. - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208 /* VariableStatement */) { var id = ts.getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -59215,10 +59305,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240 /* NamedImports */: + case 241 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -59400,8 +59490,8 @@ var ts; function modifierVisitor(node) { // Elide module-specific modifiers. switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: return undefined; } return node; @@ -59417,7 +59507,7 @@ var ts; * @param emit A callback used to emit the node in the printer. */ function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)]; noSubstitution = []; @@ -59479,12 +59569,12 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return substituteBinaryExpression(node); - case 192 /* PostfixUnaryExpression */: - case 191 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return substituteUnaryExpression(node); } return node; @@ -59505,7 +59595,7 @@ var ts; } if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) { var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node)); - if (exportContainer && exportContainer.kind === 264 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 265 /* SourceFile */) { return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), /*location*/ node); } @@ -59573,15 +59663,15 @@ var ts; // - We do not substitute identifiers that were originally the name of an enum or // namespace due to how they are transformed in TypeScript. // - We only substitute identifiers that are exported at the top level. - if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) + if ((node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 /* PostfixUnaryExpression */ - ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1)), + var expression = node.kind === 193 /* PostfixUnaryExpression */ + ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 43 /* PlusPlusToken */ ? 59 /* PlusEqualsToken */ : 60 /* MinusEqualsToken */), ts.createLiteral(1)), /*location*/ node) : node; for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) { @@ -59634,11 +59724,11 @@ var ts; var previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers for imported symbols. - context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols. - context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. - context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file. + context.enableSubstitution(71 /* Identifier */); // Substitutes expression identifiers for imported symbols. + context.enableSubstitution(194 /* BinaryExpression */); // Substitutes assignments to exported symbols. + context.enableSubstitution(192 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(193 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableEmitNotification(265 /* SourceFile */); // Restore state when substituting nodes in a file. var moduleInfoMap = []; // The ExternalModuleInfo for each file. var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found. var exportFunctionsMap = []; // The export function associated with a source file. @@ -59861,7 +59951,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) { var externalImport = _a[_i]; - if (externalImport.kind === 243 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 244 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -59886,7 +59976,7 @@ var ts; } for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) { var externalImport = _e[_d]; - if (externalImport.kind !== 243 /* ExportDeclaration */) { + if (externalImport.kind !== 244 /* ExportDeclaration */) { continue; } var exportDecl = externalImport; @@ -59965,19 +60055,19 @@ var ts; var entry = _b[_a]; var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile); switch (entry.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: if (!entry.importClause) { // 'import "..."' case // module is imported only for side-effects, no emit required break; } // falls through - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: ts.Debug.assert(importVariableName !== undefined); // save import into the local statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName))); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: ts.Debug.assert(importVariableName !== undefined); if (entry.exportClause) { // export {a, b as c} from 'foo' @@ -60027,15 +60117,15 @@ var ts; */ function sourceElementVisitor(node) { switch (node.kind) { - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return visitImportDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // ExportDeclarations are elided as they are handled via // `appendExportsOfDeclaration`. return undefined; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); default: return nestedElementVisitor(node); @@ -60211,7 +60301,7 @@ var ts; function shouldHoistVariableDeclarationList(node) { // hoist only non-block scoped declarations or block scoped declarations parented by source file return (ts.getEmitFlags(node) & 1048576 /* NoHoisting */) === 0 - && (enclosingBlockScopedContainer.kind === 264 /* SourceFile */ + && (enclosingBlockScopedContainer.kind === 265 /* SourceFile */ || (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } /** @@ -60275,7 +60365,7 @@ var ts; // // To balance the declaration, we defer the exports of the elided variable // statement until we visit this declaration's `EndOfDeclarationMarker`. - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 208 /* VariableStatement */) { var id = ts.getOriginalNodeId(node); var isExportedDeclaration = ts.hasModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -60331,10 +60421,10 @@ var ts; var namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 240 /* NamedImports */: + case 241 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; statements = appendExportsOfDeclaration(statements, importBinding); @@ -60513,43 +60603,43 @@ var ts; */ function nestedElementVisitor(node) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return visitVariableStatement(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return visitClassDeclaration(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return visitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return visitForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return visitForOfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return visitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return visitWhileStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return visitLabeledStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return visitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return visitSwitchStatement(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return visitCaseBlock(node); - case 256 /* CaseClause */: + case 257 /* CaseClause */: return visitCaseClause(node); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return visitDefaultClause(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return visitTryStatement(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return visitCatchClause(node); - case 206 /* Block */: + case 207 /* Block */: return visitBlock(node); - case 296 /* MergeDeclarationMarker */: + case 297 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 297 /* EndOfDeclarationMarker */: + case 298 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringVisitor(node); @@ -60732,7 +60822,7 @@ var ts; */ function destructuringVisitor(node) { if (node.transformFlags & 1024 /* DestructuringAssignment */ - && node.kind === 193 /* BinaryExpression */) { + && node.kind === 194 /* BinaryExpression */) { return visitDestructuringAssignment(node); } else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) { @@ -60780,7 +60870,7 @@ var ts; } else if (ts.isIdentifier(node)) { var container = resolver.getReferencedExportContainer(node); - return container !== undefined && container.kind === 264 /* SourceFile */; + return container !== undefined && container.kind === 265 /* SourceFile */; } else { return false; @@ -60796,8 +60886,8 @@ var ts; */ function modifierVisitor(node) { switch (node.kind) { - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: return undefined; } return node; @@ -60813,7 +60903,7 @@ var ts; * @param emitCallback A callback used to emit the node in the printer. */ function onEmitNode(hint, node, emitCallback) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { var id = ts.getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -60858,12 +60948,12 @@ var ts; */ function substituteExpression(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return substituteExpressionIdentifier(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return substituteBinaryExpression(node); - case 191 /* PrefixUnaryExpression */: - case 192 /* PostfixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return substituteUnaryExpression(node); } return node; @@ -60949,22 +61039,22 @@ var ts; // - We do not substitute identifiers that were originally the name of an enum or // namespace due to how they are transformed in TypeScript. // - We only substitute identifiers that are exported at the top level. - if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */) + if ((node.operator === 43 /* PlusPlusToken */ || node.operator === 44 /* MinusMinusToken */) && ts.isIdentifier(node.operand) && !ts.isGeneratedIdentifier(node.operand) && !ts.isLocalName(node.operand) && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) { var exportedNames = getExports(node.operand); if (exportedNames) { - var expression = node.kind === 192 /* PostfixUnaryExpression */ + var expression = node.kind === 193 /* PostfixUnaryExpression */ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node) : node; for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) { var exportName = exportedNames_4[_i]; expression = createExportExpression(exportName, preventSubstitution(expression)); } - if (node.kind === 192 /* PostfixUnaryExpression */) { - expression = node.operator === 42 /* PlusPlusToken */ + if (node.kind === 193 /* PostfixUnaryExpression */) { + expression = node.operator === 43 /* PlusPlusToken */ ? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1)) : ts.createAdd(preventSubstitution(expression), ts.createLiteral(1)); } @@ -60985,7 +61075,7 @@ var ts; || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { var exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false); - if (exportContainer && exportContainer.kind === 264 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 265 /* SourceFile */) { exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration)); } exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]); @@ -61026,8 +61116,8 @@ var ts; var previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(264 /* SourceFile */); - context.enableSubstitution(70 /* Identifier */); + context.enableEmitNotification(265 /* SourceFile */); + context.enableSubstitution(71 /* Identifier */); var currentSourceFile; return transformSourceFile; function transformSourceFile(node) { @@ -61053,10 +61143,10 @@ var ts; } function visitor(node) { switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // Elide `import=` as it is not legal with --module ES6 return undefined; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return visitExportAssignment(node); } return node; @@ -61194,7 +61284,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(298 /* Count */); + var enabledSyntaxKindFeatures = new Array(299 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -61528,7 +61618,7 @@ var ts; } if (compilerOptions.mapRoot) { sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (sourceFileOrBundle.kind === 264 /* SourceFile */) { + if (sourceFileOrBundle.kind === 265 /* SourceFile */) { // For modules or multiple emit files the mapRoot will have directory structure like the sources // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir)); @@ -61666,7 +61756,7 @@ var ts; var emitNode = node.emitNode; var emitFlags = emitNode && emitNode.flags; var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end; - if (node.kind !== 294 /* NotEmittedStatement */ + if (node.kind !== 295 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitPos(ts.skipTrivia(currentSourceText, pos)); @@ -61679,7 +61769,7 @@ var ts; else { emitCallback(hint, node); } - if (node.kind !== 294 /* NotEmittedStatement */ + if (node.kind !== 295 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitPos(end); @@ -61854,7 +61944,7 @@ var ts; if (extendedDiagnostics) { ts.performance.mark("preEmitNodeWithComment"); } - var isEmittedNode = node.kind !== 294 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 295 /* NotEmittedStatement */; var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0; var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0; // Emit leading comments if the position is not synthesized and the node @@ -61873,7 +61963,7 @@ var ts; containerEnd = end; // To avoid invalid comment emit in a down-level binding pattern, we // keep track of the last declaration list container's end - if (node.kind === 226 /* VariableDeclarationList */) { + if (node.kind === 227 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -62187,8 +62277,8 @@ var ts; } ts.getDeclarationDiagnostics = getDeclarationDiagnostics; function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) { - var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; - var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */; + var sourceFiles = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var isBundledEmit = sourceFileOrBundle.kind === 266 /* Bundle */; var newLine = host.getNewLine(); var compilerOptions = host.getCompilerOptions(); var write; @@ -62262,7 +62352,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 237 /* ImportDeclaration */); + ts.Debug.assert(aliasEmitInfo.node.kind === 238 /* ImportDeclaration */); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -62338,10 +62428,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 225 /* VariableDeclaration */) { + if (declaration.kind === 226 /* VariableDeclaration */) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 240 /* NamedImports */ || declaration.kind === 241 /* ImportSpecifier */ || declaration.kind === 238 /* ImportClause */) { + else if (declaration.kind === 241 /* NamedImports */ || declaration.kind === 242 /* ImportSpecifier */ || declaration.kind === 239 /* ImportClause */) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -62359,7 +62449,7 @@ var ts; // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 237 /* ImportDeclaration */) { + if (moduleElementEmitInfo.node.kind === 238 /* ImportDeclaration */) { // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; @@ -62369,12 +62459,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 232 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 233 /* ModuleDeclaration */) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 232 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 233 /* ModuleDeclaration */) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -62440,7 +62530,7 @@ var ts; write(": "); // use the checker's type, not the declared type, // for non-optional initialized parameters that aren't a parameter property - var shouldUseResolverType = declaration.kind === 145 /* Parameter */ && + var shouldUseResolverType = declaration.kind === 146 /* Parameter */ && resolver.isRequiredInitializedParameter(declaration); if (type && !shouldUseResolverType) { // Write the type @@ -62503,60 +62593,60 @@ var ts; } function emitType(type) { switch (type.kind) { - case 118 /* AnyKeyword */: - case 135 /* StringKeyword */: - case 132 /* NumberKeyword */: - case 121 /* BooleanKeyword */: - case 133 /* ObjectKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: - case 138 /* UndefinedKeyword */: - case 94 /* NullKeyword */: - case 129 /* NeverKeyword */: - case 168 /* ThisType */: - case 172 /* LiteralType */: + case 119 /* AnyKeyword */: + case 136 /* StringKeyword */: + case 133 /* NumberKeyword */: + case 122 /* BooleanKeyword */: + case 134 /* ObjectKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: + case 139 /* UndefinedKeyword */: + case 95 /* NullKeyword */: + case 130 /* NeverKeyword */: + case 169 /* ThisType */: + case 173 /* LiteralType */: return writeTextOfNode(currentText, type); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return emitTypeReference(type); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return emitTypeQuery(type); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return emitArrayType(type); - case 164 /* TupleType */: + case 165 /* TupleType */: return emitTupleType(type); - case 165 /* UnionType */: + case 166 /* UnionType */: return emitUnionType(type); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return emitIntersectionType(type); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return emitParenType(type); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return emitTypeOperator(type); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return emitIndexedAccessType(type); - case 171 /* MappedType */: + case 172 /* MappedType */: return emitMappedType(type); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return emitSignatureDeclarationWithJsDocComments(type); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return emitTypeLiteral(type); - case 70 /* Identifier */: + case 71 /* Identifier */: return emitEntityName(type); - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return emitEntityName(type); - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return emitTypePredicate(type); } function writeEntityName(entityName) { - if (entityName.kind === 70 /* Identifier */) { + if (entityName.kind === 71 /* Identifier */) { writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 142 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 142 /* QualifiedName */ ? entityName.right : entityName.name; + var left = entityName.kind === 143 /* QualifiedName */ ? entityName.left : entityName.expression; + var right = entityName.kind === 143 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); @@ -62565,14 +62655,14 @@ var ts; function emitEntityName(entityName) { var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 236 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); + entityName.parent.kind === 237 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isEntityNameExpression(node.expression)) { - ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 178 /* PropertyAccessExpression */); + ts.Debug.assert(node.expression.kind === 71 /* Identifier */ || node.expression.kind === 179 /* PropertyAccessExpression */); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -62694,7 +62784,7 @@ var ts; } } function emitExportAssignment(node) { - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { write(node.isExportEquals ? "export = " : "export default "); writeTextOfNode(currentText, node.expression); } @@ -62717,7 +62807,7 @@ var ts; write(";"); writeLine(); // Make all the declarations visible for the export name - if (node.expression.kind === 70 /* Identifier */) { + if (node.expression.kind === 71 /* Identifier */) { var nodes = resolver.collectLinkedAliases(node.expression); // write each of these declarations asynchronously writeAsynchronousModuleElements(nodes); @@ -62736,10 +62826,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 236 /* ImportEqualsDeclaration */ || - (node.parent.kind === 264 /* SourceFile */ && isCurrentFileExternalModule)) { + else if (node.kind === 237 /* ImportEqualsDeclaration */ || + (node.parent.kind === 265 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264 /* SourceFile */) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 265 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot asynchronousSubModuleDeclarationEmitInfo.push({ node: node, @@ -62749,7 +62839,7 @@ var ts; }); } else { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -62767,23 +62857,23 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return writeFunctionDeclaration(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return writeVariableStatement(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return writeInterfaceDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return writeClassDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return writeTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return writeEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return writeModuleDeclaration(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return writeImportEqualsDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); @@ -62791,7 +62881,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent.kind === 264 /* SourceFile */) { + if (node.parent.kind === 265 /* SourceFile */) { var modifiers = ts.getModifierFlags(node); // If the node is exported if (modifiers & 1 /* Export */) { @@ -62800,7 +62890,7 @@ var ts; if (modifiers & 512 /* Default */) { write("default "); } - else if (node.kind !== 229 /* InterfaceDeclaration */ && !noDeclare) { + else if (node.kind !== 230 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -62852,7 +62942,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings.kind === 240 /* NamespaceImport */) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -62876,7 +62966,7 @@ var ts; // If the default binding was emitted, write the separated write(", "); } - if (node.importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 240 /* NamespaceImport */) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -62897,13 +62987,13 @@ var ts; // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered // external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' // so compiler will treat them as external modules. - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232 /* ModuleDeclaration */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 233 /* ModuleDeclaration */; var moduleSpecifier; - if (parent.kind === 236 /* ImportEqualsDeclaration */) { + if (parent.kind === 237 /* ImportEqualsDeclaration */) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 232 /* ModuleDeclaration */) { + else if (parent.kind === 233 /* ModuleDeclaration */) { moduleSpecifier = parent.name; } else { @@ -62973,7 +63063,7 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body && node.body.kind !== 233 /* ModuleBlock */) { + while (node.body && node.body.kind !== 234 /* ModuleBlock */) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -63043,7 +63133,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 150 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */); + return node.parent.kind === 151 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -63054,15 +63144,15 @@ var ts; // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ || - node.parent.kind === 149 /* MethodSignature */ || - node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.kind === 154 /* CallSignature */ || - node.parent.kind === 155 /* ConstructSignature */); + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 163 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 151 /* MethodDeclaration */ || + node.parent.kind === 150 /* MethodSignature */ || + node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.kind === 155 /* CallSignature */ || + node.parent.kind === 156 /* ConstructSignature */); emitType(node.constraint); } else { @@ -63071,15 +63161,15 @@ var ts; } if (node.default && !isPrivateMethodTypeParameter(node)) { write(" = "); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ || - node.parent.kind === 149 /* MethodSignature */ || - node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.kind === 154 /* CallSignature */ || - node.parent.kind === 155 /* ConstructSignature */); + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 163 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 151 /* MethodDeclaration */ || + node.parent.kind === 150 /* MethodSignature */ || + node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.kind === 155 /* CallSignature */ || + node.parent.kind === 156 /* ConstructSignature */); emitType(node.default); } else { @@ -63090,34 +63180,34 @@ var ts; // Type parameter constraints are named by user so we should always be able to name it var diagnosticMessage; switch (node.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node.parent, 32 /* Static */)) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 229 /* ClassDeclaration */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -63145,7 +63235,7 @@ var ts; if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } - else if (!isImplementsList && node.expression.kind === 94 /* NullKeyword */) { + else if (!isImplementsList && node.expression.kind === 95 /* NullKeyword */) { write("null"); } else { @@ -63157,7 +63247,7 @@ var ts; function getHeritageClauseVisibilityError() { var diagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + if (node.parent.parent.kind === 229 /* ClassDeclaration */) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : @@ -63245,7 +63335,7 @@ var ts; function emitVariableDeclaration(node) { // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible - if (node.kind !== 225 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 226 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } @@ -63256,11 +63346,11 @@ var ts; writeTextOfNode(currentText, node.name); // If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor // we don't want to emit property declaration with "?" - if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */ || - (node.kind === 145 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { + if ((node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */ || + (node.kind === 146 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) && node.parent.kind === 162 /* TypeLiteral */) { + if ((node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) && node.parent.kind === 163 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (resolver.isLiteralConstDeclaration(node)) { @@ -63273,14 +63363,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 225 /* VariableDeclaration */) { + if (node.kind === 226 /* VariableDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) { + else if (node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) { // TODO(jfreeman): Deal with computed properties in error reporting. if (ts.hasModifier(node, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? @@ -63289,7 +63379,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63321,7 +63411,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 199 /* OmittedExpression */) { + if (element.kind !== 200 /* OmittedExpression */) { elements.push(element); } } @@ -63391,7 +63481,7 @@ var ts; var type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 152 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 153 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -63404,7 +63494,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 152 /* GetAccessor */ + return accessor.kind === 153 /* GetAccessor */ ? accessor.type // Getter - return type : accessor.parameters.length > 0 ? accessor.parameters[0].type // Setter parameter type @@ -63413,7 +63503,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 153 /* SetAccessor */) { + if (accessorWithTypeAnnotation.kind === 154 /* SetAccessor */) { // Setters have to have type named and cannot infer it so, the type should always be named if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32 /* Static */)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? @@ -63463,17 +63553,17 @@ var ts; // so no need to verify if the declaration is visible if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 227 /* FunctionDeclaration */) { + if (node.kind === 228 /* FunctionDeclaration */) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 150 /* MethodDeclaration */ || node.kind === 151 /* Constructor */) { + else if (node.kind === 151 /* MethodDeclaration */ || node.kind === 152 /* Constructor */) { emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); } - if (node.kind === 227 /* FunctionDeclaration */) { + if (node.kind === 228 /* FunctionDeclaration */) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 151 /* Constructor */) { + else if (node.kind === 152 /* Constructor */) { write("constructor"); } else { @@ -63493,17 +63583,17 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; var closeParenthesizedFunctionType = false; - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { // Index signature can have readonly modifier emitClassMemberDeclarationFlags(ts.getModifierFlags(node)); write("["); } else { // Construct signature or constructor type write new Signature - if (node.kind === 155 /* ConstructSignature */ || node.kind === 160 /* ConstructorType */) { + if (node.kind === 156 /* ConstructSignature */ || node.kind === 161 /* ConstructorType */) { write("new "); } - else if (node.kind === 159 /* FunctionType */) { + else if (node.kind === 160 /* FunctionType */) { var currentOutput = writer.getText(); // Do not generate incorrect type when function type with type parameters is type argument // This could happen if user used space between two '<' making it error free @@ -63518,22 +63608,22 @@ var ts; } // Parameters emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 156 /* IndexSignature */) { + if (node.kind === 157 /* IndexSignature */) { write("]"); } else { write(")"); } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 159 /* FunctionType */ || node.kind === 160 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 162 /* TypeLiteral */) { + var isFunctionTypeOrConstructorType = node.kind === 160 /* FunctionType */ || node.kind === 161 /* ConstructorType */; + if (isFunctionTypeOrConstructorType || node.parent.kind === 163 /* TypeLiteral */) { // Emit type literal signature return type only if specified if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 151 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) { + else if (node.kind !== 152 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -63547,26 +63637,26 @@ var ts; function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 154 /* CallSignature */: + case 155 /* CallSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node, 32 /* Static */)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -63574,7 +63664,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.kind === 229 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -63588,7 +63678,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -63623,9 +63713,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 159 /* FunctionType */ || - node.parent.kind === 160 /* ConstructorType */ || - node.parent.parent.kind === 162 /* TypeLiteral */) { + if (node.parent.kind === 160 /* FunctionType */ || + node.parent.kind === 161 /* ConstructorType */ || + node.parent.parent.kind === 163 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!ts.hasModifier(node.parent, 8 /* Private */)) { @@ -63641,29 +63731,29 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 154 /* CallSignature */: + case 155 /* CallSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.hasModifier(node.parent, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -63671,7 +63761,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 228 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 229 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63684,7 +63774,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -63696,12 +63786,12 @@ var ts; } function emitBindingPattern(bindingPattern) { // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 173 /* ObjectBindingPattern */) { + if (bindingPattern.kind === 174 /* ObjectBindingPattern */) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) { + else if (bindingPattern.kind === 175 /* ArrayBindingPattern */) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -63712,7 +63802,7 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 199 /* OmittedExpression */) { + if (bindingElement.kind === 200 /* OmittedExpression */) { // If bindingElement is an omittedExpression (i.e. containing elision), // we will emit blank space (although this may differ from users' original code, // it allows emitSeparatedList to write separator appropriately) @@ -63721,7 +63811,7 @@ var ts; // emit : function foo([ , x, , ]) {} write(" "); } - else if (bindingElement.kind === 175 /* BindingElement */) { + else if (bindingElement.kind === 176 /* BindingElement */) { if (bindingElement.propertyName) { // bindingElement has propertyName property in the following case: // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" @@ -63744,7 +63834,7 @@ var ts; emitBindingPattern(bindingElement.name); } else { - ts.Debug.assert(bindingElement.name.kind === 70 /* Identifier */); + ts.Debug.assert(bindingElement.name.kind === 71 /* Identifier */); // If the node is just an identifier, we will simply emit the text associated with the node's name // Example: // original: function foo({y = 10, x}) {} @@ -63760,40 +63850,40 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 232 /* ModuleDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 229 /* InterfaceDeclaration */: - case 228 /* ClassDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: + case 228 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 230 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: return emitModuleElement(node, isModuleElementVisible(node)); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return emitModuleElement(node, isVariableStatementVisible(node)); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // Import declaration without import clause is visible, otherwise it is not visible return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return emitExportDeclaration(node); - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return writeFunctionDeclaration(node); - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 156 /* IndexSignature */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 157 /* IndexSignature */: return emitSignatureDeclarationWithJsDocComments(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return emitAccessorDeclaration(node); - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return emitPropertyDeclaration(node); - case 263 /* EnumMember */: + case 264 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return emitExportAssignment(node); - case 264 /* SourceFile */: + case 265 /* SourceFile */: return emitSourceFile(node); } } @@ -63821,7 +63911,7 @@ var ts; return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFileOrBundle) { // Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path - var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */; + var isBundledEmit = sourceFileOrBundle.kind === 266 /* Bundle */; if (isBundledEmit && !addBundledFileReference) { return; } @@ -63836,7 +63926,7 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; + var sourceFiles = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle]; var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); @@ -63940,8 +64030,8 @@ var ts; } } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) { - var bundle = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle : undefined; - var sourceFile = sourceFileOrBundle.kind === 264 /* SourceFile */ ? sourceFileOrBundle : undefined; + var bundle = sourceFileOrBundle.kind === 266 /* Bundle */ ? sourceFileOrBundle : undefined; + var sourceFile = sourceFileOrBundle.kind === 265 /* SourceFile */ ? sourceFileOrBundle : undefined; var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle); if (bundle) { @@ -63981,7 +64071,7 @@ var ts; } function emitHelpers(node, writeLines) { var helpersEmitted = false; - var bundle = node.kind === 265 /* Bundle */ ? node : undefined; + var bundle = node.kind === 266 /* Bundle */ ? node : undefined; if (bundle && moduleKind === ts.ModuleKind.None) { return; } @@ -64062,8 +64152,8 @@ var ts; break; } switch (node.kind) { - case 264 /* SourceFile */: return printFile(node); - case 265 /* Bundle */: return printBundle(node); + case 265 /* SourceFile */: return printFile(node); + case 266 /* Bundle */: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); return endPrint(); @@ -64198,211 +64288,211 @@ var ts; } switch (kind) { // Pseudo-literals - case 13 /* TemplateHead */: - case 14 /* TemplateMiddle */: - case 15 /* TemplateTail */: + case 14 /* TemplateHead */: + case 15 /* TemplateMiddle */: + case 16 /* TemplateTail */: return emitLiteral(node); // Identifiers - case 70 /* Identifier */: + case 71 /* Identifier */: return emitIdentifier(node); // Parse tree nodes // Names - case 142 /* QualifiedName */: + case 143 /* QualifiedName */: return emitQualifiedName(node); - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return emitComputedPropertyName(node); // Signature elements - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: return emitTypeParameter(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return emitParameter(node); - case 146 /* Decorator */: + case 147 /* Decorator */: return emitDecorator(node); // Type members - case 147 /* PropertySignature */: + case 148 /* PropertySignature */: return emitPropertySignature(node); - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 149 /* MethodSignature */: + case 150 /* MethodSignature */: return emitMethodSignature(node); - case 150 /* MethodDeclaration */: + case 151 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return emitConstructor(node); - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return emitAccessorDeclaration(node); - case 154 /* CallSignature */: + case 155 /* CallSignature */: return emitCallSignature(node); - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return emitConstructSignature(node); - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return emitIndexSignature(node); // Types - case 157 /* TypePredicate */: + case 158 /* TypePredicate */: return emitTypePredicate(node); - case 158 /* TypeReference */: + case 159 /* TypeReference */: return emitTypeReference(node); - case 159 /* FunctionType */: + case 160 /* FunctionType */: return emitFunctionType(node); - case 160 /* ConstructorType */: + case 161 /* ConstructorType */: return emitConstructorType(node); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return emitTypeQuery(node); - case 162 /* TypeLiteral */: + case 163 /* TypeLiteral */: return emitTypeLiteral(node); - case 163 /* ArrayType */: + case 164 /* ArrayType */: return emitArrayType(node); - case 164 /* TupleType */: + case 165 /* TupleType */: return emitTupleType(node); - case 165 /* UnionType */: + case 166 /* UnionType */: return emitUnionType(node); - case 166 /* IntersectionType */: + case 167 /* IntersectionType */: return emitIntersectionType(node); - case 167 /* ParenthesizedType */: + case 168 /* ParenthesizedType */: return emitParenthesizedType(node); - case 200 /* ExpressionWithTypeArguments */: + case 201 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 168 /* ThisType */: + case 169 /* ThisType */: return emitThisType(); - case 169 /* TypeOperator */: + case 170 /* TypeOperator */: return emitTypeOperator(node); - case 170 /* IndexedAccessType */: + case 171 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 171 /* MappedType */: + case 172 /* MappedType */: return emitMappedType(node); - case 172 /* LiteralType */: + case 173 /* LiteralType */: return emitLiteralType(node); // Binding patterns - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return emitBindingElement(node); // Misc - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return emitTemplateSpan(node); - case 205 /* SemicolonClassElement */: + case 206 /* SemicolonClassElement */: return emitSemicolonClassElement(); // Statements - case 206 /* Block */: + case 207 /* Block */: return emitBlock(node); - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: return emitVariableStatement(node); - case 208 /* EmptyStatement */: + case 209 /* EmptyStatement */: return emitEmptyStatement(); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return emitExpressionStatement(node); - case 210 /* IfStatement */: + case 211 /* IfStatement */: return emitIfStatement(node); - case 211 /* DoStatement */: + case 212 /* DoStatement */: return emitDoStatement(node); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: return emitWhileStatement(node); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return emitForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: return emitForInStatement(node); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: return emitForOfStatement(node); - case 216 /* ContinueStatement */: + case 217 /* ContinueStatement */: return emitContinueStatement(node); - case 217 /* BreakStatement */: + case 218 /* BreakStatement */: return emitBreakStatement(node); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: return emitReturnStatement(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: return emitWithStatement(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return emitSwitchStatement(node); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: return emitLabeledStatement(node); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: return emitThrowStatement(node); - case 223 /* TryStatement */: + case 224 /* TryStatement */: return emitTryStatement(node); - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: return emitDebuggerStatement(node); // Declarations - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 227 /* FunctionDeclaration */: + case 228 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return emitClassDeclaration(node); - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return emitModuleBlock(node); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return emitCaseBlock(node); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: return emitImportDeclaration(node); - case 238 /* ImportClause */: + case 239 /* ImportClause */: return emitImportClause(node); - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: return emitNamespaceImport(node); - case 240 /* NamedImports */: + case 241 /* NamedImports */: return emitNamedImports(node); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: return emitImportSpecifier(node); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: return emitExportAssignment(node); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: return emitExportDeclaration(node); - case 244 /* NamedExports */: + case 245 /* NamedExports */: return emitNamedExports(node); - case 245 /* ExportSpecifier */: + case 246 /* ExportSpecifier */: return emitExportSpecifier(node); - case 246 /* MissingDeclaration */: + case 247 /* MissingDeclaration */: return; // Module references - case 247 /* ExternalModuleReference */: + case 248 /* ExternalModuleReference */: return emitExternalModuleReference(node); // JSX (non-expression) case 10 /* JsxText */: return emitJsxText(node); - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: return emitJsxOpeningElement(node); - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: return emitJsxClosingElement(node); - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: return emitJsxAttribute(node); - case 253 /* JsxAttributes */: + case 254 /* JsxAttributes */: return emitJsxAttributes(node); - case 254 /* JsxSpreadAttribute */: + case 255 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 255 /* JsxExpression */: + case 256 /* JsxExpression */: return emitJsxExpression(node); // Clauses - case 256 /* CaseClause */: + case 257 /* CaseClause */: return emitCaseClause(node); - case 257 /* DefaultClause */: + case 258 /* DefaultClause */: return emitDefaultClause(node); - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: return emitHeritageClause(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return emitCatchClause(node); // Property assignments - case 260 /* PropertyAssignment */: + case 261 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 261 /* ShorthandPropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 262 /* SpreadAssignment */: + case 263 /* SpreadAssignment */: return emitSpreadAssignment(node); // Enum - case 263 /* EnumMember */: + case 264 /* EnumMember */: return emitEnumMember(node); } // If the node is an expression, try to emit it as an expression with @@ -64422,82 +64512,82 @@ var ts; case 8 /* NumericLiteral */: return emitNumericLiteral(node); case 9 /* StringLiteral */: - case 11 /* RegularExpressionLiteral */: - case 12 /* NoSubstitutionTemplateLiteral */: + case 12 /* RegularExpressionLiteral */: + case 13 /* NoSubstitutionTemplateLiteral */: return emitLiteral(node); // Identifiers - case 70 /* Identifier */: + case 71 /* Identifier */: return emitIdentifier(node); // Reserved words - case 85 /* FalseKeyword */: - case 94 /* NullKeyword */: - case 96 /* SuperKeyword */: - case 100 /* TrueKeyword */: - case 98 /* ThisKeyword */: + case 86 /* FalseKeyword */: + case 95 /* NullKeyword */: + case 97 /* SuperKeyword */: + case 101 /* TrueKeyword */: + case 99 /* ThisKeyword */: writeTokenText(kind); return; // Expressions - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 178 /* PropertyAccessExpression */: + case 179 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 180 /* CallExpression */: + case 181 /* CallExpression */: return emitCallExpression(node); - case 181 /* NewExpression */: + case 182 /* NewExpression */: return emitNewExpression(node); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 185 /* FunctionExpression */: + case 186 /* FunctionExpression */: return emitFunctionExpression(node); - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: return emitArrowFunction(node); - case 187 /* DeleteExpression */: + case 188 /* DeleteExpression */: return emitDeleteExpression(node); - case 188 /* TypeOfExpression */: + case 189 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 189 /* VoidExpression */: + case 190 /* VoidExpression */: return emitVoidExpression(node); - case 190 /* AwaitExpression */: + case 191 /* AwaitExpression */: return emitAwaitExpression(node); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 192 /* PostfixUnaryExpression */: + case 193 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return emitBinaryExpression(node); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return emitConditionalExpression(node); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: return emitTemplateExpression(node); - case 196 /* YieldExpression */: + case 197 /* YieldExpression */: return emitYieldExpression(node); - case 197 /* SpreadElement */: + case 198 /* SpreadElement */: return emitSpreadExpression(node); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return emitClassExpression(node); - case 199 /* OmittedExpression */: + case 200 /* OmittedExpression */: return; - case 201 /* AsExpression */: + case 202 /* AsExpression */: return emitAsExpression(node); - case 202 /* NonNullExpression */: + case 203 /* NonNullExpression */: return emitNonNullExpression(node); - case 203 /* MetaProperty */: + case 204 /* MetaProperty */: return emitMetaProperty(node); // JSX - case 248 /* JsxElement */: + case 249 /* JsxElement */: return emitJsxElement(node); - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); // Transformation nodes - case 295 /* PartiallyEmittedExpression */: + case 296 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); } } @@ -64547,7 +64637,7 @@ var ts; emit(node.right); } function emitEntityName(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -64623,7 +64713,7 @@ var ts; function emitAccessorDeclaration(node) { emitDecorators(node, node.decorators); emitModifiers(node, node.modifiers); - write(node.kind === 152 /* GetAccessor */ ? "get " : "set "); + write(node.kind === 153 /* GetAccessor */ ? "get " : "set "); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); } @@ -64811,7 +64901,7 @@ var ts; if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) { var dotRangeStart = node.expression.end; var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1; - var dotToken = { kind: 22 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd }; + var dotToken = { kind: 23 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd }; indentBeforeDot = needsIndentation(node, node.expression, dotToken); indentAfterDot = needsIndentation(node, dotToken, node.name); } @@ -64831,7 +64921,7 @@ var ts; // check if numeric literal is a decimal literal that was originally written with a dot var text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0; + && text.indexOf(ts.tokenToString(23 /* DotToken */)) < 0; } else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) { // check if constant enum value is integer @@ -64926,16 +65016,16 @@ var ts; // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. var operand = node.operand; - return operand.kind === 191 /* PrefixUnaryExpression */ - && ((node.operator === 36 /* PlusToken */ && (operand.operator === 36 /* PlusToken */ || operand.operator === 42 /* PlusPlusToken */)) - || (node.operator === 37 /* MinusToken */ && (operand.operator === 37 /* MinusToken */ || operand.operator === 43 /* MinusMinusToken */))); + return operand.kind === 192 /* PrefixUnaryExpression */ + && ((node.operator === 37 /* PlusToken */ && (operand.operator === 37 /* PlusToken */ || operand.operator === 43 /* PlusPlusToken */)) + || (node.operator === 38 /* MinusToken */ && (operand.operator === 38 /* MinusToken */ || operand.operator === 44 /* MinusMinusToken */))); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand); writeTokenText(node.operator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 25 /* CommaToken */; + var isCommaOperator = node.operatorToken.kind !== 26 /* CommaToken */; var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); emitExpression(node.left); @@ -65009,18 +65099,18 @@ var ts; // function emitBlock(node) { if (isSingleLineEmptyBlock(node)) { - writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node); + writeToken(17 /* OpenBraceToken */, node.pos, /*contextNode*/ node); write(" "); - writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); + writeToken(18 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); } else { - writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node); + writeToken(17 /* OpenBraceToken */, node.pos, /*contextNode*/ node); emitBlockStatements(node); // We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted increaseIndent(); emitLeadingCommentsOfPosition(node.statements.end); decreaseIndent(); - writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); + writeToken(18 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node); } } function emitBlockStatements(node) { @@ -65044,16 +65134,16 @@ var ts; write(";"); } function emitIfStatement(node) { - var openParenPos = writeToken(89 /* IfKeyword */, node.pos, node); + var openParenPos = writeToken(90 /* IfKeyword */, node.pos, node); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos, node); + writeToken(19 /* OpenParenToken */, openParenPos, node); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end, node); + writeToken(20 /* CloseParenToken */, node.expression.end, node); emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node); - writeToken(81 /* ElseKeyword */, node.thenStatement.end, node); - if (node.elseStatement.kind === 210 /* IfStatement */) { + writeToken(82 /* ElseKeyword */, node.thenStatement.end, node); + if (node.elseStatement.kind === 211 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -65082,9 +65172,9 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos, /*contextNode*/ node); + writeToken(19 /* OpenParenToken */, openParenPos, /*contextNode*/ node); emitForBinding(node.initializer); write(";"); emitExpressionWithPrefix(" ", node.condition); @@ -65094,29 +65184,29 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitForBinding(node.initializer); write(" in "); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - var openParenPos = writeToken(87 /* ForKeyword */, node.pos); + var openParenPos = writeToken(88 /* ForKeyword */, node.pos); write(" "); emitWithSuffix(node.awaitModifier, " "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitForBinding(node.initializer); write(" of "); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); emitEmbeddedStatement(node, node.statement); } function emitForBinding(node) { if (node !== undefined) { - if (node.kind === 226 /* VariableDeclarationList */) { + if (node.kind === 227 /* VariableDeclarationList */) { emit(node); } else { @@ -65125,17 +65215,17 @@ var ts; } } function emitContinueStatement(node) { - writeToken(76 /* ContinueKeyword */, node.pos); + writeToken(77 /* ContinueKeyword */, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitBreakStatement(node) { - writeToken(71 /* BreakKeyword */, node.pos); + writeToken(72 /* BreakKeyword */, node.pos); emitWithPrefix(" ", node.label); write(";"); } function emitReturnStatement(node) { - writeToken(95 /* ReturnKeyword */, node.pos, /*contextNode*/ node); + writeToken(96 /* ReturnKeyword */, node.pos, /*contextNode*/ node); emitExpressionWithPrefix(" ", node.expression); write(";"); } @@ -65146,11 +65236,11 @@ var ts; emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - var openParenPos = writeToken(97 /* SwitchKeyword */, node.pos); + var openParenPos = writeToken(98 /* SwitchKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emitExpression(node.expression); - writeToken(19 /* CloseParenToken */, node.expression.end); + writeToken(20 /* CloseParenToken */, node.expression.end); write(" "); emit(node.caseBlock); } @@ -65178,7 +65268,7 @@ var ts; } } function emitDebuggerStatement(node) { - writeToken(77 /* DebuggerKeyword */, node.pos); + writeToken(78 /* DebuggerKeyword */, node.pos); write(";"); } // @@ -65297,7 +65387,7 @@ var ts; emitBlockFunctionBody(body); } decreaseIndent(); - writeToken(17 /* CloseBraceToken */, body.statements.end, body); + writeToken(18 /* CloseBraceToken */, body.statements.end, body); } function emitBlockFunctionBodyOnSingleLine(body) { emitBlockFunctionBodyWorker(body, /*emitBlockFunctionBodyOnSingleLine*/ true); @@ -65375,7 +65465,7 @@ var ts; write(node.flags & 16 /* Namespace */ ? "namespace " : "module "); emit(node.name); var body = node.body; - while (body.kind === 232 /* ModuleDeclaration */) { + while (body.kind === 233 /* ModuleDeclaration */) { write("."); emit(body.name); body = body.body; @@ -65396,9 +65486,9 @@ var ts; } } function emitCaseBlock(node) { - writeToken(16 /* OpenBraceToken */, node.pos); + writeToken(17 /* OpenBraceToken */, node.pos); emitList(node, node.clauses, 65 /* CaseBlockClauses */); - writeToken(17 /* CloseBraceToken */, node.clauses.end); + writeToken(18 /* CloseBraceToken */, node.clauses.end); } function emitImportEqualsDeclaration(node) { emitModifiers(node, node.modifiers); @@ -65409,7 +65499,7 @@ var ts; write(";"); } function emitModuleReference(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -65547,7 +65637,7 @@ var ts; } } function emitJsxTagName(node) { - if (node.kind === 70 /* Identifier */) { + if (node.kind === 71 /* Identifier */) { emitExpression(node); } else { @@ -65589,11 +65679,11 @@ var ts; emitList(node, node.types, 272 /* HeritageClauseTypes */); } function emitCatchClause(node) { - var openParenPos = writeToken(73 /* CatchKeyword */, node.pos); + var openParenPos = writeToken(74 /* CatchKeyword */, node.pos); write(" "); - writeToken(18 /* OpenParenToken */, openParenPos); + writeToken(19 /* OpenParenToken */, openParenPos); emit(node.variableDeclaration); - writeToken(19 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); + writeToken(20 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : openParenPos); write(" "); emit(node.block); } @@ -65979,7 +66069,7 @@ var ts; for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) { var line = lines_1[_a]; for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { - if (!ts.isWhiteSpace(line.charCodeAt(i))) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { if (indentation === undefined || i < indentation) { indentation = i; break; @@ -66107,7 +66197,7 @@ var ts; && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile); } function skipSynthesizedParentheses(node) { - while (node.kind === 184 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) { + while (node.kind === 185 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -66285,23 +66375,23 @@ var ts; */ function generateNameForNode(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return makeUniqueName(getTextOfNode(node)); - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: return generateNameForModuleOrEnum(node); - case 237 /* ImportDeclaration */: - case 243 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: + case 244 /* ExportDeclaration */: return generateNameForImportOrExportDeclaration(node); - case 227 /* FunctionDeclaration */: - case 228 /* ClassDeclaration */: - case 242 /* ExportAssignment */: + case 228 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 243 /* ExportAssignment */: return generateNameForExportDefault(); - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: return generateNameForClassExpression(); - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return generateNameForMethodOrAccessor(node); default: return makeTempVariableName(0 /* Auto */); @@ -67258,23 +67348,23 @@ var ts; // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { - case 145 /* Parameter */: - case 148 /* PropertyDeclaration */: + case 146 /* Parameter */: + case 149 /* PropertyDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); return; } // falls through - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 225 /* VariableDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 226 /* VariableDeclaration */: // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); @@ -67282,35 +67372,35 @@ var ts; } } switch (node.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return; - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return; } break; - case 258 /* HeritageClause */: + case 259 /* HeritageClause */: var heritageClause = node; - if (heritageClause.token === 107 /* ImplementsKeyword */) { + if (heritageClause.token === 108 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return; } break; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return; - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return; - case 183 /* TypeAssertionExpression */: + case 184 /* TypeAssertionExpression */: var typeAssertionExpression = node; diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return; @@ -67325,50 +67415,50 @@ var ts; diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } switch (parent.kind) { - case 228 /* ClassDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: + case 229 /* ClassDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return; } // falls through - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(nodes, parent.kind === 207 /* VariableStatement */); + return checkModifiers(nodes, parent.kind === 208 /* VariableStatement */); } break; - case 148 /* PropertyDeclaration */: + case 149 /* PropertyDeclaration */: // Check modifiers of property declaration if (nodes === parent.modifiers) { for (var _i = 0, _a = nodes; _i < _a.length; _i++) { var modifier = _a[_i]; - if (modifier.kind !== 114 /* StaticKeyword */) { + if (modifier.kind !== 115 /* StaticKeyword */) { diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); } } return; } break; - case 145 /* Parameter */: + case 146 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return; } break; - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 200 /* ExpressionWithTypeArguments */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 201 /* ExpressionWithTypeArguments */: // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); @@ -67385,24 +67475,24 @@ var ts; for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { var modifier = modifiers_1[_i]; switch (modifier.kind) { - case 75 /* ConstKeyword */: + case 76 /* ConstKeyword */: if (isConstValid) { continue; } // to report error, // falls through - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - case 130 /* ReadonlyKeyword */: - case 123 /* DeclareKeyword */: - case 116 /* AbstractKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + case 131 /* ReadonlyKeyword */: + case 124 /* DeclareKeyword */: + case 117 /* AbstractKeyword */: diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); break; // These are all legal modifiers. - case 114 /* StaticKeyword */: - case 83 /* ExportKeyword */: - case 78 /* DefaultKeyword */: + case 115 /* StaticKeyword */: + case 84 /* ExportKeyword */: + case 79 /* DefaultKeyword */: } } } @@ -67507,9 +67597,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { - case 237 /* ImportDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 243 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 244 /* ExportDeclaration */: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { break; @@ -67524,7 +67614,7 @@ var ts; (imports || (imports = [])).push(moduleNameExpr); } break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) { var moduleName = node.name; // Ambient module declarations can be interpreted as augmentations for some existing external modules. @@ -69870,34 +69960,34 @@ var ts; })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {})); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 145 /* Parameter */: - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: - case 263 /* EnumMember */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 259 /* CatchClause */: - case 252 /* JsxAttribute */: + case 146 /* Parameter */: + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: + case 264 /* EnumMember */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 260 /* CatchClause */: + case 253 /* JsxAttribute */: return 1 /* Value */; - case 144 /* TypeParameter */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 162 /* TypeLiteral */: + case 145 /* TypeParameter */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 163 /* TypeLiteral */: return 2 /* Type */; - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } @@ -69907,25 +69997,25 @@ var ts; else { return 4 /* Namespace */; } - case 240 /* NamedImports */: - case 241 /* ImportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 237 /* ImportDeclaration */: - case 242 /* ExportAssignment */: - case 243 /* ExportDeclaration */: + case 241 /* NamedImports */: + case 242 /* ImportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 238 /* ImportDeclaration */: + case 243 /* ExportAssignment */: + case 244 /* ExportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; // An external module can be a Value - case 264 /* SourceFile */: + case 265 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return 1 /* Value */; } - else if (node.parent.kind === 242 /* ExportAssignment */) { + else if (node.parent.kind === 243 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -69946,19 +70036,19 @@ var ts; } ts.getMeaningFromLocation = getMeaningFromLocation; function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 70 /* Identifier */); + ts.Debug.assert(node.kind === 71 /* Identifier */); // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (node.parent.kind === 142 /* QualifiedName */ && + if (node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node && - node.parent.parent.kind === 236 /* ImportEqualsDeclaration */) { + node.parent.parent.kind === 237 /* ImportEqualsDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function isInRightSideOfImport(node) { - while (node.parent.kind === 142 /* QualifiedName */) { + while (node.parent.kind === 143 /* QualifiedName */) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -69969,27 +70059,27 @@ var ts; function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 142 /* QualifiedName */) { - while (root.parent && root.parent.kind === 142 /* QualifiedName */) { + if (root.parent.kind === 143 /* QualifiedName */) { + while (root.parent && root.parent.kind === 143 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 158 /* TypeReference */ && !isLastClause; + return root.parent.kind === 159 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 178 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 178 /* PropertyAccessExpression */) { + if (root.parent.kind === 179 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 179 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 200 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 258 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 201 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 259 /* HeritageClause */) { var decl = root.parent.parent.parent; - return (decl.kind === 228 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) || - (decl.kind === 229 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */); + return (decl.kind === 229 /* ClassDeclaration */ && root.parent.parent.token === 108 /* ImplementsKeyword */) || + (decl.kind === 230 /* InterfaceDeclaration */ && root.parent.parent.token === 85 /* ExtendsKeyword */); } return false; } @@ -69997,17 +70087,17 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 158 /* TypeReference */ || - (node.parent.kind === 200 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || - (node.kind === 98 /* ThisKeyword */ && !ts.isPartOfExpression(node)) || - node.kind === 168 /* ThisType */; + return node.parent.kind === 159 /* TypeReference */ || + (node.parent.kind === 201 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + (node.kind === 99 /* ThisKeyword */ && !ts.isPartOfExpression(node)) || + node.kind === 169 /* ThisType */; } function isCallExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 180 /* CallExpression */); + return isCallOrNewExpressionTarget(node, 181 /* CallExpression */); } ts.isCallExpressionTarget = isCallExpressionTarget; function isNewExpressionTarget(node) { - return isCallOrNewExpressionTarget(node, 181 /* NewExpression */); + return isCallOrNewExpressionTarget(node, 182 /* NewExpression */); } ts.isNewExpressionTarget = isNewExpressionTarget; function isCallOrNewExpressionTarget(node, kind) { @@ -70020,7 +70110,7 @@ var ts; ts.climbPastPropertyAccess = climbPastPropertyAccess; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 221 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 222 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -70029,14 +70119,14 @@ var ts; } ts.getTargetLabel = getTargetLabel; function isJumpStatementTarget(node) { - return node.kind === 70 /* Identifier */ && - (node.parent.kind === 217 /* BreakStatement */ || node.parent.kind === 216 /* ContinueStatement */) && + return node.kind === 71 /* Identifier */ && + (node.parent.kind === 218 /* BreakStatement */ || node.parent.kind === 217 /* ContinueStatement */) && node.parent.label === node; } ts.isJumpStatementTarget = isJumpStatementTarget; function isLabelOfLabeledStatement(node) { - return node.kind === 70 /* Identifier */ && - node.parent.kind === 221 /* LabeledStatement */ && + return node.kind === 71 /* Identifier */ && + node.parent.kind === 222 /* LabeledStatement */ && node.parent.label === node; } function isLabelName(node) { @@ -70044,38 +70134,38 @@ var ts; } ts.isLabelName = isLabelName; function isRightSideOfQualifiedName(node) { - return node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node; + return node.parent.kind === 143 /* QualifiedName */ && node.parent.right === node; } ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName; function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node; + return node && node.parent && node.parent.kind === 179 /* PropertyAccessExpression */ && node.parent.name === node; } ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess; function isNameOfModuleDeclaration(node) { - return node.parent.kind === 232 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 233 /* ModuleDeclaration */ && node.parent.name === node; } ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration; function isNameOfFunctionDeclaration(node) { - return node.kind === 70 /* Identifier */ && + return node.kind === 71 /* Identifier */ && ts.isFunctionLike(node.parent) && node.parent.name === node; } ts.isNameOfFunctionDeclaration = isNameOfFunctionDeclaration; function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 260 /* PropertyAssignment */: - case 263 /* EnumMember */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 232 /* ModuleDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 261 /* PropertyAssignment */: + case 264 /* EnumMember */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 233 /* ModuleDeclaration */: return node.parent.name === node; - case 179 /* ElementAccessExpression */: + case 180 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 143 /* ComputedPropertyName */: + case 144 /* ComputedPropertyName */: return true; } } @@ -70124,17 +70214,17 @@ var ts; return undefined; } switch (node.kind) { - case 264 /* SourceFile */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return node; } } @@ -70142,46 +70232,46 @@ var ts; ts.getContainerNode = getContainerNode; function getNodeKind(node) { switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: return ts.ScriptElementKind.moduleElement; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: return ts.ScriptElementKind.classElement; - case 229 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement; - case 230 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement; - case 231 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement; - case 225 /* VariableDeclaration */: + case 230 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement; + case 231 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement; + case 232 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement; + case 226 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 175 /* BindingElement */: + case 176 /* BindingElement */: return getKindOfVariableDeclaration(ts.getRootDeclaration(node)); - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return ts.ScriptElementKind.functionElement; - case 152 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement; - case 153 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 153 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement; + case 154 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement; + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return ts.ScriptElementKind.memberFunctionElement; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return ts.ScriptElementKind.memberVariableElement; - case 156 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement; - case 155 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement; - case 154 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement; - case 151 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement; - case 144 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement; - case 263 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement; - case 145 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; - case 236 /* ImportEqualsDeclaration */: - case 241 /* ImportSpecifier */: - case 238 /* ImportClause */: - case 245 /* ExportSpecifier */: - case 239 /* NamespaceImport */: + case 157 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement; + case 156 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement; + case 155 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement; + case 152 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement; + case 145 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement; + case 264 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement; + case 146 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement; + case 237 /* ImportEqualsDeclaration */: + case 242 /* ImportSpecifier */: + case 239 /* ImportClause */: + case 246 /* ExportSpecifier */: + case 240 /* NamespaceImport */: return ts.ScriptElementKind.alias; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return ts.ScriptElementKind.typeElement; default: return ts.ScriptElementKind.unknown; @@ -70197,12 +70287,12 @@ var ts; ts.getNodeKind = getNodeKind; function isThis(node) { switch (node.kind) { - case 98 /* ThisKeyword */: + case 99 /* ThisKeyword */: // case SyntaxKind.ThisType: TODO: GH#9267 return true; - case 70 /* Identifier */: + case 71 /* Identifier */: // 'this' as a parameter - return ts.identifierIsThisKeyword(node) && node.parent.kind === 145 /* Parameter */; + return ts.identifierIsThisKeyword(node) && node.parent.kind === 146 /* Parameter */; default: return false; } @@ -70247,42 +70337,42 @@ var ts; return false; } switch (n.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 173 /* ObjectBindingPattern */: - case 162 /* TypeLiteral */: - case 206 /* Block */: - case 233 /* ModuleBlock */: - case 234 /* CaseBlock */: - case 240 /* NamedImports */: - case 244 /* NamedExports */: - return nodeEndsWith(n, 17 /* CloseBraceToken */, sourceFile); - case 259 /* CatchClause */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 174 /* ObjectBindingPattern */: + case 163 /* TypeLiteral */: + case 207 /* Block */: + case 234 /* ModuleBlock */: + case 235 /* CaseBlock */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: + return nodeEndsWith(n, 18 /* CloseBraceToken */, sourceFile); + case 260 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 181 /* NewExpression */: + case 182 /* NewExpression */: if (!n.arguments) { return true; } // falls through - case 180 /* CallExpression */: - case 184 /* ParenthesizedExpression */: - case 167 /* ParenthesizedType */: - return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile); - case 159 /* FunctionType */: - case 160 /* ConstructorType */: + case 181 /* CallExpression */: + case 185 /* ParenthesizedExpression */: + case 168 /* ParenthesizedType */: + return nodeEndsWith(n, 20 /* CloseParenToken */, sourceFile); + case 160 /* FunctionType */: + case 161 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 155 /* ConstructSignature */: - case 154 /* CallSignature */: - case 186 /* ArrowFunction */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 156 /* ConstructSignature */: + case 155 /* CallSignature */: + case 187 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -70291,68 +70381,68 @@ var ts; } // Even though type parameters can be unclosed, we can get away with // having at least a closing paren. - return hasChildOfKind(n, 19 /* CloseParenToken */, sourceFile); - case 232 /* ModuleDeclaration */: + return hasChildOfKind(n, 20 /* CloseParenToken */, sourceFile); + case 233 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 210 /* IfStatement */: + case 211 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || - hasChildOfKind(n, 24 /* SemicolonToken */); - case 176 /* ArrayLiteralExpression */: - case 174 /* ArrayBindingPattern */: - case 179 /* ElementAccessExpression */: - case 143 /* ComputedPropertyName */: - case 164 /* TupleType */: - return nodeEndsWith(n, 21 /* CloseBracketToken */, sourceFile); - case 156 /* IndexSignature */: + hasChildOfKind(n, 25 /* SemicolonToken */); + case 177 /* ArrayLiteralExpression */: + case 175 /* ArrayBindingPattern */: + case 180 /* ElementAccessExpression */: + case 144 /* ComputedPropertyName */: + case 165 /* TupleType */: + return nodeEndsWith(n, 22 /* CloseBracketToken */, sourceFile); + case 157 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } - return hasChildOfKind(n, 21 /* CloseBracketToken */, sourceFile); - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + return hasChildOfKind(n, 22 /* CloseBracketToken */, sourceFile); + case 257 /* CaseClause */: + case 258 /* DefaultClause */: // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicity always consider them non-completed return false; - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 211 /* DoStatement */: + case 212 /* DoStatement */: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = findChildOfKind(n, 105 /* WhileKeyword */, sourceFile); + var hasWhileKeyword = findChildOfKind(n, 106 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { - return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile); + return nodeEndsWith(n, 20 /* CloseParenToken */, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 161 /* TypeQuery */: + case 162 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 188 /* TypeOfExpression */: - case 187 /* DeleteExpression */: - case 189 /* VoidExpression */: - case 196 /* YieldExpression */: - case 197 /* SpreadElement */: + case 189 /* TypeOfExpression */: + case 188 /* DeleteExpression */: + case 190 /* VoidExpression */: + case 197 /* YieldExpression */: + case 198 /* SpreadElement */: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 182 /* TaggedTemplateExpression */: + case 183 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 195 /* TemplateExpression */: + case 196 /* TemplateExpression */: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 204 /* TemplateSpan */: + case 205 /* TemplateSpan */: return ts.nodeIsPresent(n.literal); - case 243 /* ExportDeclaration */: - case 237 /* ImportDeclaration */: + case 244 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: return ts.nodeIsPresent(n.moduleSpecifier); - case 191 /* PrefixUnaryExpression */: + case 192 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 194 /* ConditionalExpression */: + case 195 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -70370,7 +70460,7 @@ var ts; if (last.kind === expectedLastToken) { return true; } - else if (last.kind === 24 /* SemicolonToken */ && children.length !== 1) { + else if (last.kind === 25 /* SemicolonToken */ && children.length !== 1) { return children[children.length - 2].kind === expectedLastToken; } } @@ -70408,7 +70498,7 @@ var ts; // for the position of the relevant node (or comma). var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { // find syntax list that covers the span of the node - if (c.kind === 293 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 294 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -70580,7 +70670,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 264 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */); // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. @@ -70635,21 +70725,21 @@ var ts; return true; } //
Hello |
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 10 /* JsxText */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 10 /* JsxText */) { return true; } //
{ |
or
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 255 /* JsxExpression */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 256 /* JsxExpression */) { return true; } //
{ // | // } < /div> - if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 255 /* JsxExpression */) { + if (token && token.kind === 18 /* CloseBraceToken */ && token.parent.kind === 256 /* JsxExpression */) { return true; } //
|
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 251 /* JsxClosingElement */) { + if (token.kind === 27 /* LessThanToken */ && token.parent.kind === 252 /* JsxClosingElement */) { return true; } return false; @@ -70706,9 +70796,9 @@ var ts; var node = ts.getTokenAtPosition(sourceFile, position); if (ts.isToken(node)) { switch (node.kind) { - case 103 /* VarKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: + case 104 /* VarKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: // if the current token is var, let or const, skip the VariableDeclarationList node = node.parent === undefined ? undefined : node.parent.parent; break; @@ -70761,17 +70851,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 158 /* TypeReference */ || node.kind === 180 /* CallExpression */) { + if (node.kind === 159 /* TypeReference */ || node.kind === 181 /* CallExpression */) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 228 /* ClassDeclaration */ || node.kind === 229 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(node) || node.kind === 229 /* ClassDeclaration */ || node.kind === 230 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isWord(kind) { - return kind === 70 /* Identifier */ || ts.isKeyword(kind); + return kind === 71 /* Identifier */ || ts.isKeyword(kind); } ts.isWord = isWord; function isPropertyName(kind) { @@ -70783,7 +70873,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 /* StringLiteral */ - || kind === 11 /* RegularExpressionLiteral */ + || kind === 12 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(kind)) { return true; } @@ -70791,7 +70881,7 @@ var ts; } ts.isStringOrRegularExpressionOrTemplateLiteral = isStringOrRegularExpressionOrTemplateLiteral; function isPunctuation(kind) { - return 16 /* FirstPunctuation */ <= kind && kind <= 69 /* LastPunctuation */; + return 17 /* FirstPunctuation */ <= kind && kind <= 70 /* LastPunctuation */; } ts.isPunctuation = isPunctuation; function isInsideTemplateLiteral(node, position) { @@ -70801,9 +70891,9 @@ var ts; ts.isInsideTemplateLiteral = isInsideTemplateLiteral; function isAccessibilityModifier(kind) { switch (kind) { - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: return true; } return false; @@ -70826,18 +70916,18 @@ var ts; } ts.compareDataObjects = compareDataObjects; function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 176 /* ArrayLiteralExpression */ || - node.kind === 177 /* ObjectLiteralExpression */) { + if (node.kind === 177 /* ArrayLiteralExpression */ || + node.kind === 178 /* ObjectLiteralExpression */) { // [a,b,c] from: // [a, b, c] = someExpression; - if (node.parent.kind === 193 /* BinaryExpression */ && + if (node.parent.kind === 194 /* BinaryExpression */ && node.parent.left === node && - node.parent.operatorToken.kind === 57 /* EqualsToken */) { + node.parent.operatorToken.kind === 58 /* EqualsToken */) { return true; } // [a, b, c] from: // for([a, b, c] of expression) - if (node.parent.kind === 215 /* ForOfStatement */ && + if (node.parent.kind === 216 /* ForOfStatement */ && node.parent.initializer === node) { return true; } @@ -70845,7 +70935,7 @@ var ts; // [x, [a, b, c] ] = someExpression // or // {x, a: {a, b, c} } = someExpression - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 261 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -70879,14 +70969,14 @@ var ts; ts.createTextSpanFromNode = createTextSpanFromNode; function isTypeKeyword(kind) { switch (kind) { - case 118 /* AnyKeyword */: - case 121 /* BooleanKeyword */: - case 129 /* NeverKeyword */: - case 132 /* NumberKeyword */: - case 133 /* ObjectKeyword */: - case 135 /* StringKeyword */: - case 136 /* SymbolKeyword */: - case 104 /* VoidKeyword */: + case 119 /* AnyKeyword */: + case 122 /* BooleanKeyword */: + case 130 /* NeverKeyword */: + case 133 /* NumberKeyword */: + case 134 /* ObjectKeyword */: + case 136 /* StringKeyword */: + case 137 /* SymbolKeyword */: + case 105 /* VoidKeyword */: return true; default: return false; @@ -70913,7 +71003,7 @@ var ts; /* @internal */ (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145 /* Parameter */; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 146 /* Parameter */; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -71091,7 +71181,7 @@ var ts; function getDeclaredName(typeChecker, symbol, location) { // If this is an export or import specifier it could have been renamed using the 'as' syntax. // If so we want to search for whatever is under the cursor. - if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143 /* ComputedPropertyName */) { + if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 144 /* ComputedPropertyName */) { return location.text; } // Try to get the local symbol if we're dealing with an 'export default' @@ -71102,7 +71192,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 241 /* ImportSpecifier */ || location.parent.kind === 245 /* ExportSpecifier */) && + (location.parent.kind === 242 /* ImportSpecifier */ || location.parent.kind === 246 /* ExportSpecifier */) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -71169,7 +71259,7 @@ var ts; } ts.sanitizeConfigFile = sanitizeConfigFile; function getFirstNonSpaceCharacterPosition(text, position) { - while (ts.isWhiteSpace(text.charCodeAt(position))) { + while (ts.isWhiteSpaceLike(text.charCodeAt(position))) { position += 1; } return position; @@ -71195,18 +71285,18 @@ var ts; /// we have a series of divide operator. this list allows us to be more accurate by ruling out /// locations where a regexp cannot exist. var noRegexTable = []; - noRegexTable[70 /* Identifier */] = true; + noRegexTable[71 /* Identifier */] = true; noRegexTable[9 /* StringLiteral */] = true; noRegexTable[8 /* NumericLiteral */] = true; - noRegexTable[11 /* RegularExpressionLiteral */] = true; - noRegexTable[98 /* ThisKeyword */] = true; - noRegexTable[42 /* PlusPlusToken */] = true; - noRegexTable[43 /* MinusMinusToken */] = true; - noRegexTable[19 /* CloseParenToken */] = true; - noRegexTable[21 /* CloseBracketToken */] = true; - noRegexTable[17 /* CloseBraceToken */] = true; - noRegexTable[100 /* TrueKeyword */] = true; - noRegexTable[85 /* FalseKeyword */] = true; + noRegexTable[12 /* RegularExpressionLiteral */] = true; + noRegexTable[99 /* ThisKeyword */] = true; + noRegexTable[43 /* PlusPlusToken */] = true; + noRegexTable[44 /* MinusMinusToken */] = true; + noRegexTable[20 /* CloseParenToken */] = true; + noRegexTable[22 /* CloseBracketToken */] = true; + noRegexTable[18 /* CloseBraceToken */] = true; + noRegexTable[101 /* TrueKeyword */] = true; + noRegexTable[86 /* FalseKeyword */] = true; // Just a stack of TemplateHeads and OpenCurlyBraces, used to perform rudimentary (inexact) // classification on template strings. Because of the context free nature of templates, // the only precise way to classify a template portion would be by propagating the stack across @@ -71231,10 +71321,10 @@ var ts; /** Returns true if 'keyword2' can legally follow 'keyword1' in any language construct. */ function canFollow(keyword1, keyword2) { if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 124 /* GetKeyword */ || - keyword2 === 134 /* SetKeyword */ || - keyword2 === 122 /* ConstructorKeyword */ || - keyword2 === 114 /* StaticKeyword */) { + if (keyword2 === 125 /* GetKeyword */ || + keyword2 === 135 /* SetKeyword */ || + keyword2 === 123 /* ConstructorKeyword */ || + keyword2 === 115 /* StaticKeyword */) { // Allow things like "public get", "public constructor" and "public static". // These are all legal. return true; @@ -71333,7 +71423,7 @@ var ts; offset = 2; // falls through case 6 /* InTemplateSubstitutionPosition */: - templateStack.push(13 /* TemplateHead */); + templateStack.push(14 /* TemplateHead */); break; } scanner.setText(text); @@ -71364,71 +71454,71 @@ var ts; do { token = scanner.scan(); if (!ts.isTrivia(token)) { - if ((token === 40 /* SlashToken */ || token === 62 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 11 /* RegularExpressionLiteral */) { - token = 11 /* RegularExpressionLiteral */; + if ((token === 41 /* SlashToken */ || token === 63 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { + if (scanner.reScanSlashToken() === 12 /* RegularExpressionLiteral */) { + token = 12 /* RegularExpressionLiteral */; } } - else if (lastNonTriviaToken === 22 /* DotToken */ && isKeyword(token)) { - token = 70 /* Identifier */; + else if (lastNonTriviaToken === 23 /* DotToken */ && isKeyword(token)) { + token = 71 /* Identifier */; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { // We have two keywords in a row. Only treat the second as a keyword if // it's a sequence that could legally occur in the language. Otherwise // treat it as an identifier. This way, if someone writes "private var" // we recognize that 'var' is actually an identifier here. - token = 70 /* Identifier */; + token = 71 /* Identifier */; } - else if (lastNonTriviaToken === 70 /* Identifier */ && - token === 26 /* LessThanToken */) { + else if (lastNonTriviaToken === 71 /* Identifier */ && + token === 27 /* LessThanToken */) { // Could be the start of something generic. Keep track of that by bumping // up the current count of generic contexts we may be in. angleBracketStack++; } - else if (token === 28 /* GreaterThanToken */ && angleBracketStack > 0) { + else if (token === 29 /* GreaterThanToken */ && angleBracketStack > 0) { // If we think we're currently in something generic, then mark that that // generic entity is complete. angleBracketStack--; } - else if (token === 118 /* AnyKeyword */ || - token === 135 /* StringKeyword */ || - token === 132 /* NumberKeyword */ || - token === 121 /* BooleanKeyword */ || - token === 136 /* SymbolKeyword */) { + else if (token === 119 /* AnyKeyword */ || + token === 136 /* StringKeyword */ || + token === 133 /* NumberKeyword */ || + token === 122 /* BooleanKeyword */ || + token === 137 /* SymbolKeyword */) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { // If it looks like we're could be in something generic, don't classify this // as a keyword. We may just get overwritten by the syntactic classifier, // causing a noisy experience for the user. - token = 70 /* Identifier */; + token = 71 /* Identifier */; } } - else if (token === 13 /* TemplateHead */) { + else if (token === 14 /* TemplateHead */) { templateStack.push(token); } - else if (token === 16 /* OpenBraceToken */) { + else if (token === 17 /* OpenBraceToken */) { // If we don't have anything on the template stack, // then we aren't trying to keep track of a previously scanned template head. if (templateStack.length > 0) { templateStack.push(token); } } - else if (token === 17 /* CloseBraceToken */) { + else if (token === 18 /* CloseBraceToken */) { // If we don't have anything on the template stack, // then we aren't trying to keep track of a previously scanned template head. if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 13 /* TemplateHead */) { + if (lastTemplateStackToken === 14 /* TemplateHead */) { token = scanner.reScanTemplateToken(); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. - if (token === 15 /* TemplateTail */) { + if (token === 16 /* TemplateTail */) { templateStack.pop(); } else { - ts.Debug.assert(token === 14 /* TemplateMiddle */, "Should have been a template middle. Was " + token); + ts.Debug.assert(token === 15 /* TemplateMiddle */, "Should have been a template middle. Was " + token); } } else { - ts.Debug.assert(lastTemplateStackToken === 16 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); + ts.Debug.assert(lastTemplateStackToken === 17 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); templateStack.pop(); } } @@ -71469,10 +71559,10 @@ var ts; } else if (ts.isTemplateLiteralKind(token)) { if (scanner.isUnterminated()) { - if (token === 15 /* TemplateTail */) { + if (token === 16 /* TemplateTail */) { result.endOfLineState = 5 /* InTemplateMiddleOrTail */; } - else if (token === 12 /* NoSubstitutionTemplateLiteral */) { + else if (token === 13 /* NoSubstitutionTemplateLiteral */) { result.endOfLineState = 4 /* InTemplateHeadOrNoSubstitutionTemplate */; } else { @@ -71480,7 +71570,7 @@ var ts; } } } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 13 /* TemplateHead */) { + else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 14 /* TemplateHead */) { result.endOfLineState = 6 /* InTemplateSubstitutionPosition */; } } @@ -71510,43 +71600,43 @@ var ts; } function isBinaryExpressionOperatorToken(token) { switch (token) { - case 38 /* AsteriskToken */: - case 40 /* SlashToken */: - case 41 /* PercentToken */: - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 44 /* LessThanLessThanToken */: - case 45 /* GreaterThanGreaterThanToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 26 /* LessThanToken */: - case 28 /* GreaterThanToken */: - case 29 /* LessThanEqualsToken */: - case 30 /* GreaterThanEqualsToken */: - case 92 /* InstanceOfKeyword */: - case 91 /* InKeyword */: - case 117 /* AsKeyword */: - case 31 /* EqualsEqualsToken */: - case 32 /* ExclamationEqualsToken */: - case 33 /* EqualsEqualsEqualsToken */: - case 34 /* ExclamationEqualsEqualsToken */: - case 47 /* AmpersandToken */: - case 49 /* CaretToken */: - case 48 /* BarToken */: - case 52 /* AmpersandAmpersandToken */: - case 53 /* BarBarToken */: - case 68 /* BarEqualsToken */: - case 67 /* AmpersandEqualsToken */: - case 69 /* CaretEqualsToken */: - case 64 /* LessThanLessThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 58 /* PlusEqualsToken */: - case 59 /* MinusEqualsToken */: - case 60 /* AsteriskEqualsToken */: - case 62 /* SlashEqualsToken */: - case 63 /* PercentEqualsToken */: - case 57 /* EqualsToken */: - case 25 /* CommaToken */: + case 39 /* AsteriskToken */: + case 41 /* SlashToken */: + case 42 /* PercentToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 45 /* LessThanLessThanToken */: + case 46 /* GreaterThanGreaterThanToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 27 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 30 /* LessThanEqualsToken */: + case 31 /* GreaterThanEqualsToken */: + case 93 /* InstanceOfKeyword */: + case 92 /* InKeyword */: + case 118 /* AsKeyword */: + case 32 /* EqualsEqualsToken */: + case 33 /* ExclamationEqualsToken */: + case 34 /* EqualsEqualsEqualsToken */: + case 35 /* ExclamationEqualsEqualsToken */: + case 48 /* AmpersandToken */: + case 50 /* CaretToken */: + case 49 /* BarToken */: + case 53 /* AmpersandAmpersandToken */: + case 54 /* BarBarToken */: + case 69 /* BarEqualsToken */: + case 68 /* AmpersandEqualsToken */: + case 70 /* CaretEqualsToken */: + case 65 /* LessThanLessThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 59 /* PlusEqualsToken */: + case 60 /* MinusEqualsToken */: + case 61 /* AsteriskEqualsToken */: + case 63 /* SlashEqualsToken */: + case 64 /* PercentEqualsToken */: + case 58 /* EqualsToken */: + case 26 /* CommaToken */: return true; default: return false; @@ -71554,19 +71644,19 @@ var ts; } function isPrefixUnaryExpressionOperatorToken(token) { switch (token) { - case 36 /* PlusToken */: - case 37 /* MinusToken */: - case 51 /* TildeToken */: - case 50 /* ExclamationToken */: - case 42 /* PlusPlusToken */: - case 43 /* MinusMinusToken */: + case 37 /* PlusToken */: + case 38 /* MinusToken */: + case 52 /* TildeToken */: + case 51 /* ExclamationToken */: + case 43 /* PlusPlusToken */: + case 44 /* MinusMinusToken */: return true; default: return false; } } function isKeyword(token) { - return token >= 71 /* FirstKeyword */ && token <= 141 /* LastKeyword */; + return token >= 72 /* FirstKeyword */ && token <= 142 /* LastKeyword */; } function classFromKind(token) { if (isKeyword(token)) { @@ -71575,7 +71665,7 @@ var ts; else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { return 5 /* operator */; } - else if (token >= 16 /* FirstPunctuation */ && token <= 69 /* LastPunctuation */) { + else if (token >= 17 /* FirstPunctuation */ && token <= 70 /* LastPunctuation */) { return 10 /* punctuation */; } switch (token) { @@ -71583,7 +71673,7 @@ var ts; return 4 /* numericLiteral */; case 9 /* StringLiteral */: return 6 /* stringLiteral */; - case 11 /* RegularExpressionLiteral */: + case 12 /* RegularExpressionLiteral */: return 7 /* regularExpressionLiteral */; case 7 /* ConflictMarkerTrivia */: case 3 /* MultiLineCommentTrivia */: @@ -71592,7 +71682,7 @@ var ts; case 5 /* WhitespaceTrivia */: case 4 /* NewLineTrivia */: return 8 /* whiteSpace */; - case 70 /* Identifier */: + case 71 /* Identifier */: default: if (ts.isTemplateLiteralKind(token)) { return 6 /* stringLiteral */; @@ -71623,10 +71713,10 @@ var ts; // That means we're calling back into the host around every 1.2k of the file we process. // Lib.d.ts has similar numbers. switch (kind) { - case 232 /* ModuleDeclaration */: - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: + case 233 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } @@ -71677,7 +71767,7 @@ var ts; */ function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 232 /* ModuleDeclaration */ && + return declaration.kind === 233 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) === 1 /* Instantiated */; }); } @@ -71687,7 +71777,7 @@ var ts; if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { var kind = node.kind; checkForClassificationCancellation(cancellationToken, kind); - if (kind === 70 /* Identifier */ && !ts.nodeIsMissing(node)) { + if (kind === 71 /* Identifier */ && !ts.nodeIsMissing(node)) { var identifier = node; // Only bother calling into the typechecker if this is an identifier that // could possibly resolve to a type name. This makes classification run @@ -71841,16 +71931,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); pos = tag.tagName.end; switch (tag.kind) { - case 285 /* JSDocParameterTag */: + case 286 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 288 /* JSDocTemplateTag */: + case 289 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); break; - case 287 /* JSDocTypeTag */: + case 288 /* JSDocTypeTag */: processElement(tag.typeExpression); break; - case 286 /* JSDocReturnTag */: + case 287 /* JSDocReturnTag */: processElement(tag.typeExpression); break; } @@ -71937,22 +72027,22 @@ var ts; } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 250 /* JsxOpeningElement */: + case 251 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 251 /* JsxClosingElement */: + case 252 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 249 /* JsxSelfClosingElement */: + case 250 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 252 /* JsxAttribute */: + case 253 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -71969,7 +72059,7 @@ var ts; } // Special case < and > If they appear in a generic context they are punctuation, // not operators. - if (tokenKind === 26 /* LessThanToken */ || tokenKind === 28 /* GreaterThanToken */) { + if (tokenKind === 27 /* LessThanToken */ || tokenKind === 29 /* GreaterThanToken */) { // If the node owning the token has a type argument list or type parameter list, then // we can effectively assume that a '<' and '>' belong to those lists. if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { @@ -71978,19 +72068,19 @@ var ts; } if (ts.isPunctuation(tokenKind)) { if (token) { - if (tokenKind === 57 /* EqualsToken */) { + if (tokenKind === 58 /* EqualsToken */) { // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 225 /* VariableDeclaration */ || - token.parent.kind === 148 /* PropertyDeclaration */ || - token.parent.kind === 145 /* Parameter */ || - token.parent.kind === 252 /* JsxAttribute */) { + if (token.parent.kind === 226 /* VariableDeclaration */ || + token.parent.kind === 149 /* PropertyDeclaration */ || + token.parent.kind === 146 /* Parameter */ || + token.parent.kind === 253 /* JsxAttribute */) { return 5 /* operator */; } } - if (token.parent.kind === 193 /* BinaryExpression */ || - token.parent.kind === 191 /* PrefixUnaryExpression */ || - token.parent.kind === 192 /* PostfixUnaryExpression */ || - token.parent.kind === 194 /* ConditionalExpression */) { + if (token.parent.kind === 194 /* BinaryExpression */ || + token.parent.kind === 192 /* PrefixUnaryExpression */ || + token.parent.kind === 193 /* PostfixUnaryExpression */ || + token.parent.kind === 195 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -72000,9 +72090,9 @@ var ts; return 4 /* numericLiteral */; } else if (tokenKind === 9 /* StringLiteral */) { - return token.parent.kind === 252 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token.parent.kind === 253 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } - else if (tokenKind === 11 /* RegularExpressionLiteral */) { + else if (tokenKind === 12 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. return 6 /* stringLiteral */; } @@ -72013,35 +72103,35 @@ var ts; else if (tokenKind === 10 /* JsxText */) { return 23 /* jsxText */; } - else if (tokenKind === 70 /* Identifier */) { + else if (tokenKind === 71 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 145 /* Parameter */: + case 146 /* Parameter */: if (token.parent.name === token) { return ts.isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -72581,7 +72671,7 @@ var ts; else { if (!symbols || symbols.length === 0) { if (sourceFile.languageVariant === 1 /* JSX */ && - location.parent && location.parent.kind === 251 /* JsxClosingElement */) { + location.parent && location.parent.kind === 252 /* JsxClosingElement */) { // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. // For example: @@ -72677,8 +72767,8 @@ var ts; if (!node || node.kind !== 9 /* StringLiteral */) { return undefined; } - if (node.parent.kind === 260 /* PropertyAssignment */ && - node.parent.parent.kind === 177 /* ObjectLiteralExpression */ && + if (node.parent.kind === 261 /* PropertyAssignment */ && + node.parent.parent.kind === 178 /* ObjectLiteralExpression */ && node.parent.name === node) { // Get quoted name of properties of the object literal expression // i.e. interface ConfigFiles { @@ -72703,7 +72793,7 @@ var ts; // a['/*completion position*/'] return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log); } - else if (node.parent.kind === 237 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) { + else if (node.parent.kind === 238 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) { // Get all known external module names or complete a path to a module // i.e. import * as ns from "/*completion position*/"; // import x = require("/*completion position*/"); @@ -72903,9 +72993,9 @@ var ts; requestJsDocTagName = true; } switch (tag.kind) { - case 287 /* JSDocTypeTag */: - case 285 /* JSDocParameterTag */: - case 286 /* JSDocReturnTag */: + case 288 /* JSDocTypeTag */: + case 286 /* JSDocParameterTag */: + case 287 /* JSDocReturnTag */: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -72951,12 +73041,12 @@ var ts; return undefined; } var parent = contextToken.parent; - if (contextToken.kind === 22 /* DotToken */) { - if (parent.kind === 178 /* PropertyAccessExpression */) { + if (contextToken.kind === 23 /* DotToken */) { + if (parent.kind === 179 /* PropertyAccessExpression */) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent.kind === 142 /* QualifiedName */) { + else if (parent.kind === 143 /* QualifiedName */) { node = contextToken.parent.left; isRightOfDot = true; } @@ -72970,27 +73060,27 @@ var ts; // // If the tagname is a property access expression, we will then walk up to the top most of property access expression. // Then, try to get a JSX container and its associated attributes type. - if (parent && parent.kind === 178 /* PropertyAccessExpression */) { + if (parent && parent.kind === 179 /* PropertyAccessExpression */) { contextToken = parent; parent = parent.parent; } switch (parent.kind) { - case 251 /* JsxClosingElement */: - if (contextToken.kind === 40 /* SlashToken */) { + case 252 /* JsxClosingElement */: + if (contextToken.kind === 41 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 193 /* BinaryExpression */: + case 194 /* BinaryExpression */: if (!(parent.left.flags & 32768 /* ThisNodeHasError */)) { // It has a left-hand side, so we're not in an opening JSX tag. break; } // falls through - case 249 /* JsxSelfClosingElement */: - case 248 /* JsxElement */: - case 250 /* JsxOpeningElement */: - if (contextToken.kind === 26 /* LessThanToken */) { + case 250 /* JsxSelfClosingElement */: + case 249 /* JsxElement */: + case 251 /* JsxOpeningElement */: + if (contextToken.kind === 27 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } @@ -73041,7 +73131,7 @@ var ts; isGlobalCompletion = false; isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */) { + if (node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */) { var symbol = typeChecker.getSymbolAtLocation(node); // This is an alias, follow what it aliases if (symbol && symbol.flags & 8388608 /* Alias */) { @@ -73097,7 +73187,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType = void 0; - if ((jsxContainer.kind === 249 /* JsxSelfClosingElement */) || (jsxContainer.kind === 250 /* JsxOpeningElement */)) { + if ((jsxContainer.kind === 250 /* JsxSelfClosingElement */) || (jsxContainer.kind === 251 /* JsxOpeningElement */)) { // Cursor is inside a JSX self-closing element or opening element attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer); if (attrsType) { @@ -73145,9 +73235,9 @@ var ts; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; if (scopeNode) { isGlobalCompletion = - scopeNode.kind === 264 /* SourceFile */ || - scopeNode.kind === 195 /* TemplateExpression */ || - scopeNode.kind === 255 /* JsxExpression */ || + scopeNode.kind === 265 /* SourceFile */ || + scopeNode.kind === 196 /* TemplateExpression */ || + scopeNode.kind === 256 /* JsxExpression */ || ts.isStatement(scopeNode); } /// TODO filter meaning based on the current context @@ -73179,12 +73269,12 @@ var ts; if (contextToken.kind === 10 /* JsxText */) { return true; } - if (contextToken.kind === 28 /* GreaterThanToken */ && contextToken.parent) { - if (contextToken.parent.kind === 250 /* JsxOpeningElement */) { + if (contextToken.kind === 29 /* GreaterThanToken */ && contextToken.parent) { + if (contextToken.parent.kind === 251 /* JsxOpeningElement */) { return true; } - if (contextToken.parent.kind === 251 /* JsxClosingElement */ || contextToken.parent.kind === 249 /* JsxSelfClosingElement */) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 248 /* JsxElement */; + if (contextToken.parent.kind === 252 /* JsxClosingElement */ || contextToken.parent.kind === 250 /* JsxSelfClosingElement */) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 249 /* JsxElement */; } } return false; @@ -73193,41 +73283,41 @@ var ts; if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { - case 25 /* CommaToken */: - return containingNodeKind === 180 /* CallExpression */ // func( a, | - || containingNodeKind === 151 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ - || containingNodeKind === 181 /* NewExpression */ // new C(a, | - || containingNodeKind === 176 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 193 /* BinaryExpression */ // const x = (a, | - || containingNodeKind === 159 /* FunctionType */; // var x: (s: string, list| - case 18 /* OpenParenToken */: - return containingNodeKind === 180 /* CallExpression */ // func( | - || containingNodeKind === 151 /* Constructor */ // constructor( | - || containingNodeKind === 181 /* NewExpression */ // new C(a| - || containingNodeKind === 184 /* ParenthesizedExpression */ // const x = (a| - || containingNodeKind === 167 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ - case 20 /* OpenBracketToken */: - return containingNodeKind === 176 /* ArrayLiteralExpression */ // [ | - || containingNodeKind === 156 /* IndexSignature */ // [ | : string ] - || containingNodeKind === 143 /* ComputedPropertyName */; // [ | /* this can become an index signature */ - case 127 /* ModuleKeyword */: // module | - case 128 /* NamespaceKeyword */: + case 26 /* CommaToken */: + return containingNodeKind === 181 /* CallExpression */ // func( a, | + || containingNodeKind === 152 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + || containingNodeKind === 182 /* NewExpression */ // new C(a, | + || containingNodeKind === 177 /* ArrayLiteralExpression */ // [a, | + || containingNodeKind === 194 /* BinaryExpression */ // const x = (a, | + || containingNodeKind === 160 /* FunctionType */; // var x: (s: string, list| + case 19 /* OpenParenToken */: + return containingNodeKind === 181 /* CallExpression */ // func( | + || containingNodeKind === 152 /* Constructor */ // constructor( | + || containingNodeKind === 182 /* NewExpression */ // new C(a| + || containingNodeKind === 185 /* ParenthesizedExpression */ // const x = (a| + || containingNodeKind === 168 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ + case 21 /* OpenBracketToken */: + return containingNodeKind === 177 /* ArrayLiteralExpression */ // [ | + || containingNodeKind === 157 /* IndexSignature */ // [ | : string ] + || containingNodeKind === 144 /* ComputedPropertyName */; // [ | /* this can become an index signature */ + case 128 /* ModuleKeyword */: // module | + case 129 /* NamespaceKeyword */: return true; - case 22 /* DotToken */: - return containingNodeKind === 232 /* ModuleDeclaration */; // module A.| - case 16 /* OpenBraceToken */: - return containingNodeKind === 228 /* ClassDeclaration */; // class A{ | - case 57 /* EqualsToken */: - return containingNodeKind === 225 /* VariableDeclaration */ // const x = a| - || containingNodeKind === 193 /* BinaryExpression */; // x = a| - case 13 /* TemplateHead */: - return containingNodeKind === 195 /* TemplateExpression */; // `aa ${| - case 14 /* TemplateMiddle */: - return containingNodeKind === 204 /* TemplateSpan */; // `aa ${10} dd ${| - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - return containingNodeKind === 148 /* PropertyDeclaration */; // class A{ public | + case 23 /* DotToken */: + return containingNodeKind === 233 /* ModuleDeclaration */; // module A.| + case 17 /* OpenBraceToken */: + return containingNodeKind === 229 /* ClassDeclaration */; // class A{ | + case 58 /* EqualsToken */: + return containingNodeKind === 226 /* VariableDeclaration */ // const x = a| + || containingNodeKind === 194 /* BinaryExpression */; // x = a| + case 14 /* TemplateHead */: + return containingNodeKind === 196 /* TemplateExpression */; // `aa ${| + case 15 /* TemplateMiddle */: + return containingNodeKind === 205 /* TemplateSpan */; // `aa ${10} dd ${| + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + return containingNodeKind === 149 /* PropertyDeclaration */; // class A{ public | } // Previous token may have been a keyword that was converted to an identifier. switch (previousToken.getText()) { @@ -73241,7 +73331,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ - || contextToken.kind === 11 /* RegularExpressionLiteral */ + || contextToken.kind === 12 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { var start_3 = contextToken.getStart(); var end = contextToken.getEnd(); @@ -73254,7 +73344,7 @@ var ts; } if (position === end) { return !!contextToken.isUnterminated - || contextToken.kind === 11 /* RegularExpressionLiteral */; + || contextToken.kind === 12 /* RegularExpressionLiteral */; } } return false; @@ -73270,7 +73360,7 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 177 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 178 /* ObjectLiteralExpression */) { // We are completing on contextual types, but may also include properties // other than those within the declared type. isNewIdentifierLocation = true; @@ -73280,7 +73370,7 @@ var ts; typeForObject = typeForObject && typeForObject.getNonNullableType(); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 173 /* ObjectBindingPattern */) { + else if (objectLikeContainer.kind === 174 /* ObjectBindingPattern */) { // We are *only* completing on properties from the type being destructured. isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); @@ -73291,11 +73381,11 @@ var ts; // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed - // type of parameter will flow in from the contextual type of the function var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type); - if (!canGetType && rootDeclaration.kind === 145 /* Parameter */) { + if (!canGetType && rootDeclaration.kind === 146 /* Parameter */) { if (ts.isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); } - else if (rootDeclaration.parent.kind === 150 /* MethodDeclaration */ || rootDeclaration.parent.kind === 153 /* SetAccessor */) { + else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) { canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -73337,9 +73427,9 @@ var ts; * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 240 /* NamedImports */ ? - 237 /* ImportDeclaration */ : - 243 /* ExportDeclaration */; + var declarationKind = namedImportsOrExports.kind === 241 /* NamedImports */ ? + 238 /* ImportDeclaration */ : + 244 /* ExportDeclaration */; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -73363,10 +73453,10 @@ var ts; function tryGetObjectLikeCompletionContainer(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16 /* OpenBraceToken */: // const x = { | - case 25 /* CommaToken */: + case 17 /* OpenBraceToken */: // const x = { | + case 26 /* CommaToken */: var parent = contextToken.parent; - if (parent && (parent.kind === 177 /* ObjectLiteralExpression */ || parent.kind === 173 /* ObjectBindingPattern */)) { + if (parent && (parent.kind === 178 /* ObjectLiteralExpression */ || parent.kind === 174 /* ObjectBindingPattern */)) { return parent; } break; @@ -73381,11 +73471,11 @@ var ts; function tryGetNamedImportsOrExportsForCompletion(contextToken) { if (contextToken) { switch (contextToken.kind) { - case 16 /* OpenBraceToken */: // import { | - case 25 /* CommaToken */: + case 17 /* OpenBraceToken */: // import { | + case 26 /* CommaToken */: switch (contextToken.parent.kind) { - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return contextToken.parent; } } @@ -73396,17 +73486,17 @@ var ts; if (contextToken) { var parent = contextToken.parent; switch (contextToken.kind) { - case 27 /* LessThanSlashToken */: - case 40 /* SlashToken */: - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 253 /* JsxAttributes */: - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: - if (parent && (parent.kind === 249 /* JsxSelfClosingElement */ || parent.kind === 250 /* JsxOpeningElement */)) { + case 28 /* LessThanSlashToken */: + case 41 /* SlashToken */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 254 /* JsxAttributes */: + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: + if (parent && (parent.kind === 250 /* JsxSelfClosingElement */ || parent.kind === 251 /* JsxOpeningElement */)) { return parent; } - else if (parent.kind === 252 /* JsxAttribute */) { + else if (parent.kind === 253 /* JsxAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73418,7 +73508,7 @@ var ts; // its parent is a JsxExpression, whose parent is a JsxAttribute, // whose parent is a JsxOpeningLikeElement case 9 /* StringLiteral */: - if (parent && ((parent.kind === 252 /* JsxAttribute */) || (parent.kind === 254 /* JsxSpreadAttribute */))) { + if (parent && ((parent.kind === 253 /* JsxAttribute */) || (parent.kind === 255 /* JsxSpreadAttribute */))) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73426,10 +73516,10 @@ var ts; return parent.parent.parent; } break; - case 17 /* CloseBraceToken */: + case 18 /* CloseBraceToken */: if (parent && - parent.kind === 255 /* JsxExpression */ && - parent.parent && parent.parent.kind === 252 /* JsxAttribute */) { + parent.kind === 256 /* JsxExpression */ && + parent.parent && parent.parent.kind === 253 /* JsxAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73437,7 +73527,7 @@ var ts; // each JsxAttribute can have initializer as JsxExpression return parent.parent.parent.parent; } - if (parent && parent.kind === 254 /* JsxSpreadAttribute */) { + if (parent && parent.kind === 255 /* JsxSpreadAttribute */) { // Currently we parse JsxOpeningLikeElement as: // JsxOpeningLikeElement // attributes: JsxAttributes @@ -73454,9 +73544,9 @@ var ts; return false; } switch (kind) { - case 151 /* Constructor */: - case 160 /* ConstructorType */: - case 159 /* FunctionType */: + case 152 /* Constructor */: + case 161 /* ConstructorType */: + case 160 /* FunctionType */: return false; default: return true; @@ -73468,67 +73558,67 @@ var ts; function isSolelyIdentifierDefinitionLocation(contextToken) { var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { - case 25 /* CommaToken */: - return containingNodeKind === 225 /* VariableDeclaration */ || - containingNodeKind === 226 /* VariableDeclarationList */ || - containingNodeKind === 207 /* VariableStatement */ || - containingNodeKind === 231 /* EnumDeclaration */ || + case 26 /* CommaToken */: + return containingNodeKind === 226 /* VariableDeclaration */ || + containingNodeKind === 227 /* VariableDeclarationList */ || + containingNodeKind === 208 /* VariableStatement */ || + containingNodeKind === 232 /* EnumDeclaration */ || isFunction(containingNodeKind) || - containingNodeKind === 228 /* ClassDeclaration */ || - containingNodeKind === 198 /* ClassExpression */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 174 /* ArrayBindingPattern */ || - containingNodeKind === 230 /* TypeAliasDeclaration */; // type Map, K, | - case 22 /* DotToken */: - return containingNodeKind === 174 /* ArrayBindingPattern */; // var [.| - case 55 /* ColonToken */: - return containingNodeKind === 175 /* BindingElement */; // var {x :html| - case 20 /* OpenBracketToken */: - return containingNodeKind === 174 /* ArrayBindingPattern */; // var [x| - case 18 /* OpenParenToken */: - return containingNodeKind === 259 /* CatchClause */ || + containingNodeKind === 229 /* ClassDeclaration */ || + containingNodeKind === 199 /* ClassExpression */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 175 /* ArrayBindingPattern */ || + containingNodeKind === 231 /* TypeAliasDeclaration */; // type Map, K, | + case 23 /* DotToken */: + return containingNodeKind === 175 /* ArrayBindingPattern */; // var [.| + case 56 /* ColonToken */: + return containingNodeKind === 176 /* BindingElement */; // var {x :html| + case 21 /* OpenBracketToken */: + return containingNodeKind === 175 /* ArrayBindingPattern */; // var [x| + case 19 /* OpenParenToken */: + return containingNodeKind === 260 /* CatchClause */ || isFunction(containingNodeKind); - case 16 /* OpenBraceToken */: - return containingNodeKind === 231 /* EnumDeclaration */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 162 /* TypeLiteral */; // const x : { | - case 24 /* SemicolonToken */: - return containingNodeKind === 147 /* PropertySignature */ && + case 17 /* OpenBraceToken */: + return containingNodeKind === 232 /* EnumDeclaration */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 163 /* TypeLiteral */; // const x : { | + case 25 /* SemicolonToken */: + return containingNodeKind === 148 /* PropertySignature */ && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 229 /* InterfaceDeclaration */ || - contextToken.parent.parent.kind === 162 /* TypeLiteral */); // const x : { a; | - case 26 /* LessThanToken */: - return containingNodeKind === 228 /* ClassDeclaration */ || - containingNodeKind === 198 /* ClassExpression */ || - containingNodeKind === 229 /* InterfaceDeclaration */ || - containingNodeKind === 230 /* TypeAliasDeclaration */ || + (contextToken.parent.parent.kind === 230 /* InterfaceDeclaration */ || + contextToken.parent.parent.kind === 163 /* TypeLiteral */); // const x : { a; | + case 27 /* LessThanToken */: + return containingNodeKind === 229 /* ClassDeclaration */ || + containingNodeKind === 199 /* ClassExpression */ || + containingNodeKind === 230 /* InterfaceDeclaration */ || + containingNodeKind === 231 /* TypeAliasDeclaration */ || isFunction(containingNodeKind); - case 114 /* StaticKeyword */: - return containingNodeKind === 148 /* PropertyDeclaration */; - case 23 /* DotDotDotToken */: - return containingNodeKind === 145 /* Parameter */ || + case 115 /* StaticKeyword */: + return containingNodeKind === 149 /* PropertyDeclaration */; + case 24 /* DotDotDotToken */: + return containingNodeKind === 146 /* Parameter */ || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 174 /* ArrayBindingPattern */); // var [...z| - case 113 /* PublicKeyword */: - case 111 /* PrivateKeyword */: - case 112 /* ProtectedKeyword */: - return containingNodeKind === 145 /* Parameter */; - case 117 /* AsKeyword */: - return containingNodeKind === 241 /* ImportSpecifier */ || - containingNodeKind === 245 /* ExportSpecifier */ || - containingNodeKind === 239 /* NamespaceImport */; - case 74 /* ClassKeyword */: - case 82 /* EnumKeyword */: - case 108 /* InterfaceKeyword */: - case 88 /* FunctionKeyword */: - case 103 /* VarKeyword */: - case 124 /* GetKeyword */: - case 134 /* SetKeyword */: - case 90 /* ImportKeyword */: - case 109 /* LetKeyword */: - case 75 /* ConstKeyword */: - case 115 /* YieldKeyword */: - case 137 /* TypeKeyword */: + contextToken.parent.parent.kind === 175 /* ArrayBindingPattern */); // var [...z| + case 114 /* PublicKeyword */: + case 112 /* PrivateKeyword */: + case 113 /* ProtectedKeyword */: + return containingNodeKind === 146 /* Parameter */; + case 118 /* AsKeyword */: + return containingNodeKind === 242 /* ImportSpecifier */ || + containingNodeKind === 246 /* ExportSpecifier */ || + containingNodeKind === 240 /* NamespaceImport */; + case 75 /* ClassKeyword */: + case 83 /* EnumKeyword */: + case 109 /* InterfaceKeyword */: + case 89 /* FunctionKeyword */: + case 104 /* VarKeyword */: + case 125 /* GetKeyword */: + case 135 /* SetKeyword */: + case 91 /* ImportKeyword */: + case 110 /* LetKeyword */: + case 76 /* ConstKeyword */: + case 116 /* YieldKeyword */: + case 138 /* TypeKeyword */: return true; } // Previous token may have been a keyword that was converted to an identifier. @@ -73598,12 +73688,12 @@ var ts; for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; // Ignore omitted expressions for missing members - if (m.kind !== 260 /* PropertyAssignment */ && - m.kind !== 261 /* ShorthandPropertyAssignment */ && - m.kind !== 175 /* BindingElement */ && - m.kind !== 150 /* MethodDeclaration */ && - m.kind !== 152 /* GetAccessor */ && - m.kind !== 153 /* SetAccessor */) { + if (m.kind !== 261 /* PropertyAssignment */ && + m.kind !== 262 /* ShorthandPropertyAssignment */ && + m.kind !== 176 /* BindingElement */ && + m.kind !== 151 /* MethodDeclaration */ && + m.kind !== 153 /* GetAccessor */ && + m.kind !== 154 /* SetAccessor */) { continue; } // If this is the current item we are editing right now, do not filter it out @@ -73611,9 +73701,9 @@ var ts; continue; } var existingName = void 0; - if (m.kind === 175 /* BindingElement */ && m.propertyName) { + if (m.kind === 176 /* BindingElement */ && m.propertyName) { // include only identifiers in completion list - if (m.propertyName.kind === 70 /* Identifier */) { + if (m.propertyName.kind === 71 /* Identifier */) { existingName = m.propertyName.text; } } @@ -73641,7 +73731,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 252 /* JsxAttribute */) { + if (attr.kind === 253 /* JsxAttribute */) { seenNames.set(attr.name.text, true); } } @@ -73691,7 +73781,7 @@ var ts; } // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions = []; - for (var i = 71 /* FirstKeyword */; i <= 141 /* LastKeyword */; i++) { + for (var i = 72 /* FirstKeyword */; i <= 142 /* LastKeyword */; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ts.ScriptElementKind.keyword, @@ -73703,10 +73793,10 @@ var ts; return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind); } function isEqualityOperatorKind(kind) { - return kind === 31 /* EqualsEqualsToken */ || - kind === 32 /* ExclamationEqualsToken */ || - kind === 33 /* EqualsEqualsEqualsToken */ || - kind === 34 /* ExclamationEqualsEqualsToken */; + return kind === 32 /* EqualsEqualsToken */ || + kind === 33 /* ExclamationEqualsToken */ || + kind === 34 /* EqualsEqualsEqualsToken */ || + kind === 35 /* ExclamationEqualsEqualsToken */; } })(Completions = ts.Completions || (ts.Completions = {})); })(ts || (ts = {})); @@ -73769,74 +73859,74 @@ var ts; return undefined; } switch (node.kind) { - case 89 /* IfKeyword */: - case 81 /* ElseKeyword */: - if (hasKind(node.parent, 210 /* IfStatement */)) { + case 90 /* IfKeyword */: + case 82 /* ElseKeyword */: + if (hasKind(node.parent, 211 /* IfStatement */)) { return getIfElseOccurrences(node.parent, sourceFile); } break; - case 95 /* ReturnKeyword */: - if (hasKind(node.parent, 218 /* ReturnStatement */)) { + case 96 /* ReturnKeyword */: + if (hasKind(node.parent, 219 /* ReturnStatement */)) { return highlightSpans(getReturnOccurrences(node.parent)); } break; - case 99 /* ThrowKeyword */: - if (hasKind(node.parent, 222 /* ThrowStatement */)) { + case 100 /* ThrowKeyword */: + if (hasKind(node.parent, 223 /* ThrowStatement */)) { return highlightSpans(getThrowOccurrences(node.parent)); } break; - case 101 /* TryKeyword */: - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: - var tryStatement = node.kind === 73 /* CatchKeyword */ ? parent(parent(node)) : parent(node); - if (hasKind(tryStatement, 223 /* TryStatement */)) { + case 102 /* TryKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: + var tryStatement = node.kind === 74 /* CatchKeyword */ ? parent(parent(node)) : parent(node); + if (hasKind(tryStatement, 224 /* TryStatement */)) { return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile)); } break; - case 97 /* SwitchKeyword */: - if (hasKind(node.parent, 220 /* SwitchStatement */)) { + case 98 /* SwitchKeyword */: + if (hasKind(node.parent, 221 /* SwitchStatement */)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent)); } break; - case 72 /* CaseKeyword */: - case 78 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 220 /* SwitchStatement */)) { + case 73 /* CaseKeyword */: + case 79 /* DefaultKeyword */: + if (hasKind(parent(parent(parent(node))), 221 /* SwitchStatement */)) { return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent)); } break; - case 71 /* BreakKeyword */: - case 76 /* ContinueKeyword */: - if (hasKind(node.parent, 217 /* BreakStatement */) || hasKind(node.parent, 216 /* ContinueStatement */)) { + case 72 /* BreakKeyword */: + case 77 /* ContinueKeyword */: + if (hasKind(node.parent, 218 /* BreakStatement */) || hasKind(node.parent, 217 /* ContinueStatement */)) { return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent)); } break; - case 87 /* ForKeyword */: - if (hasKind(node.parent, 213 /* ForStatement */) || - hasKind(node.parent, 214 /* ForInStatement */) || - hasKind(node.parent, 215 /* ForOfStatement */)) { + case 88 /* ForKeyword */: + if (hasKind(node.parent, 214 /* ForStatement */) || + hasKind(node.parent, 215 /* ForInStatement */) || + hasKind(node.parent, 216 /* ForOfStatement */)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 105 /* WhileKeyword */: - case 80 /* DoKeyword */: - if (hasKind(node.parent, 212 /* WhileStatement */) || hasKind(node.parent, 211 /* DoStatement */)) { + case 106 /* WhileKeyword */: + case 81 /* DoKeyword */: + if (hasKind(node.parent, 213 /* WhileStatement */) || hasKind(node.parent, 212 /* DoStatement */)) { return highlightSpans(getLoopBreakContinueOccurrences(node.parent)); } break; - case 122 /* ConstructorKeyword */: - if (hasKind(node.parent, 151 /* Constructor */)) { + case 123 /* ConstructorKeyword */: + if (hasKind(node.parent, 152 /* Constructor */)) { return highlightSpans(getConstructorOccurrences(node.parent)); } break; - case 124 /* GetKeyword */: - case 134 /* SetKeyword */: - if (hasKind(node.parent, 152 /* GetAccessor */) || hasKind(node.parent, 153 /* SetAccessor */)) { + case 125 /* GetKeyword */: + case 135 /* SetKeyword */: + if (hasKind(node.parent, 153 /* GetAccessor */) || hasKind(node.parent, 154 /* SetAccessor */)) { return highlightSpans(getGetAndSetOccurrences(node.parent)); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 207 /* VariableStatement */)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 208 /* VariableStatement */)) { return highlightSpans(getModifierOccurrences(node.kind, node.parent)); } } @@ -73853,10 +73943,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 222 /* ThrowStatement */) { + if (node.kind === 223 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 223 /* TryStatement */) { + else if (node.kind === 224 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -73884,12 +73974,12 @@ var ts; var child = throwStatement; while (child.parent) { var parent_2 = child.parent; - if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264 /* SourceFile */) { + if (ts.isFunctionBlock(parent_2) || parent_2.kind === 265 /* SourceFile */) { return parent_2; } // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. - if (parent_2.kind === 223 /* TryStatement */) { + if (parent_2.kind === 224 /* TryStatement */) { var tryStatement = parent_2; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; @@ -73904,7 +73994,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 217 /* BreakStatement */ || node.kind === 216 /* ContinueStatement */) { + if (node.kind === 218 /* BreakStatement */ || node.kind === 217 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -73919,16 +74009,16 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node = statement.parent; node; node = node.parent) { switch (node.kind) { - case 220 /* SwitchStatement */: - if (statement.kind === 216 /* ContinueStatement */) { + case 221 /* SwitchStatement */: + if (statement.kind === 217 /* ContinueStatement */) { continue; } // falls through - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: if (!statement.label || isLabeledBy(node, statement.label.text)) { return node; } @@ -73947,24 +74037,24 @@ var ts; var container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 228 /* ClassDeclaration */ || - container.kind === 198 /* ClassExpression */ || - (declaration.kind === 145 /* Parameter */ && hasKind(container, 151 /* Constructor */)))) { + if (!(container.kind === 229 /* ClassDeclaration */ || + container.kind === 199 /* ClassExpression */ || + (declaration.kind === 146 /* Parameter */ && hasKind(container, 152 /* Constructor */)))) { return undefined; } } - else if (modifier === 114 /* StaticKeyword */) { - if (!(container.kind === 228 /* ClassDeclaration */ || container.kind === 198 /* ClassExpression */)) { + else if (modifier === 115 /* StaticKeyword */) { + if (!(container.kind === 229 /* ClassDeclaration */ || container.kind === 199 /* ClassExpression */)) { return undefined; } } - else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) { - if (!(container.kind === 233 /* ModuleBlock */ || container.kind === 264 /* SourceFile */)) { + else if (modifier === 84 /* ExportKeyword */ || modifier === 124 /* DeclareKeyword */) { + if (!(container.kind === 234 /* ModuleBlock */ || container.kind === 265 /* SourceFile */)) { return undefined; } } - else if (modifier === 116 /* AbstractKeyword */) { - if (!(container.kind === 228 /* ClassDeclaration */ || declaration.kind === 228 /* ClassDeclaration */)) { + else if (modifier === 117 /* AbstractKeyword */) { + if (!(container.kind === 229 /* ClassDeclaration */ || declaration.kind === 229 /* ClassDeclaration */)) { return undefined; } } @@ -73976,8 +74066,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 233 /* ModuleBlock */: - case 264 /* SourceFile */: + case 234 /* ModuleBlock */: + case 265 /* SourceFile */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */) { nodes = declaration.members.concat(declaration); @@ -73986,17 +74076,17 @@ var ts; nodes = container.statements; } break; - case 151 /* Constructor */: + case 152 /* Constructor */: nodes = container.parameters.concat(container.parent.members); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. if (modifierFlag & 28 /* AccessibilityModifier */) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 151 /* Constructor */ && member; + return member.kind === 152 /* Constructor */ && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -74017,19 +74107,19 @@ var ts; return keywords; function getFlagFromModifier(modifier) { switch (modifier) { - case 113 /* PublicKeyword */: + case 114 /* PublicKeyword */: return 4 /* Public */; - case 111 /* PrivateKeyword */: + case 112 /* PrivateKeyword */: return 8 /* Private */; - case 112 /* ProtectedKeyword */: + case 113 /* ProtectedKeyword */: return 16 /* Protected */; - case 114 /* StaticKeyword */: + case 115 /* StaticKeyword */: return 32 /* Static */; - case 83 /* ExportKeyword */: + case 84 /* ExportKeyword */: return 1 /* Export */; - case 123 /* DeclareKeyword */: + case 124 /* DeclareKeyword */: return 2 /* Ambient */; - case 116 /* AbstractKeyword */: + case 117 /* AbstractKeyword */: return 128 /* Abstract */; default: ts.Debug.fail(); @@ -74049,13 +74139,13 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* SetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* GetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 154 /* SetAccessor */); return keywords; function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 134 /* SetKeyword */); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 125 /* GetKeyword */, 135 /* SetKeyword */); }); } } } @@ -74064,19 +74154,19 @@ var ts; var keywords = []; ts.forEach(declarations, function (declaration) { ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */); + return pushKeywordIf(keywords, token, 123 /* ConstructorKeyword */); }); }); return keywords; } function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 88 /* ForKeyword */, 106 /* WhileKeyword */, 81 /* DoKeyword */)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 211 /* DoStatement */) { + if (loopNode.kind === 212 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) { + if (pushKeywordIf(keywords, loopTokens[i], 106 /* WhileKeyword */)) { break; } } @@ -74085,7 +74175,7 @@ var ts; var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 72 /* BreakKeyword */, 77 /* ContinueKeyword */); } }); return keywords; @@ -74094,13 +74184,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 211 /* DoStatement */: - case 212 /* WhileStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 212 /* DoStatement */: + case 213 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -74108,14 +74198,14 @@ var ts; } function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 98 /* SwitchKeyword */); // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */); + pushKeywordIf(keywords, clause.getFirstToken(), 73 /* CaseKeyword */, 79 /* DefaultKeyword */); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); ts.forEach(breaksAndContinues, function (statement) { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 72 /* BreakKeyword */); } }); }); @@ -74123,13 +74213,13 @@ var ts; } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 102 /* TryKeyword */); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 74 /* CatchKeyword */); } if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87 /* FinallyKeyword */, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 87 /* FinallyKeyword */); } return keywords; } @@ -74140,13 +74230,13 @@ var ts; } var keywords = []; ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100 /* ThrowKeyword */); }); // If the "owner" is a function, then we equate 'return' and 'throw' statements in their // ability to "jump out" of the function, and include occurrences for both. if (ts.isFunctionBlock(owner)) { ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96 /* ReturnKeyword */); }); } return keywords; @@ -74154,36 +74244,36 @@ var ts; function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 206 /* Block */))) { + if (!(func && hasKind(func.body, 207 /* Block */))) { return undefined; } var keywords = []; ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */); + pushKeywordIf(keywords, returnStatement.getFirstToken(), 96 /* ReturnKeyword */); }); // Include 'throw' statements that do not occur within a try block. ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */); + pushKeywordIf(keywords, throwStatement.getFirstToken(), 100 /* ThrowKeyword */); }); return keywords; } function getIfElseOccurrences(ifStatement, sourceFile) { var keywords = []; // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 210 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 211 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. while (ifStatement) { var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 89 /* IfKeyword */); + pushKeywordIf(keywords, children[0], 90 /* IfKeyword */); // Generally the 'else' keyword is second-to-last, so we traverse backwards. for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) { + if (pushKeywordIf(keywords, children[i], 82 /* ElseKeyword */)) { break; } } - if (!hasKind(ifStatement.elseStatement, 210 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 211 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -74192,7 +74282,7 @@ var ts; // We'd like to highlight else/ifs together if they are only separated by whitespace // (i.e. the keywords are separated by no comments, no newlines). for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) { + if (keywords[i].kind === 82 /* ElseKeyword */ && i < keywords.length - 1) { var elseKeyword = keywords[i]; var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. var shouldCombindElseAndIf = true; @@ -74223,7 +74313,7 @@ var ts; * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 221 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 222 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -74406,12 +74496,12 @@ var ts; } cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 180 /* CallExpression */: + case 181 /* CallExpression */: if (!isAvailableThroughGlobal) { var parent = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent.kind === 225 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent.kind === 226 /* VariableDeclaration */) { var name = parent.name; - if (name.kind === 70 /* Identifier */) { + if (name.kind === 71 /* Identifier */) { directImports.push(name); break; } @@ -74420,19 +74510,19 @@ var ts; addIndirectUser(direct.getSourceFile()); } break; - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1 /* Export */)); break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: var namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { handleNamespaceImport(direct, namedBindings.name); } else { directImports.push(direct); } break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: if (!direct.exportClause) { // This is `export * from "foo"`, so imports of this module may import the export too. handleDirectImports(getContainingModuleSymbol(direct, checker)); @@ -74452,7 +74542,7 @@ var ts; } else if (!isAvailableThroughGlobal) { var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - ts.Debug.assert(sourceFileLike.kind === 264 /* SourceFile */ || sourceFileLike.kind === 232 /* ModuleDeclaration */); + ts.Debug.assert(sourceFileLike.kind === 265 /* SourceFile */ || sourceFileLike.kind === 233 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUsers(sourceFileLike); } @@ -74506,13 +74596,13 @@ var ts; } return { importSearches: importSearches, singleReferences: singleReferences }; function handleImport(decl) { - if (decl.kind === 236 /* ImportEqualsDeclaration */) { + if (decl.kind === 237 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } return; } - if (decl.kind === 70 /* Identifier */) { + if (decl.kind === 71 /* Identifier */) { handleNamespaceImportLike(decl); return; } @@ -74520,13 +74610,13 @@ var ts; if (decl.moduleSpecifier.kind !== 9 /* StringLiteral */) { return; } - if (decl.kind === 243 /* ExportDeclaration */) { + if (decl.kind === 244 /* ExportDeclaration */) { searchForNamedImport(decl.exportClause); return; } var importClause = decl.importClause; var namedBindings = importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { handleNamespaceImportLike(namedBindings.name); return; } @@ -74577,7 +74667,7 @@ var ts; } } else { - var localSymbol = element.kind === 245 /* ExportSpecifier */ && element.propertyName + var localSymbol = element.kind === 246 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) // For re-exporting under a different name, we want to get the re-exported symbol. : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); @@ -74589,7 +74679,7 @@ var ts; function findNamespaceReExports(sourceFileLike, name, checker) { var namespaceImportSymbol = checker.getSymbolAtLocation(name); return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) { - if (statement.kind !== 243 /* ExportDeclaration */) + if (statement.kind !== 244 /* ExportDeclaration */) return; var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier; if (moduleSpecifier || !exportClause) @@ -74624,7 +74714,7 @@ var ts; } /** Iterates over all statements at the top level or in module declarations. Returns the first truthy result. */ function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return ts.forEach(sourceFileLike.kind === 264 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { + return ts.forEach(sourceFileLike.kind === 265 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action)); }); } @@ -74639,18 +74729,18 @@ var ts; else { forEachPossibleImportOrExportStatement(sourceFile, function (statement) { switch (statement.kind) { - case 243 /* ExportDeclaration */: - case 237 /* ImportDeclaration */: { + case 244 /* ExportDeclaration */: + case 238 /* ImportDeclaration */: { var decl = statement; if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9 /* StringLiteral */) { action(decl, decl.moduleSpecifier); } break; } - case 236 /* ImportEqualsDeclaration */: { + case 237 /* ImportEqualsDeclaration */: { var decl = statement; var moduleReference = decl.moduleReference; - if (moduleReference.kind === 247 /* ExternalModuleReference */ && + if (moduleReference.kind === 248 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */) { action(decl, moduleReference.expression); } @@ -74673,10 +74763,10 @@ var ts; } function importerFromModuleSpecifier(moduleSpecifier) { var decl = moduleSpecifier.parent; - if (decl.kind === 237 /* ImportDeclaration */ || decl.kind === 243 /* ExportDeclaration */) { + if (decl.kind === 238 /* ImportDeclaration */ || decl.kind === 244 /* ExportDeclaration */) { return decl; } - ts.Debug.assert(decl.kind === 247 /* ExternalModuleReference */); + ts.Debug.assert(decl.kind === 248 /* ExternalModuleReference */); return decl.parent; } /** @@ -74691,10 +74781,10 @@ var ts; function getExport() { var parent = node.parent; if (symbol.flags & 7340032 /* Export */) { - if (parent.kind === 178 /* PropertyAccessExpression */) { + if (parent.kind === 179 /* PropertyAccessExpression */) { // When accessing an export of a JS module, there's no alias. The symbol will still be flagged as an export even though we're at the use. // So check that we are at the declaration. - return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 /* BinaryExpression */ + return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194 /* BinaryExpression */ ? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false) : undefined; } @@ -74705,9 +74795,9 @@ var ts; } } else { - var exportNode = parent.kind === 225 /* VariableDeclaration */ ? ts.getAncestor(parent, 207 /* VariableStatement */) : parent; - if (ts.hasModifier(exportNode, 1 /* Export */)) { - if (exportNode.kind === 236 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) { + var exportNode = getExportNode(parent); + if (exportNode && ts.hasModifier(exportNode, 1 /* Export */)) { + if (exportNode.kind === 237 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) { // We're at `Y` in `export import X = Y`. This is not the exported symbol, the left-hand-side is. So treat this as an import statement. if (comingFromExport) { return undefined; @@ -74719,16 +74809,16 @@ var ts; return exportInfo(symbol, getExportKindForDeclaration(exportNode)); } } - else if (parent.kind === 242 /* ExportAssignment */) { + else if (parent.kind === 243 /* ExportAssignment */) { // Get the symbol for the `export =` node; its parent is the module it's the export of. var exportingModuleSymbol = parent.symbol.parent; ts.Debug.assert(!!exportingModuleSymbol); return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } }; } - else if (parent.kind === 193 /* BinaryExpression */) { + else if (parent.kind === 194 /* BinaryExpression */) { return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true); } - else if (parent.parent.kind === 193 /* BinaryExpression */) { + else if (parent.parent.kind === 194 /* BinaryExpression */) { return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true); } } @@ -74776,18 +74866,28 @@ var ts; } } FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; + // If a reference is a variable declaration, the exported node would be the variable statement. + function getExportNode(parent) { + if (parent.kind === 226 /* VariableDeclaration */) { + var p = parent; + return p.parent.kind === 260 /* CatchClause */ ? undefined : p.parent.parent.kind === 208 /* VariableStatement */ ? p.parent.parent : undefined; + } + else { + return parent; + } + } function isNodeImport(node) { var parent = node.parent; switch (parent.kind) { - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: return parent.name === node && isExternalModuleImportEquals(parent) ? { isNamedImport: false } : undefined; - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: // For a rename import `{ foo as bar }`, don't search for the imported symbol. Just find local uses of `bar`. return parent.propertyName ? undefined : { isNamedImport: true }; - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: ts.Debug.assert(parent.name === node); return { isNamedImport: false }; default: @@ -74806,7 +74906,7 @@ var ts; } var name = ts.forEach(symbol.declarations, function (_a) { var name = _a.name; - return name && name.kind === 70 /* Identifier */ && name.text; + return name && name.kind === 71 /* Identifier */ && name.text; }); ts.Debug.assert(!!name); return name; @@ -74827,22 +74927,22 @@ var ts; return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 180 /* CallExpression */) { + if (node.kind === 181 /* CallExpression */) { return node.getSourceFile(); } var parent = node.parent; - if (parent.kind === 264 /* SourceFile */) { + if (parent.kind === 265 /* SourceFile */) { return parent; } - ts.Debug.assert(parent.kind === 233 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent)); + ts.Debug.assert(parent.kind === 234 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent)); return parent.parent; } function isAmbientModuleDeclaration(node) { - return node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */; + return node.kind === 233 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */; } function isExternalModuleImportEquals(_a) { var moduleReference = _a.moduleReference; - return moduleReference.kind === 247 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */; + return moduleReference.kind === 248 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */; } })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); })(ts || (ts = {})); @@ -74881,12 +74981,12 @@ var ts; function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) { // If invoked directly on a shorthand property assignment, then return // the declaration of the symbol being assigned (not the symbol being assigned to). - if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 262 /* ShorthandPropertyAssignment */) { var result_4 = []; FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); }); return result_4; } - else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) { + else if (node.kind === 97 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) { // References to and accesses on the super keyword only have one possible implementation, so no // need to "Find all References" var symbol = typeChecker.getSymbolAtLocation(node); @@ -74995,16 +75095,16 @@ var ts; if (symbol) { return getDefinitionKindAndDisplayParts(symbol, node, checker); } - else if (node.kind === 177 /* ObjectLiteralExpression */) { + else if (node.kind === 178 /* ObjectLiteralExpression */) { return { kind: ts.ScriptElementKind.interfaceElement, - displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(19 /* CloseParenToken */)] + displayParts: [ts.punctuationPart(19 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(20 /* CloseParenToken */)] }; } - else if (node.kind === 198 /* ClassExpression */) { + else if (node.kind === 199 /* ClassExpression */) { return { kind: ts.ScriptElementKind.localClassElement, - displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(19 /* CloseParenToken */)] + displayParts: [ts.punctuationPart(19 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(20 /* CloseParenToken */)] }; } else { @@ -75038,17 +75138,17 @@ var ts; } /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ function isWriteAccess(node) { - if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) { + if (node.kind === 71 /* Identifier */ && ts.isDeclarationName(node)) { return true; } var parent = node.parent; if (parent) { - if (parent.kind === 192 /* PostfixUnaryExpression */ || parent.kind === 191 /* PrefixUnaryExpression */) { + if (parent.kind === 193 /* PostfixUnaryExpression */ || parent.kind === 192 /* PrefixUnaryExpression */) { return true; } - else if (parent.kind === 193 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 194 /* BinaryExpression */ && parent.left === node) { var operator = parent.operatorToken.kind; - return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */; + return 58 /* FirstAssignment */ <= operator && operator <= 70 /* LastAssignment */; } } return false; @@ -75065,7 +75165,7 @@ var ts; /** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) { if (options === void 0) { options = {}; } - if (node.kind === 264 /* SourceFile */) { + if (node.kind === 265 /* SourceFile */) { return undefined; } if (!options.implementations) { @@ -75112,7 +75212,7 @@ var ts; if (ts.isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 96 /* SuperKeyword */) { + if (node.kind === 97 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } return undefined; @@ -75158,7 +75258,7 @@ var ts; var inheritsFromCache = ts.createMap(); // Source file ID → symbol ID → Whether the symbol has been searched for in the source file. var sourceFileToSeenSymbols = []; - var isForConstructor = originalLocation.kind === 122 /* ConstructorKeyword */; + var isForConstructor = originalLocation.kind === 123 /* ConstructorKeyword */; var importTracker; return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference, markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() }); @@ -75255,14 +75355,14 @@ var ts; checker.getPropertySymbolOfDestructuringAssignment(location); } function isObjectBindingPatternElementWithoutPropertyName(symbol) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */); + var bindingElement = ts.getDeclarationOfKind(symbol, 176 /* BindingElement */); return bindingElement && - bindingElement.parent.kind === 173 /* ObjectBindingPattern */ && + bindingElement.parent.kind === 174 /* ObjectBindingPattern */ && !bindingElement.propertyName; } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) { if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { - var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */); + var bindingElement = ts.getDeclarationOfKind(symbol, 176 /* BindingElement */); var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); } @@ -75280,7 +75380,7 @@ var ts; // If this is the symbol of a named function expression or named class expression, // then named references are limited to its own scope. var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 185 /* FunctionExpression */ || valueDeclaration.kind === 198 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 186 /* FunctionExpression */ || valueDeclaration.kind === 199 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -75290,7 +75390,7 @@ var ts; if (flags & (4 /* Property */ | 8192 /* Method */)) { var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 228 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 229 /* ClassDeclaration */); } } // If symbol is of object binding pattern element without property name we would want to @@ -75316,7 +75416,7 @@ var ts; // Different declarations have different containers, bail out return undefined; } - if (!container || container.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) { // This is a global variable and not an external module, any declaration defined // within this scope is visible outside the file return undefined; @@ -75381,7 +75481,7 @@ var ts; function isValidReferencePosition(node, searchSymbolName) { // Compare the length so we filter out strict superstrings of the symbol we are looking for switch (node && node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: return node.getWidth() === searchSymbolName.length; case 9 /* StringLiteral */: return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) && @@ -75460,7 +75560,7 @@ var ts; return; } if (ts.isExportSpecifier(parent)) { - ts.Debug.assert(referenceLocation.kind === 70 /* Identifier */); + ts.Debug.assert(referenceLocation.kind === 71 /* Identifier */); getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state); return; } @@ -75504,7 +75604,7 @@ var ts; } // For `export { foo as bar }`, rename `foo`, but not `bar`. if (!(referenceLocation === propertyName && state.isForRename)) { - var exportKind = referenceLocation.originalKeywordKind === 78 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */; + var exportKind = referenceLocation.originalKeywordKind === 79 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */; var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker); ts.Debug.assert(!!exportInfo); searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state); @@ -75600,16 +75700,16 @@ var ts; function findOwnConstructorReferences(classSymbol, sourceFile, addNode) { for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) { var decl = _a[_i]; - var ctrKeyword = ts.findChildOfKind(decl, 122 /* ConstructorKeyword */, sourceFile); - ts.Debug.assert(decl.kind === 151 /* Constructor */ && !!ctrKeyword); + var ctrKeyword = ts.findChildOfKind(decl, 123 /* ConstructorKeyword */, sourceFile); + ts.Debug.assert(decl.kind === 152 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } classSymbol.exports.forEach(function (member) { var decl = member.valueDeclaration; - if (decl && decl.kind === 150 /* MethodDeclaration */) { + if (decl && decl.kind === 151 /* MethodDeclaration */) { var body = decl.body; if (body) { - forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) { + forEachDescendantOfKind(body, 99 /* ThisKeyword */, function (thisKeyword) { if (ts.isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -75627,10 +75727,10 @@ var ts; } for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) { var decl = _a[_i]; - ts.Debug.assert(decl.kind === 151 /* Constructor */); + ts.Debug.assert(decl.kind === 152 /* Constructor */); var body = decl.body; if (body) { - forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) { + forEachDescendantOfKind(body, 97 /* SuperKeyword */, function (node) { if (ts.isCallExpressionTarget(node)) { addNode(node); } @@ -75644,10 +75744,10 @@ var ts; addReference(refNode.parent); return; } - if (refNode.kind !== 70 /* Identifier */) { + if (refNode.kind !== 71 /* Identifier */) { return; } - if (refNode.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 262 /* ShorthandPropertyAssignment */) { // Go ahead and dereference the shorthand assignment by going to its definition getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference); } @@ -75665,7 +75765,7 @@ var ts; addReference(parent.initializer); } else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) { - if (parent.body.kind === 206 /* Block */) { + if (parent.body.kind === 207 /* Block */) { ts.forEachReturnStatement(parent.body, function (returnStatement) { if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) { addReference(returnStatement.expression); @@ -75706,12 +75806,12 @@ var ts; } function getContainingClassIfInHeritageClause(node) { if (node && node.parent) { - if (node.kind === 200 /* ExpressionWithTypeArguments */ - && node.parent.kind === 258 /* HeritageClause */ + if (node.kind === 201 /* ExpressionWithTypeArguments */ + && node.parent.kind === 259 /* HeritageClause */ && ts.isClassLike(node.parent.parent)) { return node.parent.parent; } - else if (node.kind === 70 /* Identifier */ || node.kind === 178 /* PropertyAccessExpression */) { + else if (node.kind === 71 /* Identifier */ || node.kind === 179 /* PropertyAccessExpression */) { return getContainingClassIfInHeritageClause(node.parent); } } @@ -75722,13 +75822,13 @@ var ts; */ function isImplementationExpression(node) { switch (node.kind) { - case 184 /* ParenthesizedExpression */: + case 185 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 186 /* ArrowFunction */: - case 185 /* FunctionExpression */: - case 177 /* ObjectLiteralExpression */: - case 198 /* ClassExpression */: - case 176 /* ArrayLiteralExpression */: + case 187 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 178 /* ObjectLiteralExpression */: + case 199 /* ClassExpression */: + case 177 /* ArrayLiteralExpression */: return true; default: return false; @@ -75782,7 +75882,7 @@ var ts; } return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); } - else if (declaration.kind === 229 /* InterfaceDeclaration */) { + else if (declaration.kind === 230 /* InterfaceDeclaration */) { if (parentIsInterface) { return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference); } @@ -75810,13 +75910,13 @@ var ts; // Whether 'super' occurs in a static context within a class. var staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; @@ -75829,7 +75929,7 @@ var ts; for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) { var position = possiblePositions_4[_i]; var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 96 /* SuperKeyword */) { + if (!node || node.kind !== 97 /* SuperKeyword */) { continue; } var container = ts.getSuperContainer(node, /*stopOnFunctions*/ false); @@ -75847,27 +75947,27 @@ var ts; // Whether 'this' occurs in a static context within a class. var staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } // falls through - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: staticFlag &= ts.getModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; - case 264 /* SourceFile */: + case 265 /* SourceFile */: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } // falls through - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: break; // Computed properties in classes are not handled here because references to this are illegal, // so there is no point finding references to them. @@ -75876,7 +75976,7 @@ var ts; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 264 /* SourceFile */) { + if (searchSpaceNode.kind === 265 /* SourceFile */) { ts.forEach(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); @@ -75900,28 +76000,28 @@ var ts; } var container = ts.getThisContainer(node, /* includeArrowFunctions */ false); switch (searchSpaceNode.kind) { - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: if (searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 198 /* ClassExpression */: - case 228 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 229 /* ClassDeclaration */: // Make sure the container belongs to the same class // and has the appropriate static modifier from the original container. if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32 /* Static */) === staticFlag) { result.push(FindAllReferences.nodeEntry(node)); } break; - case 264 /* SourceFile */: - if (container.kind === 264 /* SourceFile */ && !ts.isExternalModule(container)) { + case 265 /* SourceFile */: + if (container.kind === 265 /* SourceFile */ && !ts.isExternalModule(container)) { result.push(FindAllReferences.nodeEntry(node)); } break; @@ -75961,7 +76061,7 @@ var ts; // If the location is name of property symbol from object literal destructuring pattern // Search the property symbol // for ( { property: p2 } of elems) { } - if (containingObjectLiteralElement.kind !== 261 /* ShorthandPropertyAssignment */) { + if (containingObjectLiteralElement.kind !== 262 /* ShorthandPropertyAssignment */) { var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); if (propertySymbol) { result.push(propertySymbol); @@ -75993,7 +76093,7 @@ var ts; // we should include both parameter declaration symbol and property declaration symbol // Parameter Declaration symbol is only visible within function scope, so the symbol is stored in constructor.locals. // Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 /* Parameter */ && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 146 /* Parameter */ && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -76049,7 +76149,7 @@ var ts; getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 229 /* InterfaceDeclaration */) { + else if (declaration.kind === 230 /* InterfaceDeclaration */) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -76124,7 +76224,7 @@ var ts; }); } function getNameFromObjectLiteralElement(node) { - if (node.name.kind === 143 /* ComputedPropertyName */) { + if (node.name.kind === 144 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression)) { @@ -76194,7 +76294,7 @@ var ts; if (node.initializer) { return true; } - else if (node.kind === 225 /* VariableDeclaration */) { + else if (node.kind === 226 /* VariableDeclaration */) { var parentStatement = getParentStatementOfVariableDeclaration(node); return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */); } @@ -76204,18 +76304,18 @@ var ts; } else { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: return true; } } return false; } function getParentStatementOfVariableDeclaration(node) { - if (node.parent && node.parent.parent && node.parent.parent.kind === 207 /* VariableStatement */) { - ts.Debug.assert(node.parent.kind === 226 /* VariableDeclarationList */); + if (node.parent && node.parent.parent && node.parent.parent.kind === 208 /* VariableStatement */) { + ts.Debug.assert(node.parent.kind === 227 /* VariableDeclarationList */); return node.parent.parent; } } @@ -76329,9 +76429,9 @@ var ts; // (1) when the aliased symbol was declared in the location(parent). // (2) when the aliased symbol is originating from a named import. // - if (node.kind === 70 /* Identifier */ && + if (node.kind === 71 /* Identifier */ && (node.parent === declaration || - (declaration.kind === 241 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 240 /* NamedImports */))) { + (declaration.kind === 242 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 241 /* NamedImports */))) { symbol = typeChecker.getAliasedSymbol(symbol); } } @@ -76340,7 +76440,7 @@ var ts; // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. - if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 262 /* ShorthandPropertyAssignment */) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -76429,7 +76529,7 @@ var ts; function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { // Applicable only if we are in a new expression, or we are on a constructor declaration // and in either case the symbol has a construct signature definition, i.e. class - if (ts.isNewExpressionTarget(location) || location.kind === 122 /* ConstructorKeyword */) { + if (ts.isNewExpressionTarget(location) || location.kind === 123 /* ConstructorKeyword */) { if (symbol.flags & 32 /* Class */) { // Find the first class-like declaration and try to get the construct signature. for (var _i = 0, _a = symbol.getDeclarations(); _i < _a.length; _i++) { @@ -76458,7 +76558,7 @@ var ts; var definition; for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) { var d = signatureDeclarations_1[_i]; - if (selectConstructors ? d.kind === 151 /* Constructor */ : isSignatureDeclaration(d)) { + if (selectConstructors ? d.kind === 152 /* Constructor */ : isSignatureDeclaration(d)) { declarations.push(d); if (d.body) definition = d; @@ -76473,10 +76573,10 @@ var ts; } function isSignatureDeclaration(node) { switch (node.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: return true; default: return false; @@ -76638,7 +76738,7 @@ var ts; var doc = jsDocs_1[_i]; var tagsForDoc = doc.tags; if (tagsForDoc) { - tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283 /* JSDocTag */; }).map(function (jsDocTag) { + tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 284 /* JSDocTag */; }).map(function (jsDocTag) { return { name: jsDocTag.tagName.text, text: jsDocTag.comment @@ -76728,19 +76828,19 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 151 /* Constructor */: - case 228 /* ClassDeclaration */: - case 207 /* VariableStatement */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 152 /* Constructor */: + case 229 /* ClassDeclaration */: + case 208 /* VariableStatement */: break findOwner; - case 264 /* SourceFile */: + case 265 /* SourceFile */: return undefined; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // If in walking up the tree, we hit a a nested namespace declaration, // then we must be somewhere within a dotted namespace name; however we don't // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'. - if (commentOwner.parent.kind === 232 /* ModuleDeclaration */) { + if (commentOwner.parent.kind === 233 /* ModuleDeclaration */) { return undefined; } break findOwner; @@ -76758,7 +76858,7 @@ var ts; var docParams = ""; for (var i = 0; i < parameters.length; i++) { var currentName = parameters[i].name; - var paramName = currentName.kind === 70 /* Identifier */ ? + var paramName = currentName.kind === 71 /* Identifier */ ? currentName.text : "param" + i; if (isJavaScriptFile) { @@ -76788,7 +76888,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 207 /* VariableStatement */) { + if (commentOwner.kind === 208 /* VariableStatement */) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -76806,17 +76906,17 @@ var ts; * @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'. */ function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 184 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 185 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return rightHandSide.parameters; - case 198 /* ClassExpression */: + case 199 /* ClassExpression */: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 151 /* Constructor */) { + if (member.kind === 152 /* Constructor */) { return member.parameters; } } @@ -77085,7 +77185,7 @@ var ts; // Remove imports when the imported declaration is already in the list and has the same name. rawItems = ts.filter(rawItems, function (item) { var decl = item.declaration; - if (decl.kind === 238 /* ImportClause */ || decl.kind === 241 /* ImportSpecifier */ || decl.kind === 236 /* ImportEqualsDeclaration */) { + if (decl.kind === 239 /* ImportClause */ || decl.kind === 242 /* ImportSpecifier */ || decl.kind === 237 /* ImportEqualsDeclaration */) { var importer = checker.getSymbolAtLocation(decl.name); var imported = checker.getAliasedSymbol(importer); return importer.name !== imported.name; @@ -77113,7 +77213,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 /* Identifier */ || + if (node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { return node.text; @@ -77127,7 +77227,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 143 /* ComputedPropertyName */) { + else if (declaration.name.kind === 144 /* ComputedPropertyName */) { return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true); } else { @@ -77148,7 +77248,7 @@ var ts; } return true; } - if (expression.kind === 178 /* PropertyAccessExpression */) { + if (expression.kind === 179 /* PropertyAccessExpression */) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -77161,7 +77261,7 @@ var ts; var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. - if (declaration.name.kind === 143 /* ComputedPropertyName */) { + if (declaration.name.kind === 144 /* ComputedPropertyName */) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) { return undefined; } @@ -77347,7 +77447,7 @@ var ts; return; } switch (node.kind) { - case 151 /* Constructor */: + case 152 /* Constructor */: // Get parameter properties, and treat them as being on the *same* level as the constructor, not under it. var ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); @@ -77359,21 +77459,21 @@ var ts; } } break; - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 149 /* MethodSignature */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 150 /* MethodSignature */: if (!ts.hasDynamicName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: if (!ts.hasDynamicName(node)) { addLeafNode(node); } break; - case 238 /* ImportClause */: + case 239 /* ImportClause */: var importClause = node; // Handle default import case e.g.: // import d from "mod"; @@ -77385,7 +77485,7 @@ var ts; // import {a, b as B} from "mod"; var namedBindings = importClause.namedBindings; if (namedBindings) { - if (namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings.kind === 240 /* NamespaceImport */) { addLeafNode(namedBindings); } else { @@ -77396,8 +77496,8 @@ var ts; } } break; - case 175 /* BindingElement */: - case 225 /* VariableDeclaration */: + case 176 /* BindingElement */: + case 226 /* VariableDeclaration */: var decl = node; var name = decl.name; if (ts.isBindingPattern(name)) { @@ -77411,12 +77511,12 @@ var ts; addNodeWithRecursiveChild(decl, decl.initializer); } break; - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: startNode(node); for (var _d = 0, _e = node.members; _d < _e.length; _d++) { var member = _e[_d]; @@ -77426,9 +77526,9 @@ var ts; } endNode(); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: startNode(node); for (var _f = 0, _g = node.members; _f < _g.length; _f++) { var member = _g[_f]; @@ -77436,21 +77536,21 @@ var ts; } endNode(); break; - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 245 /* ExportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 156 /* IndexSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 230 /* TypeAliasDeclaration */: + case 246 /* ExportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 157 /* IndexSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 231 /* TypeAliasDeclaration */: addLeafNode(node); break; default: ts.forEach(node.jsDoc, function (jsDoc) { ts.forEach(jsDoc.tags, function (tag) { - if (tag.kind === 289 /* JSDocTypedefTag */) { + if (tag.kind === 290 /* JSDocTypedefTag */) { addLeafNode(tag); } }); @@ -77501,14 +77601,14 @@ var ts; }); /** a and b have the same name, but they may not be mergeable. */ function shouldReallyMerge(a, b) { - return a.kind === b.kind && (a.kind !== 232 /* ModuleDeclaration */ || areSameModule(a, b)); + return a.kind === b.kind && (a.kind !== 233 /* ModuleDeclaration */ || areSameModule(a, b)); // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes. // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'! function areSameModule(a, b) { if (a.body.kind !== b.body.kind) { return false; } - if (a.body.kind !== 232 /* ModuleDeclaration */) { + if (a.body.kind !== 233 /* ModuleDeclaration */) { return true; } return areSameModule(a.body, b.body); @@ -77549,7 +77649,7 @@ var ts; * So `new()` can still come before an `aardvark` method. */ function tryGetName(node) { - if (node.kind === 232 /* ModuleDeclaration */) { + if (node.kind === 233 /* ModuleDeclaration */) { return getModuleName(node); } var decl = node; @@ -77557,18 +77657,18 @@ var ts; return ts.getPropertyNameForPropertyNameNode(decl.name); } switch (node.kind) { - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 198 /* ClassExpression */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 199 /* ClassExpression */: return getFunctionOrClassName(node); - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return getJSDocTypedefTagName(node); default: return undefined; } } function getItemName(node) { - if (node.kind === 232 /* ModuleDeclaration */) { + if (node.kind === 233 /* ModuleDeclaration */) { return getModuleName(node); } var name = node.name; @@ -77579,16 +77679,16 @@ var ts; } } switch (node.kind) { - case 264 /* SourceFile */: + case 265 /* SourceFile */: var sourceFile = node; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: if (ts.getModifierFlags(node) & 512 /* Default */) { return "default"; } @@ -77596,15 +77696,15 @@ var ts; // (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the // navigation bar. return getFunctionOrClassName(node); - case 151 /* Constructor */: + case 152 /* Constructor */: return "constructor"; - case 155 /* ConstructSignature */: + case 156 /* ConstructSignature */: return "new()"; - case 154 /* CallSignature */: + case 155 /* CallSignature */: return "()"; - case 156 /* IndexSignature */: + case 157 /* IndexSignature */: return "[]"; - case 289 /* JSDocTypedefTag */: + case 290 /* JSDocTypedefTag */: return getJSDocTypedefTagName(node); default: return ""; @@ -77616,10 +77716,10 @@ var ts; } else { var parentNode = node.parent && node.parent.parent; - if (parentNode && parentNode.kind === 207 /* VariableStatement */) { + if (parentNode && parentNode.kind === 208 /* VariableStatement */) { if (parentNode.declarationList.declarations.length > 0) { var nameIdentifier = parentNode.declarationList.declarations[0].name; - if (nameIdentifier.kind === 70 /* Identifier */) { + if (nameIdentifier.kind === 71 /* Identifier */) { return nameIdentifier.text; } } @@ -77645,24 +77745,24 @@ var ts; return topLevel; function isTopLevel(item) { switch (navigationBarNodeKind(item)) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 231 /* EnumDeclaration */: - case 229 /* InterfaceDeclaration */: - case 232 /* ModuleDeclaration */: - case 264 /* SourceFile */: - case 230 /* TypeAliasDeclaration */: - case 289 /* JSDocTypedefTag */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 232 /* EnumDeclaration */: + case 230 /* InterfaceDeclaration */: + case 233 /* ModuleDeclaration */: + case 265 /* SourceFile */: + case 231 /* TypeAliasDeclaration */: + case 290 /* JSDocTypedefTag */: return true; - case 151 /* Constructor */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 225 /* VariableDeclaration */: + case 152 /* Constructor */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 226 /* VariableDeclaration */: return hasSomeImportantChild(item); - case 186 /* ArrowFunction */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -77672,10 +77772,10 @@ var ts; return false; } switch (navigationBarNodeKind(item.parent)) { - case 233 /* ModuleBlock */: - case 264 /* SourceFile */: - case 150 /* MethodDeclaration */: - case 151 /* Constructor */: + case 234 /* ModuleBlock */: + case 265 /* SourceFile */: + case 151 /* MethodDeclaration */: + case 152 /* Constructor */: return true; default: return hasSomeImportantChild(item); @@ -77684,7 +77784,7 @@ var ts; function hasSomeImportantChild(item) { return ts.forEach(item.children, function (child) { var childKind = navigationBarNodeKind(child); - return childKind !== 225 /* VariableDeclaration */ && childKind !== 175 /* BindingElement */; + return childKind !== 226 /* VariableDeclaration */ && childKind !== 176 /* BindingElement */; }); } } @@ -77740,7 +77840,7 @@ var ts; // Otherwise, we need to aggregate each identifier to build up the qualified name. var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 233 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -77751,18 +77851,18 @@ var ts; * We store 'A' as associated with a NavNode, and use getModuleName to traverse down again. */ function getInteriorModule(decl) { - return decl.body.kind === 232 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl; + return decl.body.kind === 233 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 143 /* ComputedPropertyName */; + return !member.name || member.name.kind === 144 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 264 /* SourceFile */ + return node.kind === 265 /* SourceFile */ ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromNode(node, curSourceFile); } function getModifiers(node) { - if (node.parent && node.parent.kind === 225 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 226 /* VariableDeclaration */) { node = node.parent; } return ts.getNodeModifiers(node); @@ -77771,14 +77871,14 @@ var ts; if (node.name && ts.getFullWidth(node.name) > 0) { return ts.declarationNameToString(node.name); } - else if (node.parent.kind === 225 /* VariableDeclaration */) { + else if (node.parent.kind === 226 /* VariableDeclaration */) { return ts.declarationNameToString(node.parent.name); } - else if (node.parent.kind === 193 /* BinaryExpression */ && - node.parent.operatorToken.kind === 57 /* EqualsToken */) { + else if (node.parent.kind === 194 /* BinaryExpression */ && + node.parent.operatorToken.kind === 58 /* EqualsToken */) { return nodeText(node.parent.left).replace(whiteSpaceRegex, ""); } - else if (node.parent.kind === 260 /* PropertyAssignment */ && node.parent.name) { + else if (node.parent.kind === 261 /* PropertyAssignment */ && node.parent.name) { return nodeText(node.parent.name); } else if (ts.getModifierFlags(node) & 512 /* Default */) { @@ -77789,7 +77889,7 @@ var ts; } } function isFunctionOrClassExpression(node) { - return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */ || node.kind === 198 /* ClassExpression */; + return node.kind === 186 /* FunctionExpression */ || node.kind === 187 /* ArrowFunction */ || node.kind === 199 /* ClassExpression */; } })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); @@ -77866,7 +77966,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 186 /* ArrowFunction */; + return ts.isFunctionBlock(node) && node.parent.kind !== 187 /* ArrowFunction */; } var depth = 0; var maxDepth = 20; @@ -77879,26 +77979,26 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 206 /* Block */: + case 207 /* Block */: if (!ts.isFunctionBlock(n)) { var parent = n.parent; - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. // If the latter, we want to collapse the block, but consider its hint span // to be the entire span of the parent. - if (parent.kind === 211 /* DoStatement */ || - parent.kind === 214 /* ForInStatement */ || - parent.kind === 215 /* ForOfStatement */ || - parent.kind === 213 /* ForStatement */ || - parent.kind === 210 /* IfStatement */ || - parent.kind === 212 /* WhileStatement */ || - parent.kind === 219 /* WithStatement */ || - parent.kind === 259 /* CatchClause */) { + if (parent.kind === 212 /* DoStatement */ || + parent.kind === 215 /* ForInStatement */ || + parent.kind === 216 /* ForOfStatement */ || + parent.kind === 214 /* ForStatement */ || + parent.kind === 211 /* IfStatement */ || + parent.kind === 213 /* WhileStatement */ || + parent.kind === 220 /* WithStatement */ || + parent.kind === 260 /* CatchClause */) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent.kind === 223 /* TryStatement */) { + if (parent.kind === 224 /* TryStatement */) { // Could be the try-block, or the finally-block. var tryStatement = parent; if (tryStatement.tryBlock === n) { @@ -77906,7 +78006,7 @@ var ts; break; } else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile); + var finallyKeyword = ts.findChildOfKind(tryStatement, 87 /* FinallyKeyword */, sourceFile); if (finallyKeyword) { addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); break; @@ -77926,25 +78026,25 @@ var ts; break; } // falls through - case 233 /* ModuleBlock */: { - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + case 234 /* ModuleBlock */: { + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 177 /* ObjectLiteralExpression */: - case 234 /* CaseBlock */: { - var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile); + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 178 /* ObjectLiteralExpression */: + case 235 /* CaseBlock */: { + var openBrace = ts.findChildOfKind(n, 17 /* OpenBraceToken */, sourceFile); + var closeBrace = ts.findChildOfKind(n, 18 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 176 /* ArrayLiteralExpression */: - var openBracket = ts.findChildOfKind(n, 20 /* OpenBracketToken */, sourceFile); - var closeBracket = ts.findChildOfKind(n, 21 /* CloseBracketToken */, sourceFile); + case 177 /* ArrayLiteralExpression */: + var openBracket = ts.findChildOfKind(n, 21 /* OpenBracketToken */, sourceFile); + var closeBracket = ts.findChildOfKind(n, 22 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); break; } @@ -78535,10 +78635,10 @@ var ts; var externalModule = false; function nextToken() { var token = ts.scanner.scan(); - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { braceNesting++; } - else if (token === 17 /* CloseBraceToken */) { + else if (token === 18 /* CloseBraceToken */) { braceNesting--; } return token; @@ -78589,10 +78689,10 @@ var ts; */ function tryConsumeDeclare() { var token = ts.scanner.getToken(); - if (token === 123 /* DeclareKeyword */) { + if (token === 124 /* DeclareKeyword */) { // declare module "mod" token = nextToken(); - if (token === 127 /* ModuleKeyword */) { + if (token === 128 /* ModuleKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { recordAmbientExternalModule(); @@ -78607,7 +78707,7 @@ var ts; */ function tryConsumeImport() { var token = ts.scanner.getToken(); - if (token === 90 /* ImportKeyword */) { + if (token === 91 /* ImportKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import "mod"; @@ -78615,9 +78715,9 @@ var ts; return true; } else { - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import d from "mod"; @@ -78625,12 +78725,12 @@ var ts; return true; } } - else if (token === 57 /* EqualsToken */) { + else if (token === 58 /* EqualsToken */) { if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) { return true; } } - else if (token === 25 /* CommaToken */) { + else if (token === 26 /* CommaToken */) { // consume comma and keep going token = nextToken(); } @@ -78639,16 +78739,16 @@ var ts; return true; } } - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure that it stops on EOF - while (token !== 17 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 18 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = nextToken(); } - if (token === 17 /* CloseBraceToken */) { + if (token === 18 /* CloseBraceToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import {a as A} from "mod"; @@ -78658,13 +78758,13 @@ var ts; } } } - else if (token === 38 /* AsteriskToken */) { + else if (token === 39 /* AsteriskToken */) { token = nextToken(); - if (token === 117 /* AsKeyword */) { + if (token === 118 /* AsKeyword */) { token = nextToken(); - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // import * as NS from "mod" @@ -78682,19 +78782,19 @@ var ts; } function tryConsumeExport() { var token = ts.scanner.getToken(); - if (token === 83 /* ExportKeyword */) { + if (token === 84 /* ExportKeyword */) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 16 /* OpenBraceToken */) { + if (token === 17 /* OpenBraceToken */) { token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure it stops on EOF - while (token !== 17 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 18 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { token = nextToken(); } - if (token === 17 /* CloseBraceToken */) { + if (token === 18 /* CloseBraceToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // export {a as A} from "mod"; @@ -78704,9 +78804,9 @@ var ts; } } } - else if (token === 38 /* AsteriskToken */) { + else if (token === 39 /* AsteriskToken */) { token = nextToken(); - if (token === 139 /* FromKeyword */) { + if (token === 140 /* FromKeyword */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // export * from "mod" @@ -78714,11 +78814,11 @@ var ts; } } } - else if (token === 90 /* ImportKeyword */) { + else if (token === 91 /* ImportKeyword */) { token = nextToken(); - if (token === 70 /* Identifier */ || ts.isKeyword(token)) { + if (token === 71 /* Identifier */ || ts.isKeyword(token)) { token = nextToken(); - if (token === 57 /* EqualsToken */) { + if (token === 58 /* EqualsToken */) { if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) { return true; } @@ -78731,9 +78831,9 @@ var ts; } function tryConsumeRequireCall(skipCurrentToken) { var token = skipCurrentToken ? nextToken() : ts.scanner.getToken(); - if (token === 131 /* RequireKeyword */) { + if (token === 132 /* RequireKeyword */) { token = nextToken(); - if (token === 18 /* OpenParenToken */) { + if (token === 19 /* OpenParenToken */) { token = nextToken(); if (token === 9 /* StringLiteral */) { // require("mod"); @@ -78746,16 +78846,16 @@ var ts; } function tryConsumeDefine() { var token = ts.scanner.getToken(); - if (token === 70 /* Identifier */ && ts.scanner.getTokenValue() === "define") { + if (token === 71 /* Identifier */ && ts.scanner.getTokenValue() === "define") { token = nextToken(); - if (token !== 18 /* OpenParenToken */) { + if (token !== 19 /* OpenParenToken */) { return true; } token = nextToken(); if (token === 9 /* StringLiteral */) { // looks like define ("modname", ... - skip string literal and comma token = nextToken(); - if (token === 25 /* CommaToken */) { + if (token === 26 /* CommaToken */) { token = nextToken(); } else { @@ -78764,14 +78864,14 @@ var ts; } } // should be start of dependency list - if (token !== 20 /* OpenBracketToken */) { + if (token !== 21 /* OpenBracketToken */) { return true; } // skip open bracket token = nextToken(); var i = 0; // scan until ']' or EOF - while (token !== 21 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { + while (token !== 22 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { // record string literals as module names if (token === 9 /* StringLiteral */) { recordModuleName(); @@ -78885,8 +78985,8 @@ var ts; return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); } // Cannot rename `default` as in `import { default as foo } from "./someModule"; - if (node.kind === 70 /* Identifier */ && - node.originalKeywordKind === 78 /* DefaultKeyword */ && + if (node.kind === 71 /* Identifier */ && + node.originalKeywordKind === 79 /* DefaultKeyword */ && symbol.parent.flags & 1536 /* Module */) { return undefined; } @@ -78936,7 +79036,7 @@ var ts; return ts.createTextSpan(start, width); } function nodeIsEligibleForRename(node) { - return node.kind === 70 /* Identifier */ || + return node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || ts.isThis(node); @@ -79119,15 +79219,15 @@ var ts; } SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; function createJavaScriptSignatureHelpItems(argumentInfo, program) { - if (argumentInfo.invocation.kind !== 180 /* CallExpression */) { + if (argumentInfo.invocation.kind !== 181 /* CallExpression */) { return undefined; } // See if we can find some symbol with the call expression name that has call signatures. var callExpression = argumentInfo.invocation; var expression = callExpression.expression; - var name = expression.kind === 70 /* Identifier */ + var name = expression.kind === 71 /* Identifier */ ? expression - : expression.kind === 178 /* PropertyAccessExpression */ + : expression.kind === 179 /* PropertyAccessExpression */ ? expression.name : undefined; if (!name || !name.text) { @@ -79160,7 +79260,7 @@ var ts; * in the argument of an invocation; returns undefined otherwise. */ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { - if (node.parent.kind === 180 /* CallExpression */ || node.parent.kind === 181 /* NewExpression */) { + if (node.parent.kind === 181 /* CallExpression */ || node.parent.kind === 182 /* NewExpression */) { var callExpression = node.parent; // There are 3 cases to handle: // 1. The token introduces a list, and should begin a signature help session @@ -79176,8 +79276,8 @@ var ts; // Case 3: // foo(a#, #b#) -> The token is buried inside a list, and should give signature help // Find out if 'node' is an argument, a type argument, or neither - if (node.kind === 26 /* LessThanToken */ || - node.kind === 18 /* OpenParenToken */) { + if (node.kind === 27 /* LessThanToken */ || + node.kind === 19 /* OpenParenToken */) { // Find the list that starts right *after* the < or ( token. // If the user has just opened a list, consider this item 0. var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); @@ -79214,27 +79314,27 @@ var ts; } return undefined; } - else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.kind === 13 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 183 /* TaggedTemplateExpression */) { // Check if we're actually inside the template; // otherwise we'll fall out and return undefined. if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0, sourceFile); } } - else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.kind === 14 /* TemplateHead */ && node.parent.parent.kind === 183 /* TaggedTemplateExpression */) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 196 /* TemplateExpression */); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } - else if (node.parent.kind === 204 /* TemplateSpan */ && node.parent.parent.parent.kind === 182 /* TaggedTemplateExpression */) { + else if (node.parent.kind === 205 /* TemplateSpan */ && node.parent.parent.parent.kind === 183 /* TaggedTemplateExpression */) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 196 /* TemplateExpression */); // If we're just after a template tail, don't show signature help. - if (node.kind === 15 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { + if (node.kind === 16 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); @@ -79279,7 +79379,7 @@ var ts; if (child === node) { break; } - if (child.kind !== 25 /* CommaToken */) { + if (child.kind !== 26 /* CommaToken */) { argumentIndex++; } } @@ -79298,8 +79398,8 @@ var ts; // That will give us 2 non-commas. We then add one for the last comma, giving us an // arg count of 3. var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25 /* CommaToken */; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 25 /* CommaToken */) { + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 26 /* CommaToken */; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 26 /* CommaToken */) { argumentCount++; } return argumentCount; @@ -79329,7 +79429,7 @@ var ts; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === 12 /* NoSubstitutionTemplateLiteral */ + var argumentCount = tagExpression.template.kind === 13 /* NoSubstitutionTemplateLiteral */ ? 1 : tagExpression.template.templateSpans.length + 1; ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); @@ -79367,7 +79467,7 @@ var ts; // // This is because a Missing node has no width. However, what we actually want is to include trivia // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 195 /* TemplateExpression */) { + if (template.kind === 196 /* TemplateExpression */) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); @@ -79376,7 +79476,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node, position, sourceFile) { - for (var n = node; n.kind !== 264 /* SourceFile */; n = n.parent) { + for (var n = node; n.kind !== 265 /* SourceFile */; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -79440,10 +79540,10 @@ var ts; var isVariadic; if (isTypeParameterList) { isVariadic = false; // type parameter lists are not variadic - prefixDisplayParts.push(ts.punctuationPart(26 /* LessThanToken */)); + prefixDisplayParts.push(ts.punctuationPart(27 /* LessThanToken */)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(28 /* GreaterThanToken */)); + suffixDisplayParts.push(ts.punctuationPart(29 /* GreaterThanToken */)); var parameterParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.thisParameter, candidateSignature.parameters, writer, invocation); }); @@ -79455,10 +79555,10 @@ var ts; return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); }); ts.addRange(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + prefixDisplayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + suffixDisplayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); @@ -79468,7 +79568,7 @@ var ts; isVariadic: isVariadic, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(25 /* CommaToken */), ts.spacePart()], + separatorDisplayParts: [ts.punctuationPart(26 /* CommaToken */), ts.spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment(), tags: candidateSignature.getJsDocTags() @@ -79523,7 +79623,7 @@ var ts; function getSymbolKind(typeChecker, symbol, location) { var flags = symbol.flags; if (flags & 32 /* Class */) - return ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */) ? + return ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */) ? ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement; if (flags & 384 /* Enum */) return ts.ScriptElementKind.enumElement; @@ -79554,7 +79654,7 @@ var ts; if (typeChecker.isArgumentsSymbol(symbol)) { return ts.ScriptElementKind.localVariableElement; } - if (location.kind === 98 /* ThisKeyword */ && ts.isExpression(location)) { + if (location.kind === 99 /* ThisKeyword */ && ts.isExpression(location)) { return ts.ScriptElementKind.parameterElement; } var flags = symbol.flags; @@ -79623,7 +79723,7 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); var hasAddedSymbolInfo; - var isThisExpression = location.kind === 98 /* ThisKeyword */ && ts.isExpression(location); + var isThisExpression = location.kind === 99 /* ThisKeyword */ && ts.isExpression(location); var type; // Class at constructor site need to be shown as constructor apart from property,method, vars if (symbolKind !== ts.ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 8388608 /* Alias */) { @@ -79634,7 +79734,7 @@ var ts; var signature = void 0; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 178 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 179 /* PropertyAccessExpression */) { var right = location.parent.name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { @@ -79643,7 +79743,7 @@ var ts; } // try get the call/construct signature from the type if it matches var callExpressionLike = void 0; - if (location.kind === 180 /* CallExpression */ || location.kind === 181 /* NewExpression */) { + if (location.kind === 181 /* CallExpression */ || location.kind === 182 /* NewExpression */) { callExpressionLike = location; } else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) { @@ -79659,7 +79759,7 @@ var ts; // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpressionLike.kind === 181 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96 /* SuperKeyword */); + var useConstructSignatures = callExpressionLike.kind === 182 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 97 /* SuperKeyword */); var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { // Get the first signature if there is one -- allSignatures may contain @@ -79677,7 +79777,7 @@ var ts; pushTypePart(symbolKind); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } addFullSymbolName(symbol); @@ -79694,10 +79794,10 @@ var ts; case ts.ScriptElementKind.parameterElement: case ts.ScriptElementKind.localVariableElement: // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(55 /* ColonToken */)); + displayParts.push(ts.punctuationPart(56 /* ColonToken */)); displayParts.push(ts.spacePart()); if (useConstructSignatures) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */) && type.symbol) { @@ -79713,24 +79813,24 @@ var ts; } } else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 151 /* Constructor */)) { + (location.kind === 123 /* ConstructorKeyword */ && location.parent.kind === 152 /* Constructor */)) { // get the signature from the declaration and write it var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 151 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + var allSignatures = functionDeclaration.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 151 /* Constructor */) { + if (functionDeclaration.kind === 152 /* Constructor */) { // show (constructor) Type(...) signature symbolKind = ts.ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 /* CallSignature */ && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -79739,7 +79839,7 @@ var ts; } } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { - if (ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */)) { + if (ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */)) { // Special case for class expressions because we would like to indicate that // the class name is local to the class body (similar to function expression) // (local class) class @@ -79747,7 +79847,7 @@ var ts; } else { // Class declaration has name which is not local. - displayParts.push(ts.keywordPart(74 /* ClassKeyword */)); + displayParts.push(ts.keywordPart(75 /* ClassKeyword */)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); @@ -79755,45 +79855,45 @@ var ts; } if ((symbolFlags & 64 /* Interface */) && (semanticMeaning & 2 /* Type */)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(108 /* InterfaceKeyword */)); + displayParts.push(ts.keywordPart(109 /* InterfaceKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288 /* TypeAlias */) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(137 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(138 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512 /* InTypeAlias */)); } if (symbolFlags & 384 /* Enum */) { addNewLineIfDisplayPartsExist(); if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(75 /* ConstKeyword */)); + displayParts.push(ts.keywordPart(76 /* ConstKeyword */)); displayParts.push(ts.spacePart()); } - displayParts.push(ts.keywordPart(82 /* EnumKeyword */)); + displayParts.push(ts.keywordPart(83 /* EnumKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 232 /* ModuleDeclaration */); - var isNamespace = declaration && declaration.name && declaration.name.kind === 70 /* Identifier */; - displayParts.push(ts.keywordPart(isNamespace ? 128 /* NamespaceKeyword */ : 127 /* ModuleKeyword */)); + var declaration = ts.getDeclarationOfKind(symbol, 233 /* ModuleDeclaration */); + var isNamespace = declaration && declaration.name && declaration.name.kind === 71 /* Identifier */; + displayParts.push(ts.keywordPart(isNamespace ? 129 /* NamespaceKeyword */ : 128 /* ModuleKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } if ((symbolFlags & 262144 /* TypeParameter */) && (semanticMeaning & 2 /* Type */)) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.textPart("type parameter")); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); if (symbol.parent) { @@ -79804,28 +79904,28 @@ var ts; } else { // Method/function type parameter - var declaration = ts.getDeclarationOfKind(symbol, 144 /* TypeParameter */); + var declaration = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { addInPrefix(); var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 155 /* ConstructSignature */) { - displayParts.push(ts.keywordPart(93 /* NewKeyword */)); + if (declaration.kind === 156 /* ConstructSignature */) { + displayParts.push(ts.keywordPart(94 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 154 /* CallSignature */ && declaration.name) { + else if (declaration.kind !== 155 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); } - else if (declaration.kind === 230 /* TypeAliasDeclaration */) { + else if (declaration.kind === 231 /* TypeAliasDeclaration */) { // Type alias type parameter // For example // type list = T[]; // Both T will go through same code path addInPrefix(); - displayParts.push(ts.keywordPart(137 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(138 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -79837,11 +79937,11 @@ var ts; symbolKind = ts.ScriptElementKind.enumMemberElement; addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 263 /* EnumMember */) { + if (declaration.kind === 264 /* EnumMember */) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral)); } @@ -79849,33 +79949,33 @@ var ts; } if (symbolFlags & 8388608 /* Alias */) { addNewLineIfDisplayPartsExist(); - if (symbol.declarations[0].kind === 235 /* NamespaceExportDeclaration */) { - displayParts.push(ts.keywordPart(83 /* ExportKeyword */)); + if (symbol.declarations[0].kind === 236 /* NamespaceExportDeclaration */) { + displayParts.push(ts.keywordPart(84 /* ExportKeyword */)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(128 /* NamespaceKeyword */)); + displayParts.push(ts.keywordPart(129 /* NamespaceKeyword */)); } else { - displayParts.push(ts.keywordPart(90 /* ImportKeyword */)); + displayParts.push(ts.keywordPart(91 /* ImportKeyword */)); } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 236 /* ImportEqualsDeclaration */) { + if (declaration.kind === 237 /* ImportEqualsDeclaration */) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(131 /* RequireKeyword */)); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.keywordPart(132 /* RequireKeyword */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), ts.SymbolDisplayPartKind.stringLiteral)); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } else { var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); if (internalAliasSymbol) { displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(57 /* EqualsToken */)); + displayParts.push(ts.operatorPart(58 /* EqualsToken */)); displayParts.push(ts.spacePart()); addFullSymbolName(internalAliasSymbol, enclosingDeclaration); } @@ -79889,7 +79989,7 @@ var ts; if (type) { if (isThisExpression) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(98 /* ThisKeyword */)); + displayParts.push(ts.keywordPart(99 /* ThisKeyword */)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); @@ -79900,7 +80000,7 @@ var ts; symbolFlags & 3 /* Variable */ || symbolKind === ts.ScriptElementKind.localVariableElement || isThisExpression) { - displayParts.push(ts.punctuationPart(55 /* ColonToken */)); + displayParts.push(ts.punctuationPart(56 /* ColonToken */)); displayParts.push(ts.spacePart()); // If the type is type parameter, format it specially if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */) { @@ -79935,10 +80035,10 @@ var ts; // For some special property access expressions like `exports.foo = foo` or `module.exports.foo = foo` // there documentation comments might be attached to the right hand side symbol of their declarations. // The pattern of such special property access is that the parent symbol is the symbol of the file. - if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264 /* SourceFile */; })) { + if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 265 /* SourceFile */; })) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (!declaration.parent || declaration.parent.kind !== 193 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 194 /* BinaryExpression */) { continue; } var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -79962,7 +80062,7 @@ var ts; } function addInPrefix() { displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(91 /* InKeyword */)); + displayParts.push(ts.keywordPart(92 /* InKeyword */)); displayParts.push(ts.spacePart()); } function addFullSymbolName(symbol, enclosingDeclaration) { @@ -79987,9 +80087,9 @@ var ts; displayParts.push(ts.textOrKeywordPart(symbolKind)); return; default: - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); displayParts.push(ts.textOrKeywordPart(symbolKind)); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); return; } } @@ -79997,12 +80097,12 @@ var ts; ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); if (allSignatures.length > 1) { displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(18 /* OpenParenToken */)); - displayParts.push(ts.operatorPart(36 /* PlusToken */)); + displayParts.push(ts.punctuationPart(19 /* OpenParenToken */)); + displayParts.push(ts.operatorPart(37 /* PlusToken */)); displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), ts.SymbolDisplayPartKind.numericLiteral)); displayParts.push(ts.spacePart()); displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(19 /* CloseParenToken */)); + displayParts.push(ts.punctuationPart(20 /* CloseParenToken */)); } documentation = signature.getDocumentationComment(); tags = signature.getJsDocTags(); @@ -80021,16 +80121,16 @@ var ts; } return ts.forEach(symbol.declarations, function (declaration) { // Function expressions are local - if (declaration.kind === 185 /* FunctionExpression */) { + if (declaration.kind === 186 /* FunctionExpression */) { return true; } - if (declaration.kind !== 225 /* VariableDeclaration */ && declaration.kind !== 227 /* FunctionDeclaration */) { + if (declaration.kind !== 226 /* VariableDeclaration */ && declaration.kind !== 228 /* FunctionDeclaration */) { return false; } // If the parent is not sourceFile or module block it is local variable for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) { // Reached source file or module block - if (parent.kind === 264 /* SourceFile */ || parent.kind === 233 /* ModuleBlock */) { + if (parent.kind === 265 /* SourceFile */ || parent.kind === 234 /* ModuleBlock */) { return false; } } @@ -80257,11 +80357,11 @@ var ts; function shouldRescanGreaterThanToken(node) { if (node) { switch (node.kind) { - case 30 /* GreaterThanEqualsToken */: - case 65 /* GreaterThanGreaterThanEqualsToken */: - case 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 46 /* GreaterThanGreaterThanGreaterThanToken */: - case 45 /* GreaterThanGreaterThanToken */: + case 31 /* GreaterThanEqualsToken */: + case 66 /* GreaterThanGreaterThanEqualsToken */: + case 67 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 47 /* GreaterThanGreaterThanGreaterThanToken */: + case 46 /* GreaterThanGreaterThanToken */: return true; } } @@ -80270,11 +80370,11 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 252 /* JsxAttribute */: - case 250 /* JsxOpeningElement */: - case 251 /* JsxClosingElement */: - case 249 /* JsxSelfClosingElement */: - return node.kind === 70 /* Identifier */; + case 253 /* JsxAttribute */: + case 251 /* JsxOpeningElement */: + case 252 /* JsxClosingElement */: + case 250 /* JsxSelfClosingElement */: + return node.kind === 71 /* Identifier */; } } return false; @@ -80283,14 +80383,14 @@ var ts; return node && node.kind === 10 /* JsxText */; } function shouldRescanSlashToken(container) { - return container.kind === 11 /* RegularExpressionLiteral */; + return container.kind === 12 /* RegularExpressionLiteral */; } function shouldRescanTemplateToken(container) { - return container.kind === 14 /* TemplateMiddle */ || - container.kind === 15 /* TemplateTail */; + return container.kind === 15 /* TemplateMiddle */ || + container.kind === 16 /* TemplateTail */; } function startsWithSlashToken(t) { - return t === 40 /* SlashToken */ || t === 62 /* SlashEqualsToken */; + return t === 41 /* SlashToken */ || t === 63 /* SlashEqualsToken */; } function readTokenInfo(n) { ts.Debug.assert(scanner !== undefined); @@ -80331,7 +80431,7 @@ var ts; scanner.scan(); } var currentToken = scanner.getToken(); - if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 28 /* GreaterThanToken */) { + if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 29 /* GreaterThanToken */) { currentToken = scanner.reScanGreaterToken(); ts.Debug.assert(n.kind === currentToken); lastScanAction = 1 /* RescanGreaterThanToken */; @@ -80341,11 +80441,11 @@ var ts; ts.Debug.assert(n.kind === currentToken); lastScanAction = 2 /* RescanSlashToken */; } - else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 17 /* CloseBraceToken */) { + else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 18 /* CloseBraceToken */) { currentToken = scanner.reScanTemplateToken(); lastScanAction = 3 /* RescanTemplateToken */; } - else if (expectedScanAction === 4 /* RescanJsxIdentifier */ && currentToken === 70 /* Identifier */) { + else if (expectedScanAction === 4 /* RescanJsxIdentifier */ && currentToken === 71 /* Identifier */) { currentToken = scanner.scanJsxIdentifier(); lastScanAction = 4 /* RescanJsxIdentifier */; } @@ -80488,8 +80588,8 @@ var ts; return startLine === endLine; }; FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 16 /* OpenBraceToken */, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 17 /* CloseBraceToken */, this.sourceFile); + var openBrace = ts.findChildOfKind(node, 17 /* OpenBraceToken */, this.sourceFile); + var closeBrace = ts.findChildOfKind(node, 18 /* CloseBraceToken */, this.sourceFile); if (openBrace && closeBrace) { var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; @@ -80677,129 +80777,129 @@ var ts; this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); + this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); + this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Space after }. - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 141 /* LastToken */, [19 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 142 /* LastToken */, [20 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 81 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 105 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseBraceToken */, 82 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseBraceToken */, 106 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([22 /* CloseBracketToken */, 26 /* CommaToken */, 25 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space for dot - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space before and after indexer - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); // Place a space before open brace in a function declaration this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 3 /* MultiLineCommentTrivia */, 74 /* ClassKeyword */, 83 /* ExportKeyword */, 90 /* ImportKeyword */]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([71 /* Identifier */, 3 /* MultiLineCommentTrivia */, 75 /* ClassKeyword */, 84 /* ExportKeyword */, 91 /* ImportKeyword */]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a control flow construct - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 80 /* DoKeyword */, 101 /* TryKeyword */, 86 /* FinallyKeyword */, 81 /* ElseKeyword */]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 81 /* DoKeyword */, 102 /* TryKeyword */, 87 /* FinallyKeyword */, 82 /* ElseKeyword */]); + this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); - this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); + this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); + this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */)); + this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); // Insert new line after { and before } in multi-line contexts. - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); // For functions and control block place } on a new line [multi-line rule] - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 42 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 43 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(43 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(44 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 43 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // More unary operator special-casing. // DevDiv 181814: Be careful when removing leading whitespace // around unary operators. Examples: // 1 - -2 --X--> 1--2 // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(42 /* PlusPlusToken */, 36 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* PlusToken */, 36 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* PlusToken */, 42 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(43 /* MinusMinusToken */, 37 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* MinusToken */, 37 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* MinusToken */, 43 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([103 /* VarKeyword */, 99 /* ThrowKeyword */, 93 /* NewKeyword */, 79 /* DeleteKeyword */, 95 /* ReturnKeyword */, 102 /* TypeOfKeyword */, 120 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109 /* LetKeyword */, 75 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95 /* ReturnKeyword */, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(43 /* PlusPlusToken */, 37 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* PlusToken */, 37 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* PlusToken */, 43 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(44 /* MinusMinusToken */, 38 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 38 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* VarKeyword */, 100 /* ThrowKeyword */, 94 /* NewKeyword */, 80 /* DeleteKeyword */, 96 /* ReturnKeyword */, 103 /* TypeOfKeyword */, 121 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* LetKeyword */, 76 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); + this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96 /* ReturnKeyword */, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 80 /* DoKeyword */, 81 /* ElseKeyword */, 72 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2 /* Space */)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 81 /* DoKeyword */, 82 /* ElseKeyword */, 73 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2 /* Space */)); // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101 /* TryKeyword */, 86 /* FinallyKeyword */]), 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([102 /* TryKeyword */, 87 /* FinallyKeyword */]), 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // get x() {} // set x(val) {} - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 134 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125 /* GetKeyword */, 135 /* SetKeyword */]), 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); // TypeScript-specific higher priority rules // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127 /* ModuleKeyword */, 131 /* RequireKeyword */]), 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128 /* ModuleKeyword */, 132 /* RequireKeyword */]), 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 130 /* ReadonlyKeyword */, 134 /* SetKeyword */, 114 /* StaticKeyword */, 137 /* TypeKeyword */, 139 /* FromKeyword */, 126 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 139 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117 /* AbstractKeyword */, 75 /* ClassKeyword */, 124 /* DeclareKeyword */, 79 /* DefaultKeyword */, 83 /* EnumKeyword */, 84 /* ExportKeyword */, 85 /* ExtendsKeyword */, 125 /* GetKeyword */, 108 /* ImplementsKeyword */, 91 /* ImportKeyword */, 109 /* InterfaceKeyword */, 128 /* ModuleKeyword */, 129 /* NamespaceKeyword */, 112 /* PrivateKeyword */, 114 /* PublicKeyword */, 113 /* ProtectedKeyword */, 131 /* ReadonlyKeyword */, 135 /* SetKeyword */, 115 /* StaticKeyword */, 138 /* TypeKeyword */, 140 /* FromKeyword */, 127 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([85 /* ExtendsKeyword */, 108 /* ImplementsKeyword */, 140 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); + this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); // Lambda expressions - this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 36 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(36 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Optional parameters and let args - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(23 /* DotDotDotToken */, 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 25 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(24 /* DotDotDotToken */, 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 26 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); // generics and type assertions - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 26 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* CloseParenToken */, 26 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([18 /* OpenParenToken */, 20 /* OpenBracketToken */, 28 /* GreaterThanToken */, 25 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 27 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(20 /* CloseParenToken */, 27 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 29 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([19 /* OpenParenToken */, 21 /* OpenBracketToken */, 29 /* GreaterThanToken */, 26 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); // decorators - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 134 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115 /* YieldKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115 /* YieldKeyword */, 38 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); + this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([117 /* AbstractKeyword */, 71 /* Identifier */, 84 /* ExportKeyword */, 79 /* DefaultKeyword */, 75 /* ClassKeyword */, 115 /* StaticKeyword */, 114 /* PublicKeyword */, 112 /* PrivateKeyword */, 113 /* ProtectedKeyword */, 125 /* GetKeyword */, 135 /* SetKeyword */, 21 /* OpenBracketToken */, 39 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); + this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 39 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); + this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(39 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); + this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(116 /* YieldKeyword */, 39 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); + this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* YieldKeyword */, 39 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); // Async-await - this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(119 /* AsyncKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(119 /* AsyncKeyword */, 88 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(120 /* AsyncKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(120 /* AsyncKeyword */, 89 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // template string - this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(70 /* Identifier */, formatting.Shared.TokenRange.FromTokens([12 /* NoSubstitutionTemplateLiteral */, 13 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(71 /* Identifier */, formatting.Shared.TokenRange.FromTokens([13 /* NoSubstitutionTemplateLiteral */, 14 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // jsx opening element - this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 40 /* SlashToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40 /* SlashToken */, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 71 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 41 /* SlashToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(41 /* SlashToken */, 29 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space before non-null assertion operator - this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */)); // These rules are higher in priority than user-configurable rules. this.HighPriorityCommonRules = [ this.IgnoreBeforeComment, this.IgnoreAfterLineComment, @@ -80861,54 +80961,54 @@ var ts; /// Rules controlled by user options /// // Insert space after comma delimiter - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */)); + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */)); // Insert space before and after binary operators this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); // Insert space after keywords in control flow statements - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); + this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); + this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); // Open Brace braces after function // TypeScript: Function can have return types, which can be made of tons of different token kinds - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after TypeScript module/class/interface - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after control block - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* OpenParenToken */, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty brackets - this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(20 /* OpenBracketToken */, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing template string braces - this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13 /* TemplateHead */, 14 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([13 /* TemplateHead */, 14 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14 /* TemplateMiddle */, 15 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); - this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([14 /* TemplateMiddle */, 15 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // No space after { and before } in JSX expression - this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); - this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); - this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); - this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); + this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); + this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); // Insert space after function keyword for anonymous functions - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); // No space after type assertion - this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); - this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(28 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */)); + this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); + this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */)); } Rules.prototype.getRuleName = function (rule) { var o = this; @@ -80923,44 +81023,44 @@ var ts; /// Contexts /// Rules.IsForContext = function (context) { - return context.contextNode.kind === 213 /* ForStatement */; + return context.contextNode.kind === 214 /* ForStatement */; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 193 /* BinaryExpression */: - case 194 /* ConditionalExpression */: - case 201 /* AsExpression */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: - case 157 /* TypePredicate */: - case 165 /* UnionType */: - case 166 /* IntersectionType */: + case 194 /* BinaryExpression */: + case 195 /* ConditionalExpression */: + case 202 /* AsExpression */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 158 /* TypePredicate */: + case 166 /* UnionType */: + case 167 /* IntersectionType */: return true; // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 175 /* BindingElement */: + case 176 /* BindingElement */: // equals in type X = ... - case 230 /* TypeAliasDeclaration */: + case 231 /* TypeAliasDeclaration */: // equal in import a = module('a'); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // equal in let a = 0; - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: // equal in p = 0; - case 145 /* Parameter */: - case 263 /* EnumMember */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: - return context.currentTokenSpan.kind === 57 /* EqualsToken */ || context.nextTokenSpan.kind === 57 /* EqualsToken */; + case 146 /* Parameter */: + case 264 /* EnumMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: + return context.currentTokenSpan.kind === 58 /* EqualsToken */ || context.nextTokenSpan.kind === 58 /* EqualsToken */; // "in" keyword in for (let x in []) { } - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // "in" keyword in [P in keyof T]: T[P] - case 144 /* TypeParameter */: - return context.currentTokenSpan.kind === 91 /* InKeyword */ || context.nextTokenSpan.kind === 91 /* InKeyword */; + case 145 /* TypeParameter */: + return context.currentTokenSpan.kind === 92 /* InKeyword */ || context.nextTokenSpan.kind === 92 /* InKeyword */; // Technically, "of" is not a binary operator, but format it the same way as "in" - case 215 /* ForOfStatement */: - return context.currentTokenSpan.kind === 141 /* OfKeyword */ || context.nextTokenSpan.kind === 141 /* OfKeyword */; + case 216 /* ForOfStatement */: + return context.currentTokenSpan.kind === 142 /* OfKeyword */ || context.nextTokenSpan.kind === 142 /* OfKeyword */; } return false; }; @@ -80968,7 +81068,7 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 194 /* ConditionalExpression */; + return context.contextNode.kind === 195 /* ConditionalExpression */; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. @@ -80990,7 +81090,7 @@ var ts; return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); }; Rules.IsBraceWrappedContext = function (context) { - return context.contextNode.kind === 173 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context); + return context.contextNode.kind === 174 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context); }; // This check is done before an open brace in a control construct, a function, or a typescript block declaration Rules.IsBeforeMultilineBlockContext = function (context) { @@ -81015,70 +81115,70 @@ var ts; return true; } switch (node.kind) { - case 206 /* Block */: - case 234 /* CaseBlock */: - case 177 /* ObjectLiteralExpression */: - case 233 /* ModuleBlock */: + case 207 /* Block */: + case 235 /* CaseBlock */: + case 178 /* ObjectLiteralExpression */: + case 234 /* ModuleBlock */: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: // case SyntaxKind.MemberFunctionDeclaration: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: // case SyntaxKind.MethodSignature: - case 154 /* CallSignature */: - case 185 /* FunctionExpression */: - case 151 /* Constructor */: - case 186 /* ArrowFunction */: + case 155 /* CallSignature */: + case 186 /* FunctionExpression */: + case 152 /* Constructor */: + case 187 /* ArrowFunction */: // case SyntaxKind.ConstructorDeclaration: // case SyntaxKind.SimpleArrowFunctionExpression: // case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 229 /* InterfaceDeclaration */: + case 230 /* InterfaceDeclaration */: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 227 /* FunctionDeclaration */ || context.contextNode.kind === 185 /* FunctionExpression */; + return context.contextNode.kind === 228 /* FunctionDeclaration */ || context.contextNode.kind === 186 /* FunctionExpression */; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 162 /* TypeLiteral */: - case 232 /* ModuleDeclaration */: - case 243 /* ExportDeclaration */: - case 244 /* NamedExports */: - case 237 /* ImportDeclaration */: - case 240 /* NamedImports */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 163 /* TypeLiteral */: + case 233 /* ModuleDeclaration */: + case 244 /* ExportDeclaration */: + case 245 /* NamedExports */: + case 238 /* ImportDeclaration */: + case 241 /* NamedImports */: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 228 /* ClassDeclaration */: - case 232 /* ModuleDeclaration */: - case 231 /* EnumDeclaration */: - case 259 /* CatchClause */: - case 233 /* ModuleBlock */: - case 220 /* SwitchStatement */: + case 229 /* ClassDeclaration */: + case 233 /* ModuleDeclaration */: + case 232 /* EnumDeclaration */: + case 260 /* CatchClause */: + case 234 /* ModuleBlock */: + case 221 /* SwitchStatement */: return true; - case 206 /* Block */: { + case 207 /* Block */: { var blockParent = context.currentTokenParent.parent; - if (blockParent.kind !== 186 /* ArrowFunction */ && - blockParent.kind !== 185 /* FunctionExpression */) { + if (blockParent.kind !== 187 /* ArrowFunction */ && + blockParent.kind !== 186 /* FunctionExpression */) { return true; } } @@ -81087,61 +81187,61 @@ var ts; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 210 /* IfStatement */: - case 220 /* SwitchStatement */: - case 213 /* ForStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 212 /* WhileStatement */: - case 223 /* TryStatement */: - case 211 /* DoStatement */: - case 219 /* WithStatement */: + case 211 /* IfStatement */: + case 221 /* SwitchStatement */: + case 214 /* ForStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 213 /* WhileStatement */: + case 224 /* TryStatement */: + case 212 /* DoStatement */: + case 220 /* WithStatement */: // TODO // case SyntaxKind.ElseClause: - case 259 /* CatchClause */: + case 260 /* CatchClause */: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 177 /* ObjectLiteralExpression */; + return context.contextNode.kind === 178 /* ObjectLiteralExpression */; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 180 /* CallExpression */; + return context.contextNode.kind === 181 /* CallExpression */; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 181 /* NewExpression */; + return context.contextNode.kind === 182 /* NewExpression */; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); }; Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 25 /* CommaToken */; + return context.currentTokenSpan.kind !== 26 /* CommaToken */; }; Rules.IsNextTokenNotCloseBracket = function (context) { - return context.nextTokenSpan.kind !== 21 /* CloseBracketToken */; + return context.nextTokenSpan.kind !== 22 /* CloseBracketToken */; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 186 /* ArrowFunction */; + return context.contextNode.kind === 187 /* ArrowFunction */; }; Rules.IsNonJsxSameLineTokenContext = function (context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 10 /* JsxText */; }; Rules.IsNonJsxElementContext = function (context) { - return context.contextNode.kind !== 248 /* JsxElement */; + return context.contextNode.kind !== 249 /* JsxElement */; }; Rules.IsJsxExpressionContext = function (context) { - return context.contextNode.kind === 255 /* JsxExpression */; + return context.contextNode.kind === 256 /* JsxExpression */; }; Rules.IsNextTokenParentJsxAttribute = function (context) { - return context.nextTokenParent.kind === 252 /* JsxAttribute */; + return context.nextTokenParent.kind === 253 /* JsxAttribute */; }; Rules.IsJsxAttributeContext = function (context) { - return context.contextNode.kind === 252 /* JsxAttribute */; + return context.contextNode.kind === 253 /* JsxAttribute */; }; Rules.IsJsxSelfClosingElementContext = function (context) { - return context.contextNode.kind === 249 /* JsxSelfClosingElement */; + return context.contextNode.kind === 250 /* JsxSelfClosingElement */; }; Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); @@ -81156,42 +81256,42 @@ var ts; while (ts.isPartOfExpression(node)) { node = node.parent; } - return node.kind === 146 /* Decorator */; + return node.kind === 147 /* Decorator */; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 226 /* VariableDeclarationList */ && + return context.currentTokenParent.kind === 227 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 232 /* ModuleDeclaration */; + return context.contextNode.kind === 233 /* ModuleDeclaration */; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 162 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === 163 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { - if (token.kind !== 26 /* LessThanToken */ && token.kind !== 28 /* GreaterThanToken */) { + if (token.kind !== 27 /* LessThanToken */ && token.kind !== 29 /* GreaterThanToken */) { return false; } switch (parent.kind) { - case 158 /* TypeReference */: - case 183 /* TypeAssertionExpression */: - case 230 /* TypeAliasDeclaration */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 200 /* ExpressionWithTypeArguments */: + case 159 /* TypeReference */: + case 184 /* TypeAssertionExpression */: + case 231 /* TypeAliasDeclaration */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 201 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -81202,16 +81302,16 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 183 /* TypeAssertionExpression */; + return context.contextNode.kind === 184 /* TypeAssertionExpression */; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 189 /* VoidExpression */; + return context.currentTokenSpan.kind === 105 /* VoidKeyword */ && context.currentTokenParent.kind === 190 /* VoidExpression */; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 196 /* YieldExpression */ && context.contextNode.expression !== undefined; + return context.contextNode.kind === 197 /* YieldExpression */ && context.contextNode.expression !== undefined; }; Rules.IsNonNullAssertionContext = function (context) { - return context.contextNode.kind === 202 /* NonNullExpression */; + return context.contextNode.kind === 203 /* NonNullExpression */; }; return Rules; }()); @@ -81235,7 +81335,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 141 /* LastToken */ + 1; + this.mapRowLength = 142 /* LastToken */ + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); // new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map var rulesBucketConstructionStateList = new Array(this.map.length); // new Array(this.map.length); @@ -81249,7 +81349,7 @@ var ts; }); }; RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - ts.Debug.assert(row <= 141 /* LastKeyword */ && column <= 141 /* LastKeyword */, "Must compute formatting context from tokens"); + ts.Debug.assert(row <= 142 /* LastKeyword */ && column <= 142 /* LastKeyword */, "Must compute formatting context from tokens"); var rulesBucketIndex = (row * this.mapRowLength) + column; return rulesBucketIndex; }; @@ -81430,7 +81530,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0 /* FirstToken */; token <= 141 /* LastToken */; token++) { + for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) { result.push(token); } return result; @@ -81474,17 +81574,17 @@ var ts; }()); TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 141 /* LastKeyword */); - TokenRange.BinaryOperators = TokenRange.FromRange(26 /* FirstBinaryOperator */, 69 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 141 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42 /* PlusPlusToken */, 43 /* MinusMinusToken */, 51 /* TildeToken */, 50 /* ExclamationToken */]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 70 /* Identifier */, 18 /* OpenParenToken */, 20 /* OpenBracketToken */, 16 /* OpenBraceToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]); + TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */); + TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */]); + TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */]); + TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */, 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]); + TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]); + TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]); TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 135 /* StringKeyword */, 121 /* BooleanKeyword */, 136 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]); + TokenRange.TypeNames = TokenRange.FromTokens([71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */, 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */]); Shared.TokenRange = TokenRange; })(Shared = formatting.Shared || (formatting.Shared = {})); })(formatting = ts.formatting || (ts.formatting = {})); @@ -81690,11 +81790,11 @@ var ts; } formatting.formatOnEnter = formatOnEnter; function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 24 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); + return formatOutermostParent(position, 25 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); } formatting.formatOnSemicolon = formatOnSemicolon; function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 17 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); + return formatOutermostParent(position, 18 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); } formatting.formatOnClosingCurly = formatOnClosingCurly; function formatDocument(sourceFile, rulesProvider, options) { @@ -81758,17 +81858,17 @@ var ts; // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent, node) { switch (parent.kind) { - case 228 /* ClassDeclaration */: - case 229 /* InterfaceDeclaration */: + case 229 /* ClassDeclaration */: + case 230 /* InterfaceDeclaration */: return ts.rangeContainsRange(parent.members, node); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: var body = parent.body; - return body && body.kind === 233 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node); - case 264 /* SourceFile */: - case 206 /* Block */: - case 233 /* ModuleBlock */: + return body && body.kind === 234 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node); + case 265 /* SourceFile */: + case 207 /* Block */: + case 234 /* ModuleBlock */: return ts.rangeContainsRange(parent.statements, node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -81979,19 +82079,19 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 228 /* ClassDeclaration */: return 74 /* ClassKeyword */; - case 229 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */; - case 227 /* FunctionDeclaration */: return 88 /* FunctionKeyword */; - case 231 /* EnumDeclaration */: return 231 /* EnumDeclaration */; - case 152 /* GetAccessor */: return 124 /* GetKeyword */; - case 153 /* SetAccessor */: return 134 /* SetKeyword */; - case 150 /* MethodDeclaration */: + case 229 /* ClassDeclaration */: return 75 /* ClassKeyword */; + case 230 /* InterfaceDeclaration */: return 109 /* InterfaceKeyword */; + case 228 /* FunctionDeclaration */: return 89 /* FunctionKeyword */; + case 232 /* EnumDeclaration */: return 232 /* EnumDeclaration */; + case 153 /* GetAccessor */: return 125 /* GetKeyword */; + case 154 /* SetAccessor */: return 135 /* SetKeyword */; + case 151 /* MethodDeclaration */: if (node.asteriskToken) { - return 38 /* AsteriskToken */; + return 39 /* AsteriskToken */; } // falls through - case 148 /* PropertyDeclaration */: - case 145 /* Parameter */: + case 149 /* PropertyDeclaration */: + case 146 /* Parameter */: return node.name.kind; } } @@ -82003,9 +82103,9 @@ var ts; // .. { // // comment // } - case 17 /* CloseBraceToken */: - case 21 /* CloseBracketToken */: - case 19 /* CloseParenToken */: + case 18 /* CloseBraceToken */: + case 22 /* CloseBracketToken */: + case 20 /* CloseParenToken */: return indentation + getEffectiveDelta(delta, container); } return tokenIndentation !== -1 /* Unknown */ ? tokenIndentation : indentation; @@ -82019,26 +82119,26 @@ var ts; } switch (kind) { // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent - case 16 /* OpenBraceToken */: - case 17 /* CloseBraceToken */: - case 18 /* OpenParenToken */: - case 19 /* CloseParenToken */: - case 81 /* ElseKeyword */: - case 105 /* WhileKeyword */: - case 56 /* AtToken */: + case 17 /* OpenBraceToken */: + case 18 /* CloseBraceToken */: + case 19 /* OpenParenToken */: + case 20 /* CloseParenToken */: + case 82 /* ElseKeyword */: + case 106 /* WhileKeyword */: + case 57 /* AtToken */: return indentation; - case 40 /* SlashToken */: - case 28 /* GreaterThanToken */: { - if (container.kind === 250 /* JsxOpeningElement */ || - container.kind === 251 /* JsxClosingElement */ || - container.kind === 249 /* JsxSelfClosingElement */) { + case 41 /* SlashToken */: + case 29 /* GreaterThanToken */: { + if (container.kind === 251 /* JsxOpeningElement */ || + container.kind === 252 /* JsxClosingElement */ || + container.kind === 250 /* JsxSelfClosingElement */) { return indentation; } break; } - case 20 /* OpenBracketToken */: - case 21 /* CloseBracketToken */: { - if (container.kind !== 171 /* MappedType */) { + case 21 /* OpenBracketToken */: + case 22 /* CloseBracketToken */: { + if (container.kind !== 172 /* MappedType */) { return indentation; } break; @@ -82148,11 +82248,11 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 146 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 147 /* Decorator */ ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent.kind === 176 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent.kind === 177 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -82509,41 +82609,41 @@ var ts; } function getOpenTokenForList(node, list) { switch (node.kind) { - case 151 /* Constructor */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 186 /* ArrowFunction */: + case 152 /* Constructor */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 187 /* ArrowFunction */: if (node.typeParameters === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } else if (node.parameters === list) { - return 18 /* OpenParenToken */; + return 19 /* OpenParenToken */; } break; - case 180 /* CallExpression */: - case 181 /* NewExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: if (node.typeArguments === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } else if (node.arguments === list) { - return 18 /* OpenParenToken */; + return 19 /* OpenParenToken */; } break; - case 158 /* TypeReference */: + case 159 /* TypeReference */: if (node.typeArguments === list) { - return 26 /* LessThanToken */; + return 27 /* LessThanToken */; } } return 0 /* Unknown */; } function getCloseTokenForOpenToken(kind) { switch (kind) { - case 18 /* OpenParenToken */: - return 19 /* CloseParenToken */; - case 26 /* LessThanToken */: - return 28 /* GreaterThanToken */; + case 19 /* OpenParenToken */: + return 20 /* CloseParenToken */; + case 27 /* LessThanToken */: + return 29 /* GreaterThanToken */; } return 0 /* Unknown */; } @@ -82652,7 +82752,7 @@ var ts; var current_1 = position; while (current_1 > 0) { var char = sourceFile.text.charCodeAt(current_1); - if (!ts.isWhiteSpace(char)) { + if (!ts.isWhiteSpaceLike(char)) { break; } current_1--; @@ -82660,7 +82760,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 193 /* BinaryExpression */) { + if (precedingToken.kind === 26 /* CommaToken */ && precedingToken.parent.kind !== 194 /* BinaryExpression */) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { @@ -82785,7 +82885,7 @@ var ts; // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) && - (parent.kind === 264 /* SourceFile */ || !parentAndChildShareLine); + (parent.kind === 265 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -82802,11 +82902,11 @@ var ts; if (!nextToken) { return 0 /* Unknown */; } - if (nextToken.kind === 16 /* OpenBraceToken */) { + if (nextToken.kind === 17 /* OpenBraceToken */) { // open braces are always indented at the parent level return 1 /* OpenBrace */; } - else if (nextToken.kind === 17 /* CloseBraceToken */) { + else if (nextToken.kind === 18 /* CloseBraceToken */) { // close braces are indented at the parent level if they are located on the same line with cursor // this means that if new line will be added at $ position, this case will be indented // class A { @@ -82824,8 +82924,8 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 210 /* IfStatement */ && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 81 /* ElseKeyword */, sourceFile); + if (parent.kind === 211 /* IfStatement */ && parent.elseStatement === child) { + var elseKeyword = ts.findChildOfKind(parent, 82 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -82839,37 +82939,37 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 158 /* TypeReference */: + case 159 /* TypeReference */: return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd()); - case 177 /* ObjectLiteralExpression */: + case 178 /* ObjectLiteralExpression */: return node.parent.properties; - case 176 /* ArrayLiteralExpression */: + case 177 /* ArrayLiteralExpression */: return node.parent.elements; - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 151 /* Constructor */: - case 160 /* ConstructorType */: - case 155 /* ConstructSignature */: { + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 152 /* Constructor */: + case 161 /* ConstructorType */: + case 156 /* ConstructSignature */: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd()); } - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd()); - case 181 /* NewExpression */: - case 180 /* CallExpression */: { + case 182 /* NewExpression */: + case 181 /* CallExpression */: { var start = node.getStart(sourceFile); return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) || getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd()); } - case 226 /* VariableDeclarationList */: + case 227 /* VariableDeclarationList */: return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd()); - case 240 /* NamedImports */: - case 244 /* NamedExports */: + case 241 /* NamedImports */: + case 245 /* NamedExports */: return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd()); } } @@ -82887,11 +82987,11 @@ var ts; function getLineIndentationWhenExpressionIsInMultiLine(node, sourceFile, options) { // actual indentation should not be used when: // - node is close parenthesis - this is the end of the expression - if (node.kind === 19 /* CloseParenToken */) { + if (node.kind === 20 /* CloseParenToken */) { return -1 /* Unknown */; } - if (node.parent && (node.parent.kind === 180 /* CallExpression */ || - node.parent.kind === 181 /* NewExpression */) && + if (node.parent && (node.parent.kind === 181 /* CallExpression */ || + node.parent.kind === 182 /* NewExpression */) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -82909,10 +83009,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 178 /* PropertyAccessExpression */: - case 179 /* ElementAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 179 /* PropertyAccessExpression */: + case 180 /* ElementAccessExpression */: node = node.expression; break; default: @@ -82928,7 +83028,7 @@ var ts; // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; i--) { - if (list[i].kind === 25 /* CommaToken */) { + if (list[i].kind === 26 /* CommaToken */) { continue; } // skip list items that ends on the same line with the current list element @@ -82976,49 +83076,49 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 209 /* ExpressionStatement */: - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 231 /* EnumDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 176 /* ArrayLiteralExpression */: - case 206 /* Block */: - case 233 /* ModuleBlock */: - case 177 /* ObjectLiteralExpression */: - case 162 /* TypeLiteral */: - case 171 /* MappedType */: - case 164 /* TupleType */: - case 234 /* CaseBlock */: - case 257 /* DefaultClause */: - case 256 /* CaseClause */: - case 184 /* ParenthesizedExpression */: - case 178 /* PropertyAccessExpression */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 207 /* VariableStatement */: - case 225 /* VariableDeclaration */: - case 242 /* ExportAssignment */: - case 218 /* ReturnStatement */: - case 194 /* ConditionalExpression */: - case 174 /* ArrayBindingPattern */: - case 173 /* ObjectBindingPattern */: - case 250 /* JsxOpeningElement */: - case 249 /* JsxSelfClosingElement */: - case 255 /* JsxExpression */: - case 149 /* MethodSignature */: - case 154 /* CallSignature */: - case 155 /* ConstructSignature */: - case 145 /* Parameter */: - case 159 /* FunctionType */: - case 160 /* ConstructorType */: - case 167 /* ParenthesizedType */: - case 182 /* TaggedTemplateExpression */: - case 190 /* AwaitExpression */: - case 244 /* NamedExports */: - case 240 /* NamedImports */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: + case 210 /* ExpressionStatement */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 232 /* EnumDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 177 /* ArrayLiteralExpression */: + case 207 /* Block */: + case 234 /* ModuleBlock */: + case 178 /* ObjectLiteralExpression */: + case 163 /* TypeLiteral */: + case 172 /* MappedType */: + case 165 /* TupleType */: + case 235 /* CaseBlock */: + case 258 /* DefaultClause */: + case 257 /* CaseClause */: + case 185 /* ParenthesizedExpression */: + case 179 /* PropertyAccessExpression */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 208 /* VariableStatement */: + case 226 /* VariableDeclaration */: + case 243 /* ExportAssignment */: + case 219 /* ReturnStatement */: + case 195 /* ConditionalExpression */: + case 175 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 251 /* JsxOpeningElement */: + case 250 /* JsxSelfClosingElement */: + case 256 /* JsxExpression */: + case 150 /* MethodSignature */: + case 155 /* CallSignature */: + case 156 /* ConstructSignature */: + case 146 /* Parameter */: + case 160 /* FunctionType */: + case 161 /* ConstructorType */: + case 168 /* ParenthesizedType */: + case 183 /* TaggedTemplateExpression */: + case 191 /* AwaitExpression */: + case 245 /* NamedExports */: + case 241 /* NamedImports */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: return true; } return false; @@ -83027,27 +83127,27 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0 /* Unknown */; switch (parent.kind) { - case 211 /* DoStatement */: - case 212 /* WhileStatement */: - case 214 /* ForInStatement */: - case 215 /* ForOfStatement */: - case 213 /* ForStatement */: - case 210 /* IfStatement */: - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 186 /* ArrowFunction */: - case 151 /* Constructor */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - return childKind !== 206 /* Block */; - case 243 /* ExportDeclaration */: - return childKind !== 244 /* NamedExports */; - case 237 /* ImportDeclaration */: - return childKind !== 238 /* ImportClause */ || - (child.namedBindings && child.namedBindings.kind !== 240 /* NamedImports */); - case 248 /* JsxElement */: - return childKind !== 251 /* JsxClosingElement */; + case 212 /* DoStatement */: + case 213 /* WhileStatement */: + case 215 /* ForInStatement */: + case 216 /* ForOfStatement */: + case 214 /* ForStatement */: + case 211 /* IfStatement */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 187 /* ArrowFunction */: + case 152 /* Constructor */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + return childKind !== 207 /* Block */; + case 244 /* ExportDeclaration */: + return childKind !== 245 /* NamedExports */; + case 238 /* ImportDeclaration */: + return childKind !== 239 /* ImportClause */ || + (child.namedBindings && child.namedBindings.kind !== 241 /* NamedImports */); + case 249 /* JsxElement */: + return childKind !== 252 /* JsxClosingElement */; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; @@ -83153,7 +83253,7 @@ var ts; * Checks if 'candidate' argument is a legal separator in the list that contains 'node' as an element */ function isSeparator(node, candidate) { - return candidate && node.parent && (candidate.kind === 25 /* CommaToken */ || (candidate.kind === 24 /* SemicolonToken */ && node.parent.kind === 177 /* ObjectLiteralExpression */)); + return candidate && node.parent && (candidate.kind === 26 /* CommaToken */ || (candidate.kind === 25 /* SemicolonToken */ && node.parent.kind === 178 /* ObjectLiteralExpression */)); } function spaces(count) { var s = ""; @@ -83258,9 +83358,9 @@ var ts; ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) { if (options === void 0) { options = {}; } if ((ts.isStatementButNotDeclaration(after)) || - after.kind === 148 /* PropertyDeclaration */ || - after.kind === 147 /* PropertySignature */ || - after.kind === 149 /* MethodSignature */) { + after.kind === 149 /* PropertyDeclaration */ || + after.kind === 148 /* PropertySignature */ || + after.kind === 150 /* MethodSignature */) { // check if previous statement ends with semicolon // if not - insert semicolon to preserve the code from changing the meaning due to ASI if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) { @@ -83268,7 +83368,7 @@ var ts; sourceFile: sourceFile, options: {}, range: { pos: after.end, end: after.end }, - node: ts.createToken(24 /* SemicolonToken */) + node: ts.createToken(25 /* SemicolonToken */) }); } } @@ -83365,12 +83465,12 @@ var ts; // if list has only one element then we'll format is as multiline if node has comment in trailing trivia, or as singleline otherwise // i.e. var x = 1 // this is x // | new element will be inserted at this position - separator = 25 /* CommaToken */; + separator = 26 /* CommaToken */; } else { // element has more than one element, pick separator from the list var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile); - separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25 /* CommaToken */; + separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 26 /* CommaToken */; // determine if list is multiline by checking lines of after element and element that precedes it. var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; @@ -83585,7 +83685,7 @@ var ts; if (force || !isTrivia(s)) { this.lastNonTriviaPosition = this.writer.getTextPos(); var i = 0; - while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) { + while (ts.isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { i++; } // trim trailing whitespaces @@ -83755,10 +83855,10 @@ var ts; // this.missing = 1; // ^^^^^^^ var token = ts.getTokenAtPosition(sourceFile, start); - if (token.kind !== 70 /* Identifier */) { + if (token.kind !== 71 /* Identifier */) { return undefined; } - if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98 /* ThisKeyword */) { + if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99 /* ThisKeyword */) { return undefined; } var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false); @@ -83774,7 +83874,7 @@ var ts; function getActionsForAddMissingMemberInJavaScriptFile() { var memberName = token.getText(); if (isStatic) { - if (classDeclaration.kind === 198 /* ClassExpression */) { + if (classDeclaration.kind === 199 /* ClassExpression */) { return undefined; } var className = classDeclaration.name.getText(); @@ -83808,17 +83908,17 @@ var ts; } function getActionsForAddMissingMemberInTypeScriptFile() { var typeNode; - if (token.parent.parent.kind === 193 /* BinaryExpression */) { + if (token.parent.parent.kind === 194 /* BinaryExpression */) { var binaryExpression = token.parent.parent; var checker = context.program.getTypeChecker(); var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right))); typeNode = checker.typeToTypeNode(widenedType, classDeclaration); } - typeNode = typeNode || ts.createKeywordTypeNode(118 /* AnyKeyword */); + typeNode = typeNode || ts.createKeywordTypeNode(119 /* AnyKeyword */); var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile); var property = ts.createProperty( /*decorators*/ undefined, - /*modifiers*/ isStatic ? [ts.createToken(114 /* StaticKeyword */)] : undefined, token.getText(sourceFile), + /*modifiers*/ isStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, token.getText(sourceFile), /*questionToken*/ undefined, typeNode, /*initializer*/ undefined); var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -83828,7 +83928,7 @@ var ts; changes: propertyChangeTracker.getChanges() }]; if (!isStatic) { - var stringTypeNode = ts.createKeywordTypeNode(135 /* StringKeyword */); + var stringTypeNode = ts.createKeywordTypeNode(136 /* StringKeyword */); var indexingParameter = ts.createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, @@ -83907,7 +84007,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 98 /* ThisKeyword */) { + if (token.kind !== 99 /* ThisKeyword */) { return undefined; } var constructor = ts.getContainingFunction(token); @@ -83917,7 +84017,7 @@ var ts; } // figure out if the `this` access is actually inside the supercall // i.e. super(this.a), since in that case we won't suggest a fix - if (superCall.expression && superCall.expression.kind === 180 /* CallExpression */) { + if (superCall.expression && superCall.expression.kind === 181 /* CallExpression */) { var arguments_1 = superCall.expression.arguments; for (var i = 0; i < arguments_1.length; i++) { if (arguments_1[i].expression === token) { @@ -83933,7 +84033,7 @@ var ts; changes: changeTracker.getChanges() }]; function findSuperCall(n) { - if (n.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) { + if (n.kind === 210 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) { return n; } if (ts.isFunctionLike(n)) { @@ -83955,7 +84055,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 122 /* ConstructorKeyword */) { + if (token.kind !== 123 /* ConstructorKeyword */) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -83981,7 +84081,7 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); var classDeclNode = ts.getContainingClass(token); - if (!(token.kind === 70 /* Identifier */ && ts.isClassLike(classDeclNode))) { + if (!(token.kind === 71 /* Identifier */ && ts.isClassLike(classDeclNode))) { return undefined; } var heritageClauses = classDeclNode.heritageClauses; @@ -83989,16 +84089,16 @@ var ts; return undefined; } var extendsToken = heritageClauses[0].getFirstToken(); - if (!(extendsToken && extendsToken.kind === 84 /* ExtendsKeyword */)) { + if (!(extendsToken && extendsToken.kind === 85 /* ExtendsKeyword */)) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); - changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107 /* ImplementsKeyword */)); + changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(108 /* ImplementsKeyword */)); // We replace existing keywords with commas. for (var i = 1; i < heritageClauses.length; i++) { var keywordToken = heritageClauses[i].getFirstToken(); if (keywordToken) { - changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25 /* CommaToken */)); + changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(26 /* CommaToken */)); } } var result = [{ @@ -84020,7 +84120,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile; var token = ts.getTokenAtPosition(sourceFile, context.span.start); - if (token.kind !== 70 /* Identifier */) { + if (token.kind !== 71 /* Identifier */) { return undefined; } var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context); @@ -84048,15 +84148,15 @@ var ts; var start = context.span.start; var token = ts.getTokenAtPosition(sourceFile, start); // this handles var ["computed"] = 12; - if (token.kind === 20 /* OpenBracketToken */) { + if (token.kind === 21 /* OpenBracketToken */) { token = ts.getTokenAtPosition(sourceFile, start + 1); } switch (token.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: switch (token.parent.kind) { - case 225 /* VariableDeclaration */: + case 226 /* VariableDeclaration */: switch (token.parent.parent.parent.kind) { - case 213 /* ForStatement */: + case 214 /* ForStatement */: var forStatement = token.parent.parent.parent; var forInitializer = forStatement.initializer; if (forInitializer.declarations.length === 1) { @@ -84065,18 +84165,18 @@ var ts; else { return deleteNodeInList(token.parent); } - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: var forOfStatement = token.parent.parent.parent; - if (forOfStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forOfStatement.initializer.kind === 227 /* VariableDeclarationList */) { var forOfInitializer = forOfStatement.initializer; return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()); } break; - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // There is no valid fix in the case of: // for .. in return undefined; - case 259 /* CatchClause */: + case 260 /* CatchClause */: var catchClause = token.parent.parent; var parameter = catchClause.variableDeclaration.getChildren()[0]; return deleteNode(parameter); @@ -84091,15 +84191,15 @@ var ts; } // TODO: #14885 // falls through - case 144 /* TypeParameter */: + case 145 /* TypeParameter */: var typeParameters = token.parent.parent.typeParameters; if (typeParameters.length === 1) { var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1); - if (!previousToken || previousToken.kind !== 26 /* LessThanToken */) { + if (!previousToken || previousToken.kind !== 27 /* LessThanToken */) { return deleteRange(typeParameters); } var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end); - if (!nextToken || nextToken.kind !== 28 /* GreaterThanToken */) { + if (!nextToken || nextToken.kind !== 29 /* GreaterThanToken */) { return deleteRange(typeParameters); } return deleteNodeRange(previousToken, nextToken); @@ -84107,7 +84207,7 @@ var ts; else { return deleteNodeInList(token.parent); } - case 145 /* Parameter */: + case 146 /* Parameter */: var functionDeclaration = token.parent.parent; if (functionDeclaration.parameters.length === 1) { return deleteNode(token.parent); @@ -84116,14 +84216,14 @@ var ts; return deleteNodeInList(token.parent); } // handle case where 'import a = A;' - case 236 /* ImportEqualsDeclaration */: - var importEquals = ts.getAncestor(token, 236 /* ImportEqualsDeclaration */); + case 237 /* ImportEqualsDeclaration */: + var importEquals = ts.getAncestor(token, 237 /* ImportEqualsDeclaration */); return deleteNode(importEquals); - case 241 /* ImportSpecifier */: + case 242 /* ImportSpecifier */: var namedImports = token.parent.parent; if (namedImports.elements.length === 1) { // Only 1 import and it is unused. So the entire declaration should be removed. - var importSpec = ts.getAncestor(token, 237 /* ImportDeclaration */); + var importSpec = ts.getAncestor(token, 238 /* ImportDeclaration */); return deleteNode(importSpec); } else { @@ -84132,17 +84232,17 @@ var ts; } // handle case where "import d, * as ns from './file'" // or "'import {a, b as ns} from './file'" - case 238 /* ImportClause */: + case 239 /* ImportClause */: var importClause = token.parent; if (!importClause.namedBindings) { - var importDecl = ts.getAncestor(importClause, 237 /* ImportDeclaration */); + var importDecl = ts.getAncestor(importClause, 238 /* ImportDeclaration */); return deleteNode(importDecl); } else { // import |d,| * as ns from './file' var start_4 = importClause.name.getStart(sourceFile); var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end); - if (nextToken && nextToken.kind === 25 /* CommaToken */) { + if (nextToken && nextToken.kind === 26 /* CommaToken */) { // shift first non-whitespace position after comma to the start position of the node return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) }); } @@ -84150,15 +84250,15 @@ var ts; return deleteNode(importClause.name); } } - case 239 /* NamespaceImport */: + case 240 /* NamespaceImport */: var namespaceImport = token.parent; if (namespaceImport.name === token && !namespaceImport.parent.name) { - var importDecl = ts.getAncestor(namespaceImport, 237 /* ImportDeclaration */); + var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */); return deleteNode(importDecl); } else { var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1); - if (previousToken && previousToken.kind === 25 /* CommaToken */) { + if (previousToken && previousToken.kind === 26 /* CommaToken */) { var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart); return deleteRange({ pos: startPosition, end: namespaceImport.end }); } @@ -84166,8 +84266,8 @@ var ts; } } break; - case 148 /* PropertyDeclaration */: - case 239 /* NamespaceImport */: + case 149 /* PropertyDeclaration */: + case 240 /* NamespaceImport */: return deleteNode(token.parent); } if (ts.isDeclarationName(token)) { @@ -84375,10 +84475,10 @@ var ts; function getImportDeclaration(moduleSpecifier) { var node = moduleSpecifier; while (node) { - if (node.kind === 237 /* ImportDeclaration */) { + if (node.kind === 238 /* ImportDeclaration */) { return node; } - if (node.kind === 236 /* ImportEqualsDeclaration */) { + if (node.kind === 237 /* ImportEqualsDeclaration */) { return node; } node = node.parent; @@ -84424,9 +84524,9 @@ var ts; var existingModuleSpecifier; for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) { var declaration = declarations_14[_i]; - if (declaration.kind === 237 /* ImportDeclaration */) { + if (declaration.kind === 238 /* ImportDeclaration */) { var namedBindings = declaration.importClause && declaration.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) { // case: // import * as ns from "foo" namespaceImportDeclaration = declaration; @@ -84466,7 +84566,7 @@ var ts; } return actions; function getModuleSpecifierFromImportEqualsDeclaration(declaration) { - if (declaration.moduleReference && declaration.moduleReference.kind === 247 /* ExternalModuleReference */) { + if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) { return declaration.moduleReference.expression.getText(); } return declaration.moduleReference.getText(); @@ -84494,7 +84594,7 @@ var ts; } function getCodeActionForNamespaceImport(declaration) { var namespacePrefix; - if (declaration.kind === 237 /* ImportDeclaration */) { + if (declaration.kind === 238 /* ImportDeclaration */) { namespacePrefix = declaration.importClause.namedBindings.name.getText(); } else { @@ -84519,7 +84619,7 @@ var ts; // insert after any existing imports for (var i = sourceFile.statements.length - 1; i >= 0; i--) { var statement = sourceFile.statements[i]; - if (statement.kind === 236 /* ImportEqualsDeclaration */ || statement.kind === 237 /* ImportDeclaration */) { + if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) { lastImportDeclaration = statement; break; } @@ -84556,7 +84656,7 @@ var ts; tryGetModuleNameFromRootDirs() || ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory)); function tryGetModuleNameFromAmbientModule() { - if (moduleSymbol.valueDeclaration.kind !== 264 /* SourceFile */) { + if (moduleSymbol.valueDeclaration.kind !== 265 /* SourceFile */) { return moduleSymbol.name; } } @@ -84837,17 +84937,17 @@ var ts; var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); var optional = !!(symbol.flags & 67108864 /* Optional */); switch (declaration.kind) { - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 147 /* PropertySignature */: - case 148 /* PropertyDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 148 /* PropertySignature */: + case 149 /* PropertyDeclaration */: var typeNode = checker.typeToTypeNode(type, enclosingDeclaration); var property = ts.createProperty( - /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeNode, + /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined); return property; - case 149 /* MethodSignature */: - case 150 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 151 /* MethodDeclaration */: // The signature for the implementation appears as an entry in `signatures` iff // there is only one signature. // If there are overloads and an implementation signature, it appears as an @@ -84889,12 +84989,12 @@ var ts; return undefined; } function signatureToMethodDeclaration(signature, enclosingDeclaration, body) { - var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150 /* MethodDeclaration */, enclosingDeclaration); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration); if (signatureDeclaration) { signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; - signatureDeclaration.questionToken = optional ? ts.createToken(54 /* QuestionToken */) : undefined; + signatureDeclaration.questionToken = optional ? ts.createToken(55 /* QuestionToken */) : undefined; signatureDeclaration.body = body; } return signatureDeclaration; @@ -84922,21 +85022,21 @@ var ts; var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); }); var parameters = []; for (var i = 0; i < maxNonRestArgs; i++) { - var anyType = ts.createKeywordTypeNode(118 /* AnyKeyword */); + var anyType = ts.createKeywordTypeNode(119 /* AnyKeyword */); var newParameter = ts.createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i], - /*questionToken*/ i >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyType, + /*questionToken*/ i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyType, /*initializer*/ undefined); parameters.push(newParameter); } if (someSigHasRestParameter) { - var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118 /* AnyKeyword */)); + var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119 /* AnyKeyword */)); var restParameter = ts.createParameter( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createToken(23 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", - /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyArrayType, + /*modifiers*/ undefined, ts.createToken(24 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", + /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyArrayType, /*initializer*/ undefined); parameters.push(restParameter); } @@ -84947,7 +85047,7 @@ var ts; function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) { return ts.createMethodDeclaration( /*decorators*/ undefined, modifiers, - /*asteriskToken*/ undefined, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); + /*asteriskToken*/ undefined, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody()); } codefix.createStubbedMethod = createStubbedMethod; function createStubbedMethodBody() { @@ -84957,10 +85057,10 @@ var ts; } function createVisibilityModifier(flags) { if (flags & 4 /* Public */) { - return ts.createToken(113 /* PublicKeyword */); + return ts.createToken(114 /* PublicKeyword */); } else if (flags & 16 /* Protected */) { - return ts.createToken(112 /* ProtectedKeyword */); + return ts.createToken(113 /* ProtectedKeyword */); } return undefined; } @@ -85009,8 +85109,8 @@ var ts; /** The version of the language service API */ ts.servicesVersion = "0.5"; function createNode(kind, pos, end, parent) { - var node = kind >= 142 /* FirstNode */ ? new NodeObject(kind, pos, end) : - kind === 70 /* Identifier */ ? new IdentifierObject(70 /* Identifier */, pos, end) : + var node = kind >= 143 /* FirstNode */ ? new NodeObject(kind, pos, end) : + kind === 71 /* Identifier */ ? new IdentifierObject(71 /* Identifier */, pos, end) : new TokenObject(kind, pos, end); node.parent = parent; return node; @@ -85067,7 +85167,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(293 /* SyntaxList */, nodes.pos, nodes.end, this); + var list = createNode(294 /* SyntaxList */, nodes.pos, nodes.end, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) { @@ -85086,11 +85186,11 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 142 /* FirstNode */) { + if (this.kind >= 143 /* FirstNode */) { ts.scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos_3 = this.pos; - var useJSDocScanner_1 = this.kind >= 282 /* FirstJSDocTagNode */ && this.kind <= 292 /* LastJSDocTagNode */; + var useJSDocScanner_1 = this.kind >= 283 /* FirstJSDocTagNode */ && this.kind <= 293 /* LastJSDocTagNode */; var processNode = function (node) { var isJSDocTagNode = ts.isJSDocTag(node); if (!isJSDocTagNode && pos_3 < node.pos) { @@ -85147,8 +85247,8 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 266 /* FirstJSDocNode */ || kid.kind > 292 /* LastJSDocNode */; }); - return child.kind < 142 /* FirstNode */ ? + var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 293 /* LastJSDocNode */; }); + return child.kind < 143 /* FirstNode */ ? child : child.getFirstToken(sourceFile); }; @@ -85158,7 +85258,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 142 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 143 /* FirstNode */ ? child : child.getLastToken(sourceFile); }; NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) { return ts.forEachChild(this, cbNode, cbNodeArray); @@ -85264,7 +85364,7 @@ var ts; } return IdentifierObject; }(TokenOrIdentifierObject)); - IdentifierObject.prototype.kind = 70 /* Identifier */; + IdentifierObject.prototype.kind = 71 /* Identifier */; var TypeObject = (function () { function TypeObject(checker, flags) { this.checker = checker; @@ -85397,9 +85497,9 @@ var ts; if (result_7 !== undefined) { return result_7; } - if (declaration.name.kind === 143 /* ComputedPropertyName */) { + if (declaration.name.kind === 144 /* ComputedPropertyName */) { var expr = declaration.name.expression; - if (expr.kind === 178 /* PropertyAccessExpression */) { + if (expr.kind === 179 /* PropertyAccessExpression */) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -85409,7 +85509,7 @@ var ts; } function getTextOfIdentifierOrLiteral(node) { if (node) { - if (node.kind === 70 /* Identifier */ || + if (node.kind === 71 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { return node.text; @@ -85419,10 +85519,10 @@ var ts; } function visit(node) { switch (node.kind) { - case 227 /* FunctionDeclaration */: - case 185 /* FunctionExpression */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: + case 228 /* FunctionDeclaration */: + case 186 /* FunctionExpression */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -85442,32 +85542,32 @@ var ts; } ts.forEachChild(node, visit); break; - case 228 /* ClassDeclaration */: - case 198 /* ClassExpression */: - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: - case 231 /* EnumDeclaration */: - case 232 /* ModuleDeclaration */: - case 236 /* ImportEqualsDeclaration */: - case 245 /* ExportSpecifier */: - case 241 /* ImportSpecifier */: - case 236 /* ImportEqualsDeclaration */: - case 238 /* ImportClause */: - case 239 /* NamespaceImport */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 162 /* TypeLiteral */: + case 229 /* ClassDeclaration */: + case 199 /* ClassExpression */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: + case 232 /* EnumDeclaration */: + case 233 /* ModuleDeclaration */: + case 237 /* ImportEqualsDeclaration */: + case 246 /* ExportSpecifier */: + case 242 /* ImportSpecifier */: + case 237 /* ImportEqualsDeclaration */: + case 239 /* ImportClause */: + case 240 /* NamespaceImport */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 163 /* TypeLiteral */: addDeclaration(node); ts.forEachChild(node, visit); break; - case 145 /* Parameter */: + case 146 /* Parameter */: // Only consider parameter properties if (!ts.hasModifier(node, 92 /* ParameterPropertyModifier */)) { break; } // falls through - case 225 /* VariableDeclaration */: - case 175 /* BindingElement */: { + case 226 /* VariableDeclaration */: + case 176 /* BindingElement */: { var decl = node; if (ts.isBindingPattern(decl.name)) { ts.forEachChild(decl.name, visit); @@ -85477,19 +85577,19 @@ var ts; visit(decl.initializer); } // falls through - case 263 /* EnumMember */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 264 /* EnumMember */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: addDeclaration(node); break; - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -85501,7 +85601,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 239 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 240 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { @@ -86061,12 +86161,12 @@ var ts; if (!symbol || typeChecker.isUnknownSymbol(symbol)) { // Try getting just type at this position and show switch (node.kind) { - case 70 /* Identifier */: - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: - case 98 /* ThisKeyword */: - case 168 /* ThisType */: - case 96 /* SuperKeyword */: + case 71 /* Identifier */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: + case 99 /* ThisKeyword */: + case 169 /* ThisType */: + case 97 /* SuperKeyword */: // For the identifiers/this/super etc get the type at position var type = typeChecker.getTypeAtLocation(node); if (type) { @@ -86208,16 +86308,16 @@ var ts; return; } switch (node.kind) { - case 178 /* PropertyAccessExpression */: - case 142 /* QualifiedName */: + case 179 /* PropertyAccessExpression */: + case 143 /* QualifiedName */: case 9 /* StringLiteral */: - case 85 /* FalseKeyword */: - case 100 /* TrueKeyword */: - case 94 /* NullKeyword */: - case 96 /* SuperKeyword */: - case 98 /* ThisKeyword */: - case 168 /* ThisType */: - case 70 /* Identifier */: + case 86 /* FalseKeyword */: + case 101 /* TrueKeyword */: + case 95 /* NullKeyword */: + case 97 /* SuperKeyword */: + case 99 /* ThisKeyword */: + case 169 /* ThisType */: + case 71 /* Identifier */: break; // Cant create the text span default: @@ -86233,7 +86333,7 @@ var ts; // If this is name of a module declarations, check if this is right side of dotted module name // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 232 /* ModuleDeclaration */ && + if (nodeForStartPos.parent.parent.kind === 233 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { // Use parent module declarations name for start pos nodeForStartPos = nodeForStartPos.parent.parent.name; @@ -86324,14 +86424,14 @@ var ts; return result; function getMatchingTokenKind(token) { switch (token.kind) { - case 16 /* OpenBraceToken */: return 17 /* CloseBraceToken */; - case 18 /* OpenParenToken */: return 19 /* CloseParenToken */; - case 20 /* OpenBracketToken */: return 21 /* CloseBracketToken */; - case 26 /* LessThanToken */: return 28 /* GreaterThanToken */; - case 17 /* CloseBraceToken */: return 16 /* OpenBraceToken */; - case 19 /* CloseParenToken */: return 18 /* OpenParenToken */; - case 21 /* CloseBracketToken */: return 20 /* OpenBracketToken */; - case 28 /* GreaterThanToken */: return 26 /* LessThanToken */; + case 17 /* OpenBraceToken */: return 18 /* CloseBraceToken */; + case 19 /* OpenParenToken */: return 20 /* CloseParenToken */; + case 21 /* OpenBracketToken */: return 22 /* CloseBracketToken */; + case 27 /* LessThanToken */: return 29 /* GreaterThanToken */; + case 18 /* CloseBraceToken */: return 17 /* OpenBraceToken */; + case 20 /* CloseParenToken */: return 19 /* OpenParenToken */; + case 22 /* CloseBracketToken */: return 21 /* OpenBracketToken */; + case 29 /* GreaterThanToken */: return 27 /* LessThanToken */; } return undefined; } @@ -86611,7 +86711,7 @@ var ts; sourceFile.nameTable = nameTable; function walk(node) { switch (node.kind) { - case 70 /* Identifier */: + case 71 /* Identifier */: setNameTable(node.text, node); break; case 9 /* StringLiteral */: @@ -86621,7 +86721,7 @@ var ts; // then we want 'something' to be in the name table. Similarly, if we have // "a['propname']" then we want to store "propname" in the name table. if (ts.isDeclarationName(node) || - node.parent.kind === 247 /* ExternalModuleReference */ || + node.parent.kind === 248 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || ts.isLiteralComputedPropertyDeclarationName(node)) { setNameTable(node.text, node); @@ -86643,13 +86743,13 @@ var ts; } function isObjectLiteralElement(node) { switch (node.kind) { - case 252 /* JsxAttribute */: - case 254 /* JsxSpreadAttribute */: - case 260 /* PropertyAssignment */: - case 261 /* ShorthandPropertyAssignment */: - case 150 /* MethodDeclaration */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: + case 253 /* JsxAttribute */: + case 255 /* JsxSpreadAttribute */: + case 261 /* PropertyAssignment */: + case 262 /* ShorthandPropertyAssignment */: + case 151 /* MethodDeclaration */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: return true; } return false; @@ -86662,13 +86762,13 @@ var ts; switch (node.kind) { case 9 /* StringLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 143 /* ComputedPropertyName */) { + if (node.parent.kind === 144 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined; } // falls through - case 70 /* Identifier */: + case 71 /* Identifier */: return isObjectLiteralElement(node.parent) && - (node.parent.parent.kind === 177 /* ObjectLiteralExpression */ || node.parent.parent.kind === 253 /* JsxAttributes */) && + (node.parent.parent.kind === 178 /* ObjectLiteralExpression */ || node.parent.parent.kind === 254 /* JsxAttributes */) && node.parent.name === node ? node.parent : undefined; } return undefined; @@ -86702,7 +86802,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 179 /* ElementAccessExpression */ && + node.parent.kind === 180 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } /** @@ -86783,144 +86883,144 @@ var ts; function spanInNode(node) { if (node) { switch (node.kind) { - case 207 /* VariableStatement */: + case 208 /* VariableStatement */: // Span on first variable declaration return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 225 /* VariableDeclaration */: - case 148 /* PropertyDeclaration */: - case 147 /* PropertySignature */: + case 226 /* VariableDeclaration */: + case 149 /* PropertyDeclaration */: + case 148 /* PropertySignature */: return spanInVariableDeclaration(node); - case 145 /* Parameter */: + case 146 /* Parameter */: return spanInParameterDeclaration(node); - case 227 /* FunctionDeclaration */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 185 /* FunctionExpression */: - case 186 /* ArrowFunction */: + case 228 /* FunctionDeclaration */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 186 /* FunctionExpression */: + case 187 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 206 /* Block */: + case 207 /* Block */: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } // falls through - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: return spanInBlock(node); - case 259 /* CatchClause */: + case 260 /* CatchClause */: return spanInBlock(node.block); - case 209 /* ExpressionStatement */: + case 210 /* ExpressionStatement */: // span on the expression return textSpan(node.expression); - case 218 /* ReturnStatement */: + case 219 /* ReturnStatement */: // span on return keyword and expression if present return textSpan(node.getChildAt(0), node.expression); - case 212 /* WhileStatement */: + case 213 /* WhileStatement */: // Span on while(...) return textSpanEndingAtNextToken(node, node.expression); - case 211 /* DoStatement */: + case 212 /* DoStatement */: // span in statement of the do statement return spanInNode(node.statement); - case 224 /* DebuggerStatement */: + case 225 /* DebuggerStatement */: // span on debugger keyword return textSpan(node.getChildAt(0)); - case 210 /* IfStatement */: + case 211 /* IfStatement */: // set on if(..) span return textSpanEndingAtNextToken(node, node.expression); - case 221 /* LabeledStatement */: + case 222 /* LabeledStatement */: // span in statement return spanInNode(node.statement); - case 217 /* BreakStatement */: - case 216 /* ContinueStatement */: + case 218 /* BreakStatement */: + case 217 /* ContinueStatement */: // On break or continue keyword and label if present return textSpan(node.getChildAt(0), node.label); - case 213 /* ForStatement */: + case 214 /* ForStatement */: return spanInForStatement(node); - case 214 /* ForInStatement */: + case 215 /* ForInStatement */: // span of for (a in ...) return textSpanEndingAtNextToken(node, node.expression); - case 215 /* ForOfStatement */: + case 216 /* ForOfStatement */: // span in initializer return spanInInitializerOfForLike(node); - case 220 /* SwitchStatement */: + case 221 /* SwitchStatement */: // span on switch(...) return textSpanEndingAtNextToken(node, node.expression); - case 256 /* CaseClause */: - case 257 /* DefaultClause */: + case 257 /* CaseClause */: + case 258 /* DefaultClause */: // span in first statement of the clause return spanInNode(node.statements[0]); - case 223 /* TryStatement */: + case 224 /* TryStatement */: // span in try block return spanInBlock(node.tryBlock); - case 222 /* ThrowStatement */: + case 223 /* ThrowStatement */: // span in throw ... return textSpan(node, node.expression); - case 242 /* ExportAssignment */: + case 243 /* ExportAssignment */: // span on export = id return textSpan(node, node.expression); - case 236 /* ImportEqualsDeclaration */: + case 237 /* ImportEqualsDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleReference); - case 237 /* ImportDeclaration */: + case 238 /* ImportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 243 /* ExportDeclaration */: + case 244 /* ExportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: // span on complete module if it is instantiated if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } // falls through - case 228 /* ClassDeclaration */: - case 231 /* EnumDeclaration */: - case 263 /* EnumMember */: - case 175 /* BindingElement */: + case 229 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 264 /* EnumMember */: + case 176 /* BindingElement */: // span on complete node return textSpan(node); - case 219 /* WithStatement */: + case 220 /* WithStatement */: // span in statement return spanInNode(node.statement); - case 146 /* Decorator */: + case 147 /* Decorator */: return spanInNodeArray(node.parent.decorators); - case 173 /* ObjectBindingPattern */: - case 174 /* ArrayBindingPattern */: + case 174 /* ObjectBindingPattern */: + case 175 /* ArrayBindingPattern */: return spanInBindingPattern(node); // No breakpoint in interface, type alias - case 229 /* InterfaceDeclaration */: - case 230 /* TypeAliasDeclaration */: + case 230 /* InterfaceDeclaration */: + case 231 /* TypeAliasDeclaration */: return undefined; // Tokens: - case 24 /* SemicolonToken */: + case 25 /* SemicolonToken */: case 1 /* EndOfFileToken */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 25 /* CommaToken */: + case 26 /* CommaToken */: return spanInPreviousNode(node); - case 16 /* OpenBraceToken */: + case 17 /* OpenBraceToken */: return spanInOpenBraceToken(node); - case 17 /* CloseBraceToken */: + case 18 /* CloseBraceToken */: return spanInCloseBraceToken(node); - case 21 /* CloseBracketToken */: + case 22 /* CloseBracketToken */: return spanInCloseBracketToken(node); - case 18 /* OpenParenToken */: + case 19 /* OpenParenToken */: return spanInOpenParenToken(node); - case 19 /* CloseParenToken */: + case 20 /* CloseParenToken */: return spanInCloseParenToken(node); - case 55 /* ColonToken */: + case 56 /* ColonToken */: return spanInColonToken(node); - case 28 /* GreaterThanToken */: - case 26 /* LessThanToken */: + case 29 /* GreaterThanToken */: + case 27 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); // Keywords: - case 105 /* WhileKeyword */: + case 106 /* WhileKeyword */: return spanInWhileKeyword(node); - case 81 /* ElseKeyword */: - case 73 /* CatchKeyword */: - case 86 /* FinallyKeyword */: + case 82 /* ElseKeyword */: + case 74 /* CatchKeyword */: + case 87 /* FinallyKeyword */: return spanInNextNode(node); - case 141 /* OfKeyword */: + case 142 /* OfKeyword */: return spanInOfKeyword(node); default: // Destructuring pattern in destructuring assignment @@ -86932,14 +87032,14 @@ var ts; // Set breakpoint on identifier element of destructuring pattern // a or ...c or d: x from // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern - if ((node.kind === 70 /* Identifier */ || - node.kind === 197 /* SpreadElement */ || - node.kind === 260 /* PropertyAssignment */ || - node.kind === 261 /* ShorthandPropertyAssignment */) && + if ((node.kind === 71 /* Identifier */ || + node.kind === 198 /* SpreadElement */ || + node.kind === 261 /* PropertyAssignment */ || + node.kind === 262 /* ShorthandPropertyAssignment */) && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } - if (node.kind === 193 /* BinaryExpression */) { + if (node.kind === 194 /* BinaryExpression */) { var binaryExpression = node; // Set breakpoint in destructuring pattern if its destructuring assignment // [a, b, c] or {a, b, c} of @@ -86948,7 +87048,7 @@ var ts; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); } - if (binaryExpression.operatorToken.kind === 57 /* EqualsToken */ && + if (binaryExpression.operatorToken.kind === 58 /* EqualsToken */ && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { // Set breakpoint on assignment expression element of destructuring pattern // a = expression of @@ -86956,28 +87056,28 @@ var ts; // { a = expression, b, c } = someExpression return textSpan(node); } - if (binaryExpression.operatorToken.kind === 25 /* CommaToken */) { + if (binaryExpression.operatorToken.kind === 26 /* CommaToken */) { return spanInNode(binaryExpression.left); } } if (ts.isPartOfExpression(node)) { switch (node.parent.kind) { - case 211 /* DoStatement */: + case 212 /* DoStatement */: // Set span as if on while keyword return spanInPreviousNode(node); - case 146 /* Decorator */: + case 147 /* Decorator */: // Set breakpoint on the decorator emit return spanInNode(node.parent); - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: return textSpan(node); - case 193 /* BinaryExpression */: - if (node.parent.operatorToken.kind === 25 /* CommaToken */) { + case 194 /* BinaryExpression */: + if (node.parent.operatorToken.kind === 26 /* CommaToken */) { // If this is a comma expression, the breakpoint is possible in this expression return textSpan(node); } break; - case 186 /* ArrowFunction */: + case 187 /* ArrowFunction */: if (node.parent.body === node) { // If this is body of arrow function, it is allowed to have the breakpoint return textSpan(node); @@ -86986,13 +87086,13 @@ var ts; } } // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 260 /* PropertyAssignment */ && + if (node.parent.kind === 261 /* PropertyAssignment */ && node.parent.name === node && !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 183 /* TypeAssertionExpression */ && node.parent.type === node) { + if (node.parent.kind === 184 /* TypeAssertionExpression */ && node.parent.type === node) { return spanInNextNode(node.parent.type); } // return type of function go to previous token @@ -87000,8 +87100,8 @@ var ts; return spanInPreviousNode(node); } // initializer of variable/parameter declaration go to previous node - if ((node.parent.kind === 225 /* VariableDeclaration */ || - node.parent.kind === 145 /* Parameter */)) { + if ((node.parent.kind === 226 /* VariableDeclaration */ || + node.parent.kind === 146 /* Parameter */)) { var paramOrVarDecl = node.parent; if (paramOrVarDecl.initializer === node || paramOrVarDecl.type === node || @@ -87009,7 +87109,7 @@ var ts; return spanInPreviousNode(node); } } - if (node.parent.kind === 193 /* BinaryExpression */) { + if (node.parent.kind === 194 /* BinaryExpression */) { var binaryExpression = node.parent; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && (binaryExpression.right === node || @@ -87023,7 +87123,7 @@ var ts; } } function textSpanFromVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ && + if (variableDeclaration.parent.kind === 227 /* VariableDeclarationList */ && variableDeclaration.parent.declarations[0] === variableDeclaration) { // First declaration - include let keyword return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); @@ -87035,7 +87135,7 @@ var ts; } function spanInVariableDeclaration(variableDeclaration) { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 214 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 215 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } // If this is a destructuring pattern, set breakpoint in binding pattern @@ -87046,10 +87146,10 @@ var ts; // or its declaration from 'for of' if (variableDeclaration.initializer || ts.hasModifier(variableDeclaration, 1 /* Export */) || - variableDeclaration.parent.parent.kind === 215 /* ForOfStatement */) { + variableDeclaration.parent.parent.kind === 216 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } - if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ && + if (variableDeclaration.parent.kind === 227 /* VariableDeclarationList */ && variableDeclaration.parent.declarations[0] !== variableDeclaration) { // If we cannot set breakpoint on this declaration, set it on previous one // Because the variable declaration may be binding pattern and @@ -87086,7 +87186,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return ts.hasModifier(functionDeclaration, 1 /* Export */) || - (functionDeclaration.parent.kind === 228 /* ClassDeclaration */ && functionDeclaration.kind !== 151 /* Constructor */); + (functionDeclaration.parent.kind === 229 /* ClassDeclaration */ && functionDeclaration.kind !== 152 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { // No breakpoints in the function signature @@ -87109,26 +87209,26 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 232 /* ModuleDeclaration */: + case 233 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } // falls through // Set on parent if on same line otherwise on first statement - case 212 /* WhileStatement */: - case 210 /* IfStatement */: - case 214 /* ForInStatement */: + case 213 /* WhileStatement */: + case 211 /* IfStatement */: + case 215 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } // Default action is to set on first statement return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 226 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 227 /* VariableDeclarationList */) { // Declaration list - set breakpoint in first declaration var variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -87153,23 +87253,23 @@ var ts; } function spanInBindingPattern(bindingPattern) { // Set breakpoint in first binding element - var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 200 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } // Empty binding pattern of binding element, set breakpoint on binding element - if (bindingPattern.parent.kind === 175 /* BindingElement */) { + if (bindingPattern.parent.kind === 176 /* BindingElement */) { return textSpan(bindingPattern.parent); } // Variable declaration is used as the span return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { - ts.Debug.assert(node.kind !== 174 /* ArrayBindingPattern */ && node.kind !== 173 /* ObjectBindingPattern */); - var elements = node.kind === 176 /* ArrayLiteralExpression */ ? + ts.Debug.assert(node.kind !== 175 /* ArrayBindingPattern */ && node.kind !== 174 /* ObjectBindingPattern */); + var elements = node.kind === 177 /* ArrayLiteralExpression */ ? node.elements : node.properties; - var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 200 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -87177,18 +87277,18 @@ var ts; // just nested element in another destructuring assignment // set breakpoint on assignment when parent is destructuring assignment // Otherwise set breakpoint for this element - return textSpan(node.parent.kind === 193 /* BinaryExpression */ ? node.parent : node); + return textSpan(node.parent.kind === 194 /* BinaryExpression */ ? node.parent : node); } // Tokens: function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 231 /* EnumDeclaration */: + case 232 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 228 /* ClassDeclaration */: + case 229 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } // Default to parent node @@ -87196,25 +87296,25 @@ var ts; } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 233 /* ModuleBlock */: + case 234 /* ModuleBlock */: // If this is not an instantiated module block, no bp span if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } // falls through - case 231 /* EnumDeclaration */: - case 228 /* ClassDeclaration */: + case 232 /* EnumDeclaration */: + case 229 /* ClassDeclaration */: // Span on close brace token return textSpan(node); - case 206 /* Block */: + case 207 /* Block */: if (ts.isFunctionBlock(node.parent)) { // Span on close brace token return textSpan(node); } // falls through - case 259 /* CatchClause */: + case 260 /* CatchClause */: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 234 /* CaseBlock */: + case 235 /* CaseBlock */: // breakpoint in last statement of the last clause var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); @@ -87222,7 +87322,7 @@ var ts; return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; - case 173 /* ObjectBindingPattern */: + case 174 /* ObjectBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -87238,7 +87338,7 @@ var ts; } function spanInCloseBracketToken(node) { switch (node.parent.kind) { - case 174 /* ArrayBindingPattern */: + case 175 /* ArrayBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -87253,12 +87353,12 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 211 /* DoStatement */ || - node.parent.kind === 180 /* CallExpression */ || - node.parent.kind === 181 /* NewExpression */) { + if (node.parent.kind === 212 /* DoStatement */ || + node.parent.kind === 181 /* CallExpression */ || + node.parent.kind === 182 /* NewExpression */) { return spanInPreviousNode(node); } - if (node.parent.kind === 184 /* ParenthesizedExpression */) { + if (node.parent.kind === 185 /* ParenthesizedExpression */) { return spanInNextNode(node); } // Default to parent node @@ -87267,21 +87367,21 @@ var ts; function spanInCloseParenToken(node) { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { - case 185 /* FunctionExpression */: - case 227 /* FunctionDeclaration */: - case 186 /* ArrowFunction */: - case 150 /* MethodDeclaration */: - case 149 /* MethodSignature */: - case 152 /* GetAccessor */: - case 153 /* SetAccessor */: - case 151 /* Constructor */: - case 212 /* WhileStatement */: - case 211 /* DoStatement */: - case 213 /* ForStatement */: - case 215 /* ForOfStatement */: - case 180 /* CallExpression */: - case 181 /* NewExpression */: - case 184 /* ParenthesizedExpression */: + case 186 /* FunctionExpression */: + case 228 /* FunctionDeclaration */: + case 187 /* ArrowFunction */: + case 151 /* MethodDeclaration */: + case 150 /* MethodSignature */: + case 153 /* GetAccessor */: + case 154 /* SetAccessor */: + case 152 /* Constructor */: + case 213 /* WhileStatement */: + case 212 /* DoStatement */: + case 214 /* ForStatement */: + case 216 /* ForOfStatement */: + case 181 /* CallExpression */: + case 182 /* NewExpression */: + case 185 /* ParenthesizedExpression */: return spanInPreviousNode(node); // Default to parent node default: @@ -87291,20 +87391,20 @@ var ts; function spanInColonToken(node) { // Is this : specifying return annotation of the function declaration if (ts.isFunctionLike(node.parent) || - node.parent.kind === 260 /* PropertyAssignment */ || - node.parent.kind === 145 /* Parameter */) { + node.parent.kind === 261 /* PropertyAssignment */ || + node.parent.kind === 146 /* Parameter */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 183 /* TypeAssertionExpression */) { + if (node.parent.kind === 184 /* TypeAssertionExpression */) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 211 /* DoStatement */) { + if (node.parent.kind === 212 /* DoStatement */) { // Set span on while expression return textSpanEndingAtNextToken(node, node.parent.expression); } @@ -87312,7 +87412,7 @@ var ts; return spanInNode(node.parent); } function spanInOfKeyword(node) { - if (node.parent.kind === 215 /* ForOfStatement */) { + if (node.parent.kind === 216 /* ForOfStatement */) { // Set using next token return spanInNextNode(node); } diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index 642652b5b04fe..df228288c22f3 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -2960,6 +2960,7 @@ var ts; Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." }, Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." }, Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." }, + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -3318,135 +3319,135 @@ var ts; var ts; (function (ts) { function tokenIsIdentifierOrKeyword(token) { - return token >= 70; + return token >= 71; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; var textToToken = ts.createMapFromTemplate({ - "abstract": 116, - "any": 118, - "as": 117, - "boolean": 121, - "break": 71, - "case": 72, - "catch": 73, - "class": 74, - "continue": 76, - "const": 75, - "constructor": 122, - "debugger": 77, - "declare": 123, - "default": 78, - "delete": 79, - "do": 80, - "else": 81, - "enum": 82, - "export": 83, - "extends": 84, - "false": 85, - "finally": 86, - "for": 87, - "from": 139, - "function": 88, - "get": 124, - "if": 89, - "implements": 107, - "import": 90, - "in": 91, - "instanceof": 92, - "interface": 108, - "is": 125, - "keyof": 126, - "let": 109, - "module": 127, - "namespace": 128, - "never": 129, - "new": 93, - "null": 94, - "number": 132, - "object": 133, - "package": 110, - "private": 111, - "protected": 112, - "public": 113, - "readonly": 130, - "require": 131, - "global": 140, - "return": 95, - "set": 134, - "static": 114, - "string": 135, - "super": 96, - "switch": 97, - "symbol": 136, - "this": 98, - "throw": 99, - "true": 100, - "try": 101, - "type": 137, - "typeof": 102, - "undefined": 138, - "var": 103, - "void": 104, - "while": 105, - "with": 106, - "yield": 115, - "async": 119, - "await": 120, - "of": 141, - "{": 16, - "}": 17, - "(": 18, - ")": 19, - "[": 20, - "]": 21, - ".": 22, - "...": 23, - ";": 24, - ",": 25, - "<": 26, - ">": 28, - "<=": 29, - ">=": 30, - "==": 31, - "!=": 32, - "===": 33, - "!==": 34, - "=>": 35, - "+": 36, - "-": 37, - "**": 39, - "*": 38, - "/": 40, - "%": 41, - "++": 42, - "--": 43, - "<<": 44, - ">": 45, - ">>>": 46, - "&": 47, - "|": 48, - "^": 49, - "!": 50, - "~": 51, - "&&": 52, - "||": 53, - "?": 54, - ":": 55, - "=": 57, - "+=": 58, - "-=": 59, - "*=": 60, - "**=": 61, - "/=": 62, - "%=": 63, - "<<=": 64, - ">>=": 65, - ">>>=": 66, - "&=": 67, - "|=": 68, - "^=": 69, - "@": 56, + "abstract": 117, + "any": 119, + "as": 118, + "boolean": 122, + "break": 72, + "case": 73, + "catch": 74, + "class": 75, + "continue": 77, + "const": 76, + "constructor": 123, + "debugger": 78, + "declare": 124, + "default": 79, + "delete": 80, + "do": 81, + "else": 82, + "enum": 83, + "export": 84, + "extends": 85, + "false": 86, + "finally": 87, + "for": 88, + "from": 140, + "function": 89, + "get": 125, + "if": 90, + "implements": 108, + "import": 91, + "in": 92, + "instanceof": 93, + "interface": 109, + "is": 126, + "keyof": 127, + "let": 110, + "module": 128, + "namespace": 129, + "never": 130, + "new": 94, + "null": 95, + "number": 133, + "object": 134, + "package": 111, + "private": 112, + "protected": 113, + "public": 114, + "readonly": 131, + "require": 132, + "global": 141, + "return": 96, + "set": 135, + "static": 115, + "string": 136, + "super": 97, + "switch": 98, + "symbol": 137, + "this": 99, + "throw": 100, + "true": 101, + "try": 102, + "type": 138, + "typeof": 103, + "undefined": 139, + "var": 104, + "void": 105, + "while": 106, + "with": 107, + "yield": 116, + "async": 120, + "await": 121, + "of": 142, + "{": 17, + "}": 18, + "(": 19, + ")": 20, + "[": 21, + "]": 22, + ".": 23, + "...": 24, + ";": 25, + ",": 26, + "<": 27, + ">": 29, + "<=": 30, + ">=": 31, + "==": 32, + "!=": 33, + "===": 34, + "!==": 35, + "=>": 36, + "+": 37, + "-": 38, + "**": 40, + "*": 39, + "/": 41, + "%": 42, + "++": 43, + "--": 44, + "<<": 45, + ">": 46, + ">>>": 47, + "&": 48, + "|": 49, + "^": 50, + "!": 51, + "~": 52, + "&&": 53, + "||": 54, + "?": 55, + ":": 56, + "=": 58, + "+=": 59, + "-=": 60, + "*=": 61, + "**=": 62, + "/=": 63, + "%=": 64, + "<<=": 65, + ">>=": 66, + ">>>=": 67, + "&=": 68, + "|=": 69, + "^=": 70, + "@": 57, }); var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 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, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 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, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 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, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 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, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; @@ -3558,10 +3559,10 @@ var ts; return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); } ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function isWhiteSpace(ch) { + function isWhiteSpaceLike(ch) { return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceLike = isWhiteSpaceLike; function isWhiteSpaceSingleLine(ch) { return ch === 32 || ch === 9 || @@ -3677,7 +3678,7 @@ var ts; } break; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { pos++; continue; } @@ -3811,7 +3812,7 @@ var ts; } break scan; default: - if (ch > 127 && (isWhiteSpace(ch))) { + if (ch > 127 && (isWhiteSpaceLike(ch))) { if (hasPendingCommentRange && isLineBreak(ch)) { pendingHasTrailingNewLine = true; } @@ -3909,8 +3910,8 @@ var ts; getTokenValue: function () { return tokenValue; }, hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 70 || token > 106; }, - isReservedWord: function () { return token >= 71 && token <= 106; }, + isIdentifier: function () { return token === 71 || token > 107; }, + isReservedWord: function () { return token >= 72 && token <= 107; }, isUnterminated: function () { return tokenIsUnterminated; }, getNumericLiteralFlags: function () { return numericLiteralFlags; }, reScanGreaterToken: reScanGreaterToken, @@ -4048,20 +4049,20 @@ var ts; contents += text.substring(start, pos); tokenIsUnterminated = true; error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } var currChar = text.charCodeAt(pos); if (currChar === 96) { contents += text.substring(start, pos); pos++; - resultingToken = startedWithBacktick ? 12 : 15; + resultingToken = startedWithBacktick ? 13 : 16; break; } if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) { contents += text.substring(start, pos); pos += 2; - resultingToken = startedWithBacktick ? 13 : 14; + resultingToken = startedWithBacktick ? 14 : 15; break; } if (currChar === 92) { @@ -4226,7 +4227,7 @@ var ts; } } } - return token = 70; + return token = 71; } function scanBinaryOrOctalDigits(base) { ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8"); @@ -4302,12 +4303,12 @@ var ts; case 33: if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 34; + return pos += 3, token = 35; } - return pos += 2, token = 32; + return pos += 2, token = 33; } pos++; - return token = 50; + return token = 51; case 34: case 39: tokenValue = scanString(); @@ -4316,68 +4317,68 @@ var ts; return token = scanTemplateAndSetTokenValue(); case 37: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 63; + return pos += 2, token = 64; } pos++; - return token = 41; + return token = 42; case 38: if (text.charCodeAt(pos + 1) === 38) { - return pos += 2, token = 52; + return pos += 2, token = 53; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 67; + return pos += 2, token = 68; } pos++; - return token = 47; + return token = 48; case 40: pos++; - return token = 18; + return token = 19; case 41: pos++; - return token = 19; + return token = 20; case 42: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 60; + return pos += 2, token = 61; } if (text.charCodeAt(pos + 1) === 42) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 61; + return pos += 3, token = 62; } - return pos += 2, token = 39; + return pos += 2, token = 40; } pos++; - return token = 38; + return token = 39; case 43: if (text.charCodeAt(pos + 1) === 43) { - return pos += 2, token = 42; + return pos += 2, token = 43; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 58; + return pos += 2, token = 59; } pos++; - return token = 36; + return token = 37; case 44: pos++; - return token = 25; + return token = 26; case 45: if (text.charCodeAt(pos + 1) === 45) { - return pos += 2, token = 43; + return pos += 2, token = 44; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 59; + return pos += 2, token = 60; } pos++; - return token = 37; + return token = 38; case 46: if (isDigit(text.charCodeAt(pos + 1))) { tokenValue = scanNumber(); return token = 8; } if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) { - return pos += 3, token = 23; + return pos += 3, token = 24; } pos++; - return token = 22; + return token = 23; case 47: if (text.charCodeAt(pos + 1) === 47) { pos += 2; @@ -4421,10 +4422,10 @@ var ts; } } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 62; + return pos += 2, token = 63; } pos++; - return token = 40; + return token = 41; case 48: if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) { pos += 2; @@ -4477,10 +4478,10 @@ var ts; return token = 8; case 58: pos++; - return token = 55; + return token = 56; case 59: pos++; - return token = 24; + return token = 25; case 60: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4493,20 +4494,20 @@ var ts; } if (text.charCodeAt(pos + 1) === 60) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 64; + return pos += 3, token = 65; } - return pos += 2, token = 44; + return pos += 2, token = 45; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 29; + return pos += 2, token = 30; } if (languageVariant === 1 && text.charCodeAt(pos + 1) === 47 && text.charCodeAt(pos + 2) !== 42) { - return pos += 2, token = 27; + return pos += 2, token = 28; } pos++; - return token = 26; + return token = 27; case 61: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4519,15 +4520,15 @@ var ts; } if (text.charCodeAt(pos + 1) === 61) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 33; + return pos += 3, token = 34; } - return pos += 2, token = 31; + return pos += 2, token = 32; } if (text.charCodeAt(pos + 1) === 62) { - return pos += 2, token = 35; + return pos += 2, token = 36; } pos++; - return token = 57; + return token = 58; case 62: if (isConflictMarkerTrivia(text, pos)) { pos = scanConflictMarkerTrivia(text, pos, error); @@ -4539,43 +4540,43 @@ var ts; } } pos++; - return token = 28; + return token = 29; case 63: pos++; - return token = 54; + return token = 55; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 94: if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 69; + return pos += 2, token = 70; } pos++; - return token = 49; + return token = 50; case 123: pos++; - return token = 16; + return token = 17; case 124: if (text.charCodeAt(pos + 1) === 124) { - return pos += 2, token = 53; + return pos += 2, token = 54; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 68; + return pos += 2, token = 69; } pos++; - return token = 48; + return token = 49; case 125: pos++; - return token = 17; + return token = 18; case 126: pos++; - return token = 51; + return token = 52; case 64: pos++; - return token = 56; + return token = 57; case 92: var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { @@ -4613,29 +4614,29 @@ var ts; } } function reScanGreaterToken() { - if (token === 28) { + if (token === 29) { if (text.charCodeAt(pos) === 62) { if (text.charCodeAt(pos + 1) === 62) { if (text.charCodeAt(pos + 2) === 61) { - return pos += 3, token = 66; + return pos += 3, token = 67; } - return pos += 2, token = 46; + return pos += 2, token = 47; } if (text.charCodeAt(pos + 1) === 61) { - return pos += 2, token = 65; + return pos += 2, token = 66; } pos++; - return token = 45; + return token = 46; } if (text.charCodeAt(pos) === 61) { pos++; - return token = 30; + return token = 31; } } return token; } function reScanSlashToken() { - if (token === 40 || token === 62) { + if (token === 41 || token === 63) { var p = tokenPos + 1; var inEscape = false; var inCharacterClass = false; @@ -4674,12 +4675,12 @@ var ts; } pos = p; tokenValue = text.substring(tokenPos, pos); - token = 11; + token = 12; } return token; } function reScanTemplateToken() { - ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'"); + ts.Debug.assert(token === 18, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; return token = scanTemplateAndSetTokenValue(); } @@ -4696,17 +4697,17 @@ var ts; if (char === 60) { if (text.charCodeAt(pos + 1) === 47) { pos += 2; - return token = 27; + return token = 28; } pos++; - return token = 26; + return token = 27; } if (char === 123) { pos++; - return token = 16; + return token = 17; } + var firstNonWhitespace = 0; while (pos < end) { - pos++; char = text.charCodeAt(pos); if (char === 123) { break; @@ -4718,8 +4719,15 @@ var ts; } break; } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; } - return token = 10; + return firstNonWhitespace === -1 ? 11 : 10; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -4766,42 +4774,42 @@ var ts; return token = 5; case 64: pos++; - return token = 56; + return token = 57; case 10: case 13: pos++; return token = 4; case 42: pos++; - return token = 38; + return token = 39; case 123: pos++; - return token = 16; + return token = 17; case 125: pos++; - return token = 17; + return token = 18; case 91: pos++; - return token = 20; + return token = 21; case 93: pos++; - return token = 21; + return token = 22; case 61: pos++; - return token = 57; + return token = 58; case 44: pos++; - return token = 25; + return token = 26; case 46: pos++; - return token = 22; + return token = 23; } if (isIdentifierStart(ch, 5)) { pos++; while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) { pos++; } - return token = 70; + return token = 71; } else { return pos += 1, token = 0;