@putout/babel 2.9.0 → 2.10.0
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/README.md +1 -1
- package/bundle/index.d.ts +7 -8
- package/bundle/index.js +576 -820
- package/package.json +8 -8
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;
|
|
@@ -1802,49 +1802,114 @@ var require_common = __commonJS({
|
|
|
1802
1802
|
createDebug.namespaces = namespaces;
|
|
1803
1803
|
createDebug.names = [];
|
|
1804
1804
|
createDebug.skips = [];
|
|
1805
|
-
var
|
|
1806
|
-
var
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1805
|
+
var split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
1806
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1807
|
+
try {
|
|
1808
|
+
for(var _iterator = split[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1809
|
+
var ns = _step.value;
|
|
1810
|
+
if (ns[0] === "-") {
|
|
1811
|
+
createDebug.skips.push(ns.slice(1));
|
|
1812
|
+
} else {
|
|
1813
|
+
createDebug.names.push(ns);
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
} catch (err) {
|
|
1817
|
+
_didIteratorError = true;
|
|
1818
|
+
_iteratorError = err;
|
|
1819
|
+
} finally{
|
|
1820
|
+
try {
|
|
1821
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1822
|
+
_iterator.return();
|
|
1823
|
+
}
|
|
1824
|
+
} finally{
|
|
1825
|
+
if (_didIteratorError) {
|
|
1826
|
+
throw _iteratorError;
|
|
1827
|
+
}
|
|
1811
1828
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
function matchesTemplate(search, template1) {
|
|
1832
|
+
var searchIndex = 0;
|
|
1833
|
+
var templateIndex = 0;
|
|
1834
|
+
var starIndex = -1;
|
|
1835
|
+
var matchIndex = 0;
|
|
1836
|
+
while(searchIndex < search.length){
|
|
1837
|
+
if (templateIndex < template1.length && (template1[templateIndex] === search[searchIndex] || template1[templateIndex] === "*")) {
|
|
1838
|
+
if (template1[templateIndex] === "*") {
|
|
1839
|
+
starIndex = templateIndex;
|
|
1840
|
+
matchIndex = searchIndex;
|
|
1841
|
+
templateIndex++;
|
|
1842
|
+
} else {
|
|
1843
|
+
searchIndex++;
|
|
1844
|
+
templateIndex++;
|
|
1845
|
+
}
|
|
1846
|
+
} else if (starIndex !== -1) {
|
|
1847
|
+
templateIndex = starIndex + 1;
|
|
1848
|
+
matchIndex++;
|
|
1849
|
+
searchIndex = matchIndex;
|
|
1815
1850
|
} else {
|
|
1816
|
-
|
|
1851
|
+
return false;
|
|
1817
1852
|
}
|
|
1818
1853
|
}
|
|
1854
|
+
while(templateIndex < template1.length && template1[templateIndex] === "*"){
|
|
1855
|
+
templateIndex++;
|
|
1856
|
+
}
|
|
1857
|
+
return templateIndex === template1.length;
|
|
1819
1858
|
}
|
|
1820
1859
|
function disable() {
|
|
1821
|
-
var namespaces = _to_consumable_array(createDebug.names
|
|
1860
|
+
var namespaces = _to_consumable_array(createDebug.names).concat(_to_consumable_array(createDebug.skips.map(function(namespace) {
|
|
1822
1861
|
return "-" + namespace;
|
|
1823
1862
|
}))).join(",");
|
|
1824
1863
|
createDebug.enable("");
|
|
1825
1864
|
return namespaces;
|
|
1826
1865
|
}
|
|
1827
1866
|
function enabled(name) {
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1867
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1868
|
+
try {
|
|
1869
|
+
for(var _iterator = createDebug.skips[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1870
|
+
var skip2 = _step.value;
|
|
1871
|
+
if (matchesTemplate(name, skip2)) {
|
|
1872
|
+
return false;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
} catch (err) {
|
|
1876
|
+
_didIteratorError = true;
|
|
1877
|
+
_iteratorError = err;
|
|
1878
|
+
} finally{
|
|
1879
|
+
try {
|
|
1880
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1881
|
+
_iterator.return();
|
|
1882
|
+
}
|
|
1883
|
+
} finally{
|
|
1884
|
+
if (_didIteratorError) {
|
|
1885
|
+
throw _iteratorError;
|
|
1886
|
+
}
|
|
1836
1887
|
}
|
|
1837
1888
|
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1889
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
1890
|
+
try {
|
|
1891
|
+
for(var _iterator1 = createDebug.names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
1892
|
+
var ns = _step1.value;
|
|
1893
|
+
if (matchesTemplate(name, ns)) {
|
|
1894
|
+
return true;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
} catch (err) {
|
|
1898
|
+
_didIteratorError1 = true;
|
|
1899
|
+
_iteratorError1 = err;
|
|
1900
|
+
} finally{
|
|
1901
|
+
try {
|
|
1902
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
1903
|
+
_iterator1.return();
|
|
1904
|
+
}
|
|
1905
|
+
} finally{
|
|
1906
|
+
if (_didIteratorError1) {
|
|
1907
|
+
throw _iteratorError1;
|
|
1908
|
+
}
|
|
1841
1909
|
}
|
|
1842
1910
|
}
|
|
1843
1911
|
return false;
|
|
1844
1912
|
}
|
|
1845
|
-
function toNamespace(regexp) {
|
|
1846
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
1847
|
-
}
|
|
1848
1913
|
function coerce(val) {
|
|
1849
1914
|
if (_instanceof(val, Error)) {
|
|
1850
1915
|
return val.stack || val.message;
|
|
@@ -2029,12 +2094,12 @@ var require_browser = __commonJS({
|
|
|
2029
2094
|
var require_has_flag = __commonJS({
|
|
2030
2095
|
"node_modules/has-flag/index.js": function(exports2, module2) {
|
|
2031
2096
|
"use strict";
|
|
2032
|
-
module2.exports = function(flag) {
|
|
2033
|
-
|
|
2097
|
+
module2.exports = function(flag, argv) {
|
|
2098
|
+
argv = argv || process.argv;
|
|
2034
2099
|
var prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2035
|
-
var
|
|
2036
|
-
var
|
|
2037
|
-
return
|
|
2100
|
+
var pos = argv.indexOf(prefix2 + flag);
|
|
2101
|
+
var terminatorPos = argv.indexOf("--");
|
|
2102
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
2038
2103
|
};
|
|
2039
2104
|
}
|
|
2040
2105
|
});
|
|
@@ -2043,23 +2108,16 @@ var require_supports_color = __commonJS({
|
|
|
2043
2108
|
"node_modules/supports-color/index.js": function(exports2, module2) {
|
|
2044
2109
|
"use strict";
|
|
2045
2110
|
var os = require("os");
|
|
2046
|
-
var tty = require("tty");
|
|
2047
2111
|
var hasFlag = require_has_flag();
|
|
2048
2112
|
var env = process.env;
|
|
2049
2113
|
var forceColor;
|
|
2050
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")
|
|
2051
|
-
forceColor =
|
|
2114
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
2115
|
+
forceColor = false;
|
|
2052
2116
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2053
|
-
forceColor =
|
|
2117
|
+
forceColor = true;
|
|
2054
2118
|
}
|
|
2055
2119
|
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
|
-
}
|
|
2120
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
2063
2121
|
}
|
|
2064
2122
|
function translateLevel(level) {
|
|
2065
2123
|
if (level === 0) {
|
|
@@ -2072,8 +2130,8 @@ var require_supports_color = __commonJS({
|
|
|
2072
2130
|
has16m: level >= 3
|
|
2073
2131
|
};
|
|
2074
2132
|
}
|
|
2075
|
-
function supportsColor(
|
|
2076
|
-
if (forceColor ===
|
|
2133
|
+
function supportsColor(stream) {
|
|
2134
|
+
if (forceColor === false) {
|
|
2077
2135
|
return 0;
|
|
2078
2136
|
}
|
|
2079
2137
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
@@ -2082,16 +2140,13 @@ var require_supports_color = __commonJS({
|
|
|
2082
2140
|
if (hasFlag("color=256")) {
|
|
2083
2141
|
return 2;
|
|
2084
2142
|
}
|
|
2085
|
-
if (
|
|
2143
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
2086
2144
|
return 0;
|
|
2087
2145
|
}
|
|
2088
|
-
var min = forceColor
|
|
2089
|
-
if (env.TERM === "dumb") {
|
|
2090
|
-
return min;
|
|
2091
|
-
}
|
|
2146
|
+
var min = forceColor ? 1 : 0;
|
|
2092
2147
|
if (process.platform === "win32") {
|
|
2093
2148
|
var osRelease = os.release().split(".");
|
|
2094
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2149
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2095
2150
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2096
2151
|
}
|
|
2097
2152
|
return 1;
|
|
@@ -2101,9 +2156,7 @@ var require_supports_color = __commonJS({
|
|
|
2101
2156
|
"TRAVIS",
|
|
2102
2157
|
"CIRCLECI",
|
|
2103
2158
|
"APPVEYOR",
|
|
2104
|
-
"GITLAB_CI"
|
|
2105
|
-
"GITHUB_ACTIONS",
|
|
2106
|
-
"BUILDKITE"
|
|
2159
|
+
"GITLAB_CI"
|
|
2107
2160
|
].some(function(sign) {
|
|
2108
2161
|
return sign in env;
|
|
2109
2162
|
}) || env.CI_NAME === "codeship") {
|
|
@@ -2135,16 +2188,19 @@ var require_supports_color = __commonJS({
|
|
|
2135
2188
|
if ("COLORTERM" in env) {
|
|
2136
2189
|
return 1;
|
|
2137
2190
|
}
|
|
2191
|
+
if (env.TERM === "dumb") {
|
|
2192
|
+
return min;
|
|
2193
|
+
}
|
|
2138
2194
|
return min;
|
|
2139
2195
|
}
|
|
2140
2196
|
function getSupportLevel(stream) {
|
|
2141
|
-
var level = supportsColor(stream
|
|
2197
|
+
var level = supportsColor(stream);
|
|
2142
2198
|
return translateLevel(level);
|
|
2143
2199
|
}
|
|
2144
2200
|
module2.exports = {
|
|
2145
2201
|
supportsColor: getSupportLevel,
|
|
2146
|
-
stdout:
|
|
2147
|
-
stderr:
|
|
2202
|
+
stdout: getSupportLevel(process.stdout),
|
|
2203
|
+
stderr: getSupportLevel(process.stderr)
|
|
2148
2204
|
};
|
|
2149
2205
|
}
|
|
2150
2206
|
});
|
|
@@ -2504,6 +2560,7 @@ var require_globals = __commonJS({
|
|
|
2504
2560
|
CSSKeywordValue: false,
|
|
2505
2561
|
CSSLayerBlockRule: false,
|
|
2506
2562
|
CSSLayerStatementRule: false,
|
|
2563
|
+
CSSMarginRule: false,
|
|
2507
2564
|
CSSMathClamp: false,
|
|
2508
2565
|
CSSMathInvert: false,
|
|
2509
2566
|
CSSMathMax: false,
|
|
@@ -2515,6 +2572,7 @@ var require_globals = __commonJS({
|
|
|
2515
2572
|
CSSMatrixComponent: false,
|
|
2516
2573
|
CSSMediaRule: false,
|
|
2517
2574
|
CSSNamespaceRule: false,
|
|
2575
|
+
CSSNestedDeclarations: false,
|
|
2518
2576
|
CSSNumericArray: false,
|
|
2519
2577
|
CSSNumericValue: false,
|
|
2520
2578
|
CSSPageDescriptors: false,
|
|
@@ -2815,7 +2873,6 @@ var require_globals = __commonJS({
|
|
|
2815
2873
|
IntersectionObserver: false,
|
|
2816
2874
|
IntersectionObserverEntry: false,
|
|
2817
2875
|
isSecureContext: false,
|
|
2818
|
-
Iterator: false,
|
|
2819
2876
|
Keyboard: false,
|
|
2820
2877
|
KeyboardEvent: false,
|
|
2821
2878
|
KeyboardLayoutMap: false,
|
|
@@ -3469,12 +3526,15 @@ var require_globals = __commonJS({
|
|
|
3469
3526
|
XRDepthInformation: false,
|
|
3470
3527
|
XRDOMOverlayState: false,
|
|
3471
3528
|
XRFrame: false,
|
|
3529
|
+
XRHand: false,
|
|
3472
3530
|
XRHitTestResult: false,
|
|
3473
3531
|
XRHitTestSource: false,
|
|
3474
3532
|
XRInputSource: false,
|
|
3475
3533
|
XRInputSourceArray: false,
|
|
3476
3534
|
XRInputSourceEvent: false,
|
|
3477
3535
|
XRInputSourcesChangeEvent: false,
|
|
3536
|
+
XRJointPose: false,
|
|
3537
|
+
XRJointSpace: false,
|
|
3478
3538
|
XRLayer: false,
|
|
3479
3539
|
XRLightEstimate: false,
|
|
3480
3540
|
XRLightProbe: false,
|
|
@@ -3529,6 +3589,7 @@ var require_globals = __commonJS({
|
|
|
3529
3589
|
Intl: false,
|
|
3530
3590
|
isFinite: false,
|
|
3531
3591
|
isNaN: false,
|
|
3592
|
+
Iterator: false,
|
|
3532
3593
|
JSON: false,
|
|
3533
3594
|
Map: false,
|
|
3534
3595
|
Math: false,
|
|
@@ -4240,6 +4301,7 @@ var require_globals = __commonJS({
|
|
|
4240
4301
|
Intl: false,
|
|
4241
4302
|
isFinite: false,
|
|
4242
4303
|
isNaN: false,
|
|
4304
|
+
Iterator: false,
|
|
4243
4305
|
JSON: false,
|
|
4244
4306
|
Map: false,
|
|
4245
4307
|
Math: false,
|
|
@@ -4539,6 +4601,7 @@ var require_globals = __commonJS({
|
|
|
4539
4601
|
clearImmediate: false,
|
|
4540
4602
|
clearInterval: false,
|
|
4541
4603
|
clearTimeout: false,
|
|
4604
|
+
CloseEvent: false,
|
|
4542
4605
|
CompressionStream: false,
|
|
4543
4606
|
console: false,
|
|
4544
4607
|
CountQueuingStrategy: false,
|
|
@@ -4556,7 +4619,6 @@ var require_globals = __commonJS({
|
|
|
4556
4619
|
FormData: false,
|
|
4557
4620
|
global: false,
|
|
4558
4621
|
Headers: false,
|
|
4559
|
-
Iterator: false,
|
|
4560
4622
|
MessageChannel: false,
|
|
4561
4623
|
MessageEvent: false,
|
|
4562
4624
|
MessagePort: false,
|
|
@@ -4613,6 +4675,7 @@ var require_globals = __commonJS({
|
|
|
4613
4675
|
clearImmediate: false,
|
|
4614
4676
|
clearInterval: false,
|
|
4615
4677
|
clearTimeout: false,
|
|
4678
|
+
CloseEvent: false,
|
|
4616
4679
|
CompressionStream: false,
|
|
4617
4680
|
console: false,
|
|
4618
4681
|
CountQueuingStrategy: false,
|
|
@@ -4629,7 +4692,6 @@ var require_globals = __commonJS({
|
|
|
4629
4692
|
FormData: false,
|
|
4630
4693
|
global: false,
|
|
4631
4694
|
Headers: false,
|
|
4632
|
-
Iterator: false,
|
|
4633
4695
|
MessageChannel: false,
|
|
4634
4696
|
MessageEvent: false,
|
|
4635
4697
|
MessagePort: false,
|
|
@@ -4906,6 +4968,7 @@ var require_globals = __commonJS({
|
|
|
4906
4968
|
ByteLengthQueuingStrategy: false,
|
|
4907
4969
|
clearInterval: false,
|
|
4908
4970
|
clearTimeout: false,
|
|
4971
|
+
CloseEvent: false,
|
|
4909
4972
|
CompressionStream: false,
|
|
4910
4973
|
console: false,
|
|
4911
4974
|
CountQueuingStrategy: false,
|
|
@@ -4921,7 +4984,6 @@ var require_globals = __commonJS({
|
|
|
4921
4984
|
File: false,
|
|
4922
4985
|
FormData: false,
|
|
4923
4986
|
Headers: false,
|
|
4924
|
-
Iterator: false,
|
|
4925
4987
|
MessageChannel: false,
|
|
4926
4988
|
MessageEvent: false,
|
|
4927
4989
|
MessagePort: false,
|
|
@@ -5112,6 +5174,10 @@ var require_globals = __commonJS({
|
|
|
5112
5174
|
GPUUncapturedErrorEvent: false,
|
|
5113
5175
|
GPUValidationError: false,
|
|
5114
5176
|
Headers: false,
|
|
5177
|
+
HID: false,
|
|
5178
|
+
HIDConnectionEvent: false,
|
|
5179
|
+
HIDDevice: false,
|
|
5180
|
+
HIDInputReportEvent: false,
|
|
5115
5181
|
IDBCursor: false,
|
|
5116
5182
|
IDBCursorWithValue: false,
|
|
5117
5183
|
IDBDatabase: false,
|
|
@@ -5133,7 +5199,6 @@ var require_globals = __commonJS({
|
|
|
5133
5199
|
importScripts: false,
|
|
5134
5200
|
indexedDB: false,
|
|
5135
5201
|
isSecureContext: false,
|
|
5136
|
-
Iterator: false,
|
|
5137
5202
|
location: false,
|
|
5138
5203
|
Lock: false,
|
|
5139
5204
|
LockManager: false,
|
|
@@ -5193,6 +5258,7 @@ var require_globals = __commonJS({
|
|
|
5193
5258
|
Request: false,
|
|
5194
5259
|
requestAnimationFrame: false,
|
|
5195
5260
|
Response: false,
|
|
5261
|
+
RTCDataChannel: false,
|
|
5196
5262
|
RTCEncodedAudioFrame: false,
|
|
5197
5263
|
RTCEncodedVideoFrame: false,
|
|
5198
5264
|
scheduler: false,
|
|
@@ -5508,9 +5574,6 @@ __export(lib_exports, {
|
|
|
5508
5574
|
DebuggerStatement: function() {
|
|
5509
5575
|
return debuggerStatement;
|
|
5510
5576
|
},
|
|
5511
|
-
DecimalLiteral: function() {
|
|
5512
|
-
return decimalLiteral;
|
|
5513
|
-
},
|
|
5514
5577
|
DeclareClass: function() {
|
|
5515
5578
|
return declareClass;
|
|
5516
5579
|
},
|
|
@@ -5862,9 +5925,6 @@ __export(lib_exports, {
|
|
|
5862
5925
|
NewExpression: function() {
|
|
5863
5926
|
return newExpression;
|
|
5864
5927
|
},
|
|
5865
|
-
Noop: function() {
|
|
5866
|
-
return noop;
|
|
5867
|
-
},
|
|
5868
5928
|
NullLiteral: function() {
|
|
5869
5929
|
return nullLiteral;
|
|
5870
5930
|
},
|
|
@@ -6069,6 +6129,9 @@ __export(lib_exports, {
|
|
|
6069
6129
|
TSCallSignatureDeclaration: function() {
|
|
6070
6130
|
return tsCallSignatureDeclaration;
|
|
6071
6131
|
},
|
|
6132
|
+
TSClassImplements: function() {
|
|
6133
|
+
return tsClassImplements;
|
|
6134
|
+
},
|
|
6072
6135
|
TSConditionalType: function() {
|
|
6073
6136
|
return tsConditionalType;
|
|
6074
6137
|
},
|
|
@@ -6096,9 +6159,6 @@ __export(lib_exports, {
|
|
|
6096
6159
|
TSExportAssignment: function() {
|
|
6097
6160
|
return tsExportAssignment;
|
|
6098
6161
|
},
|
|
6099
|
-
TSExpressionWithTypeArguments: function() {
|
|
6100
|
-
return tsExpressionWithTypeArguments;
|
|
6101
|
-
},
|
|
6102
6162
|
TSExternalModuleReference: function() {
|
|
6103
6163
|
return tsExternalModuleReference;
|
|
6104
6164
|
},
|
|
@@ -6129,6 +6189,9 @@ __export(lib_exports, {
|
|
|
6129
6189
|
TSInterfaceDeclaration: function() {
|
|
6130
6190
|
return tsInterfaceDeclaration;
|
|
6131
6191
|
},
|
|
6192
|
+
TSInterfaceHeritage: function() {
|
|
6193
|
+
return tsInterfaceHeritage;
|
|
6194
|
+
},
|
|
6132
6195
|
TSIntersectionType: function() {
|
|
6133
6196
|
return tsIntersectionType;
|
|
6134
6197
|
},
|
|
@@ -6507,9 +6570,6 @@ __export(lib_exports, {
|
|
|
6507
6570
|
assertDebuggerStatement: function() {
|
|
6508
6571
|
return assertDebuggerStatement;
|
|
6509
6572
|
},
|
|
6510
|
-
assertDecimalLiteral: function() {
|
|
6511
|
-
return assertDecimalLiteral;
|
|
6512
|
-
},
|
|
6513
6573
|
assertDeclaration: function() {
|
|
6514
6574
|
return assertDeclaration;
|
|
6515
6575
|
},
|
|
@@ -6834,9 +6894,6 @@ __export(lib_exports, {
|
|
|
6834
6894
|
assertNode: function() {
|
|
6835
6895
|
return assertNode;
|
|
6836
6896
|
},
|
|
6837
|
-
assertNoop: function() {
|
|
6838
|
-
return assertNoop;
|
|
6839
|
-
},
|
|
6840
6897
|
assertNullLiteral: function() {
|
|
6841
6898
|
return assertNullLiteral;
|
|
6842
6899
|
},
|
|
@@ -7023,6 +7080,9 @@ __export(lib_exports, {
|
|
|
7023
7080
|
assertTSCallSignatureDeclaration: function() {
|
|
7024
7081
|
return assertTSCallSignatureDeclaration;
|
|
7025
7082
|
},
|
|
7083
|
+
assertTSClassImplements: function() {
|
|
7084
|
+
return assertTSClassImplements;
|
|
7085
|
+
},
|
|
7026
7086
|
assertTSConditionalType: function() {
|
|
7027
7087
|
return assertTSConditionalType;
|
|
7028
7088
|
},
|
|
@@ -7050,9 +7110,6 @@ __export(lib_exports, {
|
|
|
7050
7110
|
assertTSExportAssignment: function() {
|
|
7051
7111
|
return assertTSExportAssignment;
|
|
7052
7112
|
},
|
|
7053
|
-
assertTSExpressionWithTypeArguments: function() {
|
|
7054
|
-
return assertTSExpressionWithTypeArguments;
|
|
7055
|
-
},
|
|
7056
7113
|
assertTSExternalModuleReference: function() {
|
|
7057
7114
|
return assertTSExternalModuleReference;
|
|
7058
7115
|
},
|
|
@@ -7083,6 +7140,9 @@ __export(lib_exports, {
|
|
|
7083
7140
|
assertTSInterfaceDeclaration: function() {
|
|
7084
7141
|
return assertTSInterfaceDeclaration;
|
|
7085
7142
|
},
|
|
7143
|
+
assertTSInterfaceHeritage: function() {
|
|
7144
|
+
return assertTSInterfaceHeritage;
|
|
7145
|
+
},
|
|
7086
7146
|
assertTSIntersectionType: function() {
|
|
7087
7147
|
return assertTSIntersectionType;
|
|
7088
7148
|
},
|
|
@@ -7416,9 +7476,6 @@ __export(lib_exports, {
|
|
|
7416
7476
|
debuggerStatement: function() {
|
|
7417
7477
|
return debuggerStatement;
|
|
7418
7478
|
},
|
|
7419
|
-
decimalLiteral: function() {
|
|
7420
|
-
return decimalLiteral;
|
|
7421
|
-
},
|
|
7422
7479
|
declareClass: function() {
|
|
7423
7480
|
return declareClass;
|
|
7424
7481
|
},
|
|
@@ -7752,9 +7809,6 @@ __export(lib_exports, {
|
|
|
7752
7809
|
isDebuggerStatement: function() {
|
|
7753
7810
|
return isDebuggerStatement;
|
|
7754
7811
|
},
|
|
7755
|
-
isDecimalLiteral: function() {
|
|
7756
|
-
return isDecimalLiteral;
|
|
7757
|
-
},
|
|
7758
7812
|
isDeclaration: function() {
|
|
7759
7813
|
return isDeclaration;
|
|
7760
7814
|
},
|
|
@@ -8085,9 +8139,6 @@ __export(lib_exports, {
|
|
|
8085
8139
|
isNodesEquivalent: function() {
|
|
8086
8140
|
return isNodesEquivalent;
|
|
8087
8141
|
},
|
|
8088
|
-
isNoop: function() {
|
|
8089
|
-
return isNoop;
|
|
8090
|
-
},
|
|
8091
8142
|
isNullLiteral: function() {
|
|
8092
8143
|
return isNullLiteral;
|
|
8093
8144
|
},
|
|
@@ -8286,6 +8337,9 @@ __export(lib_exports, {
|
|
|
8286
8337
|
isTSCallSignatureDeclaration: function() {
|
|
8287
8338
|
return isTSCallSignatureDeclaration;
|
|
8288
8339
|
},
|
|
8340
|
+
isTSClassImplements: function() {
|
|
8341
|
+
return isTSClassImplements;
|
|
8342
|
+
},
|
|
8289
8343
|
isTSConditionalType: function() {
|
|
8290
8344
|
return isTSConditionalType;
|
|
8291
8345
|
},
|
|
@@ -8313,9 +8367,6 @@ __export(lib_exports, {
|
|
|
8313
8367
|
isTSExportAssignment: function() {
|
|
8314
8368
|
return isTSExportAssignment;
|
|
8315
8369
|
},
|
|
8316
|
-
isTSExpressionWithTypeArguments: function() {
|
|
8317
|
-
return isTSExpressionWithTypeArguments;
|
|
8318
|
-
},
|
|
8319
8370
|
isTSExternalModuleReference: function() {
|
|
8320
8371
|
return isTSExternalModuleReference;
|
|
8321
8372
|
},
|
|
@@ -8346,6 +8397,9 @@ __export(lib_exports, {
|
|
|
8346
8397
|
isTSInterfaceDeclaration: function() {
|
|
8347
8398
|
return isTSInterfaceDeclaration;
|
|
8348
8399
|
},
|
|
8400
|
+
isTSInterfaceHeritage: function() {
|
|
8401
|
+
return isTSInterfaceHeritage;
|
|
8402
|
+
},
|
|
8349
8403
|
isTSIntersectionType: function() {
|
|
8350
8404
|
return isTSIntersectionType;
|
|
8351
8405
|
},
|
|
@@ -8583,51 +8637,6 @@ __export(lib_exports, {
|
|
|
8583
8637
|
isYieldExpression: function() {
|
|
8584
8638
|
return isYieldExpression;
|
|
8585
8639
|
},
|
|
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
8640
|
jsxAttribute: function() {
|
|
8632
8641
|
return jsxAttribute;
|
|
8633
8642
|
},
|
|
@@ -8697,9 +8706,6 @@ __export(lib_exports, {
|
|
|
8697
8706
|
newExpression: function() {
|
|
8698
8707
|
return newExpression;
|
|
8699
8708
|
},
|
|
8700
|
-
noop: function() {
|
|
8701
|
-
return noop;
|
|
8702
|
-
},
|
|
8703
8709
|
nullLiteral: function() {
|
|
8704
8710
|
return nullLiteral;
|
|
8705
8711
|
},
|
|
@@ -8859,201 +8865,6 @@ __export(lib_exports, {
|
|
|
8859
8865
|
symbolTypeAnnotation: function() {
|
|
8860
8866
|
return symbolTypeAnnotation;
|
|
8861
8867
|
},
|
|
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
8868
|
taggedTemplateExpression: function() {
|
|
9058
8869
|
return taggedTemplateExpression;
|
|
9059
8870
|
},
|
|
@@ -9123,6 +8934,9 @@ __export(lib_exports, {
|
|
|
9123
8934
|
tsCallSignatureDeclaration: function() {
|
|
9124
8935
|
return tsCallSignatureDeclaration;
|
|
9125
8936
|
},
|
|
8937
|
+
tsClassImplements: function() {
|
|
8938
|
+
return tsClassImplements;
|
|
8939
|
+
},
|
|
9126
8940
|
tsConditionalType: function() {
|
|
9127
8941
|
return tsConditionalType;
|
|
9128
8942
|
},
|
|
@@ -9147,9 +8961,6 @@ __export(lib_exports, {
|
|
|
9147
8961
|
tsExportAssignment: function() {
|
|
9148
8962
|
return tsExportAssignment;
|
|
9149
8963
|
},
|
|
9150
|
-
tsExpressionWithTypeArguments: function() {
|
|
9151
|
-
return tsExpressionWithTypeArguments;
|
|
9152
|
-
},
|
|
9153
8964
|
tsExternalModuleReference: function() {
|
|
9154
8965
|
return tsExternalModuleReference;
|
|
9155
8966
|
},
|
|
@@ -9180,6 +8991,9 @@ __export(lib_exports, {
|
|
|
9180
8991
|
tsInterfaceDeclaration: function() {
|
|
9181
8992
|
return tsInterfaceDeclaration;
|
|
9182
8993
|
},
|
|
8994
|
+
tsInterfaceHeritage: function() {
|
|
8995
|
+
return tsInterfaceHeritage;
|
|
8996
|
+
},
|
|
9183
8997
|
tsIntersectionType: function() {
|
|
9184
8998
|
return tsIntersectionType;
|
|
9185
8999
|
},
|
|
@@ -11606,11 +11420,6 @@ function isJSXClosingFragment(node, opts) {
|
|
|
11606
11420
|
if (node.type !== "JSXClosingFragment") return false;
|
|
11607
11421
|
return opts == null || shallowEqual(node, opts);
|
|
11608
11422
|
}
|
|
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
11423
|
function isPlaceholder(node, opts) {
|
|
11615
11424
|
if (!node) return false;
|
|
11616
11425
|
if (node.type !== "Placeholder") return false;
|
|
@@ -11661,11 +11470,6 @@ function isTupleExpression(node, opts) {
|
|
|
11661
11470
|
if (node.type !== "TupleExpression") return false;
|
|
11662
11471
|
return opts == null || shallowEqual(node, opts);
|
|
11663
11472
|
}
|
|
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
11473
|
function isModuleExpression(node, opts) {
|
|
11670
11474
|
if (!node) return false;
|
|
11671
11475
|
if (node.type !== "ModuleExpression") return false;
|
|
@@ -11906,9 +11710,14 @@ function isTSLiteralType(node, opts) {
|
|
|
11906
11710
|
if (node.type !== "TSLiteralType") return false;
|
|
11907
11711
|
return opts == null || shallowEqual(node, opts);
|
|
11908
11712
|
}
|
|
11909
|
-
function
|
|
11713
|
+
function isTSClassImplements(node, opts) {
|
|
11910
11714
|
if (!node) return false;
|
|
11911
|
-
if (node.type !== "
|
|
11715
|
+
if (node.type !== "TSClassImplements") return false;
|
|
11716
|
+
return opts == null || shallowEqual(node, opts);
|
|
11717
|
+
}
|
|
11718
|
+
function isTSInterfaceHeritage(node, opts) {
|
|
11719
|
+
if (!node) return false;
|
|
11720
|
+
if (node.type !== "TSInterfaceHeritage") return false;
|
|
11912
11721
|
return opts == null || shallowEqual(node, opts);
|
|
11913
11722
|
}
|
|
11914
11723
|
function isTSInterfaceDeclaration(node, opts) {
|
|
@@ -12152,7 +11961,6 @@ function isExpression(node, opts) {
|
|
|
12152
11961
|
case "ClassExpression":
|
|
12153
11962
|
case "ImportExpression":
|
|
12154
11963
|
case "MetaProperty":
|
|
12155
|
-
case "Super":
|
|
12156
11964
|
case "TaggedTemplateExpression":
|
|
12157
11965
|
case "TemplateLiteral":
|
|
12158
11966
|
case "YieldExpression":
|
|
@@ -12168,7 +11976,6 @@ function isExpression(node, opts) {
|
|
|
12168
11976
|
case "DoExpression":
|
|
12169
11977
|
case "RecordExpression":
|
|
12170
11978
|
case "TupleExpression":
|
|
12171
|
-
case "DecimalLiteral":
|
|
12172
11979
|
case "ModuleExpression":
|
|
12173
11980
|
case "TopicReference":
|
|
12174
11981
|
case "PipelineTopicExpression":
|
|
@@ -12487,7 +12294,6 @@ function isPureish(node, opts) {
|
|
|
12487
12294
|
case "RegExpLiteral":
|
|
12488
12295
|
case "ArrowFunctionExpression":
|
|
12489
12296
|
case "BigIntLiteral":
|
|
12490
|
-
case "DecimalLiteral":
|
|
12491
12297
|
break;
|
|
12492
12298
|
case "Placeholder":
|
|
12493
12299
|
if (node.expectedNode === "StringLiteral") break;
|
|
@@ -12612,7 +12418,6 @@ function isLiteral(node, opts) {
|
|
|
12612
12418
|
case "RegExpLiteral":
|
|
12613
12419
|
case "TemplateLiteral":
|
|
12614
12420
|
case "BigIntLiteral":
|
|
12615
|
-
case "DecimalLiteral":
|
|
12616
12421
|
break;
|
|
12617
12422
|
case "Placeholder":
|
|
12618
12423
|
if (node.expectedNode === "StringLiteral") break;
|
|
@@ -12985,7 +12790,6 @@ function isJSX(node, opts) {
|
|
|
12985
12790
|
function isMiscellaneous(node, opts) {
|
|
12986
12791
|
if (!node) return false;
|
|
12987
12792
|
switch(node.type){
|
|
12988
|
-
case "Noop":
|
|
12989
12793
|
case "Placeholder":
|
|
12990
12794
|
case "V8IntrinsicIdentifier":
|
|
12991
12795
|
break;
|
|
@@ -13040,7 +12844,8 @@ function isTypeScript(node, opts) {
|
|
|
13040
12844
|
case "TSIndexedAccessType":
|
|
13041
12845
|
case "TSMappedType":
|
|
13042
12846
|
case "TSLiteralType":
|
|
13043
|
-
case "
|
|
12847
|
+
case "TSClassImplements":
|
|
12848
|
+
case "TSInterfaceHeritage":
|
|
13044
12849
|
case "TSInterfaceDeclaration":
|
|
13045
12850
|
case "TSInterfaceBody":
|
|
13046
12851
|
case "TSTypeAliasDeclaration":
|
|
@@ -13118,7 +12923,8 @@ function isTSType(node, opts) {
|
|
|
13118
12923
|
case "TSIndexedAccessType":
|
|
13119
12924
|
case "TSMappedType":
|
|
13120
12925
|
case "TSLiteralType":
|
|
13121
|
-
case "
|
|
12926
|
+
case "TSClassImplements":
|
|
12927
|
+
case "TSInterfaceHeritage":
|
|
13122
12928
|
case "TSImportType":
|
|
13123
12929
|
break;
|
|
13124
12930
|
default:
|
|
@@ -15177,6 +14983,7 @@ defineType$4("ClassBody", {
|
|
|
15177
14983
|
body: validateArrayOfType("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")
|
|
15178
14984
|
}
|
|
15179
14985
|
});
|
|
14986
|
+
var _obj;
|
|
15180
14987
|
defineType$4("ClassExpression", {
|
|
15181
14988
|
builder: [
|
|
15182
14989
|
"id",
|
|
@@ -15189,7 +14996,7 @@ defineType$4("ClassExpression", {
|
|
|
15189
14996
|
"id",
|
|
15190
14997
|
"typeParameters",
|
|
15191
14998
|
"superClass",
|
|
15192
|
-
"
|
|
14999
|
+
"superTypeArguments",
|
|
15193
15000
|
"mixins",
|
|
15194
15001
|
"implements",
|
|
15195
15002
|
"body"
|
|
@@ -15199,7 +15006,7 @@ defineType$4("ClassExpression", {
|
|
|
15199
15006
|
"Class",
|
|
15200
15007
|
"Expression"
|
|
15201
15008
|
],
|
|
15202
|
-
fields: {
|
|
15009
|
+
fields: (_obj = {
|
|
15203
15010
|
id: {
|
|
15204
15011
|
validate: assertNodeType("Identifier"),
|
|
15205
15012
|
optional: true
|
|
@@ -15214,25 +15021,22 @@ defineType$4("ClassExpression", {
|
|
|
15214
15021
|
superClass: {
|
|
15215
15022
|
optional: true,
|
|
15216
15023
|
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
15024
|
}
|
|
15234
|
-
}
|
|
15025
|
+
}, _define_property(_obj, "superTypeArguments", {
|
|
15026
|
+
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15027
|
+
optional: true
|
|
15028
|
+
}), _define_property(_obj, "implements", {
|
|
15029
|
+
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15030
|
+
optional: true
|
|
15031
|
+
}), _define_property(_obj, "decorators", {
|
|
15032
|
+
validate: arrayOfType("Decorator"),
|
|
15033
|
+
optional: true
|
|
15034
|
+
}), _define_property(_obj, "mixins", {
|
|
15035
|
+
validate: assertNodeType("InterfaceExtends"),
|
|
15036
|
+
optional: true
|
|
15037
|
+
}), _obj)
|
|
15235
15038
|
});
|
|
15039
|
+
var _obj1;
|
|
15236
15040
|
defineType$4("ClassDeclaration", {
|
|
15237
15041
|
inherits: "ClassExpression",
|
|
15238
15042
|
aliases: [
|
|
@@ -15241,7 +15045,7 @@ defineType$4("ClassDeclaration", {
|
|
|
15241
15045
|
"Statement",
|
|
15242
15046
|
"Declaration"
|
|
15243
15047
|
],
|
|
15244
|
-
fields: {
|
|
15048
|
+
fields: (_obj1 = {
|
|
15245
15049
|
id: {
|
|
15246
15050
|
validate: assertNodeType("Identifier"),
|
|
15247
15051
|
optional: true
|
|
@@ -15256,32 +15060,26 @@ defineType$4("ClassDeclaration", {
|
|
|
15256
15060
|
superClass: {
|
|
15257
15061
|
optional: true,
|
|
15258
15062
|
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
15063
|
}
|
|
15284
|
-
},
|
|
15064
|
+
}, _define_property(_obj1, "superTypeArguments", {
|
|
15065
|
+
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
15066
|
+
optional: true
|
|
15067
|
+
}), _define_property(_obj1, "implements", {
|
|
15068
|
+
validate: arrayOfType("TSClassImplements", "ClassImplements"),
|
|
15069
|
+
optional: true
|
|
15070
|
+
}), _define_property(_obj1, "decorators", {
|
|
15071
|
+
validate: arrayOfType("Decorator"),
|
|
15072
|
+
optional: true
|
|
15073
|
+
}), _define_property(_obj1, "mixins", {
|
|
15074
|
+
validate: assertNodeType("InterfaceExtends"),
|
|
15075
|
+
optional: true
|
|
15076
|
+
}), _define_property(_obj1, "declare", {
|
|
15077
|
+
validate: assertValueType("boolean"),
|
|
15078
|
+
optional: true
|
|
15079
|
+
}), _define_property(_obj1, "abstract", {
|
|
15080
|
+
validate: assertValueType("boolean"),
|
|
15081
|
+
optional: true
|
|
15082
|
+
}), _obj1),
|
|
15285
15083
|
validate: function() {
|
|
15286
15084
|
var identifier4 = assertNodeType("Identifier");
|
|
15287
15085
|
return function(parent, key, node) {
|
|
@@ -17683,12 +17481,11 @@ defineType("TSTypeReference", {
|
|
|
17683
17481
|
],
|
|
17684
17482
|
visitor: [
|
|
17685
17483
|
"typeName",
|
|
17686
|
-
"
|
|
17484
|
+
"typeArguments"
|
|
17687
17485
|
],
|
|
17688
|
-
fields: {
|
|
17689
|
-
typeName: validateType("TSEntityName")
|
|
17690
|
-
|
|
17691
|
-
}
|
|
17486
|
+
fields: _define_property({
|
|
17487
|
+
typeName: validateType("TSEntityName")
|
|
17488
|
+
}, "typeArguments", validateOptionalType("TSTypeParameterInstantiation"))
|
|
17692
17489
|
});
|
|
17693
17490
|
defineType("TSTypePredicate", {
|
|
17694
17491
|
aliases: [
|
|
@@ -18075,15 +17872,15 @@ defineType("TSModuleDeclaration", {
|
|
|
18075
17872
|
"id",
|
|
18076
17873
|
"body"
|
|
18077
17874
|
],
|
|
18078
|
-
fields: {
|
|
17875
|
+
fields: Object.assign({
|
|
18079
17876
|
kind: {
|
|
18080
17877
|
validate: assertOneOf("global", "module", "namespace")
|
|
18081
17878
|
},
|
|
18082
|
-
declare: validateOptional(bool)
|
|
18083
|
-
|
|
18084
|
-
id: validateType("
|
|
18085
|
-
body: validateType("TSModuleBlock"
|
|
18086
|
-
}
|
|
17879
|
+
declare: validateOptional(bool)
|
|
17880
|
+
}, false, {
|
|
17881
|
+
id: validateType("TSEntityName", "StringLiteral"),
|
|
17882
|
+
body: validateType("TSModuleBlock")
|
|
17883
|
+
})
|
|
18087
17884
|
});
|
|
18088
17885
|
defineType("TSModuleBlock", {
|
|
18089
17886
|
aliases: [
|
|
@@ -18287,8 +18084,7 @@ var _validate = /* @__PURE__ */ Object.freeze({
|
|
|
18287
18084
|
});
|
|
18288
18085
|
var validate = _validate.validateInternal;
|
|
18289
18086
|
var NODE_FIELDS = utils.NODE_FIELDS;
|
|
18290
|
-
function arrayExpression() {
|
|
18291
|
-
var elements = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
18087
|
+
function arrayExpression(elements) {
|
|
18292
18088
|
var node = {
|
|
18293
18089
|
type: "ArrayExpression",
|
|
18294
18090
|
elements: elements
|
|
@@ -18619,19 +18415,17 @@ function logicalExpression(operator, left, right) {
|
|
|
18619
18415
|
return node;
|
|
18620
18416
|
}
|
|
18621
18417
|
function memberExpression(object, property) {
|
|
18622
|
-
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false
|
|
18418
|
+
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
18623
18419
|
var node = {
|
|
18624
18420
|
type: "MemberExpression",
|
|
18625
18421
|
object: object,
|
|
18626
18422
|
property: property,
|
|
18627
|
-
computed: computed
|
|
18628
|
-
optional: optional
|
|
18423
|
+
computed: computed
|
|
18629
18424
|
};
|
|
18630
18425
|
var defs = NODE_FIELDS.MemberExpression;
|
|
18631
18426
|
validate(defs.object, node, "object", object, 1);
|
|
18632
18427
|
validate(defs.property, node, "property", property, 1);
|
|
18633
18428
|
validate(defs.computed, node, "computed", computed);
|
|
18634
|
-
validate(defs.optional, node, "optional", optional);
|
|
18635
18429
|
return node;
|
|
18636
18430
|
}
|
|
18637
18431
|
function newExpression(callee, _arguments) {
|
|
@@ -18670,8 +18464,8 @@ function objectExpression(properties) {
|
|
|
18670
18464
|
validate(defs.properties, node, "properties", properties, 1);
|
|
18671
18465
|
return node;
|
|
18672
18466
|
}
|
|
18673
|
-
function objectMethod() {
|
|
18674
|
-
var
|
|
18467
|
+
function objectMethod(kind, key, params, body) {
|
|
18468
|
+
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
18469
|
var node = {
|
|
18676
18470
|
type: "ObjectMethod",
|
|
18677
18471
|
kind: kind,
|
|
@@ -18693,21 +18487,19 @@ function objectMethod() {
|
|
|
18693
18487
|
return node;
|
|
18694
18488
|
}
|
|
18695
18489
|
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
|
|
18490
|
+
var computed = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, shorthand = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
18697
18491
|
var node = {
|
|
18698
18492
|
type: "ObjectProperty",
|
|
18699
18493
|
key: key,
|
|
18700
18494
|
value: value1,
|
|
18701
18495
|
computed: computed,
|
|
18702
|
-
shorthand: shorthand
|
|
18703
|
-
decorators: decorators
|
|
18496
|
+
shorthand: shorthand
|
|
18704
18497
|
};
|
|
18705
18498
|
var defs = NODE_FIELDS.ObjectProperty;
|
|
18706
18499
|
validate(defs.key, node, "key", key, 1);
|
|
18707
18500
|
validate(defs.value, node, "value", value1, 1);
|
|
18708
18501
|
validate(defs.computed, node, "computed", computed);
|
|
18709
18502
|
validate(defs.shorthand, node, "shorthand", shorthand);
|
|
18710
|
-
validate(defs.decorators, node, "decorators", decorators, 1);
|
|
18711
18503
|
return node;
|
|
18712
18504
|
}
|
|
18713
18505
|
function restElement(argument) {
|
|
@@ -20019,19 +19811,17 @@ function jsxClosingElement(name) {
|
|
|
20019
19811
|
return node;
|
|
20020
19812
|
}
|
|
20021
19813
|
function jsxElement(openingElement) {
|
|
20022
|
-
var closingElement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, children = arguments.length > 2 ? arguments[2] : void 0
|
|
19814
|
+
var closingElement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, children = arguments.length > 2 ? arguments[2] : void 0;
|
|
20023
19815
|
var node = {
|
|
20024
19816
|
type: "JSXElement",
|
|
20025
19817
|
openingElement: openingElement,
|
|
20026
19818
|
closingElement: closingElement,
|
|
20027
|
-
children: children
|
|
20028
|
-
selfClosing: selfClosing
|
|
19819
|
+
children: children
|
|
20029
19820
|
};
|
|
20030
19821
|
var defs = NODE_FIELDS.JSXElement;
|
|
20031
19822
|
validate(defs.openingElement, node, "openingElement", openingElement, 1);
|
|
20032
19823
|
validate(defs.closingElement, node, "closingElement", closingElement, 1);
|
|
20033
19824
|
validate(defs.children, node, "children", children, 1);
|
|
20034
|
-
validate(defs.selfClosing, node, "selfClosing", selfClosing);
|
|
20035
19825
|
return node;
|
|
20036
19826
|
}
|
|
20037
19827
|
function jsxEmptyExpression() {
|
|
@@ -20143,11 +19933,6 @@ function jsxClosingFragment() {
|
|
|
20143
19933
|
type: "JSXClosingFragment"
|
|
20144
19934
|
};
|
|
20145
19935
|
}
|
|
20146
|
-
function noop() {
|
|
20147
|
-
return {
|
|
20148
|
-
type: "Noop"
|
|
20149
|
-
};
|
|
20150
|
-
}
|
|
20151
19936
|
function placeholder(expectedNode, name) {
|
|
20152
19937
|
var node = {
|
|
20153
19938
|
type: "Placeholder",
|
|
@@ -20244,15 +20029,6 @@ function tupleExpression() {
|
|
|
20244
20029
|
validate(defs.elements, node, "elements", elements, 1);
|
|
20245
20030
|
return node;
|
|
20246
20031
|
}
|
|
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
20032
|
function moduleExpression(body) {
|
|
20257
20033
|
var node = {
|
|
20258
20034
|
type: "ModuleExpression",
|
|
@@ -20345,31 +20121,31 @@ function tsQualifiedName(left, right) {
|
|
|
20345
20121
|
return node;
|
|
20346
20122
|
}
|
|
20347
20123
|
function tsCallSignatureDeclaration() {
|
|
20348
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20124
|
+
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
20125
|
var node = {
|
|
20350
20126
|
type: "TSCallSignatureDeclaration",
|
|
20351
20127
|
typeParameters: typeParameters,
|
|
20352
|
-
|
|
20353
|
-
|
|
20128
|
+
params: params,
|
|
20129
|
+
returnType: returnType
|
|
20354
20130
|
};
|
|
20355
20131
|
var defs = NODE_FIELDS.TSCallSignatureDeclaration;
|
|
20356
20132
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20357
|
-
validate(defs.
|
|
20358
|
-
validate(defs.
|
|
20133
|
+
validate(defs.params, node, "params", params, 1);
|
|
20134
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20359
20135
|
return node;
|
|
20360
20136
|
}
|
|
20361
20137
|
function tsConstructSignatureDeclaration() {
|
|
20362
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20138
|
+
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
20139
|
var node = {
|
|
20364
20140
|
type: "TSConstructSignatureDeclaration",
|
|
20365
20141
|
typeParameters: typeParameters,
|
|
20366
|
-
|
|
20367
|
-
|
|
20142
|
+
params: params,
|
|
20143
|
+
returnType: returnType
|
|
20368
20144
|
};
|
|
20369
20145
|
var defs = NODE_FIELDS.TSConstructSignatureDeclaration;
|
|
20370
20146
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20371
|
-
validate(defs.
|
|
20372
|
-
validate(defs.
|
|
20147
|
+
validate(defs.params, node, "params", params, 1);
|
|
20148
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20373
20149
|
return node;
|
|
20374
20150
|
}
|
|
20375
20151
|
function tsPropertySignature(key) {
|
|
@@ -20386,20 +20162,20 @@ function tsPropertySignature(key) {
|
|
|
20386
20162
|
return node;
|
|
20387
20163
|
}
|
|
20388
20164
|
function tsMethodSignature(key) {
|
|
20389
|
-
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null,
|
|
20165
|
+
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
20166
|
var node = {
|
|
20391
20167
|
type: "TSMethodSignature",
|
|
20392
20168
|
key: key,
|
|
20393
20169
|
typeParameters: typeParameters,
|
|
20394
|
-
|
|
20395
|
-
|
|
20170
|
+
params: params,
|
|
20171
|
+
returnType: returnType,
|
|
20396
20172
|
kind: null
|
|
20397
20173
|
};
|
|
20398
20174
|
var defs = NODE_FIELDS.TSMethodSignature;
|
|
20399
20175
|
validate(defs.key, node, "key", key, 1);
|
|
20400
20176
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20401
|
-
validate(defs.
|
|
20402
|
-
validate(defs.
|
|
20177
|
+
validate(defs.params, node, "params", params, 1);
|
|
20178
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20403
20179
|
return node;
|
|
20404
20180
|
}
|
|
20405
20181
|
function tsIndexSignature(parameters) {
|
|
@@ -20485,43 +20261,43 @@ function tsThisType() {
|
|
|
20485
20261
|
};
|
|
20486
20262
|
}
|
|
20487
20263
|
function tsFunctionType() {
|
|
20488
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20264
|
+
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
20265
|
var node = {
|
|
20490
20266
|
type: "TSFunctionType",
|
|
20491
20267
|
typeParameters: typeParameters,
|
|
20492
|
-
|
|
20493
|
-
|
|
20268
|
+
params: params,
|
|
20269
|
+
returnType: returnType
|
|
20494
20270
|
};
|
|
20495
20271
|
var defs = NODE_FIELDS.TSFunctionType;
|
|
20496
20272
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20497
|
-
validate(defs.
|
|
20498
|
-
validate(defs.
|
|
20273
|
+
validate(defs.params, node, "params", params, 1);
|
|
20274
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20499
20275
|
return node;
|
|
20500
20276
|
}
|
|
20501
20277
|
function tsConstructorType() {
|
|
20502
|
-
var typeParameters = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null,
|
|
20278
|
+
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
20279
|
var node = {
|
|
20504
20280
|
type: "TSConstructorType",
|
|
20505
20281
|
typeParameters: typeParameters,
|
|
20506
|
-
|
|
20507
|
-
|
|
20282
|
+
params: params,
|
|
20283
|
+
returnType: returnType
|
|
20508
20284
|
};
|
|
20509
20285
|
var defs = NODE_FIELDS.TSConstructorType;
|
|
20510
20286
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20511
|
-
validate(defs.
|
|
20512
|
-
validate(defs.
|
|
20287
|
+
validate(defs.params, node, "params", params, 1);
|
|
20288
|
+
validate(defs.returnType, node, "returnType", returnType, 1);
|
|
20513
20289
|
return node;
|
|
20514
20290
|
}
|
|
20515
20291
|
function tsTypeReference(typeName) {
|
|
20516
|
-
var
|
|
20292
|
+
var typeArguments = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20517
20293
|
var node = {
|
|
20518
20294
|
type: "TSTypeReference",
|
|
20519
20295
|
typeName: typeName,
|
|
20520
|
-
|
|
20296
|
+
typeArguments: typeArguments
|
|
20521
20297
|
};
|
|
20522
20298
|
var defs = NODE_FIELDS.TSTypeReference;
|
|
20523
20299
|
validate(defs.typeName, node, "typeName", typeName, 1);
|
|
20524
|
-
validate(defs.
|
|
20300
|
+
validate(defs.typeArguments, node, "typeArguments", typeArguments, 1);
|
|
20525
20301
|
return node;
|
|
20526
20302
|
}
|
|
20527
20303
|
function tsTypePredicate(parameterName) {
|
|
@@ -20681,18 +20457,20 @@ function tsIndexedAccessType(objectType, indexType) {
|
|
|
20681
20457
|
validate(defs.indexType, node, "indexType", indexType, 1);
|
|
20682
20458
|
return node;
|
|
20683
20459
|
}
|
|
20684
|
-
function tsMappedType(
|
|
20685
|
-
var
|
|
20460
|
+
function tsMappedType(key, constraint) {
|
|
20461
|
+
var nameType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, typeAnnotation2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
20686
20462
|
var node = {
|
|
20687
20463
|
type: "TSMappedType",
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
nameType: nameType
|
|
20464
|
+
key: key,
|
|
20465
|
+
constraint: constraint,
|
|
20466
|
+
nameType: nameType,
|
|
20467
|
+
typeAnnotation: typeAnnotation2
|
|
20691
20468
|
};
|
|
20692
20469
|
var defs = NODE_FIELDS.TSMappedType;
|
|
20693
|
-
validate(defs.
|
|
20694
|
-
validate(defs.
|
|
20470
|
+
validate(defs.key, node, "key", key, 1);
|
|
20471
|
+
validate(defs.constraint, node, "constraint", constraint, 1);
|
|
20695
20472
|
validate(defs.nameType, node, "nameType", nameType, 1);
|
|
20473
|
+
validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation2, 1);
|
|
20696
20474
|
return node;
|
|
20697
20475
|
}
|
|
20698
20476
|
function tsLiteralType(literal) {
|
|
@@ -20704,14 +20482,26 @@ function tsLiteralType(literal) {
|
|
|
20704
20482
|
validate(defs.literal, node, "literal", literal, 1);
|
|
20705
20483
|
return node;
|
|
20706
20484
|
}
|
|
20707
|
-
function
|
|
20485
|
+
function tsClassImplements(expression2) {
|
|
20708
20486
|
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20709
20487
|
var node = {
|
|
20710
|
-
type: "
|
|
20488
|
+
type: "TSClassImplements",
|
|
20711
20489
|
expression: expression2,
|
|
20712
20490
|
typeParameters: typeParameters
|
|
20713
20491
|
};
|
|
20714
|
-
var defs = NODE_FIELDS.
|
|
20492
|
+
var defs = NODE_FIELDS.TSClassImplements;
|
|
20493
|
+
validate(defs.expression, node, "expression", expression2, 1);
|
|
20494
|
+
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20495
|
+
return node;
|
|
20496
|
+
}
|
|
20497
|
+
function tsInterfaceHeritage(expression2) {
|
|
20498
|
+
var typeParameters = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
20499
|
+
var node = {
|
|
20500
|
+
type: "TSInterfaceHeritage",
|
|
20501
|
+
expression: expression2,
|
|
20502
|
+
typeParameters: typeParameters
|
|
20503
|
+
};
|
|
20504
|
+
var defs = NODE_FIELDS.TSInterfaceHeritage;
|
|
20715
20505
|
validate(defs.expression, node, "expression", expression2, 1);
|
|
20716
20506
|
validate(defs.typeParameters, node, "typeParameters", typeParameters, 1);
|
|
20717
20507
|
return node;
|
|
@@ -20944,7 +20734,7 @@ function tsTypeParameter() {
|
|
|
20944
20734
|
var defs = NODE_FIELDS.TSTypeParameter;
|
|
20945
20735
|
validate(defs.constraint, node, "constraint", constraint, 1);
|
|
20946
20736
|
validate(defs.default, node, "default", _default, 1);
|
|
20947
|
-
validate(defs.name, node, "name", name);
|
|
20737
|
+
validate(defs.name, node, "name", name, 1);
|
|
20948
20738
|
return node;
|
|
20949
20739
|
}
|
|
20950
20740
|
function NumberLiteral(value1) {
|
|
@@ -21527,9 +21317,6 @@ function assertJSXOpeningFragment(node, opts) {
|
|
|
21527
21317
|
function assertJSXClosingFragment(node, opts) {
|
|
21528
21318
|
assert("JSXClosingFragment", node, opts);
|
|
21529
21319
|
}
|
|
21530
|
-
function assertNoop(node, opts) {
|
|
21531
|
-
assert("Noop", node, opts);
|
|
21532
|
-
}
|
|
21533
21320
|
function assertPlaceholder(node, opts) {
|
|
21534
21321
|
assert("Placeholder", node, opts);
|
|
21535
21322
|
}
|
|
@@ -21560,9 +21347,6 @@ function assertRecordExpression(node, opts) {
|
|
|
21560
21347
|
function assertTupleExpression(node, opts) {
|
|
21561
21348
|
assert("TupleExpression", node, opts);
|
|
21562
21349
|
}
|
|
21563
|
-
function assertDecimalLiteral(node, opts) {
|
|
21564
|
-
assert("DecimalLiteral", node, opts);
|
|
21565
|
-
}
|
|
21566
21350
|
function assertModuleExpression(node, opts) {
|
|
21567
21351
|
assert("ModuleExpression", node, opts);
|
|
21568
21352
|
}
|
|
@@ -21707,8 +21491,11 @@ function assertTSMappedType(node, opts) {
|
|
|
21707
21491
|
function assertTSLiteralType(node, opts) {
|
|
21708
21492
|
assert("TSLiteralType", node, opts);
|
|
21709
21493
|
}
|
|
21710
|
-
function
|
|
21711
|
-
assert("
|
|
21494
|
+
function assertTSClassImplements(node, opts) {
|
|
21495
|
+
assert("TSClassImplements", node, opts);
|
|
21496
|
+
}
|
|
21497
|
+
function assertTSInterfaceHeritage(node, opts) {
|
|
21498
|
+
assert("TSInterfaceHeritage", node, opts);
|
|
21712
21499
|
}
|
|
21713
21500
|
function assertTSInterfaceDeclaration(node, opts) {
|
|
21714
21501
|
assert("TSInterfaceDeclaration", node, opts);
|
|
@@ -22095,18 +21882,19 @@ function removeTypeDuplicates(nodesIn) {
|
|
|
22095
21882
|
}
|
|
22096
21883
|
continue;
|
|
22097
21884
|
}
|
|
22098
|
-
|
|
21885
|
+
var typeArgumentsKey = "typeArguments";
|
|
21886
|
+
if (isTSTypeReference(node) && node[typeArgumentsKey]) {
|
|
21887
|
+
var typeArguments = node[typeArgumentsKey];
|
|
22099
21888
|
var name = getQualifiedName(node.typeName);
|
|
22100
21889
|
if (generics.has(name)) {
|
|
22101
21890
|
var existing = generics.get(name);
|
|
22102
|
-
|
|
22103
|
-
|
|
22104
|
-
|
|
22105
|
-
|
|
22106
|
-
|
|
22107
|
-
}
|
|
21891
|
+
var existingTypeArguments = existing[typeArgumentsKey];
|
|
21892
|
+
if (existingTypeArguments) {
|
|
21893
|
+
var _existingTypeArguments_params;
|
|
21894
|
+
(_existingTypeArguments_params = existingTypeArguments.params).push.apply(_existingTypeArguments_params, _to_consumable_array(typeArguments.params));
|
|
21895
|
+
existingTypeArguments.params = removeTypeDuplicates(existingTypeArguments.params);
|
|
22108
21896
|
} else {
|
|
22109
|
-
existing =
|
|
21897
|
+
existing = typeArguments;
|
|
22110
21898
|
}
|
|
22111
21899
|
} else {
|
|
22112
21900
|
generics.set(name, node);
|
|
@@ -24035,9 +23823,13 @@ var estree = function(superClass) {
|
|
|
24035
23823
|
key: "pushClassMethod",
|
|
24036
23824
|
value: function pushClassMethod(classBody2, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
|
|
24037
23825
|
this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
|
|
24038
|
-
|
|
24039
|
-
|
|
23826
|
+
var typeParameters = method.typeParameters;
|
|
23827
|
+
if (typeParameters) {
|
|
24040
23828
|
delete method.typeParameters;
|
|
23829
|
+
var fn = method.value;
|
|
23830
|
+
fn.typeParameters = typeParameters;
|
|
23831
|
+
fn.start = typeParameters.start;
|
|
23832
|
+
fn.loc.start = typeParameters.loc.start;
|
|
24041
23833
|
}
|
|
24042
23834
|
classBody2.body.push(method);
|
|
24043
23835
|
}
|
|
@@ -24798,6 +24590,9 @@ var tt = {
|
|
|
24798
24590
|
name: createToken("name", {
|
|
24799
24591
|
startsExpr: startsExpr
|
|
24800
24592
|
}),
|
|
24593
|
+
placeholder: createToken("%%", {
|
|
24594
|
+
startsExpr: true
|
|
24595
|
+
}),
|
|
24801
24596
|
string: createToken("string", {
|
|
24802
24597
|
startsExpr: startsExpr
|
|
24803
24598
|
}),
|
|
@@ -24824,22 +24619,19 @@ var tt = {
|
|
|
24824
24619
|
jsxTagStart: createToken("jsxTagStart", {
|
|
24825
24620
|
startsExpr: true
|
|
24826
24621
|
}),
|
|
24827
|
-
jsxTagEnd: createToken("jsxTagEnd")
|
|
24828
|
-
placeholder: createToken("%%", {
|
|
24829
|
-
startsExpr: true
|
|
24830
|
-
})
|
|
24622
|
+
jsxTagEnd: createToken("jsxTagEnd")
|
|
24831
24623
|
};
|
|
24832
24624
|
function tokenIsIdentifier(token) {
|
|
24833
|
-
return token >= 93 && token <=
|
|
24625
|
+
return token >= 93 && token <= 133;
|
|
24834
24626
|
}
|
|
24835
24627
|
function tokenKeywordOrIdentifierIsKeyword(token) {
|
|
24836
24628
|
return token <= 92;
|
|
24837
24629
|
}
|
|
24838
24630
|
function tokenIsKeywordOrIdentifier(token) {
|
|
24839
|
-
return token >= 58 && token <=
|
|
24631
|
+
return token >= 58 && token <= 133;
|
|
24840
24632
|
}
|
|
24841
24633
|
function tokenIsLiteralPropertyName(token) {
|
|
24842
|
-
return token >= 58 && token <=
|
|
24634
|
+
return token >= 58 && token <= 137;
|
|
24843
24635
|
}
|
|
24844
24636
|
function tokenComesBeforeExpression(token) {
|
|
24845
24637
|
return tokenBeforeExprs[token];
|
|
@@ -26257,6 +26049,18 @@ var BaseParser = /*#__PURE__*/ function() {
|
|
|
26257
26049
|
__publicField(this, "ambiguousScriptDifferentAst", false);
|
|
26258
26050
|
}
|
|
26259
26051
|
_create_class(BaseParser, [
|
|
26052
|
+
{
|
|
26053
|
+
key: "sourceToOffsetPos",
|
|
26054
|
+
value: function sourceToOffsetPos(sourcePos) {
|
|
26055
|
+
return sourcePos + this.startIndex;
|
|
26056
|
+
}
|
|
26057
|
+
},
|
|
26058
|
+
{
|
|
26059
|
+
key: "offsetToSourcePos",
|
|
26060
|
+
value: function offsetToSourcePos(offsetPos) {
|
|
26061
|
+
return offsetPos - this.startIndex;
|
|
26062
|
+
}
|
|
26063
|
+
},
|
|
26260
26064
|
{
|
|
26261
26065
|
key: "hasPlugin",
|
|
26262
26066
|
value: function hasPlugin(pluginConfig) {
|
|
@@ -26402,7 +26206,7 @@ var CommentsParser = /*#__PURE__*/ function(BaseParser) {
|
|
|
26402
26206
|
}
|
|
26403
26207
|
} else {
|
|
26404
26208
|
var node = commentWS.containingNode, commentStart = commentWS.start;
|
|
26405
|
-
if (this.input.charCodeAt(commentStart - 1) === 44) {
|
|
26209
|
+
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
|
|
26406
26210
|
switch(node.type){
|
|
26407
26211
|
case "ObjectExpression":
|
|
26408
26212
|
case "ObjectPattern":
|
|
@@ -26573,7 +26377,7 @@ var State = /*#__PURE__*/ function() {
|
|
|
26573
26377
|
__publicField(this, "commentsLen", 0);
|
|
26574
26378
|
__publicField(this, "commentStack", []);
|
|
26575
26379
|
__publicField(this, "pos", 0);
|
|
26576
|
-
__publicField(this, "type",
|
|
26380
|
+
__publicField(this, "type", 140);
|
|
26577
26381
|
__publicField(this, "value", null);
|
|
26578
26382
|
__publicField(this, "start", 0);
|
|
26579
26383
|
__publicField(this, "end", 0);
|
|
@@ -26731,8 +26535,7 @@ var State = /*#__PURE__*/ function() {
|
|
|
26731
26535
|
{
|
|
26732
26536
|
key: "curPosition",
|
|
26733
26537
|
value: function curPosition() {
|
|
26734
|
-
|
|
26735
|
-
return new Position(this.curLine, index2 - this.lineStart, index2);
|
|
26538
|
+
return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
26736
26539
|
}
|
|
26737
26540
|
},
|
|
26738
26541
|
{
|
|
@@ -27079,10 +26882,11 @@ var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([
|
|
|
27079
26882
|
var Token = function Token(state) {
|
|
27080
26883
|
"use strict";
|
|
27081
26884
|
_class_call_check(this, Token);
|
|
26885
|
+
var startIndex = state.startIndex || 0;
|
|
27082
26886
|
this.type = state.type;
|
|
27083
26887
|
this.value = state.value;
|
|
27084
|
-
this.start = state.start;
|
|
27085
|
-
this.end = state.end;
|
|
26888
|
+
this.start = startIndex + state.start;
|
|
26889
|
+
this.end = startIndex + state.end;
|
|
27086
26890
|
this.loc = new SourceLocation(state.startLoc, state.endLoc);
|
|
27087
26891
|
};
|
|
27088
26892
|
var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
@@ -27281,7 +27085,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27281
27085
|
this.state.start = this.state.pos;
|
|
27282
27086
|
if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
|
|
27283
27087
|
if (this.state.pos >= this.length) {
|
|
27284
|
-
this.finishToken(
|
|
27088
|
+
this.finishToken(140);
|
|
27285
27089
|
return;
|
|
27286
27090
|
}
|
|
27287
27091
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
@@ -27307,8 +27111,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27307
27111
|
var comment = {
|
|
27308
27112
|
type: "CommentBlock",
|
|
27309
27113
|
value: this.input.slice(start + 2, end),
|
|
27310
|
-
start: start,
|
|
27311
|
-
end: end + commentEnd.length,
|
|
27114
|
+
start: this.sourceToOffsetPos(start),
|
|
27115
|
+
end: this.sourceToOffsetPos(end + commentEnd.length),
|
|
27312
27116
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
27313
27117
|
};
|
|
27314
27118
|
if (this.options.tokens) this.pushToken(comment);
|
|
@@ -27333,8 +27137,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27333
27137
|
var comment = {
|
|
27334
27138
|
type: "CommentLine",
|
|
27335
27139
|
value: value1,
|
|
27336
|
-
start: start,
|
|
27337
|
-
end: end,
|
|
27140
|
+
start: this.sourceToOffsetPos(start),
|
|
27141
|
+
end: this.sourceToOffsetPos(end),
|
|
27338
27142
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
27339
27143
|
};
|
|
27340
27144
|
if (this.options.tokens) this.pushToken(comment);
|
|
@@ -27422,8 +27226,8 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27422
27226
|
if (comments.length > 0) {
|
|
27423
27227
|
var end = this.state.pos;
|
|
27424
27228
|
var commentWhitespace = {
|
|
27425
|
-
start: spaceStart,
|
|
27426
|
-
end: end,
|
|
27229
|
+
start: this.sourceToOffsetPos(spaceStart),
|
|
27230
|
+
end: this.sourceToOffsetPos(end),
|
|
27427
27231
|
comments: comments,
|
|
27428
27232
|
leadingNode: null,
|
|
27429
27233
|
trailingNode: null,
|
|
@@ -27474,10 +27278,10 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27474
27278
|
}
|
|
27475
27279
|
} else if (isIdentifierStart2(next)) {
|
|
27476
27280
|
++this.state.pos;
|
|
27477
|
-
this.finishToken(
|
|
27281
|
+
this.finishToken(139, this.readWord1(next));
|
|
27478
27282
|
} else if (next === 92) {
|
|
27479
27283
|
++this.state.pos;
|
|
27480
|
-
this.finishToken(
|
|
27284
|
+
this.finishToken(139, this.readWord1());
|
|
27481
27285
|
} else {
|
|
27482
27286
|
this.finishOp(27, 1);
|
|
27483
27287
|
}
|
|
@@ -27908,7 +27712,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27908
27712
|
mods += char;
|
|
27909
27713
|
}
|
|
27910
27714
|
this.state.pos = pos;
|
|
27911
|
-
this.finishToken(
|
|
27715
|
+
this.finishToken(138, {
|
|
27912
27716
|
pattern: content,
|
|
27913
27717
|
flags: mods
|
|
27914
27718
|
});
|
|
@@ -27926,6 +27730,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27926
27730
|
{
|
|
27927
27731
|
key: "readRadixNumber",
|
|
27928
27732
|
value: function readRadixNumber(radix) {
|
|
27733
|
+
var start = this.state.pos;
|
|
27929
27734
|
var startLoc = this.state.curPosition();
|
|
27930
27735
|
var isBigInt = false;
|
|
27931
27736
|
this.state.pos += 2;
|
|
@@ -27946,11 +27751,11 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
27946
27751
|
throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
|
|
27947
27752
|
}
|
|
27948
27753
|
if (isBigInt) {
|
|
27949
|
-
var str = this.input.slice(
|
|
27950
|
-
this.finishToken(
|
|
27754
|
+
var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
|
|
27755
|
+
this.finishToken(136, str);
|
|
27951
27756
|
return;
|
|
27952
27757
|
}
|
|
27953
|
-
this.finishToken(
|
|
27758
|
+
this.finishToken(135, val);
|
|
27954
27759
|
}
|
|
27955
27760
|
},
|
|
27956
27761
|
{
|
|
@@ -28006,11 +27811,11 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28006
27811
|
}
|
|
28007
27812
|
var str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
|
|
28008
27813
|
if (isBigInt) {
|
|
28009
|
-
this.finishToken(
|
|
27814
|
+
this.finishToken(136, str);
|
|
28010
27815
|
return;
|
|
28011
27816
|
}
|
|
28012
27817
|
var val = isOctal ? parseInt(str, 8) : parseFloat(str);
|
|
28013
|
-
this.finishToken(
|
|
27818
|
+
this.finishToken(135, val);
|
|
28014
27819
|
}
|
|
28015
27820
|
},
|
|
28016
27821
|
{
|
|
@@ -28028,7 +27833,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28028
27833
|
this.state.pos = pos + 1;
|
|
28029
27834
|
this.state.lineStart = lineStart;
|
|
28030
27835
|
this.state.curLine = curLine;
|
|
28031
|
-
this.finishToken(
|
|
27836
|
+
this.finishToken(134, str);
|
|
28032
27837
|
}
|
|
28033
27838
|
},
|
|
28034
27839
|
{
|
|
@@ -28050,7 +27855,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
28050
27855
|
this.state.lineStart = lineStart;
|
|
28051
27856
|
this.state.curLine = curLine;
|
|
28052
27857
|
if (firstInvalidLoc) {
|
|
28053
|
-
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos);
|
|
27858
|
+
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos));
|
|
28054
27859
|
}
|
|
28055
27860
|
if (this.input.codePointAt(pos) === 96) {
|
|
28056
27861
|
this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
|
|
@@ -28638,13 +28443,13 @@ var UtilParser = /*#__PURE__*/ function(Tokenizer) {
|
|
|
28638
28443
|
{
|
|
28639
28444
|
key: "canInsertSemicolon",
|
|
28640
28445
|
value: function canInsertSemicolon() {
|
|
28641
|
-
return this.match(
|
|
28446
|
+
return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
|
|
28642
28447
|
}
|
|
28643
28448
|
},
|
|
28644
28449
|
{
|
|
28645
28450
|
key: "hasPrecedingLineBreak",
|
|
28646
28451
|
value: function hasPrecedingLineBreak() {
|
|
28647
|
-
return hasNewLine(this.input, this.state.lastTokEndLoc.index, this.state.start);
|
|
28452
|
+
return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
|
|
28648
28453
|
}
|
|
28649
28454
|
},
|
|
28650
28455
|
{
|
|
@@ -29137,7 +28942,7 @@ var flow = function(superClass) {
|
|
|
29137
28942
|
{
|
|
29138
28943
|
key: "finishToken",
|
|
29139
28944
|
value: function finishToken(type, val) {
|
|
29140
|
-
if (type !==
|
|
28945
|
+
if (type !== 134 && type !== 13 && type !== 28) {
|
|
29141
28946
|
if (this.flowPragma === void 0) {
|
|
29142
28947
|
this.flowPragma = null;
|
|
29143
28948
|
}
|
|
@@ -29298,7 +29103,7 @@ var flow = function(superClass) {
|
|
|
29298
29103
|
value: function flowParseDeclareModule(node) {
|
|
29299
29104
|
var _this = this;
|
|
29300
29105
|
this.scope.enter(0);
|
|
29301
|
-
if (this.match(
|
|
29106
|
+
if (this.match(134)) {
|
|
29302
29107
|
node.id = _get(_get_prototype_of(FlowParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
29303
29108
|
} else {
|
|
29304
29109
|
node.id = this.parseIdentifier();
|
|
@@ -29571,7 +29376,7 @@ var flow = function(superClass) {
|
|
|
29571
29376
|
var node = this.startNode();
|
|
29572
29377
|
node.params = [];
|
|
29573
29378
|
this.state.inType = true;
|
|
29574
|
-
if (this.match(47) || this.match(
|
|
29379
|
+
if (this.match(47) || this.match(143)) {
|
|
29575
29380
|
this.next();
|
|
29576
29381
|
} else {
|
|
29577
29382
|
this.unexpected();
|
|
@@ -29657,7 +29462,7 @@ var flow = function(superClass) {
|
|
|
29657
29462
|
{
|
|
29658
29463
|
key: "flowParseObjectPropertyKey",
|
|
29659
29464
|
value: function flowParseObjectPropertyKey() {
|
|
29660
|
-
return this.match(
|
|
29465
|
+
return this.match(135) || this.match(134) ? _get(_get_prototype_of(FlowParserMixin.prototype), "parseExprAtom", this).call(this) : this.parseIdentifier(true);
|
|
29661
29466
|
}
|
|
29662
29467
|
},
|
|
29663
29468
|
{
|
|
@@ -30149,7 +29954,7 @@ var flow = function(superClass) {
|
|
|
30149
29954
|
node21.typeParameters = null;
|
|
30150
29955
|
return this.finishNode(node21, "FunctionTypeAnnotation");
|
|
30151
29956
|
}
|
|
30152
|
-
case
|
|
29957
|
+
case 134:
|
|
30153
29958
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
30154
29959
|
case 85:
|
|
30155
29960
|
case 86:
|
|
@@ -30159,19 +29964,19 @@ var flow = function(superClass) {
|
|
|
30159
29964
|
case 53:
|
|
30160
29965
|
if (this.state.value === "-") {
|
|
30161
29966
|
this.next();
|
|
30162
|
-
if (this.match(
|
|
29967
|
+
if (this.match(135)) {
|
|
30163
29968
|
return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
|
|
30164
29969
|
}
|
|
30165
|
-
if (this.match(
|
|
29970
|
+
if (this.match(136)) {
|
|
30166
29971
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
|
|
30167
29972
|
}
|
|
30168
29973
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
30169
29974
|
}
|
|
30170
29975
|
this.unexpected();
|
|
30171
29976
|
return;
|
|
30172
|
-
case 134:
|
|
30173
|
-
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
30174
29977
|
case 135:
|
|
29978
|
+
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
29979
|
+
case 136:
|
|
30175
29980
|
return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
|
|
30176
29981
|
case 88:
|
|
30177
29982
|
this.next();
|
|
@@ -30577,7 +30382,7 @@ var flow = function(superClass) {
|
|
|
30577
30382
|
key: "forwardNoArrowParamsConversionAt",
|
|
30578
30383
|
value: function forwardNoArrowParamsConversionAt(node, parse2) {
|
|
30579
30384
|
var result;
|
|
30580
|
-
if (this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
30385
|
+
if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
30581
30386
|
this.state.noArrowParamsConversionAt.push(this.state.start);
|
|
30582
30387
|
result = parse2();
|
|
30583
30388
|
this.state.noArrowParamsConversionAt.pop();
|
|
@@ -30880,7 +30685,9 @@ var flow = function(superClass) {
|
|
|
30880
30685
|
value: function parseClassSuper(node) {
|
|
30881
30686
|
_get(_get_prototype_of(FlowParserMixin.prototype), "parseClassSuper", this).call(this, node);
|
|
30882
30687
|
if (node.superClass && this.match(47)) {
|
|
30883
|
-
|
|
30688
|
+
{
|
|
30689
|
+
node.superTypeArguments = this.flowParseTypeParameterInstantiation();
|
|
30690
|
+
}
|
|
30884
30691
|
}
|
|
30885
30692
|
if (this.isContextual(113)) {
|
|
30886
30693
|
this.next();
|
|
@@ -31127,7 +30934,7 @@ var flow = function(superClass) {
|
|
|
31127
30934
|
var _this = this;
|
|
31128
30935
|
var state = null;
|
|
31129
30936
|
var jsx2;
|
|
31130
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
30937
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
31131
30938
|
state = this.state.clone();
|
|
31132
30939
|
jsx2 = this.tryParse(function() {
|
|
31133
30940
|
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseMaybeAssign", _this).call(_this, refExpressionErrors, afterLeftParse);
|
|
@@ -31214,7 +31021,7 @@ var flow = function(superClass) {
|
|
|
31214
31021
|
{
|
|
31215
31022
|
key: "setArrowFunctionParameters",
|
|
31216
31023
|
value: function setArrowFunctionParameters(node, params) {
|
|
31217
|
-
if (this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
31024
|
+
if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
31218
31025
|
node.params = params;
|
|
31219
31026
|
} else {
|
|
31220
31027
|
_get(_get_prototype_of(FlowParserMixin.prototype), "setArrowFunctionParameters", this).call(this, node, params);
|
|
@@ -31225,7 +31032,7 @@ var flow = function(superClass) {
|
|
|
31225
31032
|
key: "checkParams",
|
|
31226
31033
|
value: function checkParams(node, allowDuplicates, isArrowFunction) {
|
|
31227
31034
|
var strictModeChanged = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
|
|
31228
|
-
if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(node.start)) {
|
|
31035
|
+
if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) {
|
|
31229
31036
|
return;
|
|
31230
31037
|
}
|
|
31231
31038
|
for(var i = 0; i < node.params.length; i++){
|
|
@@ -31239,7 +31046,7 @@ var flow = function(superClass) {
|
|
|
31239
31046
|
{
|
|
31240
31047
|
key: "parseParenAndDistinguishExpression",
|
|
31241
31048
|
value: function parseParenAndDistinguishExpression(canBeArrow) {
|
|
31242
|
-
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseParenAndDistinguishExpression", this).call(this, canBeArrow && !this.state.noArrowAt.includes(this.state.start));
|
|
31049
|
+
return _get(_get_prototype_of(FlowParserMixin.prototype), "parseParenAndDistinguishExpression", this).call(this, canBeArrow && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)));
|
|
31243
31050
|
}
|
|
31244
31051
|
},
|
|
31245
31052
|
{
|
|
@@ -31459,7 +31266,7 @@ var flow = function(superClass) {
|
|
|
31459
31266
|
return _this.match(12) || _this.match(8);
|
|
31460
31267
|
};
|
|
31461
31268
|
switch(this.state.type){
|
|
31462
|
-
case
|
|
31269
|
+
case 135:
|
|
31463
31270
|
{
|
|
31464
31271
|
var literal = this.parseNumericLiteral(this.state.value);
|
|
31465
31272
|
if (endOfInit()) {
|
|
@@ -31474,7 +31281,7 @@ var flow = function(superClass) {
|
|
|
31474
31281
|
loc: startLoc
|
|
31475
31282
|
};
|
|
31476
31283
|
}
|
|
31477
|
-
case
|
|
31284
|
+
case 134:
|
|
31478
31285
|
{
|
|
31479
31286
|
var literal1 = this.parseStringLiteral(this.state.value);
|
|
31480
31287
|
if (endOfInit()) {
|
|
@@ -32177,14 +31984,14 @@ var jsx = function(superClass) {
|
|
|
32177
31984
|
if (this.state.pos === this.state.start) {
|
|
32178
31985
|
if (ch === 60 && this.state.canStartJSXElement) {
|
|
32179
31986
|
++this.state.pos;
|
|
32180
|
-
this.finishToken(
|
|
31987
|
+
this.finishToken(143);
|
|
32181
31988
|
} else {
|
|
32182
31989
|
_get(_get_prototype_of(JSXParserMixin.prototype), "getTokenFromCode", this).call(this, ch);
|
|
32183
31990
|
}
|
|
32184
31991
|
return;
|
|
32185
31992
|
}
|
|
32186
31993
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
32187
|
-
this.finishToken(
|
|
31994
|
+
this.finishToken(142, out);
|
|
32188
31995
|
return;
|
|
32189
31996
|
case 38:
|
|
32190
31997
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
@@ -32252,7 +32059,7 @@ var jsx = function(superClass) {
|
|
|
32252
32059
|
}
|
|
32253
32060
|
}
|
|
32254
32061
|
out += this.input.slice(chunkStart, this.state.pos++);
|
|
32255
|
-
this.finishToken(
|
|
32062
|
+
this.finishToken(134, out);
|
|
32256
32063
|
}
|
|
32257
32064
|
},
|
|
32258
32065
|
{
|
|
@@ -32298,14 +32105,14 @@ var jsx = function(superClass) {
|
|
|
32298
32105
|
do {
|
|
32299
32106
|
ch = this.input.charCodeAt(++this.state.pos);
|
|
32300
32107
|
}while (isIdentifierChar2(ch) || ch === 45);
|
|
32301
|
-
this.finishToken(
|
|
32108
|
+
this.finishToken(141, this.input.slice(start, this.state.pos));
|
|
32302
32109
|
}
|
|
32303
32110
|
},
|
|
32304
32111
|
{
|
|
32305
32112
|
key: "jsxParseIdentifier",
|
|
32306
32113
|
value: function jsxParseIdentifier() {
|
|
32307
32114
|
var node = this.startNode();
|
|
32308
|
-
if (this.match(
|
|
32115
|
+
if (this.match(141)) {
|
|
32309
32116
|
node.name = this.state.value;
|
|
32310
32117
|
} else if (tokenIsKeyword(this.state.type)) {
|
|
32311
32118
|
node.name = tokenLabelName(this.state.type);
|
|
@@ -32359,8 +32166,8 @@ var jsx = function(superClass) {
|
|
|
32359
32166
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
32360
32167
|
}
|
|
32361
32168
|
return node;
|
|
32362
|
-
case
|
|
32363
|
-
case
|
|
32169
|
+
case 143:
|
|
32170
|
+
case 134:
|
|
32364
32171
|
return this.parseExprAtom();
|
|
32365
32172
|
default:
|
|
32366
32173
|
throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);
|
|
@@ -32429,7 +32236,7 @@ var jsx = function(superClass) {
|
|
|
32429
32236
|
key: "jsxParseOpeningElementAt",
|
|
32430
32237
|
value: function jsxParseOpeningElementAt(startLoc) {
|
|
32431
32238
|
var node = this.startNodeAt(startLoc);
|
|
32432
|
-
if (this.eat(
|
|
32239
|
+
if (this.eat(144)) {
|
|
32433
32240
|
return this.finishNode(node, "JSXOpeningFragment");
|
|
32434
32241
|
}
|
|
32435
32242
|
node.name = this.jsxParseElementName();
|
|
@@ -32440,12 +32247,12 @@ var jsx = function(superClass) {
|
|
|
32440
32247
|
key: "jsxParseOpeningElementAfterName",
|
|
32441
32248
|
value: function jsxParseOpeningElementAfterName(node) {
|
|
32442
32249
|
var attributes = [];
|
|
32443
|
-
while(!this.match(56) && !this.match(
|
|
32250
|
+
while(!this.match(56) && !this.match(144)){
|
|
32444
32251
|
attributes.push(this.jsxParseAttribute());
|
|
32445
32252
|
}
|
|
32446
32253
|
node.attributes = attributes;
|
|
32447
32254
|
node.selfClosing = this.eat(56);
|
|
32448
|
-
this.expect(
|
|
32255
|
+
this.expect(144);
|
|
32449
32256
|
return this.finishNode(node, "JSXOpeningElement");
|
|
32450
32257
|
}
|
|
32451
32258
|
},
|
|
@@ -32453,11 +32260,11 @@ var jsx = function(superClass) {
|
|
|
32453
32260
|
key: "jsxParseClosingElementAt",
|
|
32454
32261
|
value: function jsxParseClosingElementAt(startLoc) {
|
|
32455
32262
|
var node = this.startNodeAt(startLoc);
|
|
32456
|
-
if (this.eat(
|
|
32263
|
+
if (this.eat(144)) {
|
|
32457
32264
|
return this.finishNode(node, "JSXClosingFragment");
|
|
32458
32265
|
}
|
|
32459
32266
|
node.name = this.jsxParseElementName();
|
|
32460
|
-
this.expect(
|
|
32267
|
+
this.expect(144);
|
|
32461
32268
|
return this.finishNode(node, "JSXClosingElement");
|
|
32462
32269
|
}
|
|
32463
32270
|
},
|
|
@@ -32471,7 +32278,7 @@ var jsx = function(superClass) {
|
|
|
32471
32278
|
if (!openingElement.selfClosing) {
|
|
32472
32279
|
contents: for(;;){
|
|
32473
32280
|
switch(this.state.type){
|
|
32474
|
-
case
|
|
32281
|
+
case 143:
|
|
32475
32282
|
startLoc = this.state.startLoc;
|
|
32476
32283
|
this.next();
|
|
32477
32284
|
if (this.eat(56)) {
|
|
@@ -32480,7 +32287,7 @@ var jsx = function(superClass) {
|
|
|
32480
32287
|
}
|
|
32481
32288
|
children.push(this.jsxParseElementAt(startLoc));
|
|
32482
32289
|
break;
|
|
32483
|
-
case
|
|
32290
|
+
case 142:
|
|
32484
32291
|
children.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
32485
32292
|
break;
|
|
32486
32293
|
case 5:
|
|
@@ -32545,10 +32352,10 @@ var jsx = function(superClass) {
|
|
|
32545
32352
|
{
|
|
32546
32353
|
key: "parseExprAtom",
|
|
32547
32354
|
value: function parseExprAtom(refExpressionErrors) {
|
|
32548
|
-
if (this.match(
|
|
32355
|
+
if (this.match(143)) {
|
|
32549
32356
|
return this.jsxParseElement();
|
|
32550
32357
|
} else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
|
|
32551
|
-
this.replaceToken(
|
|
32358
|
+
this.replaceToken(143);
|
|
32552
32359
|
return this.jsxParseElement();
|
|
32553
32360
|
} else {
|
|
32554
32361
|
return _get(_get_prototype_of(JSXParserMixin.prototype), "parseExprAtom", this).call(this, refExpressionErrors);
|
|
@@ -32577,7 +32384,7 @@ var jsx = function(superClass) {
|
|
|
32577
32384
|
}
|
|
32578
32385
|
if (code2 === 62) {
|
|
32579
32386
|
++this.state.pos;
|
|
32580
|
-
this.finishToken(
|
|
32387
|
+
this.finishToken(144);
|
|
32581
32388
|
return;
|
|
32582
32389
|
}
|
|
32583
32390
|
if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
|
|
@@ -32587,7 +32394,7 @@ var jsx = function(superClass) {
|
|
|
32587
32394
|
}
|
|
32588
32395
|
if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
|
|
32589
32396
|
++this.state.pos;
|
|
32590
|
-
this.finishToken(
|
|
32397
|
+
this.finishToken(143);
|
|
32591
32398
|
return;
|
|
32592
32399
|
}
|
|
32593
32400
|
_get(_get_prototype_of(JSXParserMixin.prototype), "getTokenFromCode", this).call(this, code2);
|
|
@@ -32597,12 +32404,12 @@ var jsx = function(superClass) {
|
|
|
32597
32404
|
key: "updateContext",
|
|
32598
32405
|
value: function updateContext(prevType) {
|
|
32599
32406
|
var _this_state = this.state, context = _this_state.context, type = _this_state.type;
|
|
32600
|
-
if (type === 56 && prevType ===
|
|
32407
|
+
if (type === 56 && prevType === 143) {
|
|
32601
32408
|
context.splice(-2, 2, types.j_cTag);
|
|
32602
32409
|
this.state.canStartJSXElement = false;
|
|
32603
|
-
} else if (type === 142) {
|
|
32604
|
-
context.push(types.j_oTag);
|
|
32605
32410
|
} else if (type === 143) {
|
|
32411
|
+
context.push(types.j_oTag);
|
|
32412
|
+
} else if (type === 144) {
|
|
32606
32413
|
var out = context[context.length - 1];
|
|
32607
32414
|
if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) {
|
|
32608
32415
|
context.pop();
|
|
@@ -33055,7 +32862,7 @@ var LValParser = /*#__PURE__*/ function(NodeUtils) {
|
|
|
33055
32862
|
return this.parseBindingRestProperty(this.startNode());
|
|
33056
32863
|
}
|
|
33057
32864
|
var prop = this.startNode();
|
|
33058
|
-
if (type ===
|
|
32865
|
+
if (type === 139) {
|
|
33059
32866
|
this.expectPlugin("destructuringPrivate", startLoc);
|
|
33060
32867
|
this.classScope.usePrivateName(this.state.value, startLoc);
|
|
33061
32868
|
prop.key = this.parsePrivateName();
|
|
@@ -33488,7 +33295,7 @@ var typescript = function(superClass) {
|
|
|
33488
33295
|
{
|
|
33489
33296
|
key: "tsTokenCanFollowModifier",
|
|
33490
33297
|
value: function tsTokenCanFollowModifier() {
|
|
33491
|
-
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(
|
|
33298
|
+
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
|
|
33492
33299
|
}
|
|
33493
33300
|
},
|
|
33494
33301
|
{
|
|
@@ -33690,7 +33497,7 @@ var typescript = function(superClass) {
|
|
|
33690
33497
|
var node = this.startNode();
|
|
33691
33498
|
this.expect(83);
|
|
33692
33499
|
this.expect(10);
|
|
33693
|
-
if (!this.match(
|
|
33500
|
+
if (!this.match(134)) {
|
|
33694
33501
|
this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
|
|
33695
33502
|
}
|
|
33696
33503
|
node.argument = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -33730,7 +33537,9 @@ var typescript = function(superClass) {
|
|
|
33730
33537
|
var node = this.startNode();
|
|
33731
33538
|
node.typeName = this.tsParseEntityName();
|
|
33732
33539
|
if (!this.hasPrecedingLineBreak() && this.match(47)) {
|
|
33733
|
-
|
|
33540
|
+
{
|
|
33541
|
+
node.typeArguments = this.tsParseTypeArguments();
|
|
33542
|
+
}
|
|
33734
33543
|
}
|
|
33735
33544
|
return this.finishNode(node, "TSTypeReference");
|
|
33736
33545
|
}
|
|
@@ -33793,7 +33602,7 @@ var typescript = function(superClass) {
|
|
|
33793
33602
|
key: "tsParseTypeParameters",
|
|
33794
33603
|
value: function tsParseTypeParameters(parseModifiers) {
|
|
33795
33604
|
var node = this.startNode();
|
|
33796
|
-
if (this.match(47) || this.match(
|
|
33605
|
+
if (this.match(47) || this.match(143)) {
|
|
33797
33606
|
this.next();
|
|
33798
33607
|
} else {
|
|
33799
33608
|
this.unexpected();
|
|
@@ -34193,9 +34002,9 @@ var typescript = function(superClass) {
|
|
|
34193
34002
|
value: function tsParseLiteralTypeNode() {
|
|
34194
34003
|
var node = this.startNode();
|
|
34195
34004
|
switch(this.state.type){
|
|
34196
|
-
case 134:
|
|
34197
34005
|
case 135:
|
|
34198
|
-
case
|
|
34006
|
+
case 136:
|
|
34007
|
+
case 134:
|
|
34199
34008
|
case 85:
|
|
34200
34009
|
case 86:
|
|
34201
34010
|
node.literal = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -34236,9 +34045,9 @@ var typescript = function(superClass) {
|
|
|
34236
34045
|
key: "tsParseNonArrayType",
|
|
34237
34046
|
value: function tsParseNonArrayType() {
|
|
34238
34047
|
switch(this.state.type){
|
|
34239
|
-
case 133:
|
|
34240
34048
|
case 134:
|
|
34241
34049
|
case 135:
|
|
34050
|
+
case 136:
|
|
34242
34051
|
case 85:
|
|
34243
34052
|
case 86:
|
|
34244
34053
|
return this.tsParseLiteralTypeNode();
|
|
@@ -34246,7 +34055,7 @@ var typescript = function(superClass) {
|
|
|
34246
34055
|
if (this.state.value === "-") {
|
|
34247
34056
|
var node = this.startNode();
|
|
34248
34057
|
var nextToken = this.lookahead();
|
|
34249
|
-
if (nextToken.type !==
|
|
34058
|
+
if (nextToken.type !== 135 && nextToken.type !== 136) {
|
|
34250
34059
|
this.unexpected();
|
|
34251
34060
|
}
|
|
34252
34061
|
node.literal = this.parseMaybeUnary();
|
|
@@ -34786,7 +34595,7 @@ var typescript = function(superClass) {
|
|
|
34786
34595
|
key: "tsParseEnumMember",
|
|
34787
34596
|
value: function tsParseEnumMember() {
|
|
34788
34597
|
var node = this.startNode();
|
|
34789
|
-
node.id = this.match(
|
|
34598
|
+
node.id = this.match(134) ? _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseStringLiteral", this).call(this, this.state.value) : this.parseIdentifier(true);
|
|
34790
34599
|
if (this.eat(29)) {
|
|
34791
34600
|
node.initializer = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssignAllowIn", this).call(this);
|
|
34792
34601
|
}
|
|
@@ -34823,15 +34632,11 @@ var typescript = function(superClass) {
|
|
|
34823
34632
|
key: "tsParseModuleOrNamespaceDeclaration",
|
|
34824
34633
|
value: function tsParseModuleOrNamespaceDeclaration(node) {
|
|
34825
34634
|
var nested = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
34826
|
-
node.id = this.
|
|
34827
|
-
if (
|
|
34635
|
+
node.id = this.tsParseEntityName();
|
|
34636
|
+
if (node.id.type === "Identifier") {
|
|
34828
34637
|
this.checkIdentifier(node.id, 1024);
|
|
34829
34638
|
}
|
|
34830
|
-
|
|
34831
|
-
var inner = this.startNode();
|
|
34832
|
-
this.tsParseModuleOrNamespaceDeclaration(inner, true);
|
|
34833
|
-
node.body = inner;
|
|
34834
|
-
} else {
|
|
34639
|
+
{
|
|
34835
34640
|
this.scope.enter(256);
|
|
34836
34641
|
this.prodParam.enter(0);
|
|
34837
34642
|
node.body = this.tsParseModuleBlock();
|
|
@@ -34846,9 +34651,8 @@ var typescript = function(superClass) {
|
|
|
34846
34651
|
value: function tsParseAmbientExternalModuleDeclaration(node) {
|
|
34847
34652
|
if (this.isContextual(112)) {
|
|
34848
34653
|
node.kind = "global";
|
|
34849
|
-
node.global = true;
|
|
34850
34654
|
node.id = this.parseIdentifier();
|
|
34851
|
-
} else if (this.match(
|
|
34655
|
+
} else if (this.match(134)) {
|
|
34852
34656
|
node.kind = "module";
|
|
34853
34657
|
node.id = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseStringLiteral", this).call(this, this.state.value);
|
|
34854
34658
|
} else {
|
|
@@ -34900,7 +34704,7 @@ var typescript = function(superClass) {
|
|
|
34900
34704
|
var node = this.startNode();
|
|
34901
34705
|
this.expectContextual(119);
|
|
34902
34706
|
this.expect(10);
|
|
34903
|
-
if (!this.match(
|
|
34707
|
+
if (!this.match(134)) {
|
|
34904
34708
|
this.unexpected();
|
|
34905
34709
|
}
|
|
34906
34710
|
node.expression = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExprAtom", this).call(this);
|
|
@@ -35017,7 +34821,6 @@ var typescript = function(superClass) {
|
|
|
35017
34821
|
this.prodParam.enter(0);
|
|
35018
34822
|
var mod = node;
|
|
35019
34823
|
mod.kind = "global";
|
|
35020
|
-
mod.global = true;
|
|
35021
34824
|
mod.id = expr;
|
|
35022
34825
|
mod.body = this.tsParseModuleBlock();
|
|
35023
34826
|
this.scope.exit();
|
|
@@ -35041,7 +34844,7 @@ var typescript = function(superClass) {
|
|
|
35041
34844
|
break;
|
|
35042
34845
|
case "module":
|
|
35043
34846
|
if (this.tsCheckLineTerminator(next)) {
|
|
35044
|
-
if (this.match(
|
|
34847
|
+
if (this.match(134)) {
|
|
35045
34848
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
35046
34849
|
} else if (tokenIsIdentifier(this.state.type)) {
|
|
35047
34850
|
node.kind = "module";
|
|
@@ -35436,7 +35239,7 @@ var typescript = function(superClass) {
|
|
|
35436
35239
|
{
|
|
35437
35240
|
key: "parseImport",
|
|
35438
35241
|
value: function parseImport(node) {
|
|
35439
|
-
if (this.match(
|
|
35242
|
+
if (this.match(134)) {
|
|
35440
35243
|
node.importKind = "value";
|
|
35441
35244
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseImport", this).call(this, node);
|
|
35442
35245
|
}
|
|
@@ -35795,7 +35598,7 @@ var typescript = function(superClass) {
|
|
|
35795
35598
|
if (node.abstract && this.match(29)) {
|
|
35796
35599
|
var key = node.key;
|
|
35797
35600
|
this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, {
|
|
35798
|
-
propertyName: key.type === "Identifier" && !node.computed ? key.name : "[".concat(this.input.slice(key.start, key.end), "]")
|
|
35601
|
+
propertyName: key.type === "Identifier" && !node.computed ? key.name : "[".concat(this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end)), "]")
|
|
35799
35602
|
});
|
|
35800
35603
|
}
|
|
35801
35604
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseClassProperty", this).call(this, node);
|
|
@@ -35866,7 +35669,9 @@ var typescript = function(superClass) {
|
|
|
35866
35669
|
value: function parseClassSuper(node) {
|
|
35867
35670
|
_get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseClassSuper", this).call(this, node);
|
|
35868
35671
|
if (node.superClass && (this.match(47) || this.match(51))) {
|
|
35869
|
-
|
|
35672
|
+
{
|
|
35673
|
+
node.superTypeArguments = this.tsParseTypeArgumentsInExpression();
|
|
35674
|
+
}
|
|
35870
35675
|
}
|
|
35871
35676
|
if (this.eatContextual(113)) {
|
|
35872
35677
|
node.implements = this.tsParseHeritageClause("implements");
|
|
@@ -35919,7 +35724,7 @@ var typescript = function(superClass) {
|
|
|
35919
35724
|
var state;
|
|
35920
35725
|
var jsx2;
|
|
35921
35726
|
var typeCast;
|
|
35922
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
35727
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
35923
35728
|
state = this.state.clone();
|
|
35924
35729
|
jsx2 = this.tryParse(function() {
|
|
35925
35730
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssign", _this).call(_this, refExpressionErrors, afterLeftParse);
|
|
@@ -36359,7 +36164,7 @@ var typescript = function(superClass) {
|
|
|
36359
36164
|
if (hasBody) {
|
|
36360
36165
|
var key = method.key;
|
|
36361
36166
|
this.raise(TSErrors.AbstractMethodHasImplementation, method, {
|
|
36362
|
-
methodName: key.type === "Identifier" && !method.computed ? key.name : "[".concat(this.input.slice(key.start, key.end), "]")
|
|
36167
|
+
methodName: key.type === "Identifier" && !method.computed ? key.name : "[".concat(this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end)), "]")
|
|
36363
36168
|
});
|
|
36364
36169
|
}
|
|
36365
36170
|
}
|
|
@@ -36558,13 +36363,13 @@ var placeholders = function(superClass) {
|
|
|
36558
36363
|
{
|
|
36559
36364
|
key: "parsePlaceholder",
|
|
36560
36365
|
value: function parsePlaceholder(expectedNode) {
|
|
36561
|
-
if (this.match(
|
|
36366
|
+
if (this.match(133)) {
|
|
36562
36367
|
var node = this.startNode();
|
|
36563
36368
|
this.next();
|
|
36564
36369
|
this.assertNoSpace();
|
|
36565
36370
|
node.name = _get(_get_prototype_of(PlaceholdersParserMixin.prototype), "parseIdentifier", this).call(this, true);
|
|
36566
36371
|
this.assertNoSpace();
|
|
36567
|
-
this.expect(
|
|
36372
|
+
this.expect(133);
|
|
36568
36373
|
return this.finishPlaceholder(node, expectedNode);
|
|
36569
36374
|
}
|
|
36570
36375
|
}
|
|
@@ -36584,7 +36389,7 @@ var placeholders = function(superClass) {
|
|
|
36584
36389
|
key: "getTokenFromCode",
|
|
36585
36390
|
value: function getTokenFromCode(code2) {
|
|
36586
36391
|
if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
|
|
36587
|
-
this.finishOp(
|
|
36392
|
+
this.finishOp(133, 2);
|
|
36588
36393
|
} else {
|
|
36589
36394
|
_get(_get_prototype_of(PlaceholdersParserMixin.prototype), "getTokenFromCode", this).call(this, code2);
|
|
36590
36395
|
}
|
|
@@ -36639,7 +36444,7 @@ var placeholders = function(superClass) {
|
|
|
36639
36444
|
return true;
|
|
36640
36445
|
}
|
|
36641
36446
|
var nextToken = this.lookahead();
|
|
36642
|
-
if (nextToken.type ===
|
|
36447
|
+
if (nextToken.type === 133) {
|
|
36643
36448
|
return true;
|
|
36644
36449
|
}
|
|
36645
36450
|
return false;
|
|
@@ -36692,7 +36497,7 @@ var placeholders = function(superClass) {
|
|
|
36692
36497
|
var oldStrict = this.state.strict;
|
|
36693
36498
|
var placeholder2 = this.parsePlaceholder("Identifier");
|
|
36694
36499
|
if (placeholder2) {
|
|
36695
|
-
if (this.match(81) || this.match(
|
|
36500
|
+
if (this.match(81) || this.match(133) || this.match(5)) {
|
|
36696
36501
|
node.id = placeholder2;
|
|
36697
36502
|
} else if (optionalId || !isStatement5) {
|
|
36698
36503
|
node.id = null;
|
|
@@ -36736,7 +36541,7 @@ var placeholders = function(superClass) {
|
|
|
36736
36541
|
if (this.match(65)) {
|
|
36737
36542
|
var next = this.nextTokenStart();
|
|
36738
36543
|
if (this.isUnparsedContextual(next, "from")) {
|
|
36739
|
-
if (this.input.startsWith(tokenLabelName(
|
|
36544
|
+
if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) {
|
|
36740
36545
|
return true;
|
|
36741
36546
|
}
|
|
36742
36547
|
}
|
|
@@ -36800,7 +36605,7 @@ var placeholders = function(superClass) {
|
|
|
36800
36605
|
{
|
|
36801
36606
|
key: "assertNoSpace",
|
|
36802
36607
|
value: function assertNoSpace() {
|
|
36803
|
-
if (this.state.start > this.state.lastTokEndLoc.index) {
|
|
36608
|
+
if (this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index)) {
|
|
36804
36609
|
this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc);
|
|
36805
36610
|
}
|
|
36806
36611
|
}
|
|
@@ -37071,7 +36876,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37071
36876
|
{
|
|
37072
36877
|
key: "shouldExitDescending",
|
|
37073
36878
|
value: function shouldExitDescending(expr, potentialArrowAt) {
|
|
37074
|
-
return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
|
|
36879
|
+
return expr.type === "ArrowFunctionExpression" && this.offsetToSourcePos(expr.start) === potentialArrowAt;
|
|
37075
36880
|
}
|
|
37076
36881
|
},
|
|
37077
36882
|
{
|
|
@@ -37080,7 +36885,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37080
36885
|
this.enterInitialScopes();
|
|
37081
36886
|
this.nextToken();
|
|
37082
36887
|
var expr = this.parseExpression();
|
|
37083
|
-
if (!this.match(
|
|
36888
|
+
if (!this.match(140)) {
|
|
37084
36889
|
this.unexpected();
|
|
37085
36890
|
}
|
|
37086
36891
|
this.finalizeRemainingComments();
|
|
@@ -37238,7 +37043,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37238
37043
|
{
|
|
37239
37044
|
key: "parseMaybeUnaryOrPrivate",
|
|
37240
37045
|
value: function parseMaybeUnaryOrPrivate(refExpressionErrors) {
|
|
37241
|
-
return this.match(
|
|
37046
|
+
return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
|
|
37242
37047
|
}
|
|
37243
37048
|
},
|
|
37244
37049
|
{
|
|
@@ -37511,7 +37316,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37511
37316
|
if (computed) {
|
|
37512
37317
|
node.property = this.parseExpression();
|
|
37513
37318
|
this.expect(3);
|
|
37514
|
-
} else if (this.match(
|
|
37319
|
+
} else if (this.match(139)) {
|
|
37515
37320
|
if (base.type === "Super") {
|
|
37516
37321
|
this.raise(Errors.SuperPrivateField, startLoc);
|
|
37517
37322
|
}
|
|
@@ -37600,7 +37405,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37600
37405
|
{
|
|
37601
37406
|
key: "atPossibleAsyncArrow",
|
|
37602
37407
|
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;
|
|
37408
|
+
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
37409
|
}
|
|
37605
37410
|
},
|
|
37606
37411
|
{
|
|
@@ -37731,11 +37536,11 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37731
37536
|
this.readRegexp();
|
|
37732
37537
|
return this.parseRegExpLiteral(this.state.value);
|
|
37733
37538
|
}
|
|
37734
|
-
case 134:
|
|
37735
|
-
return this.parseNumericLiteral(this.state.value);
|
|
37736
37539
|
case 135:
|
|
37540
|
+
return this.parseNumericLiteral(this.state.value);
|
|
37541
|
+
case 136:
|
|
37737
37542
|
return this.parseBigIntLiteral(this.state.value);
|
|
37738
|
-
case
|
|
37543
|
+
case 134:
|
|
37739
37544
|
return this.parseStringLiteral(this.state.value);
|
|
37740
37545
|
case 84:
|
|
37741
37546
|
return this.parseNullLiteral();
|
|
@@ -37789,7 +37594,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
37789
37594
|
throw this.raise(Errors.UnsupportedBind, callee);
|
|
37790
37595
|
}
|
|
37791
37596
|
}
|
|
37792
|
-
case
|
|
37597
|
+
case 139:
|
|
37793
37598
|
{
|
|
37794
37599
|
this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {
|
|
37795
37600
|
identifierName: this.state.value
|
|
@@ -38044,7 +37849,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38044
37849
|
this.sawUnambiguousESM = true;
|
|
38045
37850
|
} else if (this.isContextual(105) || this.isContextual(97)) {
|
|
38046
37851
|
var isSource = this.isContextual(105);
|
|
38047
|
-
if (!isSource) this.unexpected();
|
|
38048
37852
|
this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation");
|
|
38049
37853
|
if (!this.options.createImportExpressions) {
|
|
38050
37854
|
throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, {
|
|
@@ -38062,7 +37866,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38062
37866
|
key: "parseLiteralAtNode",
|
|
38063
37867
|
value: function parseLiteralAtNode(value1, type, node) {
|
|
38064
37868
|
this.addExtra(node, "rawValue", value1);
|
|
38065
|
-
this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
|
|
37869
|
+
this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end));
|
|
38066
37870
|
node.value = value1;
|
|
38067
37871
|
this.next();
|
|
38068
37872
|
return this.finishNode(node, type);
|
|
@@ -38103,7 +37907,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38103
37907
|
key: "parseRegExpLiteral",
|
|
38104
37908
|
value: function parseRegExpLiteral(value1) {
|
|
38105
37909
|
var node = this.startNode();
|
|
38106
|
-
this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
|
|
37910
|
+
this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end));
|
|
38107
37911
|
node.pattern = value1.pattern;
|
|
38108
37912
|
node.flags = value1.flags;
|
|
38109
37913
|
this.next();
|
|
@@ -38533,16 +38337,16 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38533
38337
|
key = this.parseIdentifier(true);
|
|
38534
38338
|
} else {
|
|
38535
38339
|
switch(type){
|
|
38536
|
-
case
|
|
38340
|
+
case 135:
|
|
38537
38341
|
key = this.parseNumericLiteral(value1);
|
|
38538
38342
|
break;
|
|
38539
|
-
case
|
|
38343
|
+
case 134:
|
|
38540
38344
|
key = this.parseStringLiteral(value1);
|
|
38541
38345
|
break;
|
|
38542
|
-
case
|
|
38346
|
+
case 136:
|
|
38543
38347
|
key = this.parseBigIntLiteral(value1);
|
|
38544
38348
|
break;
|
|
38545
|
-
case
|
|
38349
|
+
case 139:
|
|
38546
38350
|
{
|
|
38547
38351
|
var privateKeyLoc = this.state.startLoc;
|
|
38548
38352
|
if (refExpressionErrors != null) {
|
|
@@ -38560,7 +38364,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38560
38364
|
}
|
|
38561
38365
|
}
|
|
38562
38366
|
prop.key = key;
|
|
38563
|
-
if (type !==
|
|
38367
|
+
if (type !== 139) {
|
|
38564
38368
|
prop.computed = false;
|
|
38565
38369
|
}
|
|
38566
38370
|
}
|
|
@@ -38888,7 +38692,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38888
38692
|
value: function isAmbiguousAwait() {
|
|
38889
38693
|
if (this.hasPrecedingLineBreak()) return true;
|
|
38890
38694
|
var type = this.state.type;
|
|
38891
|
-
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type ===
|
|
38695
|
+
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
|
|
38892
38696
|
}
|
|
38893
38697
|
},
|
|
38894
38698
|
{
|
|
@@ -38903,7 +38707,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
38903
38707
|
delegating = this.eat(55);
|
|
38904
38708
|
switch(this.state.type){
|
|
38905
38709
|
case 13:
|
|
38906
|
-
case
|
|
38710
|
+
case 140:
|
|
38907
38711
|
case 8:
|
|
38908
38712
|
case 11:
|
|
38909
38713
|
case 3:
|
|
@@ -39144,7 +38948,7 @@ var switchLabel = {
|
|
|
39144
38948
|
};
|
|
39145
38949
|
var loneSurrogate = RegExp("[\uD800-\uDFFF]", "u");
|
|
39146
38950
|
var keywordRelationalOperator = RegExp("in(?:stanceof)?", "y");
|
|
39147
|
-
function babel7CompatTokens(tokens, input) {
|
|
38951
|
+
function babel7CompatTokens(tokens, input, startIndex) {
|
|
39148
38952
|
for(var i = 0; i < tokens.length; i++){
|
|
39149
38953
|
var token = tokens[i];
|
|
39150
38954
|
var type = token.type;
|
|
@@ -39168,7 +38972,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39168
38972
|
file2.program = this.parseProgram(program3);
|
|
39169
38973
|
file2.comments = this.comments;
|
|
39170
38974
|
if (this.options.tokens) {
|
|
39171
|
-
file2.tokens = babel7CompatTokens(this.tokens, this.input);
|
|
38975
|
+
file2.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex);
|
|
39172
38976
|
}
|
|
39173
38977
|
return this.finishNode(file2, "File");
|
|
39174
38978
|
}
|
|
@@ -39176,7 +38980,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39176
38980
|
{
|
|
39177
38981
|
key: "parseProgram",
|
|
39178
38982
|
value: function parseProgram(program3) {
|
|
39179
|
-
var end = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
38983
|
+
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
38984
|
program3.sourceType = sourceType;
|
|
39181
38985
|
program3.interpreter = this.parseInterpreterDirective();
|
|
39182
38986
|
this.parseBlockBody(program3, true, true, end);
|
|
@@ -39208,7 +39012,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39208
39012
|
this.addExtra(program3, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
39209
39013
|
}
|
|
39210
39014
|
var finishedProgram;
|
|
39211
|
-
if (end ===
|
|
39015
|
+
if (end === 140) {
|
|
39212
39016
|
finishedProgram = this.finishNode(program3, "Program");
|
|
39213
39017
|
} else {
|
|
39214
39018
|
finishedProgram = this.finishNodeAt(program3, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
|
|
@@ -39225,7 +39029,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39225
39029
|
delete directive2.expression;
|
|
39226
39030
|
var directiveLiteral2 = directive2.value;
|
|
39227
39031
|
var expressionValue = directiveLiteral2.value;
|
|
39228
|
-
var raw = this.input.slice(directiveLiteral2.start, directiveLiteral2.end);
|
|
39032
|
+
var raw = this.input.slice(this.offsetToSourcePos(directiveLiteral2.start), this.offsetToSourcePos(directiveLiteral2.end));
|
|
39229
39033
|
var val = directiveLiteral2.value = raw.slice(1, -1);
|
|
39230
39034
|
this.addExtra(directiveLiteral2, "raw", raw);
|
|
39231
39035
|
this.addExtra(directiveLiteral2, "rawValue", val);
|
|
@@ -39594,7 +39398,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39594
39398
|
while(this.eat(16)){
|
|
39595
39399
|
var node2 = this.startNodeAt(startLoc);
|
|
39596
39400
|
node2.object = expr;
|
|
39597
|
-
if (this.match(
|
|
39401
|
+
if (this.match(139)) {
|
|
39598
39402
|
this.classScope.usePrivateName(this.state.value, this.state.startLoc);
|
|
39599
39403
|
node2.property = this.parsePrivateName();
|
|
39600
39404
|
} else {
|
|
@@ -39978,7 +39782,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39978
39782
|
for(var i = this.state.labels.length - 1; i >= 0; i--){
|
|
39979
39783
|
var label1 = this.state.labels[i];
|
|
39980
39784
|
if (label1.statementStart === node.start) {
|
|
39981
|
-
label1.statementStart = this.state.start;
|
|
39785
|
+
label1.statementStart = this.sourceToOffsetPos(this.state.start);
|
|
39982
39786
|
label1.kind = kind;
|
|
39983
39787
|
} else {
|
|
39984
39788
|
break;
|
|
@@ -39987,7 +39791,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39987
39791
|
this.state.labels.push({
|
|
39988
39792
|
name: maybeName,
|
|
39989
39793
|
kind: kind,
|
|
39990
|
-
statementStart: this.state.start
|
|
39794
|
+
statementStart: this.sourceToOffsetPos(this.state.start)
|
|
39991
39795
|
});
|
|
39992
39796
|
node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement();
|
|
39993
39797
|
this.state.labels.pop();
|
|
@@ -40364,7 +40168,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40364
40168
|
this.parsePropertyNamePrefixOperator(member);
|
|
40365
40169
|
if (this.eat(55)) {
|
|
40366
40170
|
method.kind = "method";
|
|
40367
|
-
var isPrivateName3 = this.match(
|
|
40171
|
+
var isPrivateName3 = this.match(139);
|
|
40368
40172
|
this.parseClassElementName(method);
|
|
40369
40173
|
if (isPrivateName3) {
|
|
40370
40174
|
this.pushClassPrivateMethod(classBody2, privateMethod, true, false);
|
|
@@ -40415,7 +40219,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40415
40219
|
this.unexpected(maybeQuestionTokenStartLoc);
|
|
40416
40220
|
}
|
|
40417
40221
|
method.kind = "method";
|
|
40418
|
-
var isPrivate3 = this.match(
|
|
40222
|
+
var isPrivate3 = this.match(139);
|
|
40419
40223
|
this.parseClassElementName(method);
|
|
40420
40224
|
this.parsePostMemberNameModifiers(publicMember);
|
|
40421
40225
|
if (isPrivate3) {
|
|
@@ -40429,7 +40233,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40429
40233
|
} else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
40430
40234
|
this.resetPreviousNodeTrailingComments(key);
|
|
40431
40235
|
method.kind = maybeContextualKw;
|
|
40432
|
-
var isPrivate31 = this.match(
|
|
40236
|
+
var isPrivate31 = this.match(139);
|
|
40433
40237
|
this.parseClassElementName(publicMethod);
|
|
40434
40238
|
if (isPrivate31) {
|
|
40435
40239
|
this.pushClassPrivateMethod(classBody2, privateMethod, false, false);
|
|
@@ -40443,7 +40247,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40443
40247
|
} else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
|
|
40444
40248
|
this.expectPlugin("decoratorAutoAccessors");
|
|
40445
40249
|
this.resetPreviousNodeTrailingComments(key);
|
|
40446
|
-
var isPrivate32 = this.match(
|
|
40250
|
+
var isPrivate32 = this.match(139);
|
|
40447
40251
|
this.parseClassElementName(publicProp);
|
|
40448
40252
|
this.pushClassAccessorProperty(classBody2, accessorProp, isPrivate32);
|
|
40449
40253
|
} else if (this.isLineTerminator()) {
|
|
@@ -40461,10 +40265,10 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
40461
40265
|
key: "parseClassElementName",
|
|
40462
40266
|
value: function parseClassElementName(member) {
|
|
40463
40267
|
var _this_state = this.state, type = _this_state.type, value1 = _this_state.value;
|
|
40464
|
-
if ((type === 132 || type ===
|
|
40268
|
+
if ((type === 132 || type === 134) && member.static && value1 === "prototype") {
|
|
40465
40269
|
this.raise(Errors.StaticPrototype, this.state.startLoc);
|
|
40466
40270
|
}
|
|
40467
|
-
if (type ===
|
|
40271
|
+
if (type === 139) {
|
|
40468
40272
|
if (value1 === "constructor") {
|
|
40469
40273
|
this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);
|
|
40470
40274
|
}
|
|
@@ -41025,7 +40829,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41025
40829
|
if (this.eat(8)) break;
|
|
41026
40830
|
}
|
|
41027
40831
|
var isMaybeTypeOnly = this.isContextual(130);
|
|
41028
|
-
var isString = this.match(
|
|
40832
|
+
var isString = this.match(134);
|
|
41029
40833
|
var node = this.startNode();
|
|
41030
40834
|
node.local = this.parseModuleExportName();
|
|
41031
40835
|
nodes2.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
|
|
@@ -41049,7 +40853,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41049
40853
|
{
|
|
41050
40854
|
key: "parseModuleExportName",
|
|
41051
40855
|
value: function parseModuleExportName() {
|
|
41052
|
-
if (this.match(
|
|
40856
|
+
if (this.match(134)) {
|
|
41053
40857
|
var result = this.parseStringLiteral(this.state.value);
|
|
41054
40858
|
var surrogate = loneSurrogate.exec(result.value);
|
|
41055
40859
|
if (surrogate) {
|
|
@@ -41179,7 +40983,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41179
40983
|
{
|
|
41180
40984
|
key: "parseImport",
|
|
41181
40985
|
value: function parseImport(node) {
|
|
41182
|
-
if (this.match(
|
|
40986
|
+
if (this.match(134)) {
|
|
41183
40987
|
return this.parseImportSourceAndAttributes(node);
|
|
41184
40988
|
}
|
|
41185
40989
|
return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false));
|
|
@@ -41213,7 +41017,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41213
41017
|
{
|
|
41214
41018
|
key: "parseImportSource",
|
|
41215
41019
|
value: function parseImportSource() {
|
|
41216
|
-
if (!this.match(
|
|
41020
|
+
if (!this.match(134)) this.unexpected();
|
|
41217
41021
|
return this.parseExprAtom();
|
|
41218
41022
|
}
|
|
41219
41023
|
},
|
|
@@ -41252,13 +41056,13 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41252
41056
|
});
|
|
41253
41057
|
}
|
|
41254
41058
|
attrNames.add(keyName);
|
|
41255
|
-
if (this.match(
|
|
41059
|
+
if (this.match(134)) {
|
|
41256
41060
|
node.key = this.parseStringLiteral(keyName);
|
|
41257
41061
|
} else {
|
|
41258
41062
|
node.key = this.parseIdentifier(true);
|
|
41259
41063
|
}
|
|
41260
41064
|
this.expect(14);
|
|
41261
|
-
if (!this.match(
|
|
41065
|
+
if (!this.match(134)) {
|
|
41262
41066
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
41263
41067
|
}
|
|
41264
41068
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -41286,7 +41090,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41286
41090
|
}
|
|
41287
41091
|
attributes.add(node.key.name);
|
|
41288
41092
|
this.expect(14);
|
|
41289
|
-
if (!this.match(
|
|
41093
|
+
if (!this.match(134)) {
|
|
41290
41094
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
41291
41095
|
}
|
|
41292
41096
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -41368,7 +41172,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
41368
41172
|
if (this.eat(8)) break;
|
|
41369
41173
|
}
|
|
41370
41174
|
var specifier = this.startNode();
|
|
41371
|
-
var importedIsString = this.match(
|
|
41175
|
+
var importedIsString = this.match(134);
|
|
41372
41176
|
var isMaybeTypeOnly = this.isContextual(130);
|
|
41373
41177
|
specifier.imported = this.parseModuleExportName();
|
|
41374
41178
|
var importSpecifier2 = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
|
|
@@ -41420,6 +41224,7 @@ var Parser = /*#__PURE__*/ function(StatementParser) {
|
|
|
41420
41224
|
_this.initializeScopes();
|
|
41421
41225
|
_this.plugins = pluginsMap;
|
|
41422
41226
|
_this.filename = options.sourceFilename;
|
|
41227
|
+
_this.startIndex = options.startIndex;
|
|
41423
41228
|
return _this;
|
|
41424
41229
|
}
|
|
41425
41230
|
_create_class(Parser, [
|
|
@@ -41610,7 +41415,7 @@ var compose = function(f, g) {
|
|
|
41610
41415
|
return f(g(v));
|
|
41611
41416
|
};
|
|
41612
41417
|
};
|
|
41613
|
-
function
|
|
41418
|
+
function buildDefs(colors) {
|
|
41614
41419
|
return {
|
|
41615
41420
|
keyword: colors.cyan,
|
|
41616
41421
|
capitalized: colors.yellow,
|
|
@@ -41627,8 +41432,8 @@ function builDefs(colors) {
|
|
|
41627
41432
|
reset: colors.reset
|
|
41628
41433
|
};
|
|
41629
41434
|
}
|
|
41630
|
-
var defsOn =
|
|
41631
|
-
var defsOff =
|
|
41435
|
+
var defsOn = buildDefs((0, import_picocolors.createColors)(true));
|
|
41436
|
+
var defsOff = buildDefs((0, import_picocolors.createColors)(false));
|
|
41632
41437
|
function getDefs(enabled) {
|
|
41633
41438
|
return enabled ? defsOn : defsOff;
|
|
41634
41439
|
}
|
|
@@ -44463,7 +44268,8 @@ var TokenMap = /*#__PURE__*/ function() {
|
|
|
44463
44268
|
try {
|
|
44464
44269
|
for(var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44465
44270
|
var child = _step.value;
|
|
44466
|
-
if (
|
|
44271
|
+
if (child == null) continue;
|
|
44272
|
+
if (child.start == null || child.end == null) continue;
|
|
44467
44273
|
var childTok = this._findTokensOfNode(child, low, last2);
|
|
44468
44274
|
var high = childTok.first;
|
|
44469
44275
|
for(var k = low; k < high; k++)indexes.push(k);
|
|
@@ -44756,9 +44562,7 @@ function NewExpression(node, parent) {
|
|
|
44756
44562
|
}
|
|
44757
44563
|
this.tokenChar(40);
|
|
44758
44564
|
var exit = this.enterDelimited();
|
|
44759
|
-
this.printList(node.arguments,
|
|
44760
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(")")
|
|
44761
|
-
});
|
|
44565
|
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
|
44762
44566
|
exit();
|
|
44763
44567
|
this.rightParens(node);
|
|
44764
44568
|
}
|
|
@@ -44825,9 +44629,7 @@ function CallExpression(node) {
|
|
|
44825
44629
|
this.print(node.typeParameters);
|
|
44826
44630
|
this.tokenChar(40);
|
|
44827
44631
|
var exit = this.enterDelimited();
|
|
44828
|
-
this.printList(node.arguments,
|
|
44829
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(")")
|
|
44830
|
-
});
|
|
44632
|
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
|
44831
44633
|
exit();
|
|
44832
44634
|
this.rightParens(node);
|
|
44833
44635
|
}
|
|
@@ -45114,11 +44916,8 @@ function SwitchStatement(node) {
|
|
|
45114
44916
|
this.tokenChar(41);
|
|
45115
44917
|
this.space();
|
|
45116
44918
|
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
|
-
}
|
|
44919
|
+
this.printSequence(node.cases, true, void 0, function addNewlines(leading, cas) {
|
|
44920
|
+
if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
|
|
45122
44921
|
});
|
|
45123
44922
|
this.rightBrace(node);
|
|
45124
44923
|
}
|
|
@@ -45134,9 +44933,7 @@ function SwitchCase(node) {
|
|
|
45134
44933
|
}
|
|
45135
44934
|
if (node.consequent.length) {
|
|
45136
44935
|
this.newline();
|
|
45137
|
-
this.printSequence(node.consequent,
|
|
45138
|
-
indent: true
|
|
45139
|
-
});
|
|
44936
|
+
this.printSequence(node.consequent, true);
|
|
45140
44937
|
}
|
|
45141
44938
|
}
|
|
45142
44939
|
function DebuggerStatement() {
|
|
@@ -45182,13 +44979,10 @@ function VariableDeclaration(node, parent) {
|
|
|
45182
44979
|
}
|
|
45183
44980
|
}
|
|
45184
44981
|
}
|
|
45185
|
-
this.printList(node.declarations, {
|
|
45186
|
-
|
|
45187
|
-
|
|
45188
|
-
|
|
45189
|
-
} : void 0,
|
|
45190
|
-
indent: node.declarations.length > 1 ? true : false
|
|
45191
|
-
});
|
|
44982
|
+
this.printList(node.declarations, void 0, void 0, node.declarations.length > 1, hasInits ? function(occurrenceCount) {
|
|
44983
|
+
this.token(",", false, occurrenceCount);
|
|
44984
|
+
this.newline();
|
|
44985
|
+
} : void 0);
|
|
45192
44986
|
if (isFor2(parent)) {
|
|
45193
44987
|
if (isForStatement2(parent)) {
|
|
45194
44988
|
if (parent.init === node) return;
|
|
@@ -45234,7 +45028,7 @@ function ClassDeclaration(node, parent) {
|
|
|
45234
45028
|
this.word("extends");
|
|
45235
45029
|
this.space();
|
|
45236
45030
|
this.print(node.superClass);
|
|
45237
|
-
this.print(node.
|
|
45031
|
+
this.print(node.superTypeArguments);
|
|
45238
45032
|
}
|
|
45239
45033
|
if (node.implements) {
|
|
45240
45034
|
this.space();
|
|
@@ -45254,12 +45048,7 @@ function ClassBody(node) {
|
|
|
45254
45048
|
var separator = classBodyEmptySemicolonsPrinter(this, node);
|
|
45255
45049
|
separator === null || separator === void 0 ? void 0 : separator(-1);
|
|
45256
45050
|
var exit = this.enterDelimited();
|
|
45257
|
-
this.printJoin(node.body,
|
|
45258
|
-
statement: true,
|
|
45259
|
-
indent: true,
|
|
45260
|
-
separator: separator,
|
|
45261
|
-
printTrailingSeparator: true
|
|
45262
|
-
});
|
|
45051
|
+
this.printJoin(node.body, true, true, separator, true);
|
|
45263
45052
|
exit();
|
|
45264
45053
|
if (!this.endsWith(10)) this.newline();
|
|
45265
45054
|
this.rightBrace(node);
|
|
@@ -45399,9 +45188,7 @@ function StaticBlock(node) {
|
|
|
45399
45188
|
this.tokenChar(125);
|
|
45400
45189
|
} else {
|
|
45401
45190
|
this.newline();
|
|
45402
|
-
this.printSequence(node.body,
|
|
45403
|
-
indent: true
|
|
45404
|
-
});
|
|
45191
|
+
this.printSequence(node.body, true);
|
|
45405
45192
|
this.rightBrace(node);
|
|
45406
45193
|
}
|
|
45407
45194
|
}
|
|
@@ -45632,9 +45419,7 @@ function _printAttributes(node, hasPreviousBrace) {
|
|
|
45632
45419
|
var occurrenceCount = hasPreviousBrace ? 1 : 0;
|
|
45633
45420
|
this.token("{", null, occurrenceCount);
|
|
45634
45421
|
this.space();
|
|
45635
|
-
this.printList(attributes || assertions,
|
|
45636
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45637
|
-
});
|
|
45422
|
+
this.printList(attributes || assertions, this.shouldPrintTrailingComma("}"));
|
|
45638
45423
|
this.space();
|
|
45639
45424
|
this.token("}", null, occurrenceCount);
|
|
45640
45425
|
}
|
|
@@ -45698,9 +45483,7 @@ function ExportNamedDeclaration(node) {
|
|
|
45698
45483
|
this.tokenChar(123);
|
|
45699
45484
|
if (specifiers.length) {
|
|
45700
45485
|
this.space();
|
|
45701
|
-
this.printList(specifiers,
|
|
45702
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45703
|
-
});
|
|
45486
|
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
|
45704
45487
|
this.space();
|
|
45705
45488
|
}
|
|
45706
45489
|
this.tokenChar(125);
|
|
@@ -45770,9 +45553,7 @@ function ImportDeclaration(node) {
|
|
|
45770
45553
|
hasBrace = true;
|
|
45771
45554
|
this.tokenChar(123);
|
|
45772
45555
|
this.space();
|
|
45773
|
-
this.printList(specifiers,
|
|
45774
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45775
|
-
});
|
|
45556
|
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
|
45776
45557
|
this.space();
|
|
45777
45558
|
this.tokenChar(125);
|
|
45778
45559
|
} else if (isTypeKind && !hasSpecifiers) {
|
|
@@ -45856,11 +45637,7 @@ function ObjectExpression(node) {
|
|
|
45856
45637
|
if (props.length) {
|
|
45857
45638
|
var exit = this.enterDelimited();
|
|
45858
45639
|
this.space();
|
|
45859
|
-
this.printList(props,
|
|
45860
|
-
indent: true,
|
|
45861
|
-
statement: true,
|
|
45862
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("}")
|
|
45863
|
-
});
|
|
45640
|
+
this.printList(props, this.shouldPrintTrailingComma("}"), true, true);
|
|
45864
45641
|
this.space();
|
|
45865
45642
|
exit();
|
|
45866
45643
|
}
|
|
@@ -45924,11 +45701,7 @@ function RecordExpression(node) {
|
|
|
45924
45701
|
this.token(startToken);
|
|
45925
45702
|
if (props.length) {
|
|
45926
45703
|
this.space();
|
|
45927
|
-
this.printList(props,
|
|
45928
|
-
indent: true,
|
|
45929
|
-
statement: true,
|
|
45930
|
-
printTrailingSeparator: this.shouldPrintTrailingComma(endToken)
|
|
45931
|
-
});
|
|
45704
|
+
this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);
|
|
45932
45705
|
this.space();
|
|
45933
45706
|
}
|
|
45934
45707
|
this.token(endToken);
|
|
@@ -46369,9 +46142,7 @@ function InterfaceTypeAnnotation(node) {
|
|
|
46369
46142
|
this.print(node.body);
|
|
46370
46143
|
}
|
|
46371
46144
|
function IntersectionTypeAnnotation(node) {
|
|
46372
|
-
this.printJoin(node.types,
|
|
46373
|
-
separator: andSeparator
|
|
46374
|
-
});
|
|
46145
|
+
this.printJoin(node.types, void 0, void 0, andSeparator);
|
|
46375
46146
|
}
|
|
46376
46147
|
function MixedTypeAnnotation() {
|
|
46377
46148
|
this.word("mixed");
|
|
@@ -46425,7 +46196,7 @@ function TypeAnnotation(node, parent) {
|
|
|
46425
46196
|
}
|
|
46426
46197
|
function TypeParameterInstantiation(node) {
|
|
46427
46198
|
this.tokenChar(60);
|
|
46428
|
-
this.printList(node.params
|
|
46199
|
+
this.printList(node.params);
|
|
46429
46200
|
this.tokenChar(62);
|
|
46430
46201
|
}
|
|
46431
46202
|
function TypeParameter(node) {
|
|
@@ -46472,17 +46243,12 @@ function ObjectTypeAnnotation(node) {
|
|
|
46472
46243
|
if (props.length) {
|
|
46473
46244
|
this.newline();
|
|
46474
46245
|
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
|
-
}
|
|
46246
|
+
this.printJoin(props, true, true, void 0, void 0, function addNewlines(leading) {
|
|
46247
|
+
if (leading && !props[0]) return 1;
|
|
46248
|
+
}, function() {
|
|
46249
|
+
if (props.length !== 1 || node.inexact) {
|
|
46250
|
+
_this.tokenChar(44);
|
|
46251
|
+
_this.space();
|
|
46486
46252
|
}
|
|
46487
46253
|
});
|
|
46488
46254
|
this.space();
|
|
@@ -46583,9 +46349,7 @@ function orSeparator(occurrenceCount) {
|
|
|
46583
46349
|
this.space();
|
|
46584
46350
|
}
|
|
46585
46351
|
function UnionTypeAnnotation(node) {
|
|
46586
|
-
this.printJoin(node.types,
|
|
46587
|
-
separator: orSeparator
|
|
46588
|
-
});
|
|
46352
|
+
this.printJoin(node.types, void 0, void 0, orSeparator);
|
|
46589
46353
|
}
|
|
46590
46354
|
function TypeCastExpression(node) {
|
|
46591
46355
|
this.tokenChar(40);
|
|
@@ -46632,9 +46396,7 @@ function Program(node) {
|
|
|
46632
46396
|
if (directivesLen) {
|
|
46633
46397
|
var _node_directives__trailingComments;
|
|
46634
46398
|
var newline = node.body.length ? 2 : 1;
|
|
46635
|
-
this.printSequence(node.directives,
|
|
46636
|
-
trailingCommentsLineOffset: newline
|
|
46637
|
-
});
|
|
46399
|
+
this.printSequence(node.directives, void 0, newline);
|
|
46638
46400
|
if (!((_node_directives__trailingComments = node.directives[directivesLen - 1].trailingComments) === null || _node_directives__trailingComments === void 0 ? void 0 : _node_directives__trailingComments.length)) {
|
|
46639
46401
|
this.newline(newline);
|
|
46640
46402
|
}
|
|
@@ -46649,17 +46411,12 @@ function BlockStatement(node) {
|
|
|
46649
46411
|
if (directivesLen) {
|
|
46650
46412
|
var _node_directives__trailingComments;
|
|
46651
46413
|
var newline = node.body.length ? 2 : 1;
|
|
46652
|
-
this.printSequence(node.directives,
|
|
46653
|
-
indent: true,
|
|
46654
|
-
trailingCommentsLineOffset: newline
|
|
46655
|
-
});
|
|
46414
|
+
this.printSequence(node.directives, true, newline);
|
|
46656
46415
|
if (!((_node_directives__trailingComments = node.directives[directivesLen - 1].trailingComments) === null || _node_directives__trailingComments === void 0 ? void 0 : _node_directives__trailingComments.length)) {
|
|
46657
46416
|
this.newline(newline);
|
|
46658
46417
|
}
|
|
46659
46418
|
}
|
|
46660
|
-
this.printSequence(node.body,
|
|
46661
|
-
indent: true
|
|
46662
|
-
});
|
|
46419
|
+
this.printSequence(node.body, true);
|
|
46663
46420
|
exit();
|
|
46664
46421
|
this.rightBrace(node);
|
|
46665
46422
|
}
|
|
@@ -46778,9 +46535,7 @@ function JSXOpeningElement(node) {
|
|
|
46778
46535
|
this.print(node.typeParameters);
|
|
46779
46536
|
if (node.attributes.length > 0) {
|
|
46780
46537
|
this.space();
|
|
46781
|
-
this.printJoin(node.attributes,
|
|
46782
|
-
separator: spaceSeparator
|
|
46783
|
-
});
|
|
46538
|
+
this.printJoin(node.attributes, void 0, void 0, spaceSeparator);
|
|
46784
46539
|
}
|
|
46785
46540
|
if (node.selfClosing) {
|
|
46786
46541
|
this.space();
|
|
@@ -46847,9 +46602,7 @@ function TSTypeParameterInstantiation(node, parent) {
|
|
|
46847
46602
|
}));
|
|
46848
46603
|
printTrailingSeparator || (printTrailingSeparator = this.shouldPrintTrailingComma(">"));
|
|
46849
46604
|
}
|
|
46850
|
-
this.printList(node.params,
|
|
46851
|
-
printTrailingSeparator: printTrailingSeparator
|
|
46852
|
-
});
|
|
46605
|
+
this.printList(node.params, printTrailingSeparator);
|
|
46853
46606
|
this.tokenChar(62);
|
|
46854
46607
|
}
|
|
46855
46608
|
function TSTypeParameter(node) {
|
|
@@ -47036,8 +46789,9 @@ function tsPrintFunctionOrConstructorType(node) {
|
|
|
47036
46789
|
this.print(returnType);
|
|
47037
46790
|
}
|
|
47038
46791
|
function TSTypeReference(node) {
|
|
47039
|
-
|
|
47040
|
-
this.print(node.
|
|
46792
|
+
var typeArguments = node.typeArguments;
|
|
46793
|
+
this.print(node.typeName, !!typeArguments);
|
|
46794
|
+
this.print(typeArguments);
|
|
47041
46795
|
}
|
|
47042
46796
|
function TSTypePredicate(node) {
|
|
47043
46797
|
if (node.asserts) {
|
|
@@ -47063,10 +46817,7 @@ function TSTypeQuery(node) {
|
|
|
47063
46817
|
function TSTypeLiteral(node) {
|
|
47064
46818
|
var _this = this;
|
|
47065
46819
|
printBraced(this, node, function() {
|
|
47066
|
-
return _this.printJoin(node.members,
|
|
47067
|
-
indent: true,
|
|
47068
|
-
statement: true
|
|
47069
|
-
});
|
|
46820
|
+
return _this.printJoin(node.members, true, true);
|
|
47070
46821
|
});
|
|
47071
46822
|
}
|
|
47072
46823
|
function TSArrayType(node) {
|
|
@@ -47076,9 +46827,7 @@ function TSArrayType(node) {
|
|
|
47076
46827
|
}
|
|
47077
46828
|
function TSTupleType(node) {
|
|
47078
46829
|
this.tokenChar(91);
|
|
47079
|
-
this.printList(node.elementTypes,
|
|
47080
|
-
printTrailingSeparator: this.shouldPrintTrailingComma("]")
|
|
47081
|
-
});
|
|
46830
|
+
this.printList(node.elementTypes, this.shouldPrintTrailingComma("]"));
|
|
47082
46831
|
this.tokenChar(93);
|
|
47083
46832
|
}
|
|
47084
46833
|
function TSOptionalType(node) {
|
|
@@ -47109,12 +46858,10 @@ function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
|
|
47109
46858
|
hasLeadingToken = 1;
|
|
47110
46859
|
printer.token(sep);
|
|
47111
46860
|
}
|
|
47112
|
-
printer.printJoin(node.types, {
|
|
47113
|
-
|
|
47114
|
-
|
|
47115
|
-
|
|
47116
|
-
this.space();
|
|
47117
|
-
}
|
|
46861
|
+
printer.printJoin(node.types, void 0, void 0, function(i) {
|
|
46862
|
+
this.space();
|
|
46863
|
+
this.token(sep, null, i + hasLeadingToken);
|
|
46864
|
+
this.space();
|
|
47118
46865
|
});
|
|
47119
46866
|
}
|
|
47120
46867
|
function TSConditionalType(node) {
|
|
@@ -47226,10 +46973,7 @@ function TSInterfaceDeclaration(node) {
|
|
|
47226
46973
|
function TSInterfaceBody(node) {
|
|
47227
46974
|
var _this = this;
|
|
47228
46975
|
printBraced(this, node, function() {
|
|
47229
|
-
return _this.printJoin(node.body,
|
|
47230
|
-
indent: true,
|
|
47231
|
-
statement: true
|
|
47232
|
-
});
|
|
46976
|
+
return _this.printJoin(node.body, true, true);
|
|
47233
46977
|
});
|
|
47234
46978
|
}
|
|
47235
46979
|
function TSTypeAliasDeclaration(node) {
|
|
@@ -47285,11 +47029,7 @@ function TSEnumDeclaration(node) {
|
|
|
47285
47029
|
this.space();
|
|
47286
47030
|
printBraced(this, node, function() {
|
|
47287
47031
|
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
|
-
});
|
|
47032
|
+
return _this.printList(members, (_this_shouldPrintTrailingComma = _this.shouldPrintTrailingComma("}")) !== null && _this_shouldPrintTrailingComma !== void 0 ? _this_shouldPrintTrailingComma : true, true, true);
|
|
47293
47033
|
});
|
|
47294
47034
|
}
|
|
47295
47035
|
function TSEnumMember(node) {
|
|
@@ -47308,30 +47048,24 @@ function TSModuleDeclaration(node) {
|
|
|
47308
47048
|
this.word("declare");
|
|
47309
47049
|
this.space();
|
|
47310
47050
|
}
|
|
47311
|
-
|
|
47312
|
-
|
|
47051
|
+
{
|
|
47052
|
+
if (kind !== "global") {
|
|
47053
|
+
this.word(kind);
|
|
47054
|
+
this.space();
|
|
47055
|
+
}
|
|
47056
|
+
this.print(node.id);
|
|
47057
|
+
if (!node.body) {
|
|
47058
|
+
this.semicolon();
|
|
47059
|
+
return;
|
|
47060
|
+
}
|
|
47313
47061
|
this.space();
|
|
47062
|
+
this.print(node.body);
|
|
47314
47063
|
}
|
|
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
47064
|
}
|
|
47329
47065
|
function TSModuleBlock(node) {
|
|
47330
47066
|
var _this = this;
|
|
47331
47067
|
printBraced(this, node, function() {
|
|
47332
|
-
return _this.printSequence(node.body,
|
|
47333
|
-
indent: true
|
|
47334
|
-
});
|
|
47068
|
+
return _this.printSequence(node.body, true);
|
|
47335
47069
|
});
|
|
47336
47070
|
}
|
|
47337
47071
|
function TSImportType(node) {
|
|
@@ -47779,6 +47513,8 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47779
47513
|
__publicField(this, "_indentInnerComments", true);
|
|
47780
47514
|
__publicField(this, "tokenMap", null);
|
|
47781
47515
|
__publicField(this, "_boundGetRawIdentifier", this._getRawIdentifier.bind(this));
|
|
47516
|
+
__publicField(this, "_printSemicolonBeforeNextNode", -1);
|
|
47517
|
+
__publicField(this, "_printSemicolonBeforeNextToken", -1);
|
|
47782
47518
|
this.format = format;
|
|
47783
47519
|
this._tokens = tokens;
|
|
47784
47520
|
this._originalCode = originalCode;
|
|
@@ -47860,6 +47596,7 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47860
47596
|
var node = this._currentNode;
|
|
47861
47597
|
if (node.start != null && node.end != null) {
|
|
47862
47598
|
if (!this.tokenMap.endMatches(node, ";")) {
|
|
47599
|
+
this._printSemicolonBeforeNextNode = this._buf.getCurrentLine();
|
|
47863
47600
|
return;
|
|
47864
47601
|
}
|
|
47865
47602
|
var indexes = this.tokenMap.getIndexes(this._currentNode);
|
|
@@ -47909,10 +47646,11 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47909
47646
|
var noLineTerminatorAfter = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
47910
47647
|
this.tokenContext = 0;
|
|
47911
47648
|
this._maybePrintInnerComments(str);
|
|
47649
|
+
this._maybeAddAuxComment();
|
|
47650
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str);
|
|
47912
47651
|
if (this._endsWithWord || this._endsWithDiv && str.charCodeAt(0) === 47) {
|
|
47913
47652
|
this._space();
|
|
47914
47653
|
}
|
|
47915
|
-
this._maybeAddAuxComment();
|
|
47916
47654
|
this._append(str, false);
|
|
47917
47655
|
this._endsWithWord = true;
|
|
47918
47656
|
this._noLineTerminator = noLineTerminatorAfter;
|
|
@@ -47938,13 +47676,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47938
47676
|
var maybeNewline = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, occurrenceCount = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
47939
47677
|
this.tokenContext = 0;
|
|
47940
47678
|
this._maybePrintInnerComments(str, occurrenceCount);
|
|
47679
|
+
this._maybeAddAuxComment();
|
|
47680
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str, occurrenceCount);
|
|
47941
47681
|
var lastChar = this.getLastChar();
|
|
47942
47682
|
var strFirst = str.charCodeAt(0);
|
|
47943
47683
|
if (lastChar === 33 && (str === "--" || strFirst === 61) || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) {
|
|
47944
47684
|
this._space();
|
|
47945
47685
|
}
|
|
47946
|
-
this.
|
|
47947
|
-
this._append(str, maybeNewline, occurrenceCount);
|
|
47686
|
+
this._append(str, maybeNewline);
|
|
47948
47687
|
this._noLineTerminator = false;
|
|
47949
47688
|
}
|
|
47950
47689
|
},
|
|
@@ -47952,12 +47691,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
47952
47691
|
key: "tokenChar",
|
|
47953
47692
|
value: function tokenChar(char) {
|
|
47954
47693
|
this.tokenContext = 0;
|
|
47955
|
-
|
|
47694
|
+
var str = String.fromCharCode(char);
|
|
47695
|
+
this._maybePrintInnerComments(str);
|
|
47696
|
+
this._maybeAddAuxComment();
|
|
47697
|
+
if (this.tokenMap) this._catchUpToCurrentToken(str);
|
|
47956
47698
|
var lastChar = this.getLastChar();
|
|
47957
47699
|
if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) {
|
|
47958
47700
|
this._space();
|
|
47959
47701
|
}
|
|
47960
|
-
this._maybeAddAuxComment();
|
|
47961
47702
|
this._appendChar(char);
|
|
47962
47703
|
this._noLineTerminator = false;
|
|
47963
47704
|
}
|
|
@@ -48054,14 +47795,25 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48054
47795
|
this._queue(10);
|
|
48055
47796
|
}
|
|
48056
47797
|
},
|
|
47798
|
+
{
|
|
47799
|
+
key: "_catchUpToCurrentToken",
|
|
47800
|
+
value: function _catchUpToCurrentToken(str) {
|
|
47801
|
+
var occurrenceCount = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
47802
|
+
var token = this.tokenMap.findMatching(this._currentNode, str, occurrenceCount);
|
|
47803
|
+
if (token) this._catchUpTo(token.loc.start);
|
|
47804
|
+
if (this._printSemicolonBeforeNextToken !== -1 && this._printSemicolonBeforeNextToken === this._buf.getCurrentLine()) {
|
|
47805
|
+
this._buf.appendChar(59);
|
|
47806
|
+
this._endsWithWord = false;
|
|
47807
|
+
this._endsWithInteger = false;
|
|
47808
|
+
this._endsWithDiv = false;
|
|
47809
|
+
}
|
|
47810
|
+
this._printSemicolonBeforeNextToken = -1;
|
|
47811
|
+
this._printSemicolonBeforeNextNode = -1;
|
|
47812
|
+
}
|
|
47813
|
+
},
|
|
48057
47814
|
{
|
|
48058
47815
|
key: "_append",
|
|
48059
47816
|
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
47817
|
this._maybeIndent(str.charCodeAt(0));
|
|
48066
47818
|
this._buf.append(str, maybeNewline);
|
|
48067
47819
|
this._endsWithWord = false;
|
|
@@ -48072,10 +47824,6 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48072
47824
|
{
|
|
48073
47825
|
key: "_appendChar",
|
|
48074
47826
|
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
47827
|
this._maybeIndent(char);
|
|
48080
47828
|
this._buf.appendChar(char);
|
|
48081
47829
|
this._endsWithWord = false;
|
|
@@ -48181,6 +47929,9 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48181
47929
|
}
|
|
48182
47930
|
var parent = this._currentNode;
|
|
48183
47931
|
this._currentNode = node;
|
|
47932
|
+
if (this.tokenMap) {
|
|
47933
|
+
this._printSemicolonBeforeNextToken = this._printSemicolonBeforeNextNode;
|
|
47934
|
+
}
|
|
48184
47935
|
var oldInAux = this._insideAux;
|
|
48185
47936
|
this._insideAux = node.loc == null;
|
|
48186
47937
|
this._maybeAddAuxComment(this._insideAux && !oldInAux);
|
|
@@ -48306,10 +48057,8 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48306
48057
|
},
|
|
48307
48058
|
{
|
|
48308
48059
|
key: "printJoin",
|
|
48309
|
-
value: function printJoin(nodes2) {
|
|
48310
|
-
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
48060
|
+
value: function printJoin(nodes2, statement2, indent, separator, printTrailingSeparator, addNewlines, iterator, trailingCommentsLineOffset) {
|
|
48311
48061
|
if (!(nodes2 === null || nodes2 === void 0 ? void 0 : nodes2.length)) return;
|
|
48312
|
-
var indent = opts.indent;
|
|
48313
48062
|
if (indent == null && this.format.retainLines) {
|
|
48314
48063
|
var _nodes2__loc;
|
|
48315
48064
|
var startLine = (_nodes2__loc = nodes2[0].loc) === null || _nodes2__loc === void 0 ? void 0 : _nodes2__loc.start.line;
|
|
@@ -48319,23 +48068,22 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48319
48068
|
}
|
|
48320
48069
|
if (indent) this.indent();
|
|
48321
48070
|
var newlineOpts = {
|
|
48322
|
-
addNewlines:
|
|
48071
|
+
addNewlines: addNewlines,
|
|
48323
48072
|
nextNodeStartLine: 0
|
|
48324
48073
|
};
|
|
48325
|
-
var
|
|
48074
|
+
var boundSeparator = separator === null || separator === void 0 ? void 0 : separator.bind(this);
|
|
48326
48075
|
var len = nodes2.length;
|
|
48327
48076
|
for(var i = 0; i < len; i++){
|
|
48328
|
-
var _opts_iterator;
|
|
48329
48077
|
var node = nodes2[i];
|
|
48330
48078
|
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 (
|
|
48079
|
+
if (statement2) this._printNewline(i === 0, newlineOpts);
|
|
48080
|
+
this.print(node, void 0, trailingCommentsLineOffset || 0);
|
|
48081
|
+
iterator === null || iterator === void 0 ? void 0 : iterator(node, i);
|
|
48082
|
+
if (boundSeparator != null) {
|
|
48083
|
+
if (i < len - 1) boundSeparator(i, false);
|
|
48084
|
+
else if (printTrailingSeparator) boundSeparator(i, true);
|
|
48085
|
+
}
|
|
48086
|
+
if (statement2) {
|
|
48339
48087
|
var _node_trailingComments;
|
|
48340
48088
|
if (!((_node_trailingComments = node.trailingComments) === null || _node_trailingComments === void 0 ? void 0 : _node_trailingComments.length)) {
|
|
48341
48089
|
this._lastCommentLine = 0;
|
|
@@ -48428,22 +48176,14 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48428
48176
|
},
|
|
48429
48177
|
{
|
|
48430
48178
|
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);
|
|
48179
|
+
value: function printSequence(nodes2, indent, trailingCommentsLineOffset, addNewlines) {
|
|
48180
|
+
this.printJoin(nodes2, true, indent !== null && indent !== void 0 ? indent : false, void 0, void 0, addNewlines, void 0, trailingCommentsLineOffset);
|
|
48437
48181
|
}
|
|
48438
48182
|
},
|
|
48439
48183
|
{
|
|
48440
48184
|
key: "printList",
|
|
48441
|
-
value: function printList(items) {
|
|
48442
|
-
|
|
48443
|
-
if (opts.separator == null) {
|
|
48444
|
-
opts.separator = commaSeparator;
|
|
48445
|
-
}
|
|
48446
|
-
this.printJoin(items, opts);
|
|
48185
|
+
value: function printList(items, printTrailingSeparator, statement2, indent, separator, iterator) {
|
|
48186
|
+
this.printJoin(items, statement2, indent, separator !== null && separator !== void 0 ? separator : commaSeparator, printTrailingSeparator, void 0, iterator);
|
|
48447
48187
|
}
|
|
48448
48188
|
},
|
|
48449
48189
|
{
|
|
@@ -48546,8 +48286,18 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
48546
48286
|
val = "/*".concat(comment.value, "*/");
|
|
48547
48287
|
}
|
|
48548
48288
|
if (this._endsWithDiv) this._space();
|
|
48549
|
-
this.
|
|
48550
|
-
|
|
48289
|
+
if (this.tokenMap) {
|
|
48290
|
+
var _this = this, _printSemicolonBeforeNextToken = _this._printSemicolonBeforeNextToken, _printSemicolonBeforeNextNode = _this._printSemicolonBeforeNextNode;
|
|
48291
|
+
this._printSemicolonBeforeNextToken = -1;
|
|
48292
|
+
this._printSemicolonBeforeNextNode = -1;
|
|
48293
|
+
this.source("start", comment.loc);
|
|
48294
|
+
this._append(val, isBlockComment);
|
|
48295
|
+
this._printSemicolonBeforeNextNode = _printSemicolonBeforeNextNode;
|
|
48296
|
+
this._printSemicolonBeforeNextToken = _printSemicolonBeforeNextToken;
|
|
48297
|
+
} else {
|
|
48298
|
+
this.source("start", comment.loc);
|
|
48299
|
+
this._append(val, isBlockComment);
|
|
48300
|
+
}
|
|
48551
48301
|
if (!isBlockComment && !noLineTerminator) {
|
|
48552
48302
|
this.newline(1, true);
|
|
48553
48303
|
}
|
|
@@ -49137,7 +48887,7 @@ function verify$1(visitor) {
|
|
|
49137
48887
|
}
|
|
49138
48888
|
if (shouldIgnoreKey(nodeType)) continue;
|
|
49139
48889
|
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.
|
|
48890
|
+
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
48891
|
}
|
|
49142
48892
|
var visitors2 = visitor[nodeType];
|
|
49143
48893
|
if ((typeof visitors2 === "undefined" ? "undefined" : _type_of(visitors2)) === "object") {
|
|
@@ -50539,8 +50289,14 @@ var _Scope = /*#__PURE__*/ function() {
|
|
|
50539
50289
|
this.globals = /* @__PURE__ */ Object.create(null);
|
|
50540
50290
|
this.uids = /* @__PURE__ */ Object.create(null);
|
|
50541
50291
|
this.data = /* @__PURE__ */ Object.create(null);
|
|
50542
|
-
var
|
|
50543
|
-
|
|
50292
|
+
var scope2 = this;
|
|
50293
|
+
do {
|
|
50294
|
+
if (scope2.crawling) return;
|
|
50295
|
+
if (scope2.path.isProgram()) {
|
|
50296
|
+
break;
|
|
50297
|
+
}
|
|
50298
|
+
}while (scope2 = scope2.parent);
|
|
50299
|
+
var programParent = scope2;
|
|
50544
50300
|
var state = {
|
|
50545
50301
|
references: [],
|
|
50546
50302
|
constantViolations: [],
|