@putout/babel 2.9.0 → 2.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.d.ts +7 -8
- package/bundle/index.js +596 -830
- package/package.json +3 -12
package/bundle/index.js
CHANGED
|
@@ -507,9 +507,9 @@ var require_picocolors = __commonJS({
|
|
|
507
507
|
module2.exports.createColors = createColors2;
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
|
-
// node_modules
|
|
510
|
+
// node_modules/js-tokens/index.js
|
|
511
511
|
var require_js_tokens = __commonJS({
|
|
512
|
-
"node_modules
|
|
512
|
+
"node_modules/js-tokens/index.js": function(exports2, module2) {
|
|
513
513
|
var Identifier2;
|
|
514
514
|
var JSXIdentifier2;
|
|
515
515
|
var JSXPunctuator;
|
|
@@ -1377,6 +1377,9 @@ var require_jsesc = __commonJS({
|
|
|
1377
1377
|
var isNumber2 = function(value1) {
|
|
1378
1378
|
return typeof value1 == "number" || toString.call(value1) == "[object Number]";
|
|
1379
1379
|
};
|
|
1380
|
+
var isBigInt = function(value1) {
|
|
1381
|
+
return (typeof value1 === "undefined" ? "undefined" : _type_of(value1)) == "bigint";
|
|
1382
|
+
};
|
|
1380
1383
|
var isFunction5 = function(value1) {
|
|
1381
1384
|
return typeof value1 == "function";
|
|
1382
1385
|
};
|
|
@@ -1494,26 +1497,33 @@ var require_jsesc = __commonJS({
|
|
|
1494
1497
|
return "[" + result.join(", ") + "]";
|
|
1495
1498
|
}
|
|
1496
1499
|
return "[" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "]";
|
|
1497
|
-
} else if (isNumber2(argument)) {
|
|
1500
|
+
} else if (isNumber2(argument) || isBigInt(argument)) {
|
|
1498
1501
|
if (json) {
|
|
1499
|
-
return JSON.stringify(argument);
|
|
1502
|
+
return JSON.stringify(Number(argument));
|
|
1500
1503
|
}
|
|
1504
|
+
var result2;
|
|
1501
1505
|
if (useDecNumbers) {
|
|
1502
|
-
|
|
1503
|
-
}
|
|
1504
|
-
if (useHexNumbers) {
|
|
1506
|
+
result2 = String(argument);
|
|
1507
|
+
} else if (useHexNumbers) {
|
|
1505
1508
|
var hexadecimal2 = argument.toString(16);
|
|
1506
1509
|
if (!lowercaseHex) {
|
|
1507
1510
|
hexadecimal2 = hexadecimal2.toUpperCase();
|
|
1508
1511
|
}
|
|
1509
|
-
|
|
1512
|
+
result2 = "0x" + hexadecimal2;
|
|
1513
|
+
} else if (useBinNumbers) {
|
|
1514
|
+
result2 = "0b" + argument.toString(2);
|
|
1515
|
+
} else if (useOctNumbers) {
|
|
1516
|
+
result2 = "0o" + argument.toString(8);
|
|
1510
1517
|
}
|
|
1511
|
-
if (
|
|
1512
|
-
return
|
|
1518
|
+
if (isBigInt(argument)) {
|
|
1519
|
+
return result2 + "n";
|
|
1513
1520
|
}
|
|
1514
|
-
|
|
1515
|
-
|
|
1521
|
+
return result2;
|
|
1522
|
+
} else if (isBigInt(argument)) {
|
|
1523
|
+
if (json) {
|
|
1524
|
+
return JSON.stringify(Number(argument));
|
|
1516
1525
|
}
|
|
1526
|
+
return argument + "n";
|
|
1517
1527
|
} else if (!isObject(argument)) {
|
|
1518
1528
|
if (json) {
|
|
1519
1529
|
return JSON.stringify(argument) || "null";
|
|
@@ -1802,49 +1812,114 @@ var require_common = __commonJS({
|
|
|
1802
1812
|
createDebug.namespaces = namespaces;
|
|
1803
1813
|
createDebug.names = [];
|
|
1804
1814
|
createDebug.skips = [];
|
|
1805
|
-
var
|
|
1806
|
-
var
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1815
|
+
var split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
1816
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1817
|
+
try {
|
|
1818
|
+
for(var _iterator = split[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1819
|
+
var ns = _step.value;
|
|
1820
|
+
if (ns[0] === "-") {
|
|
1821
|
+
createDebug.skips.push(ns.slice(1));
|
|
1822
|
+
} else {
|
|
1823
|
+
createDebug.names.push(ns);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
} catch (err) {
|
|
1827
|
+
_didIteratorError = true;
|
|
1828
|
+
_iteratorError = err;
|
|
1829
|
+
} finally{
|
|
1830
|
+
try {
|
|
1831
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1832
|
+
_iterator.return();
|
|
1833
|
+
}
|
|
1834
|
+
} finally{
|
|
1835
|
+
if (_didIteratorError) {
|
|
1836
|
+
throw _iteratorError;
|
|
1837
|
+
}
|
|
1811
1838
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
function matchesTemplate(search, template1) {
|
|
1842
|
+
var searchIndex = 0;
|
|
1843
|
+
var templateIndex = 0;
|
|
1844
|
+
var starIndex = -1;
|
|
1845
|
+
var matchIndex = 0;
|
|
1846
|
+
while(searchIndex < search.length){
|
|
1847
|
+
if (templateIndex < template1.length && (template1[templateIndex] === search[searchIndex] || template1[templateIndex] === "*")) {
|
|
1848
|
+
if (template1[templateIndex] === "*") {
|
|
1849
|
+
starIndex = templateIndex;
|
|
1850
|
+
matchIndex = searchIndex;
|
|
1851
|
+
templateIndex++;
|
|
1852
|
+
} else {
|
|
1853
|
+
searchIndex++;
|
|
1854
|
+
templateIndex++;
|
|
1855
|
+
}
|
|
1856
|
+
} else if (starIndex !== -1) {
|
|
1857
|
+
templateIndex = starIndex + 1;
|
|
1858
|
+
matchIndex++;
|
|
1859
|
+
searchIndex = matchIndex;
|
|
1815
1860
|
} else {
|
|
1816
|
-
|
|
1861
|
+
return false;
|
|
1817
1862
|
}
|
|
1818
1863
|
}
|
|
1864
|
+
while(templateIndex < template1.length && template1[templateIndex] === "*"){
|
|
1865
|
+
templateIndex++;
|
|
1866
|
+
}
|
|
1867
|
+
return templateIndex === template1.length;
|
|
1819
1868
|
}
|
|
1820
1869
|
function disable() {
|
|
1821
|
-
var namespaces = _to_consumable_array(createDebug.names
|
|
1870
|
+
var namespaces = _to_consumable_array(createDebug.names).concat(_to_consumable_array(createDebug.skips.map(function(namespace) {
|
|
1822
1871
|
return "-" + namespace;
|
|
1823
1872
|
}))).join(",");
|
|
1824
1873
|
createDebug.enable("");
|
|
1825
1874
|
return namespaces;
|
|
1826
1875
|
}
|
|
1827
1876
|
function enabled(name) {
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1877
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1878
|
+
try {
|
|
1879
|
+
for(var _iterator = createDebug.skips[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1880
|
+
var skip2 = _step.value;
|
|
1881
|
+
if (matchesTemplate(name, skip2)) {
|
|
1882
|
+
return false;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
} catch (err) {
|
|
1886
|
+
_didIteratorError = true;
|
|
1887
|
+
_iteratorError = err;
|
|
1888
|
+
} finally{
|
|
1889
|
+
try {
|
|
1890
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1891
|
+
_iterator.return();
|
|
1892
|
+
}
|
|
1893
|
+
} finally{
|
|
1894
|
+
if (_didIteratorError) {
|
|
1895
|
+
throw _iteratorError;
|
|
1896
|
+
}
|
|
1836
1897
|
}
|
|
1837
1898
|
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1899
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1900
|
+
try {
|
|
1901
|
+
for(var _iterator1 = createDebug.names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
1902
|
+
var ns = _step1.value;
|
|
1903
|
+
if (matchesTemplate(name, ns)) {
|
|
1904
|
+
return true;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
} catch (err) {
|
|
1908
|
+
_didIteratorError1 = true;
|
|
1909
|
+
_iteratorError1 = err;
|
|
1910
|
+
} finally{
|
|
1911
|
+
try {
|
|
1912
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
1913
|
+
_iterator1.return();
|
|
1914
|
+
}
|
|
1915
|
+
} finally{
|
|
1916
|
+
if (_didIteratorError1) {
|
|
1917
|
+
throw _iteratorError1;
|
|
1918
|
+
}
|
|
1841
1919
|
}
|
|
1842
1920
|
}
|
|
1843
1921
|
return false;
|
|
1844
1922
|
}
|
|
1845
|
-
function toNamespace(regexp) {
|
|
1846
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
1847
|
-
}
|
|
1848
1923
|
function coerce(val) {
|
|
1849
1924
|
if (_instanceof(val, Error)) {
|
|
1850
1925
|
return val.stack || val.message;
|
|
@@ -2029,12 +2104,12 @@ var require_browser = __commonJS({
|
|
|
2029
2104
|
var require_has_flag = __commonJS({
|
|
2030
2105
|
"node_modules/has-flag/index.js": function(exports2, module2) {
|
|
2031
2106
|
"use strict";
|
|
2032
|
-
module2.exports = function(flag) {
|
|
2033
|
-
|
|
2107
|
+
module2.exports = function(flag, argv) {
|
|
2108
|
+
argv = argv || process.argv;
|
|
2034
2109
|
var prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2035
|
-
var
|
|
2036
|
-
var
|
|
2037
|
-
return
|
|
2110
|
+
var pos = argv.indexOf(prefix2 + flag);
|
|
2111
|
+
var terminatorPos = argv.indexOf("--");
|
|
2112
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
2038
2113
|
};
|
|
2039
2114
|
}
|
|
2040
2115
|
});
|
|
@@ -2043,23 +2118,16 @@ var require_supports_color = __commonJS({
|
|
|
2043
2118
|
"node_modules/supports-color/index.js": function(exports2, module2) {
|
|
2044
2119
|
"use strict";
|
|
2045
2120
|
var os = require("os");
|
|
2046
|
-
var tty = require("tty");
|
|
2047
2121
|
var hasFlag = require_has_flag();
|
|
2048
2122
|
var env = process.env;
|
|
2049
2123
|
var forceColor;
|
|
2050
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")
|
|
2051
|
-
forceColor =
|
|
2124
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
2125
|
+
forceColor = false;
|
|
2052
2126
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2053
|
-
forceColor =
|
|
2127
|
+
forceColor = true;
|
|
2054
2128
|
}
|
|
2055
2129
|
if ("FORCE_COLOR" in env) {
|
|
2056
|
-
|
|
2057
|
-
forceColor = 1;
|
|
2058
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
2059
|
-
forceColor = 0;
|
|
2060
|
-
} else {
|
|
2061
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
2062
|
-
}
|
|
2130
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
2063
2131
|
}
|
|
2064
2132
|
function translateLevel(level) {
|
|
2065
2133
|
if (level === 0) {
|
|
@@ -2072,8 +2140,8 @@ var require_supports_color = __commonJS({
|
|
|
2072
2140
|
has16m: level >= 3
|
|
2073
2141
|
};
|
|
2074
2142
|
}
|
|
2075
|
-
function supportsColor(
|
|
2076
|
-
if (forceColor ===
|
|
2143
|
+
function supportsColor(stream) {
|
|
2144
|
+
if (forceColor === false) {
|
|
2077
2145
|
return 0;
|
|
2078
2146
|
}
|
|
2079
2147
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
@@ -2082,16 +2150,13 @@ var require_supports_color = __commonJS({
|
|
|
2082
2150
|
if (hasFlag("color=256")) {
|
|
2083
2151
|
return 2;
|
|
2084
2152
|
}
|
|
2085
|
-
if (
|
|
2153
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
2086
2154
|
return 0;
|
|
2087
2155
|
}
|
|
2088
|
-
var min = forceColor
|
|
2089
|
-
if (env.TERM === "dumb") {
|
|
2090
|
-
return min;
|
|
2091
|
-
}
|
|
2156
|
+
var min = forceColor ? 1 : 0;
|
|
2092
2157
|
if (process.platform === "win32") {
|
|
2093
2158
|
var osRelease = os.release().split(".");
|
|
2094
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2159
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2095
2160
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2096
2161
|
}
|
|
2097
2162
|
return 1;
|
|
@@ -2101,9 +2166,7 @@ var require_supports_color = __commonJS({
|
|
|
2101
2166
|
"TRAVIS",
|
|
2102
2167
|
"CIRCLECI",
|
|
2103
2168
|
"APPVEYOR",
|
|
2104
|
-
"GITLAB_CI"
|
|
2105
|
-
"GITHUB_ACTIONS",
|
|
2106
|
-
"BUILDKITE"
|
|
2169
|
+
"GITLAB_CI"
|
|
2107
2170
|
].some(function(sign) {
|
|
2108
2171
|
return sign in env;
|
|
2109
2172
|
}) || env.CI_NAME === "codeship") {
|
|
@@ -2135,16 +2198,19 @@ var require_supports_color = __commonJS({
|
|
|
2135
2198
|
if ("COLORTERM" in env) {
|
|
2136
2199
|
return 1;
|
|
2137
2200
|
}
|
|
2201
|
+
if (env.TERM === "dumb") {
|
|
2202
|
+
return min;
|
|
2203
|
+
}
|
|
2138
2204
|
return min;
|
|
2139
2205
|
}
|
|
2140
2206
|
function getSupportLevel(stream) {
|
|
2141
|
-
var level = supportsColor(stream
|
|
2207
|
+
var level = supportsColor(stream);
|
|
2142
2208
|
return translateLevel(level);
|
|
2143
2209
|
}
|
|
2144
2210
|
module2.exports = {
|
|
2145
2211
|
supportsColor: getSupportLevel,
|
|
2146
|
-
stdout:
|
|
2147
|
-
stderr:
|
|
2212
|
+
stdout: getSupportLevel(process.stdout),
|
|
2213
|
+
stderr: getSupportLevel(process.stderr)
|
|
2148
2214
|
};
|
|
2149
2215
|
}
|
|
2150
2216
|
});
|
|
@@ -2504,6 +2570,7 @@ var require_globals = __commonJS({
|
|
|
2504
2570
|
CSSKeywordValue: false,
|
|
2505
2571
|
CSSLayerBlockRule: false,
|
|
2506
2572
|
CSSLayerStatementRule: false,
|
|
2573
|
+
CSSMarginRule: false,
|
|
2507
2574
|
CSSMathClamp: false,
|
|
2508
2575
|
CSSMathInvert: false,
|
|
2509
2576
|
CSSMathMax: false,
|
|
@@ -2515,6 +2582,7 @@ var require_globals = __commonJS({
|
|
|
2515
2582
|
CSSMatrixComponent: false,
|
|
2516
2583
|
CSSMediaRule: false,
|
|
2517
2584
|
CSSNamespaceRule: false,
|
|
2585
|
+
CSSNestedDeclarations: false,
|
|
2518
2586
|
CSSNumericArray: false,
|
|
2519
2587
|
CSSNumericValue: false,
|
|
2520
2588
|
CSSPageDescriptors: false,
|
|
@@ -2815,7 +2883,6 @@ var require_globals = __commonJS({
|
|
|
2815
2883
|
IntersectionObserver: false,
|
|
2816
2884
|
IntersectionObserverEntry: false,
|
|
2817
2885
|
isSecureContext: false,
|
|
2818
|
-
Iterator: false,
|
|
2819
2886
|
Keyboard: false,
|
|
2820
2887
|
KeyboardEvent: false,
|
|
2821
2888
|
KeyboardLayoutMap: false,
|
|
@@ -3469,12 +3536,15 @@ var require_globals = __commonJS({
|
|
|
3469
3536
|
XRDepthInformation: false,
|
|
3470
3537
|
XRDOMOverlayState: false,
|
|
3471
3538
|
XRFrame: false,
|
|
3539
|
+
XRHand: false,
|
|
3472
3540
|
XRHitTestResult: false,
|
|
3473
3541
|
XRHitTestSource: false,
|
|
3474
3542
|
XRInputSource: false,
|
|
3475
3543
|
XRInputSourceArray: false,
|
|
3476
3544
|
XRInputSourceEvent: false,
|
|
3477
3545
|
XRInputSourcesChangeEvent: false,
|
|
3546
|
+
XRJointPose: false,
|
|
3547
|
+
XRJointSpace: false,
|
|
3478
3548
|
XRLayer: false,
|
|
3479
3549
|
XRLightEstimate: false,
|
|
3480
3550
|
XRLightProbe: false,
|
|
@@ -3529,6 +3599,7 @@ var require_globals = __commonJS({
|
|
|
3529
3599
|
Intl: false,
|
|
3530
3600
|
isFinite: false,
|
|
3531
3601
|
isNaN: false,
|
|
3602
|
+
Iterator: false,
|
|
3532
3603
|
JSON: false,
|
|
3533
3604
|
Map: false,
|
|
3534
3605
|
Math: false,
|
|
@@ -4240,6 +4311,7 @@ var require_globals = __commonJS({
|
|
|
4240
4311
|
Intl: false,
|
|
4241
4312
|
isFinite: false,
|
|
4242
4313
|
isNaN: false,
|
|
4314
|
+
Iterator: false,
|
|
4243
4315
|
JSON: false,
|
|
4244
4316
|
Map: false,
|
|
4245
4317
|
Math: false,
|
|
@@ -4539,6 +4611,7 @@ var require_globals = __commonJS({
|
|
|
4539
4611
|
clearImmediate: false,
|
|
4540
4612
|
clearInterval: false,
|
|
4541
4613
|
clearTimeout: false,
|
|
4614
|
+
CloseEvent: false,
|
|
4542
4615
|
CompressionStream: false,
|
|
4543
4616
|
console: false,
|
|
4544
4617
|
CountQueuingStrategy: false,
|
|
@@ -4556,7 +4629,6 @@ var require_globals = __commonJS({
|
|
|
4556
4629
|
FormData: false,
|
|
4557
4630
|
global: false,
|
|
4558
4631
|
Headers: false,
|
|
4559
|
-
Iterator: false,
|
|
4560
4632
|
MessageChannel: false,
|
|
4561
4633
|
MessageEvent: false,
|
|
4562
4634
|
MessagePort: false,
|
|
@@ -4613,6 +4685,7 @@ var require_globals = __commonJS({
|
|
|
4613
4685
|
clearImmediate: false,
|
|
4614
4686
|
clearInterval: false,
|
|
4615
4687
|
clearTimeout: false,
|
|
4688
|
+
CloseEvent: false,
|
|
4616
4689
|
CompressionStream: false,
|
|
4617
4690
|
console: false,
|
|
4618
4691
|
CountQueuingStrategy: false,
|
|
@@ -4629,7 +4702,6 @@ var require_globals = __commonJS({
|
|
|
4629
4702
|
FormData: false,
|
|
4630
4703
|
global: false,
|
|
4631
4704
|
Headers: false,
|
|
4632
|
-
Iterator: false,
|
|
4633
4705
|
MessageChannel: false,
|
|
4634
4706
|
MessageEvent: false,
|
|
4635
4707
|
MessagePort: false,
|
|
@@ -4906,6 +4978,7 @@ var require_globals = __commonJS({
|
|
|
4906
4978
|
ByteLengthQueuingStrategy: false,
|
|
4907
4979
|
clearInterval: false,
|
|
4908
4980
|
clearTimeout: false,
|
|
4981
|
+
CloseEvent: false,
|
|
4909
4982
|
CompressionStream: false,
|
|
4910
4983
|
console: false,
|
|
4911
4984
|
CountQueuingStrategy: false,
|
|
@@ -4921,7 +4994,6 @@ var require_globals = __commonJS({
|
|
|
4921
4994
|
File: false,
|
|
4922
4995
|
FormData: false,
|
|
4923
4996
|
Headers: false,
|
|
4924
|
-
Iterator: false,
|
|
4925
4997
|
MessageChannel: false,
|
|
4926
4998
|
MessageEvent: false,
|
|
4927
4999
|
MessagePort: false,
|
|
@@ -5112,6 +5184,10 @@ var require_globals = __commonJS({
|
|
|
5112
5184
|
GPUUncapturedErrorEvent: false,
|
|
5113
5185
|
GPUValidationError: false,
|
|
5114
5186
|
Headers: false,
|
|
5187
|
+
HID: false,
|
|
5188
|
+
HIDConnectionEvent: false,
|
|
5189
|
+
HIDDevice: false,
|
|
5190
|
+
HIDInputReportEvent: false,
|
|
5115
5191
|
IDBCursor: false,
|
|
5116
5192
|
IDBCursorWithValue: false,
|
|
5117
5193
|
IDBDatabase: false,
|
|
@@ -5133,7 +5209,6 @@ var require_globals = __commonJS({
|
|
|
5133
5209
|
importScripts: false,
|
|
5134
5210
|
indexedDB: false,
|
|
5135
5211
|
isSecureContext: false,
|
|
5136
|
-
Iterator: false,
|
|
5137
5212
|
location: false,
|
|
5138
5213
|
Lock: false,
|
|
5139
5214
|
LockManager: false,
|
|
@@ -5193,6 +5268,7 @@ var require_globals = __commonJS({
|
|
|
5193
5268
|
Request: false,
|
|
5194
5269
|
requestAnimationFrame: false,
|
|
5195
5270
|
Response: false,
|
|
5271
|
+
RTCDataChannel: false,
|
|
5196
5272
|
RTCEncodedAudioFrame: false,
|
|
5197
5273
|
RTCEncodedVideoFrame: false,
|
|
5198
5274
|
scheduler: false,
|
|
@@ -5508,9 +5584,6 @@ __export(lib_exports, {
|
|
|
5508
5584
|
DebuggerStatement: function() {
|
|
5509
5585
|
return debuggerStatement;
|
|
5510
5586
|
},
|
|
5511
|
-
DecimalLiteral: function() {
|
|
5512
|
-
return decimalLiteral;
|
|
5513
|
-
},
|
|
5514
5587
|
DeclareClass: function() {
|
|
5515
5588
|
return declareClass;
|
|
5516
5589
|
},
|
|
@@ -5862,9 +5935,6 @@ __export(lib_exports, {
|
|
|
5862
5935
|
NewExpression: function() {
|
|
5863
5936
|
return newExpression;
|
|
5864
5937
|
},
|
|
5865
|
-
Noop: function() {
|
|
5866
|
-
return noop;
|
|
5867
|
-
},
|
|
5868
5938
|
NullLiteral: function() {
|
|
5869
5939
|
return nullLiteral;
|
|
5870
5940
|
},
|
|
@@ -6069,6 +6139,9 @@ __export(lib_exports, {
|
|
|
6069
6139
|
TSCallSignatureDeclaration: function() {
|
|
6070
6140
|
return tsCallSignatureDeclaration;
|
|
6071
6141
|
},
|
|
6142
|
+
TSClassImplements: function() {
|
|
6143
|
+
return tsClassImplements;
|
|
6144
|
+
},
|
|
6072
6145
|
TSConditionalType: function() {
|
|
6073
6146
|
return tsConditionalType;
|
|
6074
6147
|
},
|
|
@@ -6096,9 +6169,6 @@ __export(lib_exports, {
|
|
|
6096
6169
|
TSExportAssignment: function() {
|
|
6097
6170
|
return tsExportAssignment;
|
|
6098
6171
|
},
|
|
6099
|
-
TSExpressionWithTypeArguments: function() {
|
|
6100
|
-
return tsExpressionWithTypeArguments;
|
|
6101
|
-
},
|
|
6102
6172
|
TSExternalModuleReference: function() {
|
|
6103
6173
|
return tsExternalModuleReference;
|
|
6104
6174
|
},
|
|
@@ -6129,6 +6199,9 @@ __export(lib_exports, {
|
|
|
6129
6199
|
TSInterfaceDeclaration: function() {
|
|
6130
6200
|
return tsInterfaceDeclaration;
|
|
6131
6201
|
},
|
|
6202
|
+
TSInterfaceHeritage: function() {
|
|
6203
|
+
return tsInterfaceHeritage;
|
|
6204
|
+
},
|
|
6132
6205
|
TSIntersectionType: function() {
|
|
6133
6206
|
return tsIntersectionType;
|
|
6134
6207
|
},
|
|
@@ -6507,9 +6580,6 @@ __export(lib_exports, {
|
|
|
6507
6580
|
assertDebuggerStatement: function() {
|
|
6508
6581
|
return assertDebuggerStatement;
|
|
6509
6582
|
},
|
|
6510
|
-
assertDecimalLiteral: function() {
|
|
6511
|
-
return assertDecimalLiteral;
|
|
6512
|
-
},
|
|
6513
6583
|
assertDeclaration: function() {
|
|
6514
6584
|
return assertDeclaration;
|
|
6515
6585
|
},
|
|
@@ -6834,9 +6904,6 @@ __export(lib_exports, {
|
|
|
6834
6904
|
assertNode: function() {
|
|
6835
6905
|
return assertNode;
|
|
6836
6906
|
},
|
|
6837
|
-
assertNoop: function() {
|
|
6838
|
-
return assertNoop;
|
|
6839
|
-
},
|
|
6840
6907
|
assertNullLiteral: function() {
|
|
6841
6908
|
return assertNullLiteral;
|
|
6842
6909
|
},
|
|
@@ -7023,6 +7090,9 @@ __export(lib_exports, {
|
|
|
7023
7090
|
assertTSCallSignatureDeclaration: function() {
|
|
7024
7091
|
return assertTSCallSignatureDeclaration;
|
|
7025
7092
|
},
|
|
7093
|
+
assertTSClassImplements: function() {
|
|
7094
|
+
return assertTSClassImplements;
|
|
7095
|
+
},
|
|
7026
7096
|
assertTSConditionalType: function() {
|
|
7027
7097
|
return assertTSConditionalType;
|
|
7028
7098
|
},
|
|
@@ -7050,9 +7120,6 @@ __export(lib_exports, {
|
|
|
7050
7120
|
assertTSExportAssignment: function() {
|
|
7051
7121
|
return assertTSExportAssignment;
|
|
7052
7122
|
},
|
|
7053
|
-
assertTSExpressionWithTypeArguments: function() {
|
|
7054
|
-
return assertTSExpressionWithTypeArguments;
|
|
7055
|
-
},
|
|
7056
7123
|
assertTSExternalModuleReference: function() {
|
|
7057
7124
|
return assertTSExternalModuleReference;
|
|
7058
7125
|
},
|
|
@@ -7083,6 +7150,9 @@ __export(lib_exports, {
|
|
|
7083
7150
|
assertTSInterfaceDeclaration: function() {
|
|
7084
7151
|
return assertTSInterfaceDeclaration;
|
|
7085
7152
|
},
|
|
7153
|
+
assertTSInterfaceHeritage: function() {
|
|
7154
|
+
return assertTSInterfaceHeritage;
|
|
7155
|
+
},
|
|
7086
7156
|
assertTSIntersectionType: function() {
|
|
7087
7157
|
return assertTSIntersectionType;
|
|
7088
7158
|
},
|
|
@@ -7416,9 +7486,6 @@ __export(lib_exports, {
|
|
|
7416
7486
|
debuggerStatement: function() {
|
|
7417
7487
|
return debuggerStatement;
|
|
7418
7488
|
},
|
|
7419
|
-
decimalLiteral: function() {
|
|
7420
|
-
return decimalLiteral;
|
|
7421
|
-
},
|
|
7422
7489
|
declareClass: function() {
|
|
7423
7490
|
return declareClass;
|
|
7424
7491
|
},
|
|
@@ -7752,9 +7819,6 @@ __export(lib_exports, {
|
|
|
7752
7819
|
isDebuggerStatement: function() {
|
|
7753
7820
|
return isDebuggerStatement;
|
|
7754
7821
|
},
|
|
7755
|
-
isDecimalLiteral: function() {
|
|
7756
|
-
return isDecimalLiteral;
|
|
7757
|
-
},
|
|
7758
7822
|
isDeclaration: function() {
|
|
7759
7823
|
return isDeclaration;
|
|
7760
7824
|
},
|
|
@@ -8085,9 +8149,6 @@ __export(lib_exports, {
|
|
|
8085
8149
|
isNodesEquivalent: function() {
|
|
8086
8150
|
return isNodesEquivalent;
|
|
8087
8151
|
},
|
|
8088
|
-
isNoop: function() {
|
|
8089
|
-
return isNoop;
|
|
8090
|
-
},
|
|
8091
8152
|
isNullLiteral: function() {
|
|
8092
8153
|
return isNullLiteral;
|
|
8093
8154
|
},
|
|
@@ -8286,6 +8347,9 @@ __export(lib_exports, {
|
|
|
8286
8347
|
isTSCallSignatureDeclaration: function() {
|
|
8287
8348
|
return isTSCallSignatureDeclaration;
|
|
8288
8349
|
},
|
|
8350
|
+
isTSClassImplements: function() {
|
|
8351
|
+
return isTSClassImplements;
|
|
8352
|
+
},
|
|
8289
8353
|
isTSConditionalType: function() {
|
|
8290
8354
|
return isTSConditionalType;
|
|
8291
8355
|
},
|
|
@@ -8313,9 +8377,6 @@ __export(lib_exports, {
|
|
|
8313
8377
|
isTSExportAssignment: function() {
|
|
8314
8378
|
return isTSExportAssignment;
|
|
8315
8379
|
},
|
|
8316
|
-
isTSExpressionWithTypeArguments: function() {
|
|
8317
|
-
return isTSExpressionWithTypeArguments;
|
|
8318
|
-
},
|
|
8319
8380
|
isTSExternalModuleReference: function() {
|
|
8320
8381
|
return isTSExternalModuleReference;
|
|
8321
8382
|
},
|
|
@@ -8346,6 +8407,9 @@ __export(lib_exports, {
|
|
|
8346
8407
|
isTSInterfaceDeclaration: function() {
|
|
8347
8408
|
return isTSInterfaceDeclaration;
|
|
8348
8409
|
},
|
|
8410
|
+
isTSInterfaceHeritage: function() {
|
|
8411
|
+
return isTSInterfaceHeritage;
|
|
8412
|
+
},
|
|
8349
8413
|
isTSIntersectionType: function() {
|
|
8350
8414
|
return isTSIntersectionType;
|
|
8351
8415
|
},
|
|
@@ -8583,51 +8647,6 @@ __export(lib_exports, {
|
|
|
8583
8647
|
isYieldExpression: function() {
|
|
8584
8648
|
return isYieldExpression;
|
|
8585
8649
|
},
|
|
8586
|
-
jSXAttribute: function() {
|
|
8587
|
-
return jsxAttribute;
|
|
8588
|
-
},
|
|
8589
|
-
jSXClosingElement: function() {
|
|
8590
|
-
return jsxClosingElement;
|
|
8591
|
-
},
|
|
8592
|
-
jSXClosingFragment: function() {
|
|
8593
|
-
return jsxClosingFragment;
|
|
8594
|
-
},
|
|
8595
|
-
jSXElement: function() {
|
|
8596
|
-
return jsxElement;
|
|
8597
|
-
},
|
|
8598
|
-
jSXEmptyExpression: function() {
|
|
8599
|
-
return jsxEmptyExpression;
|
|
8600
|
-
},
|
|
8601
|
-
jSXExpressionContainer: function() {
|
|
8602
|
-
return jsxExpressionContainer;
|
|
8603
|
-
},
|
|
8604
|
-
jSXFragment: function() {
|
|
8605
|
-
return jsxFragment;
|
|
8606
|
-
},
|
|
8607
|
-
jSXIdentifier: function() {
|
|
8608
|
-
return jsxIdentifier;
|
|
8609
|
-
},
|
|
8610
|
-
jSXMemberExpression: function() {
|
|
8611
|
-
return jsxMemberExpression;
|
|
8612
|
-
},
|
|
8613
|
-
jSXNamespacedName: function() {
|
|
8614
|
-
return jsxNamespacedName;
|
|
8615
|
-
},
|
|
8616
|
-
jSXOpeningElement: function() {
|
|
8617
|
-
return jsxOpeningElement;
|
|
8618
|
-
},
|
|
8619
|
-
jSXOpeningFragment: function() {
|
|
8620
|
-
return jsxOpeningFragment;
|
|
8621
|
-
},
|
|
8622
|
-
jSXSpreadAttribute: function() {
|
|
8623
|
-
return jsxSpreadAttribute;
|
|
8624
|
-
},
|
|
8625
|
-
jSXSpreadChild: function() {
|
|
8626
|
-
return jsxSpreadChild;
|
|
8627
|
-
},
|
|
8628
|
-
jSXText: function() {
|
|
8629
|
-
return jsxText;
|
|
8630
|
-
},
|
|
8631
8650
|
jsxAttribute: function() {
|
|
8632
8651
|
return jsxAttribute;
|
|
8633
8652
|
},
|
|
@@ -8697,9 +8716,6 @@ __export(lib_exports, {
|
|
|
8697
8716
|
newExpression: function() {
|
|
8698
8717
|
return newExpression;
|
|
8699
8718
|
},
|
|
8700
|
-
noop: function() {
|
|
8701
|
-
return noop;
|
|
8702
|
-
},
|
|
8703
8719
|
nullLiteral: function() {
|
|
8704
8720
|
return nullLiteral;
|
|
8705
8721
|
},
|
|
@@ -8859,201 +8875,6 @@ __export(lib_exports, {
|
|
|
8859
8875
|
symbolTypeAnnotation: function() {
|
|
8860
8876
|
return symbolTypeAnnotation;
|
|
8861
8877
|
},
|
|
8862
|
-
tSAnyKeyword: function() {
|
|
8863
|
-
return tsAnyKeyword;
|
|
8864
|
-
},
|
|
8865
|
-
tSArrayType: function() {
|
|
8866
|
-
return tsArrayType;
|
|
8867
|
-
},
|
|
8868
|
-
tSAsExpression: function() {
|
|
8869
|
-
return tsAsExpression;
|
|
8870
|
-
},
|
|
8871
|
-
tSBigIntKeyword: function() {
|
|
8872
|
-
return tsBigIntKeyword;
|
|
8873
|
-
},
|
|
8874
|
-
tSBooleanKeyword: function() {
|
|
8875
|
-
return tsBooleanKeyword;
|
|
8876
|
-
},
|
|
8877
|
-
tSCallSignatureDeclaration: function() {
|
|
8878
|
-
return tsCallSignatureDeclaration;
|
|
8879
|
-
},
|
|
8880
|
-
tSConditionalType: function() {
|
|
8881
|
-
return tsConditionalType;
|
|
8882
|
-
},
|
|
8883
|
-
tSConstructSignatureDeclaration: function() {
|
|
8884
|
-
return tsConstructSignatureDeclaration;
|
|
8885
|
-
},
|
|
8886
|
-
tSConstructorType: function() {
|
|
8887
|
-
return tsConstructorType;
|
|
8888
|
-
},
|
|
8889
|
-
tSDeclareFunction: function() {
|
|
8890
|
-
return tsDeclareFunction;
|
|
8891
|
-
},
|
|
8892
|
-
tSDeclareMethod: function() {
|
|
8893
|
-
return tsDeclareMethod;
|
|
8894
|
-
},
|
|
8895
|
-
tSEnumDeclaration: function() {
|
|
8896
|
-
return tsEnumDeclaration;
|
|
8897
|
-
},
|
|
8898
|
-
tSEnumMember: function() {
|
|
8899
|
-
return tsEnumMember;
|
|
8900
|
-
},
|
|
8901
|
-
tSExportAssignment: function() {
|
|
8902
|
-
return tsExportAssignment;
|
|
8903
|
-
},
|
|
8904
|
-
tSExpressionWithTypeArguments: function() {
|
|
8905
|
-
return tsExpressionWithTypeArguments;
|
|
8906
|
-
},
|
|
8907
|
-
tSExternalModuleReference: function() {
|
|
8908
|
-
return tsExternalModuleReference;
|
|
8909
|
-
},
|
|
8910
|
-
tSFunctionType: function() {
|
|
8911
|
-
return tsFunctionType;
|
|
8912
|
-
},
|
|
8913
|
-
tSImportEqualsDeclaration: function() {
|
|
8914
|
-
return tsImportEqualsDeclaration;
|
|
8915
|
-
},
|
|
8916
|
-
tSImportType: function() {
|
|
8917
|
-
return tsImportType;
|
|
8918
|
-
},
|
|
8919
|
-
tSIndexSignature: function() {
|
|
8920
|
-
return tsIndexSignature;
|
|
8921
|
-
},
|
|
8922
|
-
tSIndexedAccessType: function() {
|
|
8923
|
-
return tsIndexedAccessType;
|
|
8924
|
-
},
|
|
8925
|
-
tSInferType: function() {
|
|
8926
|
-
return tsInferType;
|
|
8927
|
-
},
|
|
8928
|
-
tSInstantiationExpression: function() {
|
|
8929
|
-
return tsInstantiationExpression;
|
|
8930
|
-
},
|
|
8931
|
-
tSInterfaceBody: function() {
|
|
8932
|
-
return tsInterfaceBody;
|
|
8933
|
-
},
|
|
8934
|
-
tSInterfaceDeclaration: function() {
|
|
8935
|
-
return tsInterfaceDeclaration;
|
|
8936
|
-
},
|
|
8937
|
-
tSIntersectionType: function() {
|
|
8938
|
-
return tsIntersectionType;
|
|
8939
|
-
},
|
|
8940
|
-
tSIntrinsicKeyword: function() {
|
|
8941
|
-
return tsIntrinsicKeyword;
|
|
8942
|
-
},
|
|
8943
|
-
tSLiteralType: function() {
|
|
8944
|
-
return tsLiteralType;
|
|
8945
|
-
},
|
|
8946
|
-
tSMappedType: function() {
|
|
8947
|
-
return tsMappedType;
|
|
8948
|
-
},
|
|
8949
|
-
tSMethodSignature: function() {
|
|
8950
|
-
return tsMethodSignature;
|
|
8951
|
-
},
|
|
8952
|
-
tSModuleBlock: function() {
|
|
8953
|
-
return tsModuleBlock;
|
|
8954
|
-
},
|
|
8955
|
-
tSModuleDeclaration: function() {
|
|
8956
|
-
return tsModuleDeclaration;
|
|
8957
|
-
},
|
|
8958
|
-
tSNamedTupleMember: function() {
|
|
8959
|
-
return tsNamedTupleMember;
|
|
8960
|
-
},
|
|
8961
|
-
tSNamespaceExportDeclaration: function() {
|
|
8962
|
-
return tsNamespaceExportDeclaration;
|
|
8963
|
-
},
|
|
8964
|
-
tSNeverKeyword: function() {
|
|
8965
|
-
return tsNeverKeyword;
|
|
8966
|
-
},
|
|
8967
|
-
tSNonNullExpression: function() {
|
|
8968
|
-
return tsNonNullExpression;
|
|
8969
|
-
},
|
|
8970
|
-
tSNullKeyword: function() {
|
|
8971
|
-
return tsNullKeyword;
|
|
8972
|
-
},
|
|
8973
|
-
tSNumberKeyword: function() {
|
|
8974
|
-
return tsNumberKeyword;
|
|
8975
|
-
},
|
|
8976
|
-
tSObjectKeyword: function() {
|
|
8977
|
-
return tsObjectKeyword;
|
|
8978
|
-
},
|
|
8979
|
-
tSOptionalType: function() {
|
|
8980
|
-
return tsOptionalType;
|
|
8981
|
-
},
|
|
8982
|
-
tSParameterProperty: function() {
|
|
8983
|
-
return tsParameterProperty;
|
|
8984
|
-
},
|
|
8985
|
-
tSParenthesizedType: function() {
|
|
8986
|
-
return tsParenthesizedType;
|
|
8987
|
-
},
|
|
8988
|
-
tSPropertySignature: function() {
|
|
8989
|
-
return tsPropertySignature;
|
|
8990
|
-
},
|
|
8991
|
-
tSQualifiedName: function() {
|
|
8992
|
-
return tsQualifiedName;
|
|
8993
|
-
},
|
|
8994
|
-
tSRestType: function() {
|
|
8995
|
-
return tsRestType;
|
|
8996
|
-
},
|
|
8997
|
-
tSSatisfiesExpression: function() {
|
|
8998
|
-
return tsSatisfiesExpression;
|
|
8999
|
-
},
|
|
9000
|
-
tSStringKeyword: function() {
|
|
9001
|
-
return tsStringKeyword;
|
|
9002
|
-
},
|
|
9003
|
-
tSSymbolKeyword: function() {
|
|
9004
|
-
return tsSymbolKeyword;
|
|
9005
|
-
},
|
|
9006
|
-
tSThisType: function() {
|
|
9007
|
-
return tsThisType;
|
|
9008
|
-
},
|
|
9009
|
-
tSTupleType: function() {
|
|
9010
|
-
return tsTupleType;
|
|
9011
|
-
},
|
|
9012
|
-
tSTypeAliasDeclaration: function() {
|
|
9013
|
-
return tsTypeAliasDeclaration;
|
|
9014
|
-
},
|
|
9015
|
-
tSTypeAnnotation: function() {
|
|
9016
|
-
return tsTypeAnnotation;
|
|
9017
|
-
},
|
|
9018
|
-
tSTypeAssertion: function() {
|
|
9019
|
-
return tsTypeAssertion;
|
|
9020
|
-
},
|
|
9021
|
-
tSTypeLiteral: function() {
|
|
9022
|
-
return tsTypeLiteral;
|
|
9023
|
-
},
|
|
9024
|
-
tSTypeOperator: function() {
|
|
9025
|
-
return tsTypeOperator;
|
|
9026
|
-
},
|
|
9027
|
-
tSTypeParameter: function() {
|
|
9028
|
-
return tsTypeParameter;
|
|
9029
|
-
},
|
|
9030
|
-
tSTypeParameterDeclaration: function() {
|
|
9031
|
-
return tsTypeParameterDeclaration;
|
|
9032
|
-
},
|
|
9033
|
-
tSTypeParameterInstantiation: function() {
|
|
9034
|
-
return tsTypeParameterInstantiation;
|
|
9035
|
-
},
|
|
9036
|
-
tSTypePredicate: function() {
|
|
9037
|
-
return tsTypePredicate;
|
|
9038
|
-
},
|
|
9039
|
-
tSTypeQuery: function() {
|
|
9040
|
-
return tsTypeQuery;
|
|
9041
|
-
},
|
|
9042
|
-
tSTypeReference: function() {
|
|
9043
|
-
return tsTypeReference;
|
|
9044
|
-
},
|
|
9045
|
-
tSUndefinedKeyword: function() {
|
|
9046
|
-
return tsUndefinedKeyword;
|
|
9047
|
-
},
|
|
9048
|
-
tSUnionType: function() {
|
|
9049
|
-
return tsUnionType;
|
|
9050
|
-
},
|
|
9051
|
-
tSUnknownKeyword: function() {
|
|
9052
|
-
return tsUnknownKeyword;
|
|
9053
|
-
},
|
|
9054
|
-
tSVoidKeyword: function() {
|
|
9055
|
-
return tsVoidKeyword;
|
|
9056
|
-
},
|
|
9057
8878
|
taggedTemplateExpression: function() {
|
|
9058
8879
|
return taggedTemplateExpression;
|
|
9059
8880
|
},
|
|
@@ -9123,6 +8944,9 @@ __export(lib_exports, {
|
|
|
9123
8944
|
tsCallSignatureDeclaration: function() {
|
|
9124
8945
|
return tsCallSignatureDeclaration;
|
|
9125
8946
|
},
|
|
8947
|
+
tsClassImplements: function() {
|
|
8948
|
+
return tsClassImplements;
|
|
8949
|
+
},
|
|
9126
8950
|
tsConditionalType: function() {
|
|
9127
8951
|
return tsConditionalType;
|
|
9128
8952
|
},
|
|
@@ -9147,9 +8971,6 @@ __export(lib_exports, {
|
|
|
9147
8971
|
tsExportAssignment: function() {
|
|
9148
8972
|
return tsExportAssignment;
|
|
9149
8973
|
},
|
|
9150
|
-
tsExpressionWithTypeArguments: function() {
|
|
9151
|
-
return tsExpressionWithTypeArguments;
|
|
9152
|
-
},
|
|
9153
8974
|
tsExternalModuleReference: function() {
|
|
9154
8975
|
return tsExternalModuleReference;
|
|
9155
8976
|
},
|
|
@@ -9180,6 +9001,9 @@ __export(lib_exports, {
|
|
|
9180
9001
|
tsInterfaceDeclaration: function() {
|
|
9181
9002
|
return tsInterfaceDeclaration;
|
|
9182
9003
|
},
|
|
9004
|
+
tsInterfaceHeritage: function() {
|
|
9005
|
+
return tsInterfaceHeritage;
|
|
9006
|
+
},
|
|
9183
9007
|
tsIntersectionType: function() {
|
|
9184
9008
|
return tsIntersectionType;
|
|
9185
9009
|
},
|
|
@@ -11606,11 +11430,6 @@ function isJSXClosingFragment(node, opts) {
|
|
|
11606
11430
|
if (node.type !== "JSXClosingFragment") return false;
|
|
11607
11431
|
return opts == null || shallowEqual(node, opts);
|
|
11608
11432
|
}
|
|
11609
|
-
function isNoop(node, opts) {
|
|
11610
|
-
if (!node) return false;
|
|
11611
|
-
if (node.type !== "Noop") return false;
|
|
11612
|
-
return opts == null || shallowEqual(node, opts);
|
|
11613
|
-
}
|
|
11614
11433
|
function isPlaceholder(node, opts) {
|
|
11615
11434
|
if (!node) return false;
|
|
11616
11435
|
if (node.type !== "Placeholder") return false;
|
|
@@ -11661,11 +11480,6 @@ function isTupleExpression(node, opts) {
|
|
|
11661
11480
|
if (node.type !== "TupleExpression") return false;
|
|
11662
11481
|
return opts == null || shallowEqual(node, opts);
|
|
11663
11482
|
}
|
|
11664
|
-
function isDecimalLiteral(node, opts) {
|
|
11665
|
-
if (!node) return false;
|
|
11666
|
-
if (node.type !== "DecimalLiteral") return false;
|
|
11667
|
-
return opts == null || shallowEqual(node, opts);
|
|
11668
|
-
}
|
|
11669
11483
|
function isModuleExpression(node, opts) {
|
|
11670
11484
|
if (!node) return false;
|
|
11671
11485
|
if (node.type !== "ModuleExpression") return false;
|
|
@@ -11906,9 +11720,14 @@ function isTSLiteralType(node, opts) {
|
|
|
11906
11720
|
if (node.type !== "TSLiteralType") return false;
|
|
11907
11721
|
return opts == null || shallowEqual(node, opts);
|
|
11908
11722
|
}
|
|
11909
|
-
function
|
|
11723
|
+
function isTSClassImplements(node, opts) {
|
|
11910
11724
|
if (!node) return false;
|
|
11911
|
-
if (node.type !== "
|
|
11725
|
+
if (node.type !== "TSClassImplements") return false;
|
|
11726
|
+
return opts == null || shallowEqual(node, opts);
|
|
11727
|
+
}
|
|
11728
|
+
function isTSInterfaceHeritage(node, opts) {
|
|
11729
|
+
if (!node) return false;
|
|
11730
|
+
if (node.type !== "TSInterfaceHeritage") return false;
|
|
11912
11731
|
return opts == null || shallowEqual(node, opts);
|
|
11913
11732
|
}
|
|
11914
11733
|
function isTSInterfaceDeclaration(node, opts) {
|
|
@@ -12152,7 +11971,6 @@ function isExpression(node, opts) {
|
|
|
12152
11971
|
case "ClassExpression":
|
|
12153
11972
|
case "ImportExpression":
|
|
12154
11973
|
case "MetaProperty":
|
|
12155
|
-
case "Super":
|
|
12156
11974
|
case "TaggedTemplateExpression":
|
|
12157
11975
|
case "TemplateLiteral":
|
|
12158
11976
|
case "YieldExpression":
|
|
@@ -12168,7 +11986,6 @@ function isExpression(node, opts) {
|
|
|
12168
11986
|
case "DoExpression":
|
|
12169
11987
|
case "RecordExpression":
|
|
12170
11988
|
case "TupleExpression":
|
|
12171
|
-
case "DecimalLiteral":
|
|
12172
11989
|
case "ModuleExpression":
|
|
12173
11990
|
case "TopicReference":
|
|
12174
11991
|
case "PipelineTopicExpression":
|
|
@@ -12487,7 +12304,6 @@ function isPureish(node, opts) {
|
|
|
12487
12304
|
case "RegExpLiteral":
|
|
12488
12305
|
case "ArrowFunctionExpression":
|
|
12489
12306
|
case "BigIntLiteral":
|
|
12490
|
-
case "DecimalLiteral":
|
|
12491
12307
|
break;
|
|
12492
12308
|
case "Placeholder":
|
|
12493
12309
|
if (node.expectedNode === "StringLiteral") break;
|
|
@@ -12612,7 +12428,6 @@ function isLiteral(node, opts) {
|
|
|
12612
12428
|
case "RegExpLiteral":
|
|
12613
12429
|
case "TemplateLiteral":
|
|
12614
12430
|
case "BigIntLiteral":
|
|
12615
|
-
case "DecimalLiteral":
|
|
12616
12431
|
break;
|
|
12617
12432
|
case "Placeholder":
|
|
12618
12433
|
if (node.expectedNode === "StringLiteral") break;
|
|
@@ -12985,7 +12800,6 @@ function isJSX(node, opts) {
|
|
|
12985
12800
|
function isMiscellaneous(node, opts) {
|
|
12986
12801
|
if (!node) return false;
|
|
12987
12802
|
switch(node.type){
|
|
12988
|
-
case "Noop":
|
|
12989
12803
|
case "Placeholder":
|
|
12990
12804
|
case "V8IntrinsicIdentifier":
|
|
12991
12805
|
break;
|
|
@@ -13040,7 +12854,8 @@ function isTypeScript(node, opts) {
|
|
|
13040
12854
|
case "TSIndexedAccessType":
|
|
13041
12855
|
case "TSMappedType":
|
|
13042
12856
|
case "TSLiteralType":
|
|
13043
|
-
case "
|
|
12857
|
+
case "TSClassImplements":
|
|
12858
|
+
case "TSInterfaceHeritage":
|
|
13044
12859
|
case "TSInterfaceDeclaration":
|
|
13045
12860
|
case "TSInterfaceBody":
|
|
13046
12861
|
case "TSTypeAliasDeclaration":
|
|
@@ -13118,7 +12933,8 @@ function isTSType(node, opts) {
|
|
|
13118
12933
|
case "TSIndexedAccessType":
|
|
13119
12934
|
case "TSMappedType":
|
|
13120
12935
|
case "TSLiteralType":
|
|
13121
|
-
case "
|
|
12936
|
+
case "TSClassImplements":
|
|
12937
|
+
case "TSInterfaceHeritage":
|
|
13122
12938
|
case "TSImportType":
|
|
13123
12939
|
break;
|
|
13124
12940
|
default:
|
|
@@ -15177,6 +14993,7 @@ defineType$4("ClassBody", {
|
|
|
15177
14993
|
body: validateArrayOfType("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")
|
|
15178
14994
|
}
|
|
15179
14995
|
});
|
|
14996
|
+
var _obj;
|
|
15180
14997
|
defineType$4("ClassExpression", {
|
|
15181
14998
|
builder: [
|
|
15182
14999
|
"id",
|
|
@@ -15189,7 +15006,7 @@ defineType$4("ClassExpression", {
|
|
|
15189
15006
|
"id",
|
|
15190
15007
|
"typeParameters",
|
|
15191
15008
|
"superClass",
|
|
15192
|
-
"
|
|
15009
|
+
"superTypeArguments",
|
|
15193
15010
|
"mixins",
|
|
15194
15011
|
"implements",
|
|
15195
15012
|
"body"
|
|
@@ -15199,7 +15016,7 @@ defineType$4("ClassExpression", {
|
|
|
15199
15016
|
"Class",
|
|
15200
15017
|
"Expression"
|
|
15201
15018
|
],
|
|
15202
|
-
fields: {
|
|
15019
|
+
fields: (_obj = {
|
|
15203
15020
|
id: {
|
|
15204
15021
|
validate: assertNodeType("Identifier"),
|
|
15205
15022
|
optional: true
|
|
@@ -15214,25 +15031,22 @@ defineType$4("ClassExpression", {
|
|
|
15214
15031
|
superClass: {
|
|
15215
15032
|
optional: true,
|
|
15216
15033
|
validate: assertNodeType("Expression")
|
|
15217
|
-
},
|
|
15218
|
-
superTypeParameters: {
|
|
15219
|
-
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15220
|
-
optional: true
|
|
15221
|
-
},
|
|
15222
|
-
implements: {
|
|
15223
|
-
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15224
|
-
optional: true
|
|
15225
|
-
},
|
|
15226
|
-
decorators: {
|
|
15227
|
-
validate: arrayOfType("Decorator"),
|
|
15228
|
-
optional: true
|
|
15229
|
-
},
|
|
15230
|
-
mixins: {
|
|
15231
|
-
validate: assertNodeType("InterfaceExtends"),
|
|
15232
|
-
optional: true
|
|
15233
15034
|
}
|
|
15234
|
-
}
|
|
15035
|
+
}, _define_property(_obj, "superTypeArguments", {
|
|
15036
|
+
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15037
|
+
optional: true
|
|
15038
|
+
}), _define_property(_obj, "implements", {
|
|
15039
|
+
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15040
|
+
optional: true
|
|
15041
|
+
}), _define_property(_obj, "decorators", {
|
|
15042
|
+
validate: arrayOfType("Decorator"),
|
|
15043
|
+
optional: true
|
|
15044
|
+
}), _define_property(_obj, "mixins", {
|
|
15045
|
+
validate: assertNodeType("InterfaceExtends"),
|
|
15046
|
+
optional: true
|
|
15047
|
+
}), _obj)
|
|
15235
15048
|
});
|
|
15049
|
+
var _obj1;
|
|
15236
15050
|
defineType$4("ClassDeclaration", {
|
|
15237
15051
|
inherits: "ClassExpression",
|
|
15238
15052
|
aliases: [
|
|
@@ -15241,7 +15055,7 @@ defineType$4("ClassDeclaration", {
|
|
|
15241
15055
|
"Statement",
|
|
15242
15056
|
"Declaration"
|
|
15243
15057
|
],
|
|
15244
|
-
fields: {
|
|
15058
|
+
fields: (_obj1 = {
|
|
15245
15059
|
id: {
|
|
15246
15060
|
validate: assertNodeType("Identifier"),
|
|
15247
15061
|
optional: true
|
|
@@ -15256,32 +15070,26 @@ defineType$4("ClassDeclaration", {
|
|
|
15256
15070
|
superClass: {
|
|
15257
15071
|
optional: true,
|
|
15258
15072
|
validate: assertNodeType("Expression")
|
|
15259
|
-
},
|
|
15260
|
-
superTypeParameters: {
|
|
15261
|
-
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15262
|
-
optional: true
|
|
15263
|
-
},
|
|
15264
|
-
implements: {
|
|
15265
|
-
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15266
|
-
optional: true
|
|
15267
|
-
},
|
|
15268
|
-
decorators: {
|
|
15269
|
-
validate: arrayOfType("Decorator"),
|
|
15270
|
-
optional: true
|
|
15271
|
-
},
|
|
15272
|
-
mixins: {
|
|
15273
|
-
validate: assertNodeType("InterfaceExtends"),
|
|
15274
|
-
optional: true
|
|
15275
|
-
},
|
|
15276
|
-
declare: {
|
|
15277
|
-
validate: assertValueType("boolean"),
|
|
15278
|
-
optional: true
|
|
15279
|
-
},
|
|
15280
|
-
abstract: {
|
|
15281
|
-
validate: assertValueType("boolean"),
|
|
15282
|
-
optional: true
|
|
15283
15073
|
}
|
|
15284
|
-
},
|
|
15074
|
+
}, _define_property(_obj1, "superTypeArguments", {
|
|
15075
|
+
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15076
|
+
optional: true
|
|
15077
|
+
}), _define_property(_obj1, "implements", {
|
|
15078
|
+
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15079
|
+
optional: true
|
|
15080
|
+
}), _define_property(_obj1, "decorators", {
|
|
15081
|
+
validate: arrayOfType("Decorator"),
|
|
15082
|
+
optional: true
|
|
15083
|
+
}), _define_property(_obj1, "mixins", {
|
|
15084
|
+
validate: assertNodeType("InterfaceExtends"),
|
|
15085
|
+
optional: true
|
|
15086
|
+
}), _define_property(_obj1, "declare", {
|
|
15087
|
+
validate: assertValueType("boolean"),
|
|
15088
|
+
optional: true
|
|
15089
|
+
}), _define_property(_obj1, "abstract", {
|
|
15090
|
+
validate: assertValueType("boolean"),
|
|
15091
|
+
optional: true
|
|
15092
|
+
}), _obj1),
|
|
15285
15093
|
validate: function() {
|
|
15286
15094
|
var identifier4 = assertNodeType("Identifier");
|
|
15287
15095
|
return function(parent, key, node) {
|
|
@@ -17683,12 +17491,11 @@ defineType("TSTypeReference", {
|
|
|
17683
17491
|
],
|
|
17684
17492
|
visitor: [
|
|
17685
17493
|
"typeName",
|
|
17686
|
-
"
|
|
17494
|
+
"typeArguments"
|
|
17687
17495
|
],
|
|
17688
|
-
fields: {
|
|
17689
|
-
typeName: validateType("TSEntityName")
|
|
17690
|
-
|
|
17691
|
-
}
|
|
17496
|
+
fields: _define_property({
|
|
17497
|
+
typeName: validateType("TSEntityName")
|
|
17498
|
+
}, "typeArguments", validateOptionalType("TSTypeParameterInstantiation"))
|
|
17692
17499
|
});
|
|
17693
17500
|
defineType("TSTypePredicate", {
|
|
17694
17501
|
aliases: [
|
|
@@ -18075,15 +17882,15 @@ defineType("TSModuleDeclaration", {
|
|
|
18075
17882
|
"id",
|
|
18076
17883
|
"body"
|
|
18077
17884
|
],
|
|
18078
|
-
fields: {
|
|
17885
|
+
fields: Object.assign({
|
|
18079
17886
|
kind: {
|
|
18080
17887
|
validate: assertOneOf("global", "module", "namespace")
|
|
18081
17888
|
},
|
|
18082
|
-
declare: validateOptional(bool)
|
|
18083
|
-
|
|
18084
|
-
id: validateType("
|
|
18085
|
-
body: validateType("TSModuleBlock"
|
|
18086
|
-
}
|
|
17889
|
+
declare: validateOptional(bool)
|
|
17890
|
+
}, false, {
|
|
17891
|
+
id: validateType("TSEntityName", "StringLiteral"),
|
|
17892
|
+
body: validateType("TSModuleBlock")
|
|
17893
|
+
})
|
|
18087
17894
|
});
|
|
18088
17895
|
defineType("TSModuleBlock", {
|
|
18089
17896
|
aliases: [
|
|
@@ -18287,8 +18094,7 @@ var _validate = /* @__PURE__ */ Object.freeze({
|
|
|
18287
18094
|
});
|
|
18288
18095
|
var validate = _validate.validateInternal;
|
|
18289
18096
|
var NODE_FIELDS = utils.NODE_FIELDS;
|
|
18290
|
-
function arrayExpression() {
|
|
18291
|
-
var elements = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
18097
|
+
function arrayExpression(elements) {
|
|
18292
18098
|
var node = {
|
|
18293
18099
|
type: "ArrayExpression",
|
|
18294
18100
|
elements: elements
|
|
@@ -18619,19 +18425,17 @@ function logicalExpression(operator, left, right) {
|
|
|
18619
18425
|
return node;
|
|
18620
18426
|
}
|
|
18621
18427
|
function memberExpression(object, property) {
|
|
18622
|
-
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false
|
|
18428
|
+
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
18623
18429
|
var node = {
|
|
18624
18430
|
type: "MemberExpression",
|
|
18625
18431
|
object: object,
|
|
18626
18432
|
property: property,
|
|
18627
|
-
computed: computed
|
|
18628
|
-
optional: optional
|
|
18433
|
+
computed: computed
|
|
18629
18434
|
};
|
|
18630
18435
|
var defs = NODE_FIELDS.MemberExpression;
|
|
18631
18436
|
validate(defs.object, node, "object", object, 1);
|
|
18632
18437
|
validate(defs.property, node, "property", property, 1);
|
|
18633
18438
|
validate(defs.computed, node, "computed", computed);
|
|
18634
|
-
validate(defs.optional, node, "optional", optional);
|
|
18635
18439
|
return node;
|
|
18636
18440
|
}
|
|
18637
18441
|
function newExpression(callee, _arguments) {
|
|
@@ -18670,8 +18474,8 @@ function objectExpression(properties) {
|
|
|
18670
18474
|
validate(defs.properties, node, "properties", properties, 1);
|
|
18671
18475
|
return node;
|
|
18672
18476
|
}
|
|
18673
|
-
function objectMethod() {
|
|
18674
|
-
var
|
|
18477
|
+
function objectMethod(kind, key, params, body) {
|
|
18478
|
+
var computed = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, generator = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false, async = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
|
|
18675
18479
|
var node = {
|
|
18676
18480
|
type: "ObjectMethod",
|
|
18677
18481
|
kind: kind,
|
|
@@ -18693,21 +18497,19 @@ function objectMethod() {
|
|
|
18693
18497
|
return node;
|
|
18694
18498
|
}
|
|
18695
18499
|
function objectProperty(key, value1) {
|
|
18696
|
-
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, shorthand = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false
|
|
18500
|
+
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, shorthand = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
18697
18501
|
var node = {
|
|
18698
18502
|
type: "ObjectProperty",
|
|
18699
18503
|
key: key,
|
|
18700
18504
|
value: value1,
|
|
18701
18505
|
computed: computed,
|
|
18702
|
-
shorthand: shorthand
|
|
18703
|
-
decorators: decorators
|
|
18506
|
+
shorthand: shorthand
|
|
18704
18507
|
};
|
|
18705
18508
|
var defs = NODE_FIELDS.ObjectProperty;
|
|
18706
18509
|
validate(defs.key, node, "key", key, 1);
|
|
18707
18510
|
validate(defs.value, node, "value", value1, 1);
|
|
18708
18511
|
validate(defs.computed, node, "computed", computed);
|
|
18709
18512
|
validate(defs.shorthand, node, "shorthand", shorthand);
|
|
18710
|
-
validate(defs.decorators, node, "decorators", decorators, 1);
|
|
18711
18513
|
return node;
|
|
18712
18514
|
}
|
|
18713
18515
|
function restElement(argument) {
|
|
@@ -20019,19 +19821,17 @@ function jsxClosingElement(name) {
|
|
|
20019
19821
|
return node;
|
|
20020
19822
|
}
|
|
20021
19823
|
function jsxElement(openingElement) {
|
|
20022
|
-
var closingElement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, children = arguments.length > 2 ? arguments[2] : void 0
|
|
19824
|
+
var closingElement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, children = arguments.length > 2 ? arguments[2] : void 0;
|
|
20023
19825
|
var node = {
|
|
20024
19826
|
type: "JSXElement",
|
|
20025
19827
|
openingElement: openingElement,
|
|
20026
19828
|
closingElement: closingElement,
|
|
20027
|
-
children: children
|
|
20028
|
-
selfClosing: selfClosing
|
|
19829
|
+
children: children
|
|
20029
19830
|
};
|
|
20030
19831
|
var defs = NODE_FIELDS.JSXElement;
|
|
20031
19832
|
validate(defs.openingElement, node, "openingElement", openingElement, 1);
|
|
20032
19833
|
validate(defs.closingElement, node, "closingElement", closingElement, 1);
|
|
20033
19834
|
validate(defs.children, node, "children", children, 1);
|
|
20034
|
-
validate(defs.selfClosing, node, "selfClosing", selfClosing);
|
|
20035
19835
|
return node;
|
|
20036
19836
|
}
|
|
20037
19837
|
function jsxEmptyExpression() {
|
|
@@ -20143,11 +19943,6 @@ function jsxClosingFragment() {
|
|
|
20143
19943
|
type: "JSXClosingFragment"
|
|
20144
19944
|
};
|
|
20145
19945
|
}
|
|
20146
|
-
function noop() {
|
|
20147
|
-
return {
|
|
20148
|
-
type: "Noop"
|
|
20149
|
-
};
|
|
20150
|
-
}
|
|
20151
19946
|
function placeholder(expectedNode, name) {
|
|
20152
19947
|
var node = {
|
|
20153
19948
|
type: "Placeholder",
|
|
@@ -20244,15 +20039,6 @@ function tupleExpression() {
|
|
|
20244
20039
|
validate(defs.elements, node, "elements", elements, 1);
|
|
20245
20040
|
return node;
|
|
20246
20041
|
}
|
|
20247
|
-
function decimalLiteral(value1) {
|
|
20248
|
-
var node = {
|
|
20249
|
-
type: "DecimalLiteral",
|
|
20250
|
-
value: value1
|
|
20251
|
-
};
|
|
20252
|
-
var defs = NODE_FIELDS.DecimalLiteral;
|
|
20253
|
-
validate(defs.value, node, "value", value1);
|
|
20254
|
-
return node;
|
|
20255
|
-
}
|
|
20256
20042
|
function moduleExpression(body) {
|
|
20257
20043
|
var node = {
|
|
20258
20044
|
type: "ModuleExpression",
|
|
@@ -20345,31 +20131,31 @@ function tsQualifiedName(left, right) {
|
|
|
20345
20131
|
return node;
|
|
20346
20132
|
}
|
|
20347
20133
|
function tsCallSignatureDeclaration() {
|
|
20348
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20134
|
+
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, params = arguments.length > 1 ? arguments[1] : void 0, returnType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
20349
20135
|
var node = {
|
|
20350
20136
|
type: "TSCallSignatureDeclaration",
|
|
20351
20137
|
typeParameters: typeParameters,
|
|
20352
|
-
|
|
20353
|
-
|
|
20138
|
+
params: params,
|
|
20139
|
+
returnType: returnType
|
|
20354
20140
|
};
|
|
20355
20141
|
var defs = NODE_FIELDS.TSCallSignatureDeclaration;
|
|
20356
20142
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20357
|
-
validate(defs.
|
|
20358
|
-
validate(defs.
|
|
20143
|
+
validate(defs.params, node, "params", params, 1);
|
|
20144
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20359
20145
|
return node;
|
|
20360
20146
|
}
|
|
20361
20147
|
function tsConstructSignatureDeclaration() {
|
|
20362
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20148
|
+
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, params = arguments.length > 1 ? arguments[1] : void 0, returnType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
20363
20149
|
var node = {
|
|
20364
20150
|
type: "TSConstructSignatureDeclaration",
|
|
20365
20151
|
typeParameters: typeParameters,
|
|
20366
|
-
|
|
20367
|
-
|
|
20152
|
+
params: params,
|
|
20153
|
+
returnType: returnType
|
|
20368
20154
|
};
|
|
20369
20155
|
var defs = NODE_FIELDS.TSConstructSignatureDeclaration;
|
|
20370
20156
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20371
|
-
validate(defs.
|
|
20372
|
-
validate(defs.
|
|
20157
|
+
validate(defs.params, node, "params", params, 1);
|
|
20158
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20373
20159
|
return node;
|
|
20374
20160
|
}
|
|
20375
20161
|
function tsPropertySignature(key) {
|
|
@@ -20386,20 +20172,20 @@ function tsPropertySignature(key) {
|
|
|
20386
20172
|
return node;
|
|
20387
20173
|
}
|
|
20388
20174
|
function tsMethodSignature(key) {
|
|
20389
|
-
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null,
|
|
20175
|
+
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, params = arguments.length > 2 ? arguments[2] : void 0, returnType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
20390
20176
|
var node = {
|
|
20391
20177
|
type: "TSMethodSignature",
|
|
20392
20178
|
key: key,
|
|
20393
20179
|
typeParameters: typeParameters,
|
|
20394
|
-
|
|
20395
|
-
|
|
20180
|
+
params: params,
|
|
20181
|
+
returnType: returnType,
|
|
20396
20182
|
kind: null
|
|
20397
20183
|
};
|
|
20398
20184
|
var defs = NODE_FIELDS.TSMethodSignature;
|
|
20399
20185
|
validate(defs.key, node, "key", key, 1);
|
|
20400
20186
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20401
|
-
validate(defs.
|
|
20402
|
-
validate(defs.
|
|
20187
|
+
validate(defs.params, node, "params", params, 1);
|
|
20188
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20403
20189
|
return node;
|
|
20404
20190
|
}
|
|
20405
20191
|
function tsIndexSignature(parameters) {
|
|
@@ -20485,43 +20271,43 @@ function tsThisType() {
|
|
|
20485
20271
|
};
|
|
20486
20272
|
}
|
|
20487
20273
|
function tsFunctionType() {
|
|
20488
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20274
|
+
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, params = arguments.length > 1 ? arguments[1] : void 0, returnType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
20489
20275
|
var node = {
|
|
20490
20276
|
type: "TSFunctionType",
|
|
20491
20277
|
typeParameters: typeParameters,
|
|
20492
|
-
|
|
20493
|
-
|
|
20278
|
+
params: params,
|
|
20279
|
+
returnType: returnType
|
|
20494
20280
|
};
|
|
20495
20281
|
var defs = NODE_FIELDS.TSFunctionType;
|
|
20496
20282
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20497
|
-
validate(defs.
|
|
20498
|
-
validate(defs.
|
|
20283
|
+
validate(defs.params, node, "params", params, 1);
|
|
20284
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20499
20285
|
return node;
|
|
20500
20286
|
}
|
|
20501
20287
|
function tsConstructorType() {
|
|
20502
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20288
|
+
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, params = arguments.length > 1 ? arguments[1] : void 0, returnType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
20503
20289
|
var node = {
|
|
20504
20290
|
type: "TSConstructorType",
|
|
20505
20291
|
typeParameters: typeParameters,
|
|
20506
|
-
|
|
20507
|
-
|
|
20292
|
+
params: params,
|
|
20293
|
+
returnType: returnType
|
|
20508
20294
|
};
|
|
20509
20295
|
var defs = NODE_FIELDS.TSConstructorType;
|
|
20510
20296
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20511
|
-
validate(defs.
|
|
20512
|
-
validate(defs.
|
|
20297
|
+
validate(defs.params, node, "params", params, 1);
|
|
20298
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20513
20299
|
return node;
|
|
20514
20300
|
}
|
|
20515
20301
|
function tsTypeReference(typeName) {
|
|
20516
|
-
var
|
|
20302
|
+
var typeArguments = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20517
20303
|
var node = {
|
|
20518
20304
|
type: "TSTypeReference",
|
|
20519
20305
|
typeName: typeName,
|
|
20520
|
-
|
|
20306
|
+
typeArguments: typeArguments
|
|
20521
20307
|
};
|
|
20522
20308
|
var defs = NODE_FIELDS.TSTypeReference;
|
|
20523
20309
|
validate(defs.typeName, node, "typeName", typeName, 1);
|
|
20524
|
-
validate(defs.
|
|
20310
|
+
validate(defs.typeArguments, node, "typeArguments", typeArguments, 1);
|
|
20525
20311
|
return node;
|
|
20526
20312
|
}
|
|
20527
20313
|
function tsTypePredicate(parameterName) {
|
|
@@ -20681,18 +20467,20 @@ function tsIndexedAccessType(objectType, indexType) {
|
|
|
20681
20467
|
validate(defs.indexType, node, "indexType", indexType, 1);
|
|
20682
20468
|
return node;
|
|
20683
20469
|
}
|
|
20684
|
-
function tsMappedType(
|
|
20685
|
-
var
|
|
20470
|
+
function tsMappedType(key, constraint) {
|
|
20471
|
+
var nameType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, typeAnnotation2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
20686
20472
|
var node = {
|
|
20687
20473
|
type: "TSMappedType",
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
nameType: nameType
|
|
20474
|
+
key: key,
|
|
20475
|
+
constraint: constraint,
|
|
20476
|
+
nameType: nameType,
|
|
20477
|
+
typeAnnotation: typeAnnotation2
|
|
20691
20478
|
};
|
|
20692
20479
|
var defs = NODE_FIELDS.TSMappedType;
|
|
20693
|
-
validate(defs.
|
|
20694
|
-
validate(defs.
|
|
20480
|
+
validate(defs.key, node, "key", key, 1);
|
|
20481
|
+
validate(defs.constraint, node, "constraint", constraint, 1);
|
|
20695
20482
|
validate(defs.nameType, node, "nameType", nameType, 1);
|
|
20483
|
+
validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation2, 1);
|
|
20696
20484
|
return node;
|
|
20697
20485
|
}
|
|
20698
20486
|
function tsLiteralType(literal) {
|
|
@@ -20704,14 +20492,26 @@ function tsLiteralType(literal) {
|
|
|
20704
20492
|
validate(defs.literal, node, "literal", literal, 1);
|
|
20705
20493
|
return node;
|
|
20706
20494
|
}
|
|
20707
|
-
function
|
|
20495
|
+
function tsClassImplements(expression2) {
|
|
20708
20496
|
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20709
20497
|
var node = {
|
|
20710
|
-
type: "
|
|
20498
|
+
type: "TSClassImplements",
|
|
20711
20499
|
expression: expression2,
|
|
20712
20500
|
typeParameters: typeParameters
|
|
20713
20501
|
};
|
|
20714
|
-
var defs = NODE_FIELDS.
|
|
20502
|
+
var defs = NODE_FIELDS.TSClassImplements;
|
|
20503
|
+
validate(defs.expression, node, "expression", expression2, 1);
|
|
20504
|
+
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20505
|
+
return node;
|
|
20506
|
+
}
|
|
20507
|
+
function tsInterfaceHeritage(expression2) {
|
|
20508
|
+
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20509
|
+
var node = {
|
|
20510
|
+
type: "TSInterfaceHeritage",
|
|
20511
|
+
expression: expression2,
|
|
20512
|
+
typeParameters: typeParameters
|
|
20513
|
+
};
|
|
20514
|
+
var defs = NODE_FIELDS.TSInterfaceHeritage;
|
|
20715
20515
|
validate(defs.expression, node, "expression", expression2, 1);
|
|
20716
20516
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20717
20517
|
return node;
|
|
@@ -20944,7 +20744,7 @@ function tsTypeParameter() {
|
|
|
20944
20744
|
var defs = NODE_FIELDS.TSTypeParameter;
|
|
20945
20745
|
validate(defs.constraint, node, "constraint", constraint, 1);
|
|
20946
20746
|
validate(defs.default, node, "default", _default, 1);
|
|
20947
|
-
validate(defs.name, node, "name", name);
|
|
20747
|
+
validate(defs.name, node, "name", name, 1);
|
|
20948
20748
|
return node;
|
|
20949
20749
|
}
|
|
20950
20750
|
function NumberLiteral(value1) {
|
|
@@ -21527,9 +21327,6 @@ function assertJSXOpeningFragment(node, opts) {
|
|
|
21527
21327
|
function assertJSXClosingFragment(node, opts) {
|
|
21528
21328
|
assert("JSXClosingFragment", node, opts);
|
|
21529
21329
|
}
|
|
21530
|
-
function assertNoop(node, opts) {
|
|
21531
|
-
assert("Noop", node, opts);
|
|
21532
|
-
}
|
|
21533
21330
|
function assertPlaceholder(node, opts) {
|
|
21534
21331
|
assert("Placeholder", node, opts);
|
|
21535
21332
|
}
|
|
@@ -21560,9 +21357,6 @@ function assertRecordExpression(node, opts) {
|
|
|
21560
21357
|
function assertTupleExpression(node, opts) {
|
|
21561
21358
|
assert("TupleExpression", node, opts);
|
|
21562
21359
|
}
|
|
21563
|
-
function assertDecimalLiteral(node, opts) {
|
|
21564
|
-
assert("DecimalLiteral", node, opts);
|
|
21565
|
-
}
|
|
21566
21360
|
function assertModuleExpression(node, opts) {
|
|
21567
21361
|
assert("ModuleExpression", node, opts);
|
|
21568
21362
|
}
|
|
@@ -21707,8 +21501,11 @@ function assertTSMappedType(node, opts) {
|
|
|
21707
21501
|
function assertTSLiteralType(node, opts) {
|
|
21708
21502
|
assert("TSLiteralType", node, opts);
|
|
21709
21503
|
}
|
|
21710
|
-
function
|
|
21711
|
-
assert("
|
|
21504
|
+
function assertTSClassImplements(node, opts) {
|
|
21505
|
+
assert("TSClassImplements", node, opts);
|
|
21506
|
+
}
|
|
21507
|
+
function assertTSInterfaceHeritage(node, opts) {
|
|
21508
|
+
assert("TSInterfaceHeritage", node, opts);
|
|
21712
21509
|
}
|
|
21713
21510
|
function assertTSInterfaceDeclaration(node, opts) {
|
|
21714
21511
|
assert("TSInterfaceDeclaration", node, opts);
|
|
@@ -22095,18 +21892,19 @@ function removeTypeDuplicates(nodesIn) {
|
|
|
22095
21892
|
}
|
|
22096
21893
|
continue;
|
|
22097
21894
|
}
|
|
22098
|
-
|
|
21895
|
+
var typeArgumentsKey = "typeArguments";
|
|
21896
|
+
if (isTSTypeReference(node) && node[typeArgumentsKey]) {
|
|
21897
|
+
var typeArguments = node[typeArgumentsKey];
|
|
22099
21898
|
var name = getQualifiedName(node.typeName);
|
|
22100
21899
|
if (generics.has(name)) {
|
|
22101
21900
|
var existing = generics.get(name);
|
|
22102
|
-
|
|
22103
|
-
|
|
22104
|
-
|
|
22105
|
-
|
|
22106
|
-
|
|
22107
|
-
}
|
|
21901
|
+
var existingTypeArguments = existing[typeArgumentsKey];
|
|
21902
|
+
if (existingTypeArguments) {
|
|
21903
|
+
var _existingTypeArguments_params;
|
|
21904
|
+
(_existingTypeArguments_params = existingTypeArguments.params).push.apply(_existingTypeArguments_params, _to_consumable_array(typeArguments.params));
|
|
21905
|
+
existingTypeArguments.params = removeTypeDuplicates(existingTypeArguments.params);
|
|
22108
21906
|
} else {
|
|
22109
|
-
existing =
|
|
21907
|
+
existing = typeArguments;
|
|
22110
21908
|
}
|
|
22111
21909
|
} else {
|
|
22112
21910
|
generics.set(name, node);
|
|
@@ -24035,9 +23833,13 @@ var estree = function(superClass) {
|
|
|
24035
23833
|
key: "pushClassMethod",
|
|
24036
23834
|
value: function pushClassMethod(classBody2, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
|
|
24037
23835
|
this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
|
|
24038
|
-
|
|
24039
|
-
|
|
23836
|
+
var typeParameters = method.typeParameters;
|
|
23837
|
+
if (typeParameters) {
|
|
24040
23838
|
delete method.typeParameters;
|
|
23839
|
+
var fn = method.value;
|
|
23840
|
+
fn.typeParameters = typeParameters;
|
|
23841
|
+
fn.start = typeParameters.start;
|
|
23842
|
+
fn.loc.start = typeParameters.loc.start;
|
|
24041
23843
|
}
|
|
24042
23844
|
classBody2.body.push(method);
|
|
24043
23845
|
}
|
|
@@ -24798,6 +24600,9 @@ var tt = {
|
|
|
24798
24600
|
name: createToken("name", {
|
|
24799
24601
|
startsExpr: startsExpr
|
|
24800
24602
|
}),
|
|
24603
|
+
placeholder: createToken("%%", {
|
|
24604
|
+
startsExpr: true
|
|
24605
|
+
}),
|
|
24801
24606
|
string: createToken("string", {
|
|
24802
24607
|
startsExpr: startsExpr
|
|
24803
24608
|
}),
|
|
@@ -24824,22 +24629,19 @@ var tt = {
|
|
|
24824
24629
|
jsxTagStart: createToken("jsxTagStart", {
|
|
24825
24630
|
startsExpr: true
|
|
24826
24631
|
}),
|
|
24827
|
-
jsxTagEnd: createToken("jsxTagEnd")
|
|
24828
|
-
placeholder: createToken("%%", {
|
|
24829
|
-
startsExpr: true
|
|
24830
|
-
})
|
|
24632
|
+
jsxTagEnd: createToken("jsxTagEnd")
|
|
24831
24633
|
};
|
|
24832
24634
|
function tokenIsIdentifier(token) {
|
|
24833
|
-
return token >= 93 && token <=
|
|
24635
|
+
return token >= 93 && token <= 133;
|
|
24834
24636
|
}
|
|
24835
24637
|
function tokenKeywordOrIdentifierIsKeyword(token) {
|
|
24836
24638
|
return token <= 92;
|
|
24837
24639
|
}
|
|
24838
24640
|
function tokenIsKeywordOrIdentifier(token) {
|
|
24839
|
-
return token >= 58 && token <=
|
|
24641
|
+
return token >= 58 && token <= 133;
|
|
24840
24642
|
}
|
|
24841
24643
|
function tokenIsLiteralPropertyName(token) {
|
|
24842
|
-
return token >= 58 && token <=
|
|
24644
|
+
return token >= 58 && token <= 137;
|
|
24843
24645
|
}
|
|
24844
24646
|
function tokenComesBeforeExpression(token) {
|
|
24845
24647
|
return tokenBeforeExprs[token];
|
|
@@ -26257,6 +26059,18 @@ var BaseParser = /*#__PURE__*/ function() {
|
|
|
26257
26059
|
__publicField(this, "ambiguousScriptDifferentAst", false);
|
|
26258
26060
|
}
|
|
26259
26061
|
_create_class(BaseParser, [
|
|
26062
|
+
{
|
|
26063
|
+
key: "sourceToOffsetPos",
|
|
26064
|
+
value: function sourceToOffsetPos(sourcePos) {
|
|
26065
|
+
return sourcePos + this.startIndex;
|
|
26066
|
+
}
|
|
26067
|
+
},
|
|
26068
|
+
{
|
|
26069
|
+
key: "offsetToSourcePos",
|
|
26070
|
+
value: function offsetToSourcePos(offsetPos) {
|
|
26071
|
+
return offsetPos - this.startIndex;
|
|
26072
|
+
}
|
|
26073
|
+
},
|
|
26260
26074
|
{
|
|
26261
26075
|
key: "hasPlugin",
|
|
26262
26076
|
value: function hasPlugin(pluginConfig) {
|
|
@@ -26402,7 +26216,7 @@ var CommentsParser = /*#__PURE__*/ function(BaseParser) {
|
|
|
26402
26216
|
}
|
|
26403
26217
|
} else {
|
|
26404
26218
|
var node = commentWS.containingNode, commentStart = commentWS.start;
|
|
26405
|
-
if (this.input.charCodeAt(commentStart - 1) === 44) {
|
|
26219
|
+
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
|
|
26406
26220
|
switch(node.type){
|
|
26407
26221
|
case "ObjectExpression":
|
|
26408
26222
|
case "ObjectPattern":
|
|
@@ -26573,7 +26387,7 @@ var State = /*#__PURE__*/ function() {
|
|
|
26573
26387
|
__publicField(this, "commentsLen", 0);
|
|
26574
26388
|
__publicField(this, "commentStack", []);
|
|
26575
26389
|
__publicField(this, "pos", 0);
|
|
26576
|
-
__publicField(this, "type",
|
|
26390
|
+
__publicField(this, "type", 140);
|
|
26577
26391
|
__publicField(this, "value", null);
|
|
26578
26392
|
__publicField(this, "start", 0);
|
|
26579
26393
|
__publicField(this, "end", 0);
|
|
@@ -26731,8 +26545,7 @@ var State = /*#__PURE__*/ function() {
|
|
|
26731
26545
|
{
|
|
26732
26546
|
key: "curPosition",
|
|
26733
26547
|
value: function curPosition() {
|
|
26734
|
-
|
|
26735
|
-
return new Position(this.curLine, index2 - this.lineStart, index2);
|
|
26548
|
+
return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
26736
26549
|
}
|
|
26737
26550
|
},
|
|
26738
26551
|
{
|
|
@@ -27079,10 +26892,11 @@ var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([
|
|
|
27079
26892
|
var Token = function Token(state) {
|
|
27080
26893
|
"use strict";
|
|
27081
26894
|
_class_call_check(this, Token);
|
|
26895
|
+
var startIndex = state.startIndex || 0;
|
|
27082
26896
|
this.type = state.type;
|
|
27083
26897
|
this.value = state.value;
|
|
27084
|
-
this.start = state.start;
|
|
27085
|
-
this.end = state.end;
|
|
26898
|
+
this.start = startIndex + state.start;
|
|
26899
|
+
this.end = startIndex + state.end;
|
|
27086
26900
|
this.loc = new SourceLocation(state.startLoc, state.endLoc);
|
|
27087
26901
|
};
|
|
27088
26902
|
var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
@@ -27281,7 +27095,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27281
27095
|
this.state.start = this.state.pos;
|
|
27282
27096
|
if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
|
|
27283
27097
|
if (this.state.pos >= this.length) {
|
|
27284
|
-
this.finishToken(
|
|
27098
|
+
this.finishToken(140);
|
|
27285
27099
|
return;
|
|
27286
27100
|
}
|
|
27287
27101
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
@@ -27307,8 +27121,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27307
27121
|
var comment = {
|
|
27308
27122
|
type: "CommentBlock",
|
|
27309
27123
|
value: this.input.slice(start + 2, end),
|
|
27310
|
-
start: start,
|
|
27311
|
-
end: end + commentEnd.length,
|
|
27124
|
+
start: this.sourceToOffsetPos(start),
|
|
27125
|
+
end: this.sourceToOffsetPos(end + commentEnd.length),
|
|
27312
27126
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
27313
27127
|
};
|
|
27314
27128
|
if (this.options.tokens) this.pushToken(comment);
|
|
@@ -27333,8 +27147,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27333
27147
|
var comment = {
|
|
27334
27148
|
type: "CommentLine",
|
|
27335
27149
|
value: value1,
|
|
27336
|
-
start: start,
|
|
27337
|
-
end: end,
|
|
27150
|
+
start: this.sourceToOffsetPos(start),
|
|
27151
|
+
end: this.sourceToOffsetPos(end),
|
|
27338
27152
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
27339
27153
|
};
|
|
27340
27154
|
if (this.options.tokens) this.pushToken(comment);
|
|
@@ -27422,8 +27236,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27422
27236
|
if (comments.length > 0) {
|
|
27423
27237
|
var end = this.state.pos;
|
|
27424
27238
|
var commentWhitespace = {
|
|
27425
|
-
start: spaceStart,
|
|
27426
|
-
end: end,
|
|
27239
|
+
start: this.sourceToOffsetPos(spaceStart),
|
|
27240
|
+
end: this.sourceToOffsetPos(end),
|
|
27427
27241
|
comments: comments,
|
|
27428
27242
|
leadingNode: null,
|
|
27429
27243
|
trailingNode: null,
|
|
@@ -27474,10 +27288,10 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27474
27288
|
}
|
|
27475
27289
|
} else if (isIdentifierStart2(next)) {
|
|
27476
27290
|
++this.state.pos;
|
|
27477
|
-
this.finishToken(
|
|
27291
|
+
this.finishToken(139, this.readWord1(next));
|
|
27478
27292
|
} else if (next === 92) {
|
|
27479
27293
|
++this.state.pos;
|
|
27480
|
-
this.finishToken(
|
|
27294
|
+
this.finishToken(139, this.readWord1());
|
|
27481
27295
|
} else {
|
|
27482
27296
|
this.finishOp(27, 1);
|
|
27483
27297
|
}
|
|
@@ -27908,7 +27722,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27908
27722
|
mods += char;
|
|
27909
27723
|
}
|
|
27910
27724
|
this.state.pos = pos;
|
|
27911
|
-
this.finishToken(
|
|
27725
|
+
this.finishToken(138, {
|
|
27912
27726
|
pattern: content,
|
|
27913
27727
|
flags: mods
|
|
27914
27728
|
});
|
|
@@ -27926,6 +27740,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27926
27740
|
{
|
|
27927
27741
|
key: "readRadixNumber",
|
|
27928
27742
|
value: function readRadixNumber(radix) {
|
|
27743
|
+
var start = this.state.pos;
|
|
27929
27744
|
var startLoc = this.state.curPosition();
|
|
27930
27745
|
var isBigInt = false;
|
|
27931
27746
|
this.state.pos += 2;
|
|
@@ -27946,11 +27761,11 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27946
27761
|
throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
|
|
27947
27762
|
}
|
|
27948
27763
|
if (isBigInt) {
|
|
27949
|
-
var str = this.input.slice(
|
|
27950
|
-
this.finishToken(
|
|
27764
|
+
var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
|
|
27765
|
+
this.finishToken(136, str);
|
|
27951
27766
|
return;
|
|
27952
27767
|
}
|
|
27953
|
-
this.finishToken(
|
|
27768
|
+
this.finishToken(135, val);
|
|
27954
27769
|
}
|
|
27955
27770
|
},
|
|
27956
27771
|
{
|
|
@@ -28006,11 +27821,11 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28006
27821
|
}
|
|
28007
27822
|
var str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
|
|
28008
27823
|
if (isBigInt) {
|
|
28009
|
-
this.finishToken(
|
|
27824
|
+
this.finishToken(136, str);
|
|
28010
27825
|
return;
|
|
28011
27826
|
}
|
|
28012
27827
|
var val = isOctal ? parseInt(str, 8) : parseFloat(str);
|
|
28013
|
-
this.finishToken(
|
|
27828
|
+
this.finishToken(135, val);
|
|
28014
27829
|
}
|
|
28015
27830
|
},
|
|
28016
27831
|
{
|
|
@@ -28028,7 +27843,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28028
27843
|
this.state.pos = pos + 1;
|
|
28029
27844
|
this.state.lineStart = lineStart;
|
|
28030
27845
|
this.state.curLine = curLine;
|
|
28031
|
-
this.finishToken(
|
|
27846
|
+
this.finishToken(134, str);
|
|
28032
27847
|
}
|
|
28033
27848
|
},
|
|
28034
27849
|
{
|
|
@@ -28050,7 +27865,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28050
27865
|
this.state.lineStart = lineStart;
|
|
28051
27866
|
this.state.curLine = curLine;
|
|
28052
27867
|
if (firstInvalidLoc) {
|
|
28053
|
-
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos);
|
|
27868
|
+
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos));
|
|
28054
27869
|
}
|
|
28055
27870
|
if (this.input.codePointAt(pos) === 96) {
|
|
28056
27871
|
this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
|
|
@@ -28638,13 +28453,13 @@ var UtilParser = /*#__PURE__*/ function(Tokenizer) {
|
|
|
28638
28453
|
{
|
|
28639
28454
|
key: "canInsertSemicolon",
|
|
28640
28455
|
value: function canInsertSemicolon() {
|
|
28641
|
-
return this.match(
|
|
28456
|
+
return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
|
|
28642
28457
|
}
|
|
28643
28458
|
},
|
|
28644
28459
|
{
|
|
28645
28460
|
key: "hasPrecedingLineBreak",
|
|
28646
28461
|
value: function hasPrecedingLineBreak() {
|
|
28647
|
-
return hasNewLine(this.input, this.state.lastTokEndLoc.index, this.state.start);
|
|
28462
|
+
return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
|
|
28648
28463
|
}
|
|
28649
28464
|
},
|
|
28650
28465
|
{
|
|
@@ -29137,7 +28952,7 @@ var flow = function(superClass) {
|
|
|
29137
28952
|
{
|
|
29138
28953
|
key: "finishToken",
|
|
29139
28954
|
value: function finishToken(type, val) {
|
|
29140
|
-
if (type !==
|
|
28955
|
+
if (type !== 134 && type !== 13 && type !== 28) {
|
|
29141
28956
|
if (this.flowPragma === void 0) {
|
|
29142
28957
|
this.flowPragma = null;
|
|
29143
28958
|
}
|
|
@@ -29298,7 +29113,7 @@ var flow = function(superClass) {
|
|
|
29298
29113
|
value: function flowParseDeclareModule(node) {
|
|
29299
29114
|
var _this = this;
|
|
29300
29115
|
this.scope.enter(0);
|
|
29301
|
-
if (this.match(
|
|
29116
|
+
if (this.match(134)) {
|
|
29302
29117
|
node.id = _get(_get_prototype_of(FlowParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
29303
29118
|
} else {
|
|
29304
29119
|
node.id = this.parseIdentifier();
|
|
@@ -29571,7 +29386,7 @@ var flow = function(superClass) {
|
|
|
29571
29386
|
var node = this.startNode();
|
|
29572
29387
|
node.params = [];
|
|
29573
29388
|
this.state.inType = true;
|
|
29574
|
-
if (this.match(47) || this.match(
|
|
29389
|
+
if (this.match(47) || this.match(143)) {
|
|
29575
29390
|
this.next();
|
|
29576
29391
|
} else {
|
|
29577
29392
|
this.unexpected();
|
|
@@ -29657,7 +29472,7 @@ var flow = function(superClass) {
|
|
|
29657
29472
|
{
|
|
29658
29473
|
key: "flowParseObjectPropertyKey",
|
|
29659
29474
|
value: function flowParseObjectPropertyKey() {
|
|
29660
|
-
return this.match(
|
|
29475
|
+
return this.match(135) || this.match(134) ? _get(_get_prototype_of(FlowParserMixin.prototype), "parseExprAtom", this).call(this) : this.parseIdentifier(true);
|
|
29661
29476
|
}
|
|
29662
29477
|
},
|
|
29663
29478
|
{
|
|
@@ -30149,7 +29964,7 @@ var flow = function(superClass) {
|
|
|
30149
29964
|
node21.typeParameters = null;
|
|
30150
29965
|
return this.finishNode(node21, "FunctionTypeAnnotation");
|
|
30151
29966
|
}
|
|
30152
|
-
case
|
|
29967
|
+
case 134:
|
|
30153
29968
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
30154
29969
|
case 85:
|
|
30155
29970
|
case 86:
|
|
@@ -30159,19 +29974,19 @@ var flow = function(superClass) {
|
|
|
30159
29974
|
case 53:
|
|
30160
29975
|
if (this.state.value === "-") {
|
|
30161
29976
|
this.next();
|
|
30162
|
-
if (this.match(
|
|
29977
|
+
if (this.match(135)) {
|
|
30163
29978
|
return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
|
|
30164
29979
|
}
|
|
30165
|
-
if (this.match(
|
|
29980
|
+
if (this.match(136)) {
|
|
30166
29981
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
|
|
30167
29982
|
}
|
|
30168
29983
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
30169
29984
|
}
|
|
30170
29985
|
this.unexpected();
|
|
30171
29986
|
return;
|
|
30172
|
-
case 134:
|
|
30173
|
-
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
30174
29987
|
case 135:
|
|
29988
|
+
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
29989
|
+
case 136:
|
|
30175
29990
|
return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
|
|
30176
29991
|
case 88:
|
|
30177
29992
|
this.next();
|
|
@@ -30577,7 +30392,7 @@ var flow = function(superClass) {
|
|
|
30577
30392
|
key: "forwardNoArrowParamsConversionAt",
|
|
30578
30393
|
value: function forwardNoArrowParamsConversionAt(node, parse2) {
|
|
30579
30394
|
var result;
|
|
30580
|
-
if (this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
30395
|
+
if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
30581
30396
|
this.state.noArrowParamsConversionAt.push(this.state.start);
|
|
30582
30397
|
result = parse2();
|
|
30583
30398
|
this.state.noArrowParamsConversionAt.pop();
|
|
@@ -30880,7 +30695,9 @@ var flow = function(superClass) {
|
|
|
30880
30695
|
value: function parseClassSuper(node) {
|
|
30881
30696
|
_get(_get_prototype_of(FlowParserMixin.prototype), "parseClassSuper", this).call(this, node);
|
|
30882
30697
|
if (node.superClass && this.match(47)) {
|
|
30883
|
-
|
|
30698
|
+
{
|
|
30699
|
+
node.superTypeArguments = this.flowParseTypeParameterInstantiation();
|
|
30700
|
+
}
|
|
30884
30701
|
}
|
|
30885
30702
|
if (this.isContextual(113)) {
|
|
30886
30703
|
this.next();
|
|
@@ -31127,7 +30944,7 @@ var flow = function(superClass) {
|
|
|
31127
30944
|
var _this = this;
|
|
31128
30945
|
var state = null;
|
|
31129
30946
|
var jsx2;
|
|
31130
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
30947
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
31131
30948
|
state = this.state.clone();
|
|
31132
30949
|
jsx2 = this.tryParse(function() {
|
|
31133
30950
|
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseMaybeAssign", _this).call(_this, refExpressionErrors, afterLeftParse);
|
|
@@ -31214,7 +31031,7 @@ var flow = function(superClass) {
|
|
|
31214
31031
|
{
|
|
31215
31032
|
key: "setArrowFunctionParameters",
|
|
31216
31033
|
value: function setArrowFunctionParameters(node, params) {
|
|
31217
|
-
if (this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
31034
|
+
if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
31218
31035
|
node.params = params;
|
|
31219
31036
|
} else {
|
|
31220
31037
|
_get(_get_prototype_of(FlowParserMixin.prototype), "setArrowFunctionParameters", this).call(this, node, params);
|
|
@@ -31225,7 +31042,7 @@ var flow = function(superClass) {
|
|
|
31225
31042
|
key: "checkParams",
|
|
31226
31043
|
value: function checkParams(node, allowDuplicates, isArrowFunction) {
|
|
31227
31044
|
var strictModeChanged = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
|
|
31228
|
-
if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
31045
|
+
if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
31229
31046
|
return;
|
|
31230
31047
|
}
|
|
31231
31048
|
for(var i = 0; i < node.params.length; i++){
|
|
@@ -31239,7 +31056,7 @@ var flow = function(superClass) {
|
|
|
31239
31056
|
{
|
|
31240
31057
|
key: "parseParenAndDistinguishExpression",
|
|
31241
31058
|
value: function parseParenAndDistinguishExpression(canBeArrow) {
|
|
31242
|
-
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseParenAndDistinguishExpression", this).call(this, canBeArrow && !this.state.noArrowAt.includes(this.state.start));
|
|
31059
|
+
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseParenAndDistinguishExpression", this).call(this, canBeArrow && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)));
|
|
31243
31060
|
}
|
|
31244
31061
|
},
|
|
31245
31062
|
{
|
|
@@ -31459,7 +31276,7 @@ var flow = function(superClass) {
|
|
|
31459
31276
|
return _this.match(12) || _this.match(8);
|
|
31460
31277
|
};
|
|
31461
31278
|
switch(this.state.type){
|
|
31462
|
-
case
|
|
31279
|
+
case 135:
|
|
31463
31280
|
{
|
|
31464
31281
|
var literal = this.parseNumericLiteral(this.state.value);
|
|
31465
31282
|
if (endOfInit()) {
|
|
@@ -31474,7 +31291,7 @@ var flow = function(superClass) {
|
|
|
31474
31291
|
loc: startLoc
|
|
31475
31292
|
};
|
|
31476
31293
|
}
|
|
31477
|
-
case
|
|
31294
|
+
case 134:
|
|
31478
31295
|
{
|
|
31479
31296
|
var literal1 = this.parseStringLiteral(this.state.value);
|
|
31480
31297
|
if (endOfInit()) {
|
|
@@ -32177,14 +31994,14 @@ var jsx = function(superClass) {
|
|
|
32177
31994
|
if (this.state.pos === this.state.start) {
|
|
32178
31995
|
if (ch === 60 && this.state.canStartJSXElement) {
|
|
32179
31996
|
++this.state.pos;
|
|
32180
|
-
this.finishToken(
|
|
31997
|
+
this.finishToken(143);
|
|
32181
31998
|
} else {
|
|
32182
31999
|
_get(_get_prototype_of(JSXParserMixin.prototype), "getTokenFromCode", this).call(this, ch);
|
|
32183
32000
|
}
|
|
32184
32001
|
return;
|
|
32185
32002
|
}
|
|
32186
32003
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
32187
|
-
this.finishToken(
|
|
32004
|
+
this.finishToken(142, out);
|
|
32188
32005
|
return;
|
|
32189
32006
|
case 38:
|
|
32190
32007
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
@@ -32252,7 +32069,7 @@ var jsx = function(superClass) {
|
|
|
32252
32069
|
}
|
|
32253
32070
|
}
|
|
32254
32071
|
out += this.input.slice(chunkStart, this.state.pos++);
|
|
32255
|
-
this.finishToken(
|
|
32072
|
+
this.finishToken(134, out);
|
|
32256
32073
|
}
|
|
32257
32074
|
},
|
|
32258
32075
|
{
|
|
@@ -32298,14 +32115,14 @@ var jsx = function(superClass) {
|
|
|
32298
32115
|
do {
|
|
32299
32116
|
ch = this.input.charCodeAt(++this.state.pos);
|
|
32300
32117
|
}while (isIdentifierChar2(ch) || ch === 45);
|
|
32301
|
-
this.finishToken(
|
|
32118
|
+
this.finishToken(141, this.input.slice(start, this.state.pos));
|
|
32302
32119
|
}
|
|
32303
32120
|
},
|
|
32304
32121
|
{
|
|
32305
32122
|
key: "jsxParseIdentifier",
|
|
32306
32123
|
value: function jsxParseIdentifier() {
|
|
32307
32124
|
var node = this.startNode();
|
|
32308
|
-
if (this.match(
|
|
32125
|
+
if (this.match(141)) {
|
|
32309
32126
|
node.name = this.state.value;
|
|
32310
32127
|
} else if (tokenIsKeyword(this.state.type)) {
|
|
32311
32128
|
node.name = tokenLabelName(this.state.type);
|
|
@@ -32359,8 +32176,8 @@ var jsx = function(superClass) {
|
|
|
32359
32176
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
32360
32177
|
}
|
|
32361
32178
|
return node;
|
|
32362
|
-
case
|
|
32363
|
-
case
|
|
32179
|
+
case 143:
|
|
32180
|
+
case 134:
|
|
32364
32181
|
return this.parseExprAtom();
|
|
32365
32182
|
default:
|
|
32366
32183
|
throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);
|
|
@@ -32429,7 +32246,7 @@ var jsx = function(superClass) {
|
|
|
32429
32246
|
key: "jsxParseOpeningElementAt",
|
|
32430
32247
|
value: function jsxParseOpeningElementAt(startLoc) {
|
|
32431
32248
|
var node = this.startNodeAt(startLoc);
|
|
32432
|
-
if (this.eat(
|
|
32249
|
+
if (this.eat(144)) {
|
|
32433
32250
|
return this.finishNode(node, "JSXOpeningFragment");
|
|
32434
32251
|
}
|
|
32435
32252
|
node.name = this.jsxParseElementName();
|
|
@@ -32440,12 +32257,12 @@ var jsx = function(superClass) {
|
|
|
32440
32257
|
key: "jsxParseOpeningElementAfterName",
|
|
32441
32258
|
value: function jsxParseOpeningElementAfterName(node) {
|
|
32442
32259
|
var attributes = [];
|
|
32443
|
-
while(!this.match(56) && !this.match(
|
|
32260
|
+
while(!this.match(56) && !this.match(144)){
|
|
32444
32261
|
attributes.push(this.jsxParseAttribute());
|
|
32445
32262
|
}
|
|
32446
32263
|
node.attributes = attributes;
|
|
32447
32264
|
node.selfClosing = this.eat(56);
|
|
32448
|
-
this.expect(
|
|
32265
|
+
this.expect(144);
|
|
32449
32266
|
return this.finishNode(node, "JSXOpeningElement");
|
|
32450
32267
|
}
|
|
32451
32268
|
},
|
|
@@ -32453,11 +32270,11 @@ var jsx = function(superClass) {
|
|
|
32453
32270
|
key: "jsxParseClosingElementAt",
|
|
32454
32271
|
value: function jsxParseClosingElementAt(startLoc) {
|
|
32455
32272
|
var node = this.startNodeAt(startLoc);
|
|
32456
|
-
if (this.eat(
|
|
32273
|
+
if (this.eat(144)) {
|
|
32457
32274
|
return this.finishNode(node, "JSXClosingFragment");
|
|
32458
32275
|
}
|
|
32459
32276
|
node.name = this.jsxParseElementName();
|
|
32460
|
-
this.expect(
|
|
32277
|
+
this.expect(144);
|
|
32461
32278
|
return this.finishNode(node, "JSXClosingElement");
|
|
32462
32279
|
}
|
|
32463
32280
|
},
|
|
@@ -32471,7 +32288,7 @@ var jsx = function(superClass) {
|
|
|
32471
32288
|
if (!openingElement.selfClosing) {
|
|
32472
32289
|
contents: for(;;){
|
|
32473
32290
|
switch(this.state.type){
|
|
32474
|
-
case
|
|
32291
|
+
case 143:
|
|
32475
32292
|
startLoc = this.state.startLoc;
|
|
32476
32293
|
this.next();
|
|
32477
32294
|
if (this.eat(56)) {
|
|
@@ -32480,7 +32297,7 @@ var jsx = function(superClass) {
|
|
|
32480
32297
|
}
|
|
32481
32298
|
children.push(this.jsxParseElementAt(startLoc));
|
|
32482
32299
|
break;
|
|
32483
|
-
case
|
|
32300
|
+
case 142:
|
|
32484
32301
|
children.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
32485
32302
|
break;
|
|
32486
32303
|
case 5:
|
|
@@ -32545,10 +32362,10 @@ var jsx = function(superClass) {
|
|
|
32545
32362
|
{
|
|
32546
32363
|
key: "parseExprAtom",
|
|
32547
32364
|
value: function parseExprAtom(refExpressionErrors) {
|
|
32548
|
-
if (this.match(
|
|
32365
|
+
if (this.match(143)) {
|
|
32549
32366
|
return this.jsxParseElement();
|
|
32550
32367
|
} else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
|
|
32551
|
-
this.replaceToken(
|
|
32368
|
+
this.replaceToken(143);
|
|
32552
32369
|
return this.jsxParseElement();
|
|
32553
32370
|
} else {
|
|
32554
32371
|
return _get(_get_prototype_of(JSXParserMixin.prototype), "parseExprAtom", this).call(this, refExpressionErrors);
|
|
@@ -32577,7 +32394,7 @@ var jsx = function(superClass) {
|
|
|
32577
32394
|
}
|
|
32578
32395
|
if (code2 === 62) {
|
|
32579
32396
|
++this.state.pos;
|
|
32580
|
-
this.finishToken(
|
|
32397
|
+
this.finishToken(144);
|
|
32581
32398
|
return;
|
|
32582
32399
|
}
|
|
32583
32400
|
if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
|
|
@@ -32587,7 +32404,7 @@ var jsx = function(superClass) {
|
|
|
32587
32404
|
}
|
|
32588
32405
|
if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
|
|
32589
32406
|
++this.state.pos;
|
|
32590
|
-
this.finishToken(
|
|
32407
|
+
this.finishToken(143);
|
|
32591
32408
|
return;
|
|
32592
32409
|
}
|
|
32593
32410
|
_get(_get_prototype_of(JSXParserMixin.prototype), "getTokenFromCode", this).call(this, code2);
|
|
@@ -32597,12 +32414,12 @@ var jsx = function(superClass) {
|
|
|
32597
32414
|
key: "updateContext",
|
|
32598
32415
|
value: function updateContext(prevType) {
|
|
32599
32416
|
var _this_state = this.state, context = _this_state.context, type = _this_state.type;
|
|
32600
|
-
if (type === 56 && prevType ===
|
|
32417
|
+
if (type === 56 && prevType === 143) {
|
|
32601
32418
|
context.splice(-2, 2, types.j_cTag);
|
|
32602
32419
|
this.state.canStartJSXElement = false;
|
|
32603
|
-
} else if (type === 142) {
|
|
32604
|
-
context.push(types.j_oTag);
|
|
32605
32420
|
} else if (type === 143) {
|
|
32421
|
+
context.push(types.j_oTag);
|
|
32422
|
+
} else if (type === 144) {
|
|
32606
32423
|
var out = context[context.length - 1];
|
|
32607
32424
|
if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) {
|
|
32608
32425
|
context.pop();
|
|
@@ -33055,7 +32872,7 @@ var LValParser = /*#__PURE__*/ function(NodeUtils) {
|
|
|
33055
32872
|
return this.parseBindingRestProperty(this.startNode());
|
|
33056
32873
|
}
|
|
33057
32874
|
var prop = this.startNode();
|
|
33058
|
-
if (type ===
|
|
32875
|
+
if (type === 139) {
|
|
33059
32876
|
this.expectPlugin("destructuringPrivate", startLoc);
|
|
33060
32877
|
this.classScope.usePrivateName(this.state.value, startLoc);
|
|
33061
32878
|
prop.key = this.parsePrivateName();
|
|
@@ -33488,7 +33305,7 @@ var typescript = function(superClass) {
|
|
|
33488
33305
|
{
|
|
33489
33306
|
key: "tsTokenCanFollowModifier",
|
|
33490
33307
|
value: function tsTokenCanFollowModifier() {
|
|
33491
|
-
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(
|
|
33308
|
+
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
|
|
33492
33309
|
}
|
|
33493
33310
|
},
|
|
33494
33311
|
{
|
|
@@ -33690,7 +33507,7 @@ var typescript = function(superClass) {
|
|
|
33690
33507
|
var node = this.startNode();
|
|
33691
33508
|
this.expect(83);
|
|
33692
33509
|
this.expect(10);
|
|
33693
|
-
if (!this.match(
|
|
33510
|
+
if (!this.match(134)) {
|
|
33694
33511
|
this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
|
|
33695
33512
|
}
|
|
33696
33513
|
node.argument = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -33730,7 +33547,9 @@ var typescript = function(superClass) {
|
|
|
33730
33547
|
var node = this.startNode();
|
|
33731
33548
|
node.typeName = this.tsParseEntityName();
|
|
33732
33549
|
if (!this.hasPrecedingLineBreak() && this.match(47)) {
|
|
33733
|
-
|
|
33550
|
+
{
|
|
33551
|
+
node.typeArguments = this.tsParseTypeArguments();
|
|
33552
|
+
}
|
|
33734
33553
|
}
|
|
33735
33554
|
return this.finishNode(node, "TSTypeReference");
|
|
33736
33555
|
}
|
|
@@ -33793,7 +33612,7 @@ var typescript = function(superClass) {
|
|
|
33793
33612
|
key: "tsParseTypeParameters",
|
|
33794
33613
|
value: function tsParseTypeParameters(parseModifiers) {
|
|
33795
33614
|
var node = this.startNode();
|
|
33796
|
-
if (this.match(47) || this.match(
|
|
33615
|
+
if (this.match(47) || this.match(143)) {
|
|
33797
33616
|
this.next();
|
|
33798
33617
|
} else {
|
|
33799
33618
|
this.unexpected();
|
|
@@ -34193,9 +34012,9 @@ var typescript = function(superClass) {
|
|
|
34193
34012
|
value: function tsParseLiteralTypeNode() {
|
|
34194
34013
|
var node = this.startNode();
|
|
34195
34014
|
switch(this.state.type){
|
|
34196
|
-
case 134:
|
|
34197
34015
|
case 135:
|
|
34198
|
-
case
|
|
34016
|
+
case 136:
|
|
34017
|
+
case 134:
|
|
34199
34018
|
case 85:
|
|
34200
34019
|
case 86:
|
|
34201
34020
|
node.literal = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -34236,9 +34055,9 @@ var typescript = function(superClass) {
|
|
|
34236
34055
|
key: "tsParseNonArrayType",
|
|
34237
34056
|
value: function tsParseNonArrayType() {
|
|
34238
34057
|
switch(this.state.type){
|
|
34239
|
-
case 133:
|
|
34240
34058
|
case 134:
|
|
34241
34059
|
case 135:
|
|
34060
|
+
case 136:
|
|
34242
34061
|
case 85:
|
|
34243
34062
|
case 86:
|
|
34244
34063
|
return this.tsParseLiteralTypeNode();
|
|
@@ -34246,7 +34065,7 @@ var typescript = function(superClass) {
|
|
|
34246
34065
|
if (this.state.value === "-") {
|
|
34247
34066
|
var node = this.startNode();
|
|
34248
34067
|
var nextToken = this.lookahead();
|
|
34249
|
-
if (nextToken.type !==
|
|
34068
|
+
if (nextToken.type !== 135 && nextToken.type !== 136) {
|
|
34250
34069
|
this.unexpected();
|
|
34251
34070
|
}
|
|
34252
34071
|
node.literal = this.parseMaybeUnary();
|
|
@@ -34786,7 +34605,7 @@ var typescript = function(superClass) {
|
|
|
34786
34605
|
key: "tsParseEnumMember",
|
|
34787
34606
|
value: function tsParseEnumMember() {
|
|
34788
34607
|
var node = this.startNode();
|
|
34789
|
-
node.id = this.match(
|
|
34608
|
+
node.id = this.match(134) ? _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseStringLiteral", this).call(this, this.state.value) : this.parseIdentifier(true);
|
|
34790
34609
|
if (this.eat(29)) {
|
|
34791
34610
|
node.initializer = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssignAllowIn", this).call(this);
|
|
34792
34611
|
}
|
|
@@ -34823,15 +34642,11 @@ var typescript = function(superClass) {
|
|
|
34823
34642
|
key: "tsParseModuleOrNamespaceDeclaration",
|
|
34824
34643
|
value: function tsParseModuleOrNamespaceDeclaration(node) {
|
|
34825
34644
|
var nested = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
34826
|
-
node.id = this.
|
|
34827
|
-
if (
|
|
34645
|
+
node.id = this.tsParseEntityName();
|
|
34646
|
+
if (node.id.type === "Identifier") {
|
|
34828
34647
|
this.checkIdentifier(node.id, 1024);
|
|
34829
34648
|
}
|
|
34830
|
-
|
|
34831
|
-
var inner = this.startNode();
|
|
34832
|
-
this.tsParseModuleOrNamespaceDeclaration(inner, true);
|
|
34833
|
-
node.body = inner;
|
|
34834
|
-
} else {
|
|
34649
|
+
{
|
|
34835
34650
|
this.scope.enter(256);
|
|
34836
34651
|
this.prodParam.enter(0);
|
|
34837
34652
|
node.body = this.tsParseModuleBlock();
|
|
@@ -34846,9 +34661,8 @@ var typescript = function(superClass) {
|
|
|
34846
34661
|
value: function tsParseAmbientExternalModuleDeclaration(node) {
|
|
34847
34662
|
if (this.isContextual(112)) {
|
|
34848
34663
|
node.kind = "global";
|
|
34849
|
-
node.global = true;
|
|
34850
34664
|
node.id = this.parseIdentifier();
|
|
34851
|
-
} else if (this.match(
|
|
34665
|
+
} else if (this.match(134)) {
|
|
34852
34666
|
node.kind = "module";
|
|
34853
34667
|
node.id = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseStringLiteral", this).call(this, this.state.value);
|
|
34854
34668
|
} else {
|
|
@@ -34900,7 +34714,7 @@ var typescript = function(superClass) {
|
|
|
34900
34714
|
var node = this.startNode();
|
|
34901
34715
|
this.expectContextual(119);
|
|
34902
34716
|
this.expect(10);
|
|
34903
|
-
if (!this.match(
|
|
34717
|
+
if (!this.match(134)) {
|
|
34904
34718
|
this.unexpected();
|
|
34905
34719
|
}
|
|
34906
34720
|
node.expression = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -35017,7 +34831,6 @@ var typescript = function(superClass) {
|
|
|
35017
34831
|
this.prodParam.enter(0);
|
|
35018
34832
|
var mod = node;
|
|
35019
34833
|
mod.kind = "global";
|
|
35020
|
-
mod.global = true;
|
|
35021
34834
|
mod.id = expr;
|
|
35022
34835
|
mod.body = this.tsParseModuleBlock();
|
|
35023
34836
|
this.scope.exit();
|
|
@@ -35041,7 +34854,7 @@ var typescript = function(superClass) {
|
|
|
35041
34854
|
break;
|
|
35042
34855
|
case "module":
|
|
35043
34856
|
if (this.tsCheckLineTerminator(next)) {
|
|
35044
|
-
if (this.match(
|
|
34857
|
+
if (this.match(134)) {
|
|
35045
34858
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
35046
34859
|
} else if (tokenIsIdentifier(this.state.type)) {
|
|
35047
34860
|
node.kind = "module";
|
|
@@ -35436,7 +35249,7 @@ var typescript = function(superClass) {
|
|
|
35436
35249
|
{
|
|
35437
35250
|
key: "parseImport",
|
|
35438
35251
|
value: function parseImport(node) {
|
|
35439
|
-
if (this.match(
|
|
35252
|
+
if (this.match(134)) {
|
|
35440
35253
|
node.importKind = "value";
|
|
35441
35254
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseImport", this).call(this, node);
|
|
35442
35255
|
}
|
|
@@ -35795,7 +35608,7 @@ var typescript = function(superClass) {
|
|
|
35795
35608
|
if (node.abstract && this.match(29)) {
|
|
35796
35609
|
var key = node.key;
|
|
35797
35610
|
this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, {
|
|
35798
|
-
propertyName: key.type === "Identifier" && !node.computed ? key.name : "[".concat(this.input.slice(key.start, key.end), "]")
|
|
35611
|
+
propertyName: key.type === "Identifier" && !node.computed ? key.name : "[".concat(this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end)), "]")
|
|
35799
35612
|
});
|
|
35800
35613
|
}
|
|
35801
35614
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseClassProperty", this).call(this, node);
|
|
@@ -35866,7 +35679,9 @@ var typescript = function(superClass) {
|
|
|
35866
35679
|
value: function parseClassSuper(node) {
|
|
35867
35680
|
_get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseClassSuper", this).call(this, node);
|
|
35868
35681
|
if (node.superClass && (this.match(47) || this.match(51))) {
|
|
35869
|
-
|
|
35682
|
+
{
|
|
35683
|
+
node.superTypeArguments = this.tsParseTypeArgumentsInExpression();
|
|
35684
|
+
}
|
|
35870
35685
|
}
|
|
35871
35686
|
if (this.eatContextual(113)) {
|
|
35872
35687
|
node.implements = this.tsParseHeritageClause("implements");
|
|
@@ -35919,7 +35734,7 @@ var typescript = function(superClass) {
|
|
|
35919
35734
|
var state;
|
|
35920
35735
|
var jsx2;
|
|
35921
35736
|
var typeCast;
|
|
35922
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
35737
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
35923
35738
|
state = this.state.clone();
|
|
35924
35739
|
jsx2 = this.tryParse(function() {
|
|
35925
35740
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssign", _this).call(_this, refExpressionErrors, afterLeftParse);
|
|
@@ -36359,7 +36174,7 @@ var typescript = function(superClass) {
|
|
|
36359
36174
|
if (hasBody) {
|
|
36360
36175
|
var key = method.key;
|
|
36361
36176
|
this.raise(TSErrors.AbstractMethodHasImplementation, method, {
|
|
36362
|
-
methodName: key.type === "Identifier" && !method.computed ? key.name : "[".concat(this.input.slice(key.start, key.end), "]")
|
|
36177
|
+
methodName: key.type === "Identifier" && !method.computed ? key.name : "[".concat(this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end)), "]")
|
|
36363
36178
|
});
|
|
36364
36179
|
}
|
|
36365
36180
|
}
|
|
@@ -36558,13 +36373,13 @@ var placeholders = function(superClass) {
|
|
|
36558
36373
|
{
|
|
36559
36374
|
key: "parsePlaceholder",
|
|
36560
36375
|
value: function parsePlaceholder(expectedNode) {
|
|
36561
|
-
if (this.match(
|
|
36376
|
+
if (this.match(133)) {
|
|
36562
36377
|
var node = this.startNode();
|
|
36563
36378
|
this.next();
|
|
36564
36379
|
this.assertNoSpace();
|
|
36565
36380
|
node.name = _get(_get_prototype_of(PlaceholdersParserMixin.prototype), "parseIdentifier", this).call(this, true);
|
|
36566
36381
|
this.assertNoSpace();
|
|
36567
|
-
this.expect(
|
|
36382
|
+
this.expect(133);
|
|
36568
36383
|
return this.finishPlaceholder(node, expectedNode);
|
|
36569
36384
|
}
|
|
36570
36385
|
}
|
|
@@ -36584,7 +36399,7 @@ var placeholders = function(superClass) {
|
|
|
36584
36399
|
key: "getTokenFromCode",
|
|
36585
36400
|
value: function getTokenFromCode(code2) {
|
|
36586
36401
|
if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
|
|
36587
|
-
this.finishOp(
|
|
36402
|
+
this.finishOp(133, 2);
|
|
36588
36403
|
} else {
|
|
36589
36404
|
_get(_get_prototype_of(PlaceholdersParserMixin.prototype), "getTokenFromCode", this).call(this, code2);
|
|
36590
36405
|
}
|
|
@@ -36639,7 +36454,7 @@ var placeholders = function(superClass) {
|
|
|
36639
36454
|
return true;
|
|
36640
36455
|
}
|
|
36641
36456
|
var nextToken = this.lookahead();
|
|
36642
|
-
if (nextToken.type ===
|
|
36457
|
+
if (nextToken.type === 133) {
|
|
36643
36458
|
return true;
|
|
36644
36459
|
}
|
|
36645
36460
|
return false;
|
|
@@ -36692,7 +36507,7 @@ var placeholders = function(superClass) {
|
|
|
36692
36507
|
var oldStrict = this.state.strict;
|
|
36693
36508
|
var placeholder2 = this.parsePlaceholder("Identifier");
|
|
36694
36509
|
if (placeholder2) {
|
|
36695
|
-
if (this.match(81) || this.match(
|
|
36510
|
+
if (this.match(81) || this.match(133) || this.match(5)) {
|
|
36696
36511
|
node.id = placeholder2;
|
|
36697
36512
|
} else if (optionalId || !isStatement5) {
|
|
36698
36513
|
node.id = null;
|
|
@@ -36736,7 +36551,7 @@ var placeholders = function(superClass) {
|
|
|
36736
36551
|
if (this.match(65)) {
|
|
36737
36552
|
var next = this.nextTokenStart();
|
|
36738
36553
|
if (this.isUnparsedContextual(next, "from")) {
|
|
36739
|
-
if (this.input.startsWith(tokenLabelName(
|
|
36554
|
+
if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) {
|
|
36740
36555
|
return true;
|
|
36741
36556
|
}
|
|
36742
36557
|
}
|
|
@@ -36800,7 +36615,7 @@ var placeholders = function(superClass) {
|
|
|
36800
36615
|
{
|
|
36801
36616
|
key: "assertNoSpace",
|
|
36802
36617
|
value: function assertNoSpace() {
|
|
36803
|
-
if (this.state.start > this.state.lastTokEndLoc.index) {
|
|
36618
|
+
if (this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index)) {
|
|
36804
36619
|
this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc);
|
|
36805
36620
|
}
|
|
36806
36621
|
}
|
|
@@ -37071,7 +36886,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37071
36886
|
{
|
|
37072
36887
|
key: "shouldExitDescending",
|
|
37073
36888
|
value: function shouldExitDescending(expr, potentialArrowAt) {
|
|
37074
|
-
return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
|
|
36889
|
+
return expr.type === "ArrowFunctionExpression" && this.offsetToSourcePos(expr.start) === potentialArrowAt;
|
|
37075
36890
|
}
|
|
37076
36891
|
},
|
|
37077
36892
|
{
|
|
@@ -37080,7 +36895,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37080
36895
|
this.enterInitialScopes();
|
|
37081
36896
|
this.nextToken();
|
|
37082
36897
|
var expr = this.parseExpression();
|
|
37083
|
-
if (!this.match(
|
|
36898
|
+
if (!this.match(140)) {
|
|
37084
36899
|
this.unexpected();
|
|
37085
36900
|
}
|
|
37086
36901
|
this.finalizeRemainingComments();
|
|
@@ -37238,7 +37053,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37238
37053
|
{
|
|
37239
37054
|
key: "parseMaybeUnaryOrPrivate",
|
|
37240
37055
|
value: function parseMaybeUnaryOrPrivate(refExpressionErrors) {
|
|
37241
|
-
return this.match(
|
|
37056
|
+
return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
|
|
37242
37057
|
}
|
|
37243
37058
|
},
|
|
37244
37059
|
{
|
|
@@ -37511,7 +37326,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37511
37326
|
if (computed) {
|
|
37512
37327
|
node.property = this.parseExpression();
|
|
37513
37328
|
this.expect(3);
|
|
37514
|
-
} else if (this.match(
|
|
37329
|
+
} else if (this.match(139)) {
|
|
37515
37330
|
if (base.type === "Super") {
|
|
37516
37331
|
this.raise(Errors.SuperPrivateField, startLoc);
|
|
37517
37332
|
}
|
|
@@ -37600,7 +37415,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37600
37415
|
{
|
|
37601
37416
|
key: "atPossibleAsyncArrow",
|
|
37602
37417
|
value: function atPossibleAsyncArrow(base) {
|
|
37603
|
-
return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt;
|
|
37418
|
+
return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.offsetToSourcePos(base.start) === this.state.potentialArrowAt;
|
|
37604
37419
|
}
|
|
37605
37420
|
},
|
|
37606
37421
|
{
|
|
@@ -37731,11 +37546,11 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37731
37546
|
this.readRegexp();
|
|
37732
37547
|
return this.parseRegExpLiteral(this.state.value);
|
|
37733
37548
|
}
|
|
37734
|
-
case 134:
|
|
37735
|
-
return this.parseNumericLiteral(this.state.value);
|
|
37736
37549
|
case 135:
|
|
37550
|
+
return this.parseNumericLiteral(this.state.value);
|
|
37551
|
+
case 136:
|
|
37737
37552
|
return this.parseBigIntLiteral(this.state.value);
|
|
37738
|
-
case
|
|
37553
|
+
case 134:
|
|
37739
37554
|
return this.parseStringLiteral(this.state.value);
|
|
37740
37555
|
case 84:
|
|
37741
37556
|
return this.parseNullLiteral();
|
|
@@ -37789,7 +37604,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37789
37604
|
throw this.raise(Errors.UnsupportedBind, callee);
|
|
37790
37605
|
}
|
|
37791
37606
|
}
|
|
37792
|
-
case
|
|
37607
|
+
case 139:
|
|
37793
37608
|
{
|
|
37794
37609
|
this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {
|
|
37795
37610
|
identifierName: this.state.value
|
|
@@ -38044,7 +37859,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38044
37859
|
this.sawUnambiguousESM = true;
|
|
38045
37860
|
} else if (this.isContextual(105) || this.isContextual(97)) {
|
|
38046
37861
|
var isSource = this.isContextual(105);
|
|
38047
|
-
if (!isSource) this.unexpected();
|
|
38048
37862
|
this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation");
|
|
38049
37863
|
if (!this.options.createImportExpressions) {
|
|
38050
37864
|
throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, {
|
|
@@ -38062,7 +37876,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38062
37876
|
key: "parseLiteralAtNode",
|
|
38063
37877
|
value: function parseLiteralAtNode(value1, type, node) {
|
|
38064
37878
|
this.addExtra(node, "rawValue", value1);
|
|
38065
|
-
this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
|
|
37879
|
+
this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end));
|
|
38066
37880
|
node.value = value1;
|
|
38067
37881
|
this.next();
|
|
38068
37882
|
return this.finishNode(node, type);
|
|
@@ -38103,7 +37917,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38103
37917
|
key: "parseRegExpLiteral",
|
|
38104
37918
|
value: function parseRegExpLiteral(value1) {
|
|
38105
37919
|
var node = this.startNode();
|
|
38106
|
-
this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
|
|
37920
|
+
this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end));
|
|
38107
37921
|
node.pattern = value1.pattern;
|
|
38108
37922
|
node.flags = value1.flags;
|
|
38109
37923
|
this.next();
|
|
@@ -38533,16 +38347,16 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38533
38347
|
key = this.parseIdentifier(true);
|
|
38534
38348
|
} else {
|
|
38535
38349
|
switch(type){
|
|
38536
|
-
case
|
|
38350
|
+
case 135:
|
|
38537
38351
|
key = this.parseNumericLiteral(value1);
|
|
38538
38352
|
break;
|
|
38539
|
-
case
|
|
38353
|
+
case 134:
|
|
38540
38354
|
key = this.parseStringLiteral(value1);
|
|
38541
38355
|
break;
|
|
38542
|
-
case
|
|
38356
|
+
case 136:
|
|
38543
38357
|
key = this.parseBigIntLiteral(value1);
|
|
38544
38358
|
break;
|
|
38545
|
-
case
|
|
38359
|
+
case 139:
|
|
38546
38360
|
{
|
|
38547
38361
|
var privateKeyLoc = this.state.startLoc;
|
|
38548
38362
|
if (refExpressionErrors != null) {
|
|
@@ -38560,7 +38374,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38560
38374
|
}
|
|
38561
38375
|
}
|
|
38562
38376
|
prop.key = key;
|
|
38563
|
-
if (type !==
|
|
38377
|
+
if (type !== 139) {
|
|
38564
38378
|
prop.computed = false;
|
|
38565
38379
|
}
|
|
38566
38380
|
}
|
|
@@ -38888,7 +38702,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38888
38702
|
value: function isAmbiguousAwait() {
|
|
38889
38703
|
if (this.hasPrecedingLineBreak()) return true;
|
|
38890
38704
|
var type = this.state.type;
|
|
38891
|
-
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type ===
|
|
38705
|
+
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
|
|
38892
38706
|
}
|
|
38893
38707
|
},
|
|
38894
38708
|
{
|
|
@@ -38903,7 +38717,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38903
38717
|
delegating = this.eat(55);
|
|
38904
38718
|
switch(this.state.type){
|
|
38905
38719
|
case 13:
|
|
38906
|
-
case
|
|
38720
|
+
case 140:
|
|
38907
38721
|
case 8:
|
|
38908
38722
|
case 11:
|
|
38909
38723
|
case 3:
|
|
@@ -39144,7 +38958,7 @@ var switchLabel = {
|
|
|
39144
38958
|
};
|
|
39145
38959
|
var loneSurrogate = RegExp("[\uD800-\uDFFF]", "u");
|
|
39146
38960
|
var keywordRelationalOperator = RegExp("in(?:stanceof)?", "y");
|
|
39147
|
-
function babel7CompatTokens(tokens, input) {
|
|
38961
|
+
function babel7CompatTokens(tokens, input, startIndex) {
|
|
39148
38962
|
for(var i = 0; i < tokens.length; i++){
|
|
39149
38963
|
var token = tokens[i];
|
|
39150
38964
|
var type = token.type;
|
|
@@ -39168,7 +38982,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39168
38982
|
file2.program = this.parseProgram(program3);
|
|
39169
38983
|
file2.comments = this.comments;
|
|
39170
38984
|
if (this.options.tokens) {
|
|
39171
|
-
file2.tokens = babel7CompatTokens(this.tokens, this.input);
|
|
38985
|
+
file2.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex);
|
|
39172
38986
|
}
|
|
39173
38987
|
return this.finishNode(file2, "File");
|
|
39174
38988
|
}
|
|
@@ -39176,7 +38990,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39176
38990
|
{
|
|
39177
38991
|
key: "parseProgram",
|
|
39178
38992
|
value: function parseProgram(program3) {
|
|
39179
|
-
var end = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
38993
|
+
var end = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 140, sourceType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options.sourceType;
|
|
39180
38994
|
program3.sourceType = sourceType;
|
|
39181
38995
|
program3.interpreter = this.parseInterpreterDirective();
|
|
39182
38996
|
this.parseBlockBody(program3, true, true, end);
|
|
@@ -39208,7 +39022,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39208
39022
|
this.addExtra(program3, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
39209
39023
|
}
|
|
39210
39024
|
var finishedProgram;
|
|
39211
|
-
if (end ===
|
|
39025
|
+
if (end === 140) {
|
|
39212
39026
|
finishedProgram = this.finishNode(program3, "Program");
|
|
39213
39027
|
} else {
|
|
39214
39028
|
finishedProgram = this.finishNodeAt(program3, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
|
|
@@ -39225,7 +39039,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39225
39039
|
delete directive2.expression;
|
|
39226
39040
|
var directiveLiteral2 = directive2.value;
|
|
39227
39041
|
var expressionValue = directiveLiteral2.value;
|
|
39228
|
-
var raw = this.input.slice(directiveLiteral2.start, directiveLiteral2.end);
|
|
39042
|
+
var raw = this.input.slice(this.offsetToSourcePos(directiveLiteral2.start), this.offsetToSourcePos(directiveLiteral2.end));
|
|
39229
39043
|
var val = directiveLiteral2.value = raw.slice(1, -1);
|
|
39230
39044
|
this.addExtra(directiveLiteral2, "raw", raw);
|
|
39231
39045
|
this.addExtra(directiveLiteral2, "rawValue", val);
|
|
@@ -39594,7 +39408,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39594
39408
|
while(this.eat(16)){
|
|
39595
39409
|
var node2 = this.startNodeAt(startLoc);
|
|
39596
39410
|
node2.object = expr;
|
|
39597
|
-
if (this.match(
|
|
39411
|
+
if (this.match(139)) {
|
|
39598
39412
|
this.classScope.usePrivateName(this.state.value, this.state.startLoc);
|
|
39599
39413
|
node2.property = this.parsePrivateName();
|
|
39600
39414
|
} else {
|
|
@@ -39978,7 +39792,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39978
39792
|
for(var i = this.state.labels.length - 1; i >= 0; i--){
|
|
39979
39793
|
var label1 = this.state.labels[i];
|
|
39980
39794
|
if (label1.statementStart === node.start) {
|
|
39981
|
-
label1.statementStart = this.state.start;
|
|
39795
|
+
label1.statementStart = this.sourceToOffsetPos(this.state.start);
|
|
39982
39796
|
label1.kind = kind;
|
|
39983
39797
|
} else {
|
|
39984
39798
|
break;
|
|
@@ -39987,7 +39801,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39987
39801
|
this.state.labels.push({
|
|
39988
39802
|
name: maybeName,
|
|
39989
39803
|
kind: kind,
|
|
39990
|
-
statementStart: this.state.start
|
|
39804
|
+
statementStart: this.sourceToOffsetPos(this.state.start)
|
|
39991
39805
|
});
|
|
39992
39806
|
node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement();
|
|
39993
39807
|
this.state.labels.pop();
|
|
@@ -40364,7 +40178,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40364
40178
|
this.parsePropertyNamePrefixOperator(member);
|
|
40365
40179
|
if (this.eat(55)) {
|
|
40366
40180
|
method.kind = "method";
|
|
40367
|
-
var isPrivateName3 = this.match(
|
|
40181
|
+
var isPrivateName3 = this.match(139);
|
|
40368
40182
|
this.parseClassElementName(method);
|
|
40369
40183
|
if (isPrivateName3) {
|
|
40370
40184
|
this.pushClassPrivateMethod(classBody2, privateMethod, true, false);
|
|
@@ -40415,7 +40229,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40415
40229
|
this.unexpected(maybeQuestionTokenStartLoc);
|
|
40416
40230
|
}
|
|
40417
40231
|
method.kind = "method";
|
|
40418
|
-
var isPrivate3 = this.match(
|
|
40232
|
+
var isPrivate3 = this.match(139);
|
|
40419
40233
|
this.parseClassElementName(method);
|
|
40420
40234
|
this.parsePostMemberNameModifiers(publicMember);
|
|
40421
40235
|
if (isPrivate3) {
|
|
@@ -40429,7 +40243,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40429
40243
|
} else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
40430
40244
|
this.resetPreviousNodeTrailingComments(key);
|
|
40431
40245
|
method.kind = maybeContextualKw;
|
|
40432
|
-
var isPrivate31 = this.match(
|
|
40246
|
+
var isPrivate31 = this.match(139);
|
|
40433
40247
|
this.parseClassElementName(publicMethod);
|
|
40434
40248
|
if (isPrivate31) {
|
|
40435
40249
|
this.pushClassPrivateMethod(classBody2, privateMethod, false, false);
|
|
@@ -40443,7 +40257,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40443
40257
|
} else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
|
|
40444
40258
|
this.expectPlugin("decoratorAutoAccessors");
|
|
40445
40259
|
this.resetPreviousNodeTrailingComments(key);
|
|
40446
|
-
var isPrivate32 = this.match(
|
|
40260
|
+
var isPrivate32 = this.match(139);
|
|
40447
40261
|
this.parseClassElementName(publicProp);
|
|
40448
40262
|
this.pushClassAccessorProperty(classBody2, accessorProp, isPrivate32);
|
|
40449
40263
|
} else if (this.isLineTerminator()) {
|
|
@@ -40461,10 +40275,10 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40461
40275
|
key: "parseClassElementName",
|
|
40462
40276
|
value: function parseClassElementName(member) {
|
|
40463
40277
|
var _this_state = this.state, type = _this_state.type, value1 = _this_state.value;
|
|
40464
|
-
if ((type === 132 || type ===
|
|
40278
|
+
if ((type === 132 || type === 134) && member.static && value1 === "prototype") {
|
|
40465
40279
|
this.raise(Errors.StaticPrototype, this.state.startLoc);
|
|
40466
40280
|
}
|
|
40467
|
-
if (type ===
|
|
40281
|
+
if (type === 139) {
|
|
40468
40282
|
if (value1 === "constructor") {
|
|
40469
40283
|
this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);
|
|
40470
40284
|
}
|
|
@@ -41025,7 +40839,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41025
40839
|
if (this.eat(8)) break;
|
|
41026
40840
|
}
|
|
41027
40841
|
var isMaybeTypeOnly = this.isContextual(130);
|
|
41028
|
-
var isString = this.match(
|
|
40842
|
+
var isString = this.match(134);
|
|
41029
40843
|
var node = this.startNode();
|
|
41030
40844
|
node.local = this.parseModuleExportName();
|
|
41031
40845
|
nodes2.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
|
|
@@ -41049,7 +40863,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41049
40863
|
{
|
|
41050
40864
|
key: "parseModuleExportName",
|
|
41051
40865
|
value: function parseModuleExportName() {
|
|
41052
|
-
if (this.match(
|
|
40866
|
+
if (this.match(134)) {
|
|
41053
40867
|
var result = this.parseStringLiteral(this.state.value);
|
|
41054
40868
|
var surrogate = loneSurrogate.exec(result.value);
|
|
41055
40869
|
if (surrogate) {
|
|
@@ -41179,7 +40993,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41179
40993
|
{
|
|
41180
40994
|
key: "parseImport",
|
|
41181
40995
|
value: function parseImport(node) {
|
|
41182
|
-
if (this.match(
|
|
40996
|
+
if (this.match(134)) {
|
|
41183
40997
|
return this.parseImportSourceAndAttributes(node);
|
|
41184
40998
|
}
|
|
41185
40999
|
return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false));
|
|
@@ -41213,7 +41027,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41213
41027
|
{
|
|
41214
41028
|
key: "parseImportSource",
|
|
41215
41029
|
value: function parseImportSource() {
|
|
41216
|
-
if (!this.match(
|
|
41030
|
+
if (!this.match(134)) this.unexpected();
|
|
41217
41031
|
return this.parseExprAtom();
|
|
41218
41032
|
}
|
|
41219
41033
|
},
|
|
@@ -41252,13 +41066,13 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41252
41066
|
});
|
|
41253
41067
|
}
|
|
41254
41068
|
attrNames.add(keyName);
|
|
41255
|
-
if (this.match(
|
|
41069
|
+
if (this.match(134)) {
|
|
41256
41070
|
node.key = this.parseStringLiteral(keyName);
|
|
41257
41071
|
} else {
|
|
41258
41072
|
node.key = this.parseIdentifier(true);
|
|
41259
41073
|
}
|
|
41260
41074
|
this.expect(14);
|
|
41261
|
-
if (!this.match(
|
|
41075
|
+
if (!this.match(134)) {
|
|
41262
41076
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
41263
41077
|
}
|
|
41264
41078
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -41286,7 +41100,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41286
41100
|
}
|
|
41287
41101
|
attributes.add(node.key.name);
|
|
41288
41102
|
this.expect(14);
|
|
41289
|
-
if (!this.match(
|
|
41103
|
+
if (!this.match(134)) {
|
|
41290
41104
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
41291
41105
|
}
|
|
41292
41106
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -41368,7 +41182,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41368
41182
|
if (this.eat(8)) break;
|
|
41369
41183
|
}
|
|
41370
41184
|
var specifier = this.startNode();
|
|
41371
|
-
var importedIsString = this.match(
|
|
41185
|
+
var importedIsString = this.match(134);
|
|
41372
41186
|
var isMaybeTypeOnly = this.isContextual(130);
|
|
41373
41187
|
specifier.imported = this.parseModuleExportName();
|
|
41374
41188
|
var importSpecifier2 = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
|
|
@@ -41420,6 +41234,7 @@ var Parser = /*#__PURE__*/ function(StatementParser) {
|
|
|
41420
41234
|
_this.initializeScopes();
|
|
41421
41235
|
_this.plugins = pluginsMap;
|
|
41422
41236
|
_this.filename = options.sourceFilename;
|
|
41237
|
+
_this.startIndex = options.startIndex;
|
|
41423
41238
|
return _this;
|
|
41424
41239
|
}
|
|
41425
41240
|
_create_class(Parser, [
|
|
@@ -41610,7 +41425,7 @@ var compose = function(f, g) {
|
|
|
41610
41425
|
return f(g(v));
|
|
41611
41426
|
};
|
|
41612
41427
|
};
|
|
41613
|
-
function
|
|
41428
|
+
function buildDefs(colors) {
|
|
41614
41429
|
return {
|
|
41615
41430
|
keyword: colors.cyan,
|
|
41616
41431
|
capitalized: colors.yellow,
|
|
@@ -41627,8 +41442,8 @@ function builDefs(colors) {
|
|
|
41627
41442
|
reset: colors.reset
|
|
41628
41443
|
};
|
|
41629
41444
|
}
|
|
41630
|
-
var defsOn =
|
|
41631
|
-
var defsOff =
|
|
41445
|
+
var defsOn = buildDefs((0, import_picocolors.createColors)(true));
|
|
41446
|
+
var defsOff = buildDefs((0, import_picocolors.createColors)(false));
|
|
41632
41447
|
function getDefs(enabled) {
|
|
41633
41448
|
return enabled ? defsOn : defsOff;
|
|
41634
41449
|
}
|
|
@@ -44463,7 +44278,8 @@ var TokenMap = /*#__PURE__*/ function() {
|
|
|
44463
44278
|
try {
|
|
44464
44279
|
for(var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44465
44280
|
var child = _step.value;
|
|
44466
|
-
if (
|
|
44281
|
+
if (child == null) continue;
|
|
44282
|
+
if (child.start == null || child.end == null) continue;
|
|
44467
44283
|
var childTok = this._findTokensOfNode(child, low, last2);
|
|
44468
44284
|
var high = childTok.first;
|
|
44469
44285
|
for(var k = low; k < high; k++)indexes.push(k);
|
|
@@ -44756,9 +44572,7 @@ function NewExpression(node, parent) {
|
|
|
44756
44572
|
}
|
|
44757
44573
|
this.tokenChar(40);
|
|
44758
44574
|
var exit = this.enterDelimited();
|
|
44759
|
-
this.printList(node.arguments,
|
|
44760
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(")")
|
|
44761
|
-
});
|
|
44575
|
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
|
44762
44576
|
exit();
|
|
44763
44577
|
this.rightParens(node);
|
|
44764
44578
|
}
|
|
@@ -44825,9 +44639,7 @@ function CallExpression(node) {
|
|
|
44825
44639
|
this.print(node.typeParameters);
|
|
44826
44640
|
this.tokenChar(40);
|
|
44827
44641
|
var exit = this.enterDelimited();
|
|
44828
|
-
this.printList(node.arguments,
|
|
44829
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(")")
|
|
44830
|
-
});
|
|
44642
|
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
|
44831
44643
|
exit();
|
|
44832
44644
|
this.rightParens(node);
|
|
44833
44645
|
}
|
|
@@ -45114,11 +44926,8 @@ function SwitchStatement(node) {
|
|
|
45114
44926
|
this.tokenChar(41);
|
|
45115
44927
|
this.space();
|
|
45116
44928
|
this.tokenChar(123);
|
|
45117
|
-
this.printSequence(node.cases, {
|
|
45118
|
-
|
|
45119
|
-
addNewlines: function addNewlines(leading, cas) {
|
|
45120
|
-
if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
|
|
45121
|
-
}
|
|
44929
|
+
this.printSequence(node.cases, true, void 0, function addNewlines(leading, cas) {
|
|
44930
|
+
if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
|
|
45122
44931
|
});
|
|
45123
44932
|
this.rightBrace(node);
|
|
45124
44933
|
}
|
|
@@ -45134,9 +44943,7 @@ function SwitchCase(node) {
|
|
|
45134
44943
|
}
|
|
45135
44944
|
if (node.consequent.length) {
|
|
45136
44945
|
this.newline();
|
|
45137
|
-
this.printSequence(node.consequent,
|
|
45138
|
-
indent: true
|
|
45139
|
-
});
|
|
44946
|
+
this.printSequence(node.consequent, true);
|
|
45140
44947
|
}
|
|
45141
44948
|
}
|
|
45142
44949
|
function DebuggerStatement() {
|
|
@@ -45182,13 +44989,10 @@ function VariableDeclaration(node, parent) {
|
|
|
45182
44989
|
}
|
|
45183
44990
|
}
|
|
45184
44991
|
}
|
|
45185
|
-
this.printList(node.declarations, {
|
|
45186
|
-
|
|
45187
|
-
|
|
45188
|
-
|
|
45189
|
-
} : void 0,
|
|
45190
|
-
indent: node.declarations.length > 1 ? true : false
|
|
45191
|
-
});
|
|
44992
|
+
this.printList(node.declarations, void 0, void 0, node.declarations.length > 1, hasInits ? function(occurrenceCount) {
|
|
44993
|
+
this.token(",", false, occurrenceCount);
|
|
44994
|
+
this.newline();
|
|
44995
|
+
} : void 0);
|
|
45192
44996
|
if (isFor2(parent)) {
|
|
45193
44997
|
if (isForStatement2(parent)) {
|
|
45194
44998
|
if (parent.init === node) return;
|
|
@@ -45234,7 +45038,7 @@ function ClassDeclaration(node, parent) {
|
|
|
45234
45038
|
this.word("extends");
|
|
45235
45039
|
this.space();
|
|
45236
45040
|
this.print(node.superClass);
|
|
45237
|
-
this.print(node.
|
|
45041
|
+
this.print(node.superTypeArguments);
|
|
45238
45042
|
}
|
|
45239
45043
|
if (node.implements) {
|
|
45240
45044
|
this.space();
|
|
@@ -45254,12 +45058,7 @@ function ClassBody(node) {
|
|
|
45254
45058
|
var separator = classBodyEmptySemicolonsPrinter(this, node);
|
|
45255
45059
|
separator === null || separator === void 0 ? void 0 : separator(-1);
|
|
45256
45060
|
var exit = this.enterDelimited();
|
|
45257
|
-
this.printJoin(node.body,
|
|
45258
|
-
statement: true,
|
|
45259
|
-
indent: true,
|
|
45260
|
-
separator: separator,
|
|
45261
|
-
printTrailingSeparator: true
|
|
45262
|
-
});
|
|
45061
|
+
this.printJoin(node.body, true, true, separator, true);
|
|
45263
45062
|
exit();
|
|
45264
45063
|
if (!this.endsWith(10)) this.newline();
|
|
45265
45064
|
this.rightBrace(node);
|
|
@@ -45399,9 +45198,7 @@ function StaticBlock(node) {
|
|
|
45399
45198
|
this.tokenChar(125);
|
|
45400
45199
|
} else {
|
|
45401
45200
|
this.newline();
|
|
45402
|
-
this.printSequence(node.body,
|
|
45403
|
-
indent: true
|
|
45404
|
-
});
|
|
45201
|
+
this.printSequence(node.body, true);
|
|
45405
45202
|
this.rightBrace(node);
|
|
45406
45203
|
}
|
|
45407
45204
|
}
|
|
@@ -45632,9 +45429,7 @@ function _printAttributes(node, hasPreviousBrace) {
|
|
|
45632
45429
|
var occurrenceCount = hasPreviousBrace ? 1 : 0;
|
|
45633
45430
|
this.token("{", null, occurrenceCount);
|
|
45634
45431
|
this.space();
|
|
45635
|
-
this.printList(attributes || assertions,
|
|
45636
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45637
|
-
});
|
|
45432
|
+
this.printList(attributes || assertions, this.shouldPrintTrailingComma("}"));
|
|
45638
45433
|
this.space();
|
|
45639
45434
|
this.token("}", null, occurrenceCount);
|
|
45640
45435
|
}
|
|
@@ -45698,9 +45493,7 @@ function ExportNamedDeclaration(node) {
|
|
|
45698
45493
|
this.tokenChar(123);
|
|
45699
45494
|
if (specifiers.length) {
|
|
45700
45495
|
this.space();
|
|
45701
|
-
this.printList(specifiers,
|
|
45702
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45703
|
-
});
|
|
45496
|
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
|
45704
45497
|
this.space();
|
|
45705
45498
|
}
|
|
45706
45499
|
this.tokenChar(125);
|
|
@@ -45770,9 +45563,7 @@ function ImportDeclaration(node) {
|
|
|
45770
45563
|
hasBrace = true;
|
|
45771
45564
|
this.tokenChar(123);
|
|
45772
45565
|
this.space();
|
|
45773
|
-
this.printList(specifiers,
|
|
45774
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45775
|
-
});
|
|
45566
|
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
|
45776
45567
|
this.space();
|
|
45777
45568
|
this.tokenChar(125);
|
|
45778
45569
|
} else if (isTypeKind && !hasSpecifiers) {
|
|
@@ -45856,11 +45647,7 @@ function ObjectExpression(node) {
|
|
|
45856
45647
|
if (props.length) {
|
|
45857
45648
|
var exit = this.enterDelimited();
|
|
45858
45649
|
this.space();
|
|
45859
|
-
this.printList(props,
|
|
45860
|
-
indent: true,
|
|
45861
|
-
statement: true,
|
|
45862
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45863
|
-
});
|
|
45650
|
+
this.printList(props, this.shouldPrintTrailingComma("}"), true, true);
|
|
45864
45651
|
this.space();
|
|
45865
45652
|
exit();
|
|
45866
45653
|
}
|
|
@@ -45924,11 +45711,7 @@ function RecordExpression(node) {
|
|
|
45924
45711
|
this.token(startToken);
|
|
45925
45712
|
if (props.length) {
|
|
45926
45713
|
this.space();
|
|
45927
|
-
this.printList(props,
|
|
45928
|
-
indent: true,
|
|
45929
|
-
statement: true,
|
|
45930
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(endToken)
|
|
45931
|
-
});
|
|
45714
|
+
this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);
|
|
45932
45715
|
this.space();
|
|
45933
45716
|
}
|
|
45934
45717
|
this.token(endToken);
|
|
@@ -46369,9 +46152,7 @@ function InterfaceTypeAnnotation(node) {
|
|
|
46369
46152
|
this.print(node.body);
|
|
46370
46153
|
}
|
|
46371
46154
|
function IntersectionTypeAnnotation(node) {
|
|
46372
|
-
this.printJoin(node.types,
|
|
46373
|
-
separator: andSeparator
|
|
46374
|
-
});
|
|
46155
|
+
this.printJoin(node.types, void 0, void 0, andSeparator);
|
|
46375
46156
|
}
|
|
46376
46157
|
function MixedTypeAnnotation() {
|
|
46377
46158
|
this.word("mixed");
|
|
@@ -46425,7 +46206,7 @@ function TypeAnnotation(node, parent) {
|
|
|
46425
46206
|
}
|
|
46426
46207
|
function TypeParameterInstantiation(node) {
|
|
46427
46208
|
this.tokenChar(60);
|
|
46428
|
-
this.printList(node.params
|
|
46209
|
+
this.printList(node.params);
|
|
46429
46210
|
this.tokenChar(62);
|
|
46430
46211
|
}
|
|
46431
46212
|
function TypeParameter(node) {
|
|
@@ -46472,17 +46253,12 @@ function ObjectTypeAnnotation(node) {
|
|
|
46472
46253
|
if (props.length) {
|
|
46473
46254
|
this.newline();
|
|
46474
46255
|
this.space();
|
|
46475
|
-
this.printJoin(props, {
|
|
46476
|
-
|
|
46477
|
-
|
|
46478
|
-
|
|
46479
|
-
|
|
46480
|
-
|
|
46481
|
-
iterator: function() {
|
|
46482
|
-
if (props.length !== 1 || node.inexact) {
|
|
46483
|
-
_this.tokenChar(44);
|
|
46484
|
-
_this.space();
|
|
46485
|
-
}
|
|
46256
|
+
this.printJoin(props, true, true, void 0, void 0, function addNewlines(leading) {
|
|
46257
|
+
if (leading && !props[0]) return 1;
|
|
46258
|
+
}, function() {
|
|
46259
|
+
if (props.length !== 1 || node.inexact) {
|
|
46260
|
+
_this.tokenChar(44);
|
|
46261
|
+
_this.space();
|
|
46486
46262
|
}
|
|
46487
46263
|
});
|
|
46488
46264
|
this.space();
|
|
@@ -46583,9 +46359,7 @@ function orSeparator(occurrenceCount) {
|
|
|
46583
46359
|
this.space();
|
|
46584
46360
|
}
|
|
46585
46361
|
function UnionTypeAnnotation(node) {
|
|
46586
|
-
this.printJoin(node.types,
|
|
46587
|
-
separator: orSeparator
|
|
46588
|
-
});
|
|
46362
|
+
this.printJoin(node.types, void 0, void 0, orSeparator);
|
|
46589
46363
|
}
|
|
46590
46364
|
function TypeCastExpression(node) {
|
|
46591
46365
|
this.tokenChar(40);
|
|
@@ -46632,9 +46406,7 @@ function Program(node) {
|
|
|
46632
46406
|
if (directivesLen) {
|
|
46633
46407
|
var _node_directives__trailingComments;
|
|
46634
46408
|
var newline = node.body.length ? 2 : 1;
|
|
46635
|
-
this.printSequence(node.directives,
|
|
46636
|
-
trailingCommentsLineOffset: newline
|
|
46637
|
-
});
|
|
46409
|
+
this.printSequence(node.directives, void 0, newline);
|
|
46638
46410
|
if (!((_node_directives__trailingComments = node.directives[directivesLen - 1].trailingComments) === null || _node_directives__trailingComments === void 0 ? void 0 : _node_directives__trailingComments.length)) {
|
|
46639
46411
|
this.newline(newline);
|
|
46640
46412
|
}
|
|
@@ -46649,17 +46421,12 @@ function BlockStatement(node) {
|
|
|
46649
46421
|
if (directivesLen) {
|
|
46650
46422
|
var _node_directives__trailingComments;
|
|
46651
46423
|
var newline = node.body.length ? 2 : 1;
|
|
46652
|
-
this.printSequence(node.directives,
|
|
46653
|
-
indent: true,
|
|
46654
|
-
trailingCommentsLineOffset: newline
|
|
46655
|
-
});
|
|
46424
|
+
this.printSequence(node.directives, true, newline);
|
|
46656
46425
|
if (!((_node_directives__trailingComments = node.directives[directivesLen - 1].trailingComments) === null || _node_directives__trailingComments === void 0 ? void 0 : _node_directives__trailingComments.length)) {
|
|
46657
46426
|
this.newline(newline);
|
|
46658
46427
|
}
|
|
46659
46428
|
}
|
|
46660
|
-
this.printSequence(node.body,
|
|
46661
|
-
indent: true
|
|
46662
|
-
});
|
|
46429
|
+
this.printSequence(node.body, true);
|
|
46663
46430
|
exit();
|
|
46664
46431
|
this.rightBrace(node);
|
|
46665
46432
|
}
|
|
@@ -46778,9 +46545,7 @@ function JSXOpeningElement(node) {
|
|
|
46778
46545
|
this.print(node.typeParameters);
|
|
46779
46546
|
if (node.attributes.length > 0) {
|
|
46780
46547
|
this.space();
|
|
46781
|
-
this.printJoin(node.attributes,
|
|
46782
|
-
separator: spaceSeparator
|
|
46783
|
-
});
|
|
46548
|
+
this.printJoin(node.attributes, void 0, void 0, spaceSeparator);
|
|
46784
46549
|
}
|
|
46785
46550
|
if (node.selfClosing) {
|
|
46786
46551
|
this.space();
|
|
@@ -46847,9 +46612,7 @@ function TSTypeParameterInstantiation(node, parent) {
|
|
|
46847
46612
|
}));
|
|
46848
46613
|
printTrailingSeparator || (printTrailingSeparator = this.shouldPrintTrailingComma(">"));
|
|
46849
46614
|
}
|
|
46850
|
-
this.printList(node.params,
|
|
46851
|
-
printTrailingSeparator: printTrailingSeparator
|
|
46852
|
-
});
|
|
46615
|
+
this.printList(node.params, printTrailingSeparator);
|
|
46853
46616
|
this.tokenChar(62);
|
|
46854
46617
|
}
|
|
46855
46618
|
function TSTypeParameter(node) {
|
|
@@ -47036,8 +46799,9 @@ function tsPrintFunctionOrConstructorType(node) {
|
|
|
47036
46799
|
this.print(returnType);
|
|
47037
46800
|
}
|
|
47038
46801
|
function TSTypeReference(node) {
|
|
47039
|
-
|
|
47040
|
-
this.print(node.
|
|
46802
|
+
var typeArguments = node.typeArguments;
|
|
46803
|
+
this.print(node.typeName, !!typeArguments);
|
|
46804
|
+
this.print(typeArguments);
|
|
47041
46805
|
}
|
|
47042
46806
|
function TSTypePredicate(node) {
|
|
47043
46807
|
if (node.asserts) {
|
|
@@ -47063,10 +46827,7 @@ function TSTypeQuery(node) {
|
|
|
47063
46827
|
function TSTypeLiteral(node) {
|
|
47064
46828
|
var _this = this;
|
|
47065
46829
|
printBraced(this, node, function() {
|
|
47066
|
-
return _this.printJoin(node.members,
|
|
47067
|
-
indent: true,
|
|
47068
|
-
statement: true
|
|
47069
|
-
});
|
|
46830
|
+
return _this.printJoin(node.members, true, true);
|
|
47070
46831
|
});
|
|
47071
46832
|
}
|
|
47072
46833
|
function TSArrayType(node) {
|
|
@@ -47076,9 +46837,7 @@ function TSArrayType(node) {
|
|
|
47076
46837
|
}
|
|
47077
46838
|
function TSTupleType(node) {
|
|
47078
46839
|
this.tokenChar(91);
|
|
47079
|
-
this.printList(node.elementTypes,
|
|
47080
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("]")
|
|
47081
|
-
});
|
|
46840
|
+
this.printList(node.elementTypes, this.shouldPrintTrailingComma("]"));
|
|
47082
46841
|
this.tokenChar(93);
|
|
47083
46842
|
}
|
|
47084
46843
|
function TSOptionalType(node) {
|
|
@@ -47109,12 +46868,10 @@ function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
|
|
47109
46868
|
hasLeadingToken = 1;
|
|
47110
46869
|
printer.token(sep);
|
|
47111
46870
|
}
|
|
47112
|
-
printer.printJoin(node.types, {
|
|
47113
|
-
|
|
47114
|
-
|
|
47115
|
-
|
|
47116
|
-
this.space();
|
|
47117
|
-
}
|
|
46871
|
+
printer.printJoin(node.types, void 0, void 0, function(i) {
|
|
46872
|
+
this.space();
|
|
46873
|
+
this.token(sep, null, i + hasLeadingToken);
|
|
46874
|
+
this.space();
|
|
47118
46875
|
});
|
|
47119
46876
|
}
|
|
47120
46877
|
function TSConditionalType(node) {
|
|
@@ -47226,10 +46983,7 @@ function TSInterfaceDeclaration(node) {
|
|
|
47226
46983
|
function TSInterfaceBody(node) {
|
|
47227
46984
|
var _this = this;
|
|
47228
46985
|
printBraced(this, node, function() {
|
|
47229
|
-
return _this.printJoin(node.body,
|
|
47230
|
-
indent: true,
|
|
47231
|
-
statement: true
|
|
47232
|
-
});
|
|
46986
|
+
return _this.printJoin(node.body, true, true);
|
|
47233
46987
|
});
|
|
47234
46988
|
}
|
|
47235
46989
|
function TSTypeAliasDeclaration(node) {
|
|
@@ -47285,11 +47039,7 @@ function TSEnumDeclaration(node) {
|
|
|
47285
47039
|
this.space();
|
|
47286
47040
|
printBraced(this, node, function() {
|
|
47287
47041
|
var _this_shouldPrintTrailingComma;
|
|
47288
|
-
return _this.printList(members,
|
|
47289
|
-
indent: true,
|
|
47290
|
-
statement: true,
|
|
47291
|
-
printTrailingSeparator: (_this_shouldPrintTrailingComma = _this.shouldPrintTrailingComma("}")) !== null && _this_shouldPrintTrailingComma !== void 0 ? _this_shouldPrintTrailingComma : true
|
|
47292
|
-
});
|
|
47042
|
+
return _this.printList(members, (_this_shouldPrintTrailingComma = _this.shouldPrintTrailingComma("}")) !== null && _this_shouldPrintTrailingComma !== void 0 ? _this_shouldPrintTrailingComma : true, true, true);
|
|
47293
47043
|
});
|
|
47294
47044
|
}
|
|
47295
47045
|
function TSEnumMember(node) {
|
|
@@ -47308,30 +47058,24 @@ function TSModuleDeclaration(node) {
|
|
|
47308
47058
|
this.word("declare");
|
|
47309
47059
|
this.space();
|
|
47310
47060
|
}
|
|
47311
|
-
|
|
47312
|
-
|
|
47061
|
+
{
|
|
47062
|
+
if (kind !== "global") {
|
|
47063
|
+
this.word(kind);
|
|
47064
|
+
this.space();
|
|
47065
|
+
}
|
|
47066
|
+
this.print(node.id);
|
|
47067
|
+
if (!node.body) {
|
|
47068
|
+
this.semicolon();
|
|
47069
|
+
return;
|
|
47070
|
+
}
|
|
47313
47071
|
this.space();
|
|
47072
|
+
this.print(node.body);
|
|
47314
47073
|
}
|
|
47315
|
-
this.print(id);
|
|
47316
|
-
if (!node.body) {
|
|
47317
|
-
this.semicolon();
|
|
47318
|
-
return;
|
|
47319
|
-
}
|
|
47320
|
-
var body = node.body;
|
|
47321
|
-
while(body.type === "TSModuleDeclaration"){
|
|
47322
|
-
this.tokenChar(46);
|
|
47323
|
-
this.print(body.id);
|
|
47324
|
-
body = body.body;
|
|
47325
|
-
}
|
|
47326
|
-
this.space();
|
|
47327
|
-
this.print(body);
|
|
47328
47074
|
}
|
|
47329
47075
|
function TSModuleBlock(node) {
|
|
47330
47076
|
var _this = this;
|
|
47331
47077
|
printBraced(this, node, function() {
|
|
47332
|
-
return _this.printSequence(node.body,
|
|
47333
|
-
indent: true
|
|
47334
|
-
});
|
|
47078
|
+
return _this.printSequence(node.body, true);
|
|
47335
47079
|
});
|
|
47336
47080
|
}
|
|
47337
47081
|
function TSImportType(node) {
|
|
@@ -47779,6 +47523,8 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47779
47523
|
__publicField(this, "_indentInnerComments", true);
|
|
47780
47524
|
__publicField(this, "tokenMap", null);
|
|
47781
47525
|
__publicField(this, "_boundGetRawIdentifier", this._getRawIdentifier.bind(this));
|
|
47526
|
+
__publicField(this, "_printSemicolonBeforeNextNode", -1);
|
|
47527
|
+
__publicField(this, "_printSemicolonBeforeNextToken", -1);
|
|
47782
47528
|
this.format = format;
|
|
47783
47529
|
this._tokens = tokens;
|
|
47784
47530
|
this._originalCode = originalCode;
|
|
@@ -47860,6 +47606,7 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47860
47606
|
var node = this._currentNode;
|
|
47861
47607
|
if (node.start != null && node.end != null) {
|
|
47862
47608
|
if (!this.tokenMap.endMatches(node, ";")) {
|
|
47609
|
+
this._printSemicolonBeforeNextNode = this._buf.getCurrentLine();
|
|
47863
47610
|
return;
|
|
47864
47611
|
}
|
|
47865
47612
|
var indexes = this.tokenMap.getIndexes(this._currentNode);
|
|
@@ -47909,10 +47656,11 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47909
47656
|
var noLineTerminatorAfter = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
47910
47657
|
this.tokenContext = 0;
|
|
47911
47658
|
this._maybePrintInnerComments(str);
|
|
47659
|
+
this._maybeAddAuxComment();
|
|
47660
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str);
|
|
47912
47661
|
if (this._endsWithWord || this._endsWithDiv && str.charCodeAt(0) === 47) {
|
|
47913
47662
|
this._space();
|
|
47914
47663
|
}
|
|
47915
|
-
this._maybeAddAuxComment();
|
|
47916
47664
|
this._append(str, false);
|
|
47917
47665
|
this._endsWithWord = true;
|
|
47918
47666
|
this._noLineTerminator = noLineTerminatorAfter;
|
|
@@ -47938,13 +47686,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47938
47686
|
var maybeNewline = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, occurrenceCount = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
47939
47687
|
this.tokenContext = 0;
|
|
47940
47688
|
this._maybePrintInnerComments(str, occurrenceCount);
|
|
47689
|
+
this._maybeAddAuxComment();
|
|
47690
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str, occurrenceCount);
|
|
47941
47691
|
var lastChar = this.getLastChar();
|
|
47942
47692
|
var strFirst = str.charCodeAt(0);
|
|
47943
47693
|
if (lastChar === 33 && (str === "--" || strFirst === 61) || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) {
|
|
47944
47694
|
this._space();
|
|
47945
47695
|
}
|
|
47946
|
-
this.
|
|
47947
|
-
this._append(str, maybeNewline, occurrenceCount);
|
|
47696
|
+
this._append(str, maybeNewline);
|
|
47948
47697
|
this._noLineTerminator = false;
|
|
47949
47698
|
}
|
|
47950
47699
|
},
|
|
@@ -47952,12 +47701,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47952
47701
|
key: "tokenChar",
|
|
47953
47702
|
value: function tokenChar(char) {
|
|
47954
47703
|
this.tokenContext = 0;
|
|
47955
|
-
|
|
47704
|
+
var str = String.fromCharCode(char);
|
|
47705
|
+
this._maybePrintInnerComments(str);
|
|
47706
|
+
this._maybeAddAuxComment();
|
|
47707
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str);
|
|
47956
47708
|
var lastChar = this.getLastChar();
|
|
47957
47709
|
if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) {
|
|
47958
47710
|
this._space();
|
|
47959
47711
|
}
|
|
47960
|
-
this._maybeAddAuxComment();
|
|
47961
47712
|
this._appendChar(char);
|
|
47962
47713
|
this._noLineTerminator = false;
|
|
47963
47714
|
}
|
|
@@ -48054,14 +47805,25 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48054
47805
|
this._queue(10);
|
|
48055
47806
|
}
|
|
48056
47807
|
},
|
|
47808
|
+
{
|
|
47809
|
+
key: "_catchUpToCurrentToken",
|
|
47810
|
+
value: function _catchUpToCurrentToken(str) {
|
|
47811
|
+
var occurrenceCount = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
47812
|
+
var token = this.tokenMap.findMatching(this._currentNode, str, occurrenceCount);
|
|
47813
|
+
if (token) this._catchUpTo(token.loc.start);
|
|
47814
|
+
if (this._printSemicolonBeforeNextToken !== -1 && this._printSemicolonBeforeNextToken === this._buf.getCurrentLine()) {
|
|
47815
|
+
this._buf.appendChar(59);
|
|
47816
|
+
this._endsWithWord = false;
|
|
47817
|
+
this._endsWithInteger = false;
|
|
47818
|
+
this._endsWithDiv = false;
|
|
47819
|
+
}
|
|
47820
|
+
this._printSemicolonBeforeNextToken = -1;
|
|
47821
|
+
this._printSemicolonBeforeNextNode = -1;
|
|
47822
|
+
}
|
|
47823
|
+
},
|
|
48057
47824
|
{
|
|
48058
47825
|
key: "_append",
|
|
48059
47826
|
value: function _append(str, maybeNewline) {
|
|
48060
|
-
var occurrenceCount = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
48061
|
-
if (this.tokenMap) {
|
|
48062
|
-
var token = this.tokenMap.findMatching(this._currentNode, str, occurrenceCount);
|
|
48063
|
-
if (token) this._catchUpTo(token.loc.start);
|
|
48064
|
-
}
|
|
48065
47827
|
this._maybeIndent(str.charCodeAt(0));
|
|
48066
47828
|
this._buf.append(str, maybeNewline);
|
|
48067
47829
|
this._endsWithWord = false;
|
|
@@ -48072,10 +47834,6 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48072
47834
|
{
|
|
48073
47835
|
key: "_appendChar",
|
|
48074
47836
|
value: function _appendChar(char) {
|
|
48075
|
-
if (this.tokenMap) {
|
|
48076
|
-
var token = this.tokenMap.findMatching(this._currentNode, String.fromCharCode(char));
|
|
48077
|
-
if (token) this._catchUpTo(token.loc.start);
|
|
48078
|
-
}
|
|
48079
47837
|
this._maybeIndent(char);
|
|
48080
47838
|
this._buf.appendChar(char);
|
|
48081
47839
|
this._endsWithWord = false;
|
|
@@ -48181,6 +47939,9 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48181
47939
|
}
|
|
48182
47940
|
var parent = this._currentNode;
|
|
48183
47941
|
this._currentNode = node;
|
|
47942
|
+
if (this.tokenMap) {
|
|
47943
|
+
this._printSemicolonBeforeNextToken = this._printSemicolonBeforeNextNode;
|
|
47944
|
+
}
|
|
48184
47945
|
var oldInAux = this._insideAux;
|
|
48185
47946
|
this._insideAux = node.loc == null;
|
|
48186
47947
|
this._maybeAddAuxComment(this._insideAux && !oldInAux);
|
|
@@ -48306,10 +48067,8 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48306
48067
|
},
|
|
48307
48068
|
{
|
|
48308
48069
|
key: "printJoin",
|
|
48309
|
-
value: function printJoin(nodes2) {
|
|
48310
|
-
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
48070
|
+
value: function printJoin(nodes2, statement2, indent, separator, printTrailingSeparator, addNewlines, iterator, trailingCommentsLineOffset) {
|
|
48311
48071
|
if (!(nodes2 === null || nodes2 === void 0 ? void 0 : nodes2.length)) return;
|
|
48312
|
-
var indent = opts.indent;
|
|
48313
48072
|
if (indent == null && this.format.retainLines) {
|
|
48314
48073
|
var _nodes2__loc;
|
|
48315
48074
|
var startLine = (_nodes2__loc = nodes2[0].loc) === null || _nodes2__loc === void 0 ? void 0 : _nodes2__loc.start.line;
|
|
@@ -48319,23 +48078,22 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48319
48078
|
}
|
|
48320
48079
|
if (indent) this.indent();
|
|
48321
48080
|
var newlineOpts = {
|
|
48322
|
-
addNewlines:
|
|
48081
|
+
addNewlines: addNewlines,
|
|
48323
48082
|
nextNodeStartLine: 0
|
|
48324
48083
|
};
|
|
48325
|
-
var
|
|
48084
|
+
var boundSeparator = separator === null || separator === void 0 ? void 0 : separator.bind(this);
|
|
48326
48085
|
var len = nodes2.length;
|
|
48327
48086
|
for(var i = 0; i < len; i++){
|
|
48328
|
-
var _opts_iterator;
|
|
48329
48087
|
var node = nodes2[i];
|
|
48330
48088
|
if (!node) continue;
|
|
48331
|
-
if (
|
|
48332
|
-
this.print(node, void 0,
|
|
48333
|
-
|
|
48334
|
-
if (
|
|
48335
|
-
if (i < len - 1)
|
|
48336
|
-
else if (
|
|
48337
|
-
}
|
|
48338
|
-
if (
|
|
48089
|
+
if (statement2) this._printNewline(i === 0, newlineOpts);
|
|
48090
|
+
this.print(node, void 0, trailingCommentsLineOffset || 0);
|
|
48091
|
+
iterator === null || iterator === void 0 ? void 0 : iterator(node, i);
|
|
48092
|
+
if (boundSeparator != null) {
|
|
48093
|
+
if (i < len - 1) boundSeparator(i, false);
|
|
48094
|
+
else if (printTrailingSeparator) boundSeparator(i, true);
|
|
48095
|
+
}
|
|
48096
|
+
if (statement2) {
|
|
48339
48097
|
var _node_trailingComments;
|
|
48340
48098
|
if (!((_node_trailingComments = node.trailingComments) === null || _node_trailingComments === void 0 ? void 0 : _node_trailingComments.length)) {
|
|
48341
48099
|
this._lastCommentLine = 0;
|
|
@@ -48428,22 +48186,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48428
48186
|
},
|
|
48429
48187
|
{
|
|
48430
48188
|
key: "printSequence",
|
|
48431
|
-
value: function printSequence(nodes2) {
|
|
48432
|
-
|
|
48433
|
-
opts.statement = true;
|
|
48434
|
-
var _opts_indent;
|
|
48435
|
-
(_opts_indent = opts.indent) !== null && _opts_indent !== void 0 ? _opts_indent : opts.indent = false;
|
|
48436
|
-
this.printJoin(nodes2, opts);
|
|
48189
|
+
value: function printSequence(nodes2, indent, trailingCommentsLineOffset, addNewlines) {
|
|
48190
|
+
this.printJoin(nodes2, true, indent !== null && indent !== void 0 ? indent : false, void 0, void 0, addNewlines, void 0, trailingCommentsLineOffset);
|
|
48437
48191
|
}
|
|
48438
48192
|
},
|
|
48439
48193
|
{
|
|
48440
48194
|
key: "printList",
|
|
48441
|
-
value: function printList(items) {
|
|
48442
|
-
|
|
48443
|
-
if (opts.separator == null) {
|
|
48444
|
-
opts.separator = commaSeparator;
|
|
48445
|
-
}
|
|
48446
|
-
this.printJoin(items, opts);
|
|
48195
|
+
value: function printList(items, printTrailingSeparator, statement2, indent, separator, iterator) {
|
|
48196
|
+
this.printJoin(items, statement2, indent, separator !== null && separator !== void 0 ? separator : commaSeparator, printTrailingSeparator, void 0, iterator);
|
|
48447
48197
|
}
|
|
48448
48198
|
},
|
|
48449
48199
|
{
|
|
@@ -48546,8 +48296,18 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48546
48296
|
val = "/*".concat(comment.value, "*/");
|
|
48547
48297
|
}
|
|
48548
48298
|
if (this._endsWithDiv) this._space();
|
|
48549
|
-
this.
|
|
48550
|
-
|
|
48299
|
+
if (this.tokenMap) {
|
|
48300
|
+
var _this = this, _printSemicolonBeforeNextToken = _this._printSemicolonBeforeNextToken, _printSemicolonBeforeNextNode = _this._printSemicolonBeforeNextNode;
|
|
48301
|
+
this._printSemicolonBeforeNextToken = -1;
|
|
48302
|
+
this._printSemicolonBeforeNextNode = -1;
|
|
48303
|
+
this.source("start", comment.loc);
|
|
48304
|
+
this._append(val, isBlockComment);
|
|
48305
|
+
this._printSemicolonBeforeNextNode = _printSemicolonBeforeNextNode;
|
|
48306
|
+
this._printSemicolonBeforeNextToken = _printSemicolonBeforeNextToken;
|
|
48307
|
+
} else {
|
|
48308
|
+
this.source("start", comment.loc);
|
|
48309
|
+
this._append(val, isBlockComment);
|
|
48310
|
+
}
|
|
48551
48311
|
if (!isBlockComment && !noLineTerminator) {
|
|
48552
48312
|
this.newline(1, true);
|
|
48553
48313
|
}
|
|
@@ -49137,7 +48897,7 @@ function verify$1(visitor) {
|
|
|
49137
48897
|
}
|
|
49138
48898
|
if (shouldIgnoreKey(nodeType)) continue;
|
|
49139
48899
|
if (!TYPES2.includes(nodeType)) {
|
|
49140
|
-
throw new Error("You gave us a visitor for the node type ".concat(nodeType, " but it's not a valid type in @babel/traverse ", "8.0.0-alpha.
|
|
48900
|
+
throw new Error("You gave us a visitor for the node type ".concat(nodeType, " but it's not a valid type in @babel/traverse ", "8.0.0-alpha.14"));
|
|
49141
48901
|
}
|
|
49142
48902
|
var visitors2 = visitor[nodeType];
|
|
49143
48903
|
if ((typeof visitors2 === "undefined" ? "undefined" : _type_of(visitors2)) === "object") {
|
|
@@ -50539,8 +50299,14 @@ var _Scope = /*#__PURE__*/ function() {
|
|
|
50539
50299
|
this.globals = /* @__PURE__ */ Object.create(null);
|
|
50540
50300
|
this.uids = /* @__PURE__ */ Object.create(null);
|
|
50541
50301
|
this.data = /* @__PURE__ */ Object.create(null);
|
|
50542
|
-
var
|
|
50543
|
-
|
|
50302
|
+
var scope2 = this;
|
|
50303
|
+
do {
|
|
50304
|
+
if (scope2.crawling) return;
|
|
50305
|
+
if (scope2.path.isProgram()) {
|
|
50306
|
+
break;
|
|
50307
|
+
}
|
|
50308
|
+
}while (scope2 = scope2.parent);
|
|
50309
|
+
var programParent = scope2;
|
|
50544
50310
|
var state = {
|
|
50545
50311
|
references: [],
|
|
50546
50312
|
constantViolations: [],
|