@putout/babel 5.2.7 → 5.2.8
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 -0
- package/bundle/index.js +841 -914
- package/bundle/metafile-esm.json +1 -1
- package/package.json +1 -1
package/bundle/index.js
CHANGED
|
@@ -40,91 +40,6 @@ isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
|
|
|
40
40
|
enumerable: true,
|
|
41
41
|
}) : target, mod));
|
|
42
42
|
|
|
43
|
-
// ../babel-babel/node_modules/picocolors/picocolors.js
|
|
44
|
-
var require_picocolors = __commonJS({
|
|
45
|
-
'../babel-babel/node_modules/picocolors/picocolors.js'(exports, module) {
|
|
46
|
-
var p = process || {};
|
|
47
|
-
var argv = p.argv || [];
|
|
48
|
-
var env = p.env || {};
|
|
49
|
-
var isColorSupported2 = !(!!env.NO_COLOR || argv.includes('--no-color'))
|
|
50
|
-
&& (!!env.FORCE_COLOR
|
|
51
|
-
|| argv.includes('--color')
|
|
52
|
-
|| p.platform === 'win32'
|
|
53
|
-
|| (p.stdout || {}).isTTY
|
|
54
|
-
&& env.TERM !== 'dumb'
|
|
55
|
-
|| !!env.CI);
|
|
56
|
-
|
|
57
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
58
|
-
let string = '' + input, index3 = string.indexOf(close, open.length);
|
|
59
|
-
return ~index3 ? open + replaceClose(string, close, replace, index3) + close : open + string + close;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var replaceClose = (string, close, replace, index3) => {
|
|
63
|
-
let result = '', cursor = 0;
|
|
64
|
-
|
|
65
|
-
do {
|
|
66
|
-
result += string.substring(cursor, index3) + replace;
|
|
67
|
-
cursor = index3 + close.length;
|
|
68
|
-
index3 = string.indexOf(close, cursor);
|
|
69
|
-
} while (~index3)
|
|
70
|
-
|
|
71
|
-
return result + string.substring(cursor);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var createColors2 = (enabled2 = isColorSupported2) => {
|
|
75
|
-
let f = enabled2 ? formatter : () => String;
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
isColorSupported: enabled2,
|
|
79
|
-
reset: f('\x1B[0m', '\x1B[0m'),
|
|
80
|
-
bold: f('\x1B[1m', '\x1B[22m', '\x1B[22m\x1B[1m'),
|
|
81
|
-
dim: f('\x1B[2m', '\x1B[22m', '\x1B[22m\x1B[2m'),
|
|
82
|
-
italic: f('\x1B[3m', '\x1B[23m'),
|
|
83
|
-
underline: f('\x1B[4m', '\x1B[24m'),
|
|
84
|
-
inverse: f('\x1B[7m', '\x1B[27m'),
|
|
85
|
-
hidden: f('\x1B[8m', '\x1B[28m'),
|
|
86
|
-
strikethrough: f('\x1B[9m', '\x1B[29m'),
|
|
87
|
-
black: f('\x1B[30m', '\x1B[39m'),
|
|
88
|
-
red: f('\x1B[31m', '\x1B[39m'),
|
|
89
|
-
green: f('\x1B[32m', '\x1B[39m'),
|
|
90
|
-
yellow: f('\x1B[33m', '\x1B[39m'),
|
|
91
|
-
blue: f('\x1B[34m', '\x1B[39m'),
|
|
92
|
-
magenta: f('\x1B[35m', '\x1B[39m'),
|
|
93
|
-
cyan: f('\x1B[36m', '\x1B[39m'),
|
|
94
|
-
white: f('\x1B[37m', '\x1B[39m'),
|
|
95
|
-
gray: f('\x1B[90m', '\x1B[39m'),
|
|
96
|
-
bgBlack: f('\x1B[40m', '\x1B[49m'),
|
|
97
|
-
bgRed: f('\x1B[41m', '\x1B[49m'),
|
|
98
|
-
bgGreen: f('\x1B[42m', '\x1B[49m'),
|
|
99
|
-
bgYellow: f('\x1B[43m', '\x1B[49m'),
|
|
100
|
-
bgBlue: f('\x1B[44m', '\x1B[49m'),
|
|
101
|
-
bgMagenta: f('\x1B[45m', '\x1B[49m'),
|
|
102
|
-
bgCyan: f('\x1B[46m', '\x1B[49m'),
|
|
103
|
-
bgWhite: f('\x1B[47m', '\x1B[49m'),
|
|
104
|
-
blackBright: f('\x1B[90m', '\x1B[39m'),
|
|
105
|
-
redBright: f('\x1B[91m', '\x1B[39m'),
|
|
106
|
-
greenBright: f('\x1B[92m', '\x1B[39m'),
|
|
107
|
-
yellowBright: f('\x1B[93m', '\x1B[39m'),
|
|
108
|
-
blueBright: f('\x1B[94m', '\x1B[39m'),
|
|
109
|
-
magentaBright: f('\x1B[95m', '\x1B[39m'),
|
|
110
|
-
cyanBright: f('\x1B[96m', '\x1B[39m'),
|
|
111
|
-
whiteBright: f('\x1B[97m', '\x1B[39m'),
|
|
112
|
-
bgBlackBright: f('\x1B[100m', '\x1B[49m'),
|
|
113
|
-
bgRedBright: f('\x1B[101m', '\x1B[49m'),
|
|
114
|
-
bgGreenBright: f('\x1B[102m', '\x1B[49m'),
|
|
115
|
-
bgYellowBright: f('\x1B[103m', '\x1B[49m'),
|
|
116
|
-
bgBlueBright: f('\x1B[104m', '\x1B[49m'),
|
|
117
|
-
bgMagentaBright: f('\x1B[105m', '\x1B[49m'),
|
|
118
|
-
bgCyanBright: f('\x1B[106m', '\x1B[49m'),
|
|
119
|
-
bgWhiteBright: f('\x1B[107m', '\x1B[49m'),
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
module.exports = createColors2();
|
|
124
|
-
module.exports.createColors = createColors2;
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
|
|
128
43
|
// ../babel-babel/node_modules/jsesc/jsesc.js
|
|
129
44
|
var require_jsesc = __commonJS({
|
|
130
45
|
'../babel-babel/node_modules/jsesc/jsesc.js'(exports, module) {
|
|
@@ -11613,8 +11528,8 @@ function arrayExpression(elements) {
|
|
|
11613
11528
|
elements,
|
|
11614
11529
|
};
|
|
11615
11530
|
|
|
11616
|
-
const
|
|
11617
|
-
validate(
|
|
11531
|
+
const defs2 = NODE_FIELDS.ArrayExpression;
|
|
11532
|
+
validate(defs2.elements, node, 'elements', elements, 1);
|
|
11618
11533
|
return node;
|
|
11619
11534
|
}
|
|
11620
11535
|
|
|
@@ -11626,10 +11541,10 @@ function assignmentExpression(operator, left, right) {
|
|
|
11626
11541
|
right,
|
|
11627
11542
|
};
|
|
11628
11543
|
|
|
11629
|
-
const
|
|
11630
|
-
validate(
|
|
11631
|
-
validate(
|
|
11632
|
-
validate(
|
|
11544
|
+
const defs2 = NODE_FIELDS.AssignmentExpression;
|
|
11545
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11546
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11547
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11633
11548
|
return node;
|
|
11634
11549
|
}
|
|
11635
11550
|
|
|
@@ -11641,10 +11556,10 @@ function binaryExpression(operator, left, right) {
|
|
|
11641
11556
|
right,
|
|
11642
11557
|
};
|
|
11643
11558
|
|
|
11644
|
-
const
|
|
11645
|
-
validate(
|
|
11646
|
-
validate(
|
|
11647
|
-
validate(
|
|
11559
|
+
const defs2 = NODE_FIELDS.BinaryExpression;
|
|
11560
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11561
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11562
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11648
11563
|
return node;
|
|
11649
11564
|
}
|
|
11650
11565
|
|
|
@@ -11654,8 +11569,8 @@ function interpreterDirective(value) {
|
|
|
11654
11569
|
value,
|
|
11655
11570
|
};
|
|
11656
11571
|
|
|
11657
|
-
const
|
|
11658
|
-
validate(
|
|
11572
|
+
const defs2 = NODE_FIELDS.InterpreterDirective;
|
|
11573
|
+
validate(defs2.value, node, 'value', value);
|
|
11659
11574
|
return node;
|
|
11660
11575
|
}
|
|
11661
11576
|
|
|
@@ -11665,8 +11580,8 @@ function directive(value) {
|
|
|
11665
11580
|
value,
|
|
11666
11581
|
};
|
|
11667
11582
|
|
|
11668
|
-
const
|
|
11669
|
-
validate(
|
|
11583
|
+
const defs2 = NODE_FIELDS.Directive;
|
|
11584
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
11670
11585
|
return node;
|
|
11671
11586
|
}
|
|
11672
11587
|
|
|
@@ -11676,8 +11591,8 @@ function directiveLiteral(value) {
|
|
|
11676
11591
|
value,
|
|
11677
11592
|
};
|
|
11678
11593
|
|
|
11679
|
-
const
|
|
11680
|
-
validate(
|
|
11594
|
+
const defs2 = NODE_FIELDS.DirectiveLiteral;
|
|
11595
|
+
validate(defs2.value, node, 'value', value);
|
|
11681
11596
|
return node;
|
|
11682
11597
|
}
|
|
11683
11598
|
|
|
@@ -11688,9 +11603,9 @@ function blockStatement(body, directives = []) {
|
|
|
11688
11603
|
directives,
|
|
11689
11604
|
};
|
|
11690
11605
|
|
|
11691
|
-
const
|
|
11692
|
-
validate(
|
|
11693
|
-
validate(
|
|
11606
|
+
const defs2 = NODE_FIELDS.BlockStatement;
|
|
11607
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11608
|
+
validate(defs2.directives, node, 'directives', directives, 1);
|
|
11694
11609
|
return node;
|
|
11695
11610
|
}
|
|
11696
11611
|
|
|
@@ -11700,8 +11615,8 @@ function breakStatement(label = null) {
|
|
|
11700
11615
|
label,
|
|
11701
11616
|
};
|
|
11702
11617
|
|
|
11703
|
-
const
|
|
11704
|
-
validate(
|
|
11618
|
+
const defs2 = NODE_FIELDS.BreakStatement;
|
|
11619
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11705
11620
|
return node;
|
|
11706
11621
|
}
|
|
11707
11622
|
|
|
@@ -11712,9 +11627,9 @@ function callExpression(callee, _arguments) {
|
|
|
11712
11627
|
arguments: _arguments,
|
|
11713
11628
|
};
|
|
11714
11629
|
|
|
11715
|
-
const
|
|
11716
|
-
validate(
|
|
11717
|
-
validate(
|
|
11630
|
+
const defs2 = NODE_FIELDS.CallExpression;
|
|
11631
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
11632
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
11718
11633
|
return node;
|
|
11719
11634
|
}
|
|
11720
11635
|
|
|
@@ -11725,9 +11640,9 @@ function catchClause(param = null, body) {
|
|
|
11725
11640
|
body,
|
|
11726
11641
|
};
|
|
11727
11642
|
|
|
11728
|
-
const
|
|
11729
|
-
validate(
|
|
11730
|
-
validate(
|
|
11643
|
+
const defs2 = NODE_FIELDS.CatchClause;
|
|
11644
|
+
validate(defs2.param, node, 'param', param, 1);
|
|
11645
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11731
11646
|
return node;
|
|
11732
11647
|
}
|
|
11733
11648
|
|
|
@@ -11739,10 +11654,10 @@ function conditionalExpression(test, consequent, alternate) {
|
|
|
11739
11654
|
alternate,
|
|
11740
11655
|
};
|
|
11741
11656
|
|
|
11742
|
-
const
|
|
11743
|
-
validate(
|
|
11744
|
-
validate(
|
|
11745
|
-
validate(
|
|
11657
|
+
const defs2 = NODE_FIELDS.ConditionalExpression;
|
|
11658
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11659
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
11660
|
+
validate(defs2.alternate, node, 'alternate', alternate, 1);
|
|
11746
11661
|
return node;
|
|
11747
11662
|
}
|
|
11748
11663
|
|
|
@@ -11752,8 +11667,8 @@ function continueStatement(label = null) {
|
|
|
11752
11667
|
label,
|
|
11753
11668
|
};
|
|
11754
11669
|
|
|
11755
|
-
const
|
|
11756
|
-
validate(
|
|
11670
|
+
const defs2 = NODE_FIELDS.ContinueStatement;
|
|
11671
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11757
11672
|
return node;
|
|
11758
11673
|
}
|
|
11759
11674
|
|
|
@@ -11770,9 +11685,9 @@ function doWhileStatement(test, body) {
|
|
|
11770
11685
|
body,
|
|
11771
11686
|
};
|
|
11772
11687
|
|
|
11773
|
-
const
|
|
11774
|
-
validate(
|
|
11775
|
-
validate(
|
|
11688
|
+
const defs2 = NODE_FIELDS.DoWhileStatement;
|
|
11689
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11690
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11776
11691
|
return node;
|
|
11777
11692
|
}
|
|
11778
11693
|
|
|
@@ -11788,8 +11703,8 @@ function expressionStatement(expression2) {
|
|
|
11788
11703
|
expression: expression2,
|
|
11789
11704
|
};
|
|
11790
11705
|
|
|
11791
|
-
const
|
|
11792
|
-
validate(
|
|
11706
|
+
const defs2 = NODE_FIELDS.ExpressionStatement;
|
|
11707
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
11793
11708
|
return node;
|
|
11794
11709
|
}
|
|
11795
11710
|
|
|
@@ -11801,10 +11716,10 @@ function file(program3, comments = null, tokens = null) {
|
|
|
11801
11716
|
tokens,
|
|
11802
11717
|
};
|
|
11803
11718
|
|
|
11804
|
-
const
|
|
11805
|
-
validate(
|
|
11806
|
-
validate(
|
|
11807
|
-
validate(
|
|
11719
|
+
const defs2 = NODE_FIELDS.File;
|
|
11720
|
+
validate(defs2.program, node, 'program', program3, 1);
|
|
11721
|
+
validate(defs2.comments, node, 'comments', comments, 1);
|
|
11722
|
+
validate(defs2.tokens, node, 'tokens', tokens);
|
|
11808
11723
|
return node;
|
|
11809
11724
|
}
|
|
11810
11725
|
|
|
@@ -11816,10 +11731,10 @@ function forInStatement(left, right, body) {
|
|
|
11816
11731
|
body,
|
|
11817
11732
|
};
|
|
11818
11733
|
|
|
11819
|
-
const
|
|
11820
|
-
validate(
|
|
11821
|
-
validate(
|
|
11822
|
-
validate(
|
|
11734
|
+
const defs2 = NODE_FIELDS.ForInStatement;
|
|
11735
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11736
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11737
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11823
11738
|
return node;
|
|
11824
11739
|
}
|
|
11825
11740
|
|
|
@@ -11832,11 +11747,11 @@ function forStatement(init = null, test = null, update = null, body) {
|
|
|
11832
11747
|
body,
|
|
11833
11748
|
};
|
|
11834
11749
|
|
|
11835
|
-
const
|
|
11836
|
-
validate(
|
|
11837
|
-
validate(
|
|
11838
|
-
validate(
|
|
11839
|
-
validate(
|
|
11750
|
+
const defs2 = NODE_FIELDS.ForStatement;
|
|
11751
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
11752
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11753
|
+
validate(defs2.update, node, 'update', update, 1);
|
|
11754
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11840
11755
|
return node;
|
|
11841
11756
|
}
|
|
11842
11757
|
|
|
@@ -11850,12 +11765,12 @@ function functionDeclaration(id = null, params, body, generator = false, async =
|
|
|
11850
11765
|
async,
|
|
11851
11766
|
};
|
|
11852
11767
|
|
|
11853
|
-
const
|
|
11854
|
-
validate(
|
|
11855
|
-
validate(
|
|
11856
|
-
validate(
|
|
11857
|
-
validate(
|
|
11858
|
-
validate(
|
|
11768
|
+
const defs2 = NODE_FIELDS.FunctionDeclaration;
|
|
11769
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
11770
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11771
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11772
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11773
|
+
validate(defs2.async, node, 'async', async);
|
|
11859
11774
|
return node;
|
|
11860
11775
|
}
|
|
11861
11776
|
|
|
@@ -11869,12 +11784,12 @@ function functionExpression(id = null, params, body, generator = false, async =
|
|
|
11869
11784
|
async,
|
|
11870
11785
|
};
|
|
11871
11786
|
|
|
11872
|
-
const
|
|
11873
|
-
validate(
|
|
11874
|
-
validate(
|
|
11875
|
-
validate(
|
|
11876
|
-
validate(
|
|
11877
|
-
validate(
|
|
11787
|
+
const defs2 = NODE_FIELDS.FunctionExpression;
|
|
11788
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
11789
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11790
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11791
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11792
|
+
validate(defs2.async, node, 'async', async);
|
|
11878
11793
|
return node;
|
|
11879
11794
|
}
|
|
11880
11795
|
|
|
@@ -11884,8 +11799,8 @@ function identifier(name) {
|
|
|
11884
11799
|
name,
|
|
11885
11800
|
};
|
|
11886
11801
|
|
|
11887
|
-
const
|
|
11888
|
-
validate(
|
|
11802
|
+
const defs2 = NODE_FIELDS.Identifier;
|
|
11803
|
+
validate(defs2.name, node, 'name', name);
|
|
11889
11804
|
return node;
|
|
11890
11805
|
}
|
|
11891
11806
|
|
|
@@ -11897,10 +11812,10 @@ function ifStatement(test, consequent, alternate = null) {
|
|
|
11897
11812
|
alternate,
|
|
11898
11813
|
};
|
|
11899
11814
|
|
|
11900
|
-
const
|
|
11901
|
-
validate(
|
|
11902
|
-
validate(
|
|
11903
|
-
validate(
|
|
11815
|
+
const defs2 = NODE_FIELDS.IfStatement;
|
|
11816
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11817
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
11818
|
+
validate(defs2.alternate, node, 'alternate', alternate, 1);
|
|
11904
11819
|
return node;
|
|
11905
11820
|
}
|
|
11906
11821
|
|
|
@@ -11911,9 +11826,9 @@ function labeledStatement(label, body) {
|
|
|
11911
11826
|
body,
|
|
11912
11827
|
};
|
|
11913
11828
|
|
|
11914
|
-
const
|
|
11915
|
-
validate(
|
|
11916
|
-
validate(
|
|
11829
|
+
const defs2 = NODE_FIELDS.LabeledStatement;
|
|
11830
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11831
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11917
11832
|
return node;
|
|
11918
11833
|
}
|
|
11919
11834
|
|
|
@@ -11923,8 +11838,8 @@ function stringLiteral(value) {
|
|
|
11923
11838
|
value,
|
|
11924
11839
|
};
|
|
11925
11840
|
|
|
11926
|
-
const
|
|
11927
|
-
validate(
|
|
11841
|
+
const defs2 = NODE_FIELDS.StringLiteral;
|
|
11842
|
+
validate(defs2.value, node, 'value', value);
|
|
11928
11843
|
return node;
|
|
11929
11844
|
}
|
|
11930
11845
|
|
|
@@ -11934,8 +11849,8 @@ function numericLiteral(value) {
|
|
|
11934
11849
|
value,
|
|
11935
11850
|
};
|
|
11936
11851
|
|
|
11937
|
-
const
|
|
11938
|
-
validate(
|
|
11852
|
+
const defs2 = NODE_FIELDS.NumericLiteral;
|
|
11853
|
+
validate(defs2.value, node, 'value', value);
|
|
11939
11854
|
return node;
|
|
11940
11855
|
}
|
|
11941
11856
|
|
|
@@ -11951,8 +11866,8 @@ function booleanLiteral(value) {
|
|
|
11951
11866
|
value,
|
|
11952
11867
|
};
|
|
11953
11868
|
|
|
11954
|
-
const
|
|
11955
|
-
validate(
|
|
11869
|
+
const defs2 = NODE_FIELDS.BooleanLiteral;
|
|
11870
|
+
validate(defs2.value, node, 'value', value);
|
|
11956
11871
|
return node;
|
|
11957
11872
|
}
|
|
11958
11873
|
|
|
@@ -11963,9 +11878,9 @@ function regExpLiteral(pattern, flags = '') {
|
|
|
11963
11878
|
flags,
|
|
11964
11879
|
};
|
|
11965
11880
|
|
|
11966
|
-
const
|
|
11967
|
-
validate(
|
|
11968
|
-
validate(
|
|
11881
|
+
const defs2 = NODE_FIELDS.RegExpLiteral;
|
|
11882
|
+
validate(defs2.pattern, node, 'pattern', pattern);
|
|
11883
|
+
validate(defs2.flags, node, 'flags', flags);
|
|
11969
11884
|
return node;
|
|
11970
11885
|
}
|
|
11971
11886
|
|
|
@@ -11977,10 +11892,10 @@ function logicalExpression(operator, left, right) {
|
|
|
11977
11892
|
right,
|
|
11978
11893
|
};
|
|
11979
11894
|
|
|
11980
|
-
const
|
|
11981
|
-
validate(
|
|
11982
|
-
validate(
|
|
11983
|
-
validate(
|
|
11895
|
+
const defs2 = NODE_FIELDS.LogicalExpression;
|
|
11896
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11897
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11898
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11984
11899
|
return node;
|
|
11985
11900
|
}
|
|
11986
11901
|
|
|
@@ -11992,10 +11907,10 @@ function memberExpression(object, property, computed = false) {
|
|
|
11992
11907
|
computed,
|
|
11993
11908
|
};
|
|
11994
11909
|
|
|
11995
|
-
const
|
|
11996
|
-
validate(
|
|
11997
|
-
validate(
|
|
11998
|
-
validate(
|
|
11910
|
+
const defs2 = NODE_FIELDS.MemberExpression;
|
|
11911
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
11912
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
11913
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
11999
11914
|
return node;
|
|
12000
11915
|
}
|
|
12001
11916
|
|
|
@@ -12006,9 +11921,9 @@ function newExpression(callee, _arguments) {
|
|
|
12006
11921
|
arguments: _arguments,
|
|
12007
11922
|
};
|
|
12008
11923
|
|
|
12009
|
-
const
|
|
12010
|
-
validate(
|
|
12011
|
-
validate(
|
|
11924
|
+
const defs2 = NODE_FIELDS.NewExpression;
|
|
11925
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
11926
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
12012
11927
|
return node;
|
|
12013
11928
|
}
|
|
12014
11929
|
|
|
@@ -12021,11 +11936,11 @@ function program(body, directives = [], sourceType = 'script', interpreter = nul
|
|
|
12021
11936
|
interpreter,
|
|
12022
11937
|
};
|
|
12023
11938
|
|
|
12024
|
-
const
|
|
12025
|
-
validate(
|
|
12026
|
-
validate(
|
|
12027
|
-
validate(
|
|
12028
|
-
validate(
|
|
11939
|
+
const defs2 = NODE_FIELDS.Program;
|
|
11940
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11941
|
+
validate(defs2.directives, node, 'directives', directives, 1);
|
|
11942
|
+
validate(defs2.sourceType, node, 'sourceType', sourceType);
|
|
11943
|
+
validate(defs2.interpreter, node, 'interpreter', interpreter, 1);
|
|
12029
11944
|
return node;
|
|
12030
11945
|
}
|
|
12031
11946
|
|
|
@@ -12035,8 +11950,8 @@ function objectExpression(properties) {
|
|
|
12035
11950
|
properties,
|
|
12036
11951
|
};
|
|
12037
11952
|
|
|
12038
|
-
const
|
|
12039
|
-
validate(
|
|
11953
|
+
const defs2 = NODE_FIELDS.ObjectExpression;
|
|
11954
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
12040
11955
|
return node;
|
|
12041
11956
|
}
|
|
12042
11957
|
|
|
@@ -12052,14 +11967,14 @@ function objectMethod(kind, key, params, body, computed = false, generator = fal
|
|
|
12052
11967
|
async,
|
|
12053
11968
|
};
|
|
12054
11969
|
|
|
12055
|
-
const
|
|
12056
|
-
validate(
|
|
12057
|
-
validate(
|
|
12058
|
-
validate(
|
|
12059
|
-
validate(
|
|
12060
|
-
validate(
|
|
12061
|
-
validate(
|
|
12062
|
-
validate(
|
|
11970
|
+
const defs2 = NODE_FIELDS.ObjectMethod;
|
|
11971
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
11972
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
11973
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11974
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11975
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
11976
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11977
|
+
validate(defs2.async, node, 'async', async);
|
|
12063
11978
|
return node;
|
|
12064
11979
|
}
|
|
12065
11980
|
|
|
@@ -12072,11 +11987,11 @@ function objectProperty(key, value, computed = false, shorthand = false) {
|
|
|
12072
11987
|
shorthand,
|
|
12073
11988
|
};
|
|
12074
11989
|
|
|
12075
|
-
const
|
|
12076
|
-
validate(
|
|
12077
|
-
validate(
|
|
12078
|
-
validate(
|
|
12079
|
-
validate(
|
|
11990
|
+
const defs2 = NODE_FIELDS.ObjectProperty;
|
|
11991
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
11992
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
11993
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
11994
|
+
validate(defs2.shorthand, node, 'shorthand', shorthand);
|
|
12080
11995
|
return node;
|
|
12081
11996
|
}
|
|
12082
11997
|
|
|
@@ -12086,8 +12001,8 @@ function restElement(argument) {
|
|
|
12086
12001
|
argument,
|
|
12087
12002
|
};
|
|
12088
12003
|
|
|
12089
|
-
const
|
|
12090
|
-
validate(
|
|
12004
|
+
const defs2 = NODE_FIELDS.RestElement;
|
|
12005
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12091
12006
|
return node;
|
|
12092
12007
|
}
|
|
12093
12008
|
|
|
@@ -12097,8 +12012,8 @@ function returnStatement(argument = null) {
|
|
|
12097
12012
|
argument,
|
|
12098
12013
|
};
|
|
12099
12014
|
|
|
12100
|
-
const
|
|
12101
|
-
validate(
|
|
12015
|
+
const defs2 = NODE_FIELDS.ReturnStatement;
|
|
12016
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12102
12017
|
return node;
|
|
12103
12018
|
}
|
|
12104
12019
|
|
|
@@ -12108,8 +12023,8 @@ function sequenceExpression(expressions) {
|
|
|
12108
12023
|
expressions,
|
|
12109
12024
|
};
|
|
12110
12025
|
|
|
12111
|
-
const
|
|
12112
|
-
validate(
|
|
12026
|
+
const defs2 = NODE_FIELDS.SequenceExpression;
|
|
12027
|
+
validate(defs2.expressions, node, 'expressions', expressions, 1);
|
|
12113
12028
|
return node;
|
|
12114
12029
|
}
|
|
12115
12030
|
|
|
@@ -12119,8 +12034,8 @@ function parenthesizedExpression(expression2) {
|
|
|
12119
12034
|
expression: expression2,
|
|
12120
12035
|
};
|
|
12121
12036
|
|
|
12122
|
-
const
|
|
12123
|
-
validate(
|
|
12037
|
+
const defs2 = NODE_FIELDS.ParenthesizedExpression;
|
|
12038
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
12124
12039
|
return node;
|
|
12125
12040
|
}
|
|
12126
12041
|
|
|
@@ -12131,9 +12046,9 @@ function switchCase(test = null, consequent) {
|
|
|
12131
12046
|
consequent,
|
|
12132
12047
|
};
|
|
12133
12048
|
|
|
12134
|
-
const
|
|
12135
|
-
validate(
|
|
12136
|
-
validate(
|
|
12049
|
+
const defs2 = NODE_FIELDS.SwitchCase;
|
|
12050
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
12051
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
12137
12052
|
return node;
|
|
12138
12053
|
}
|
|
12139
12054
|
|
|
@@ -12144,9 +12059,9 @@ function switchStatement(discriminant, cases) {
|
|
|
12144
12059
|
cases,
|
|
12145
12060
|
};
|
|
12146
12061
|
|
|
12147
|
-
const
|
|
12148
|
-
validate(
|
|
12149
|
-
validate(
|
|
12062
|
+
const defs2 = NODE_FIELDS.SwitchStatement;
|
|
12063
|
+
validate(defs2.discriminant, node, 'discriminant', discriminant, 1);
|
|
12064
|
+
validate(defs2.cases, node, 'cases', cases, 1);
|
|
12150
12065
|
return node;
|
|
12151
12066
|
}
|
|
12152
12067
|
|
|
@@ -12162,8 +12077,8 @@ function throwStatement(argument) {
|
|
|
12162
12077
|
argument,
|
|
12163
12078
|
};
|
|
12164
12079
|
|
|
12165
|
-
const
|
|
12166
|
-
validate(
|
|
12080
|
+
const defs2 = NODE_FIELDS.ThrowStatement;
|
|
12081
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12167
12082
|
return node;
|
|
12168
12083
|
}
|
|
12169
12084
|
|
|
@@ -12175,10 +12090,10 @@ function tryStatement(block, handler = null, finalizer = null) {
|
|
|
12175
12090
|
finalizer,
|
|
12176
12091
|
};
|
|
12177
12092
|
|
|
12178
|
-
const
|
|
12179
|
-
validate(
|
|
12180
|
-
validate(
|
|
12181
|
-
validate(
|
|
12093
|
+
const defs2 = NODE_FIELDS.TryStatement;
|
|
12094
|
+
validate(defs2.block, node, 'block', block, 1);
|
|
12095
|
+
validate(defs2.handler, node, 'handler', handler, 1);
|
|
12096
|
+
validate(defs2.finalizer, node, 'finalizer', finalizer, 1);
|
|
12182
12097
|
return node;
|
|
12183
12098
|
}
|
|
12184
12099
|
|
|
@@ -12190,10 +12105,10 @@ function unaryExpression(operator, argument, prefix2 = true) {
|
|
|
12190
12105
|
prefix: prefix2,
|
|
12191
12106
|
};
|
|
12192
12107
|
|
|
12193
|
-
const
|
|
12194
|
-
validate(
|
|
12195
|
-
validate(
|
|
12196
|
-
validate(
|
|
12108
|
+
const defs2 = NODE_FIELDS.UnaryExpression;
|
|
12109
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
12110
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12111
|
+
validate(defs2.prefix, node, 'prefix', prefix2);
|
|
12197
12112
|
return node;
|
|
12198
12113
|
}
|
|
12199
12114
|
|
|
@@ -12205,10 +12120,10 @@ function updateExpression(operator, argument, prefix2 = false) {
|
|
|
12205
12120
|
prefix: prefix2,
|
|
12206
12121
|
};
|
|
12207
12122
|
|
|
12208
|
-
const
|
|
12209
|
-
validate(
|
|
12210
|
-
validate(
|
|
12211
|
-
validate(
|
|
12123
|
+
const defs2 = NODE_FIELDS.UpdateExpression;
|
|
12124
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
12125
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12126
|
+
validate(defs2.prefix, node, 'prefix', prefix2);
|
|
12212
12127
|
return node;
|
|
12213
12128
|
}
|
|
12214
12129
|
|
|
@@ -12219,9 +12134,9 @@ function variableDeclaration(kind, declarations) {
|
|
|
12219
12134
|
declarations,
|
|
12220
12135
|
};
|
|
12221
12136
|
|
|
12222
|
-
const
|
|
12223
|
-
validate(
|
|
12224
|
-
validate(
|
|
12137
|
+
const defs2 = NODE_FIELDS.VariableDeclaration;
|
|
12138
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12139
|
+
validate(defs2.declarations, node, 'declarations', declarations, 1);
|
|
12225
12140
|
return node;
|
|
12226
12141
|
}
|
|
12227
12142
|
|
|
@@ -12232,9 +12147,9 @@ function variableDeclarator(id, init = null) {
|
|
|
12232
12147
|
init,
|
|
12233
12148
|
};
|
|
12234
12149
|
|
|
12235
|
-
const
|
|
12236
|
-
validate(
|
|
12237
|
-
validate(
|
|
12150
|
+
const defs2 = NODE_FIELDS.VariableDeclarator;
|
|
12151
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12152
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
12238
12153
|
return node;
|
|
12239
12154
|
}
|
|
12240
12155
|
|
|
@@ -12245,9 +12160,9 @@ function whileStatement(test, body) {
|
|
|
12245
12160
|
body,
|
|
12246
12161
|
};
|
|
12247
12162
|
|
|
12248
|
-
const
|
|
12249
|
-
validate(
|
|
12250
|
-
validate(
|
|
12163
|
+
const defs2 = NODE_FIELDS.WhileStatement;
|
|
12164
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
12165
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12251
12166
|
return node;
|
|
12252
12167
|
}
|
|
12253
12168
|
|
|
@@ -12258,9 +12173,9 @@ function withStatement(object, body) {
|
|
|
12258
12173
|
body,
|
|
12259
12174
|
};
|
|
12260
12175
|
|
|
12261
|
-
const
|
|
12262
|
-
validate(
|
|
12263
|
-
validate(
|
|
12176
|
+
const defs2 = NODE_FIELDS.WithStatement;
|
|
12177
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
12178
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12264
12179
|
return node;
|
|
12265
12180
|
}
|
|
12266
12181
|
|
|
@@ -12271,9 +12186,9 @@ function assignmentPattern(left, right) {
|
|
|
12271
12186
|
right,
|
|
12272
12187
|
};
|
|
12273
12188
|
|
|
12274
|
-
const
|
|
12275
|
-
validate(
|
|
12276
|
-
validate(
|
|
12189
|
+
const defs2 = NODE_FIELDS.AssignmentPattern;
|
|
12190
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
12191
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12277
12192
|
return node;
|
|
12278
12193
|
}
|
|
12279
12194
|
|
|
@@ -12283,8 +12198,8 @@ function arrayPattern(elements) {
|
|
|
12283
12198
|
elements,
|
|
12284
12199
|
};
|
|
12285
12200
|
|
|
12286
|
-
const
|
|
12287
|
-
validate(
|
|
12201
|
+
const defs2 = NODE_FIELDS.ArrayPattern;
|
|
12202
|
+
validate(defs2.elements, node, 'elements', elements, 1);
|
|
12288
12203
|
return node;
|
|
12289
12204
|
}
|
|
12290
12205
|
|
|
@@ -12297,10 +12212,10 @@ function arrowFunctionExpression(params, body, async = false) {
|
|
|
12297
12212
|
expression: body.type !== 'BlockStatement',
|
|
12298
12213
|
};
|
|
12299
12214
|
|
|
12300
|
-
const
|
|
12301
|
-
validate(
|
|
12302
|
-
validate(
|
|
12303
|
-
validate(
|
|
12215
|
+
const defs2 = NODE_FIELDS.ArrowFunctionExpression;
|
|
12216
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12217
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12218
|
+
validate(defs2.async, node, 'async', async);
|
|
12304
12219
|
return node;
|
|
12305
12220
|
}
|
|
12306
12221
|
|
|
@@ -12310,8 +12225,8 @@ function classBody(body) {
|
|
|
12310
12225
|
body,
|
|
12311
12226
|
};
|
|
12312
12227
|
|
|
12313
|
-
const
|
|
12314
|
-
validate(
|
|
12228
|
+
const defs2 = NODE_FIELDS.ClassBody;
|
|
12229
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12315
12230
|
return node;
|
|
12316
12231
|
}
|
|
12317
12232
|
|
|
@@ -12324,11 +12239,11 @@ function classExpression(id = null, superClass = null, body, decorators = null)
|
|
|
12324
12239
|
decorators,
|
|
12325
12240
|
};
|
|
12326
12241
|
|
|
12327
|
-
const
|
|
12328
|
-
validate(
|
|
12329
|
-
validate(
|
|
12330
|
-
validate(
|
|
12331
|
-
validate(
|
|
12242
|
+
const defs2 = NODE_FIELDS.ClassExpression;
|
|
12243
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12244
|
+
validate(defs2.superClass, node, 'superClass', superClass, 1);
|
|
12245
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12246
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12332
12247
|
return node;
|
|
12333
12248
|
}
|
|
12334
12249
|
|
|
@@ -12341,11 +12256,11 @@ function classDeclaration(id = null, superClass = null, body, decorators = null)
|
|
|
12341
12256
|
decorators,
|
|
12342
12257
|
};
|
|
12343
12258
|
|
|
12344
|
-
const
|
|
12345
|
-
validate(
|
|
12346
|
-
validate(
|
|
12347
|
-
validate(
|
|
12348
|
-
validate(
|
|
12259
|
+
const defs2 = NODE_FIELDS.ClassDeclaration;
|
|
12260
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12261
|
+
validate(defs2.superClass, node, 'superClass', superClass, 1);
|
|
12262
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12263
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12349
12264
|
return node;
|
|
12350
12265
|
}
|
|
12351
12266
|
|
|
@@ -12356,9 +12271,9 @@ function exportAllDeclaration(source, attributes = null) {
|
|
|
12356
12271
|
attributes,
|
|
12357
12272
|
};
|
|
12358
12273
|
|
|
12359
|
-
const
|
|
12360
|
-
validate(
|
|
12361
|
-
validate(
|
|
12274
|
+
const defs2 = NODE_FIELDS.ExportAllDeclaration;
|
|
12275
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12276
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12362
12277
|
return node;
|
|
12363
12278
|
}
|
|
12364
12279
|
|
|
@@ -12368,8 +12283,8 @@ function exportDefaultDeclaration(declaration) {
|
|
|
12368
12283
|
declaration,
|
|
12369
12284
|
};
|
|
12370
12285
|
|
|
12371
|
-
const
|
|
12372
|
-
validate(
|
|
12286
|
+
const defs2 = NODE_FIELDS.ExportDefaultDeclaration;
|
|
12287
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12373
12288
|
return node;
|
|
12374
12289
|
}
|
|
12375
12290
|
|
|
@@ -12382,11 +12297,11 @@ function exportNamedDeclaration(declaration = null, specifiers = [], source = nu
|
|
|
12382
12297
|
attributes,
|
|
12383
12298
|
};
|
|
12384
12299
|
|
|
12385
|
-
const
|
|
12386
|
-
validate(
|
|
12387
|
-
validate(
|
|
12388
|
-
validate(
|
|
12389
|
-
validate(
|
|
12300
|
+
const defs2 = NODE_FIELDS.ExportNamedDeclaration;
|
|
12301
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12302
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12303
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12304
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12390
12305
|
return node;
|
|
12391
12306
|
}
|
|
12392
12307
|
|
|
@@ -12397,9 +12312,9 @@ function exportSpecifier(local, exported) {
|
|
|
12397
12312
|
exported,
|
|
12398
12313
|
};
|
|
12399
12314
|
|
|
12400
|
-
const
|
|
12401
|
-
validate(
|
|
12402
|
-
validate(
|
|
12315
|
+
const defs2 = NODE_FIELDS.ExportSpecifier;
|
|
12316
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12317
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
12403
12318
|
return node;
|
|
12404
12319
|
}
|
|
12405
12320
|
|
|
@@ -12412,11 +12327,11 @@ function forOfStatement(left, right, body, _await = false) {
|
|
|
12412
12327
|
await: _await,
|
|
12413
12328
|
};
|
|
12414
12329
|
|
|
12415
|
-
const
|
|
12416
|
-
validate(
|
|
12417
|
-
validate(
|
|
12418
|
-
validate(
|
|
12419
|
-
validate(
|
|
12330
|
+
const defs2 = NODE_FIELDS.ForOfStatement;
|
|
12331
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
12332
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12333
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12334
|
+
validate(defs2.await, node, 'await', _await);
|
|
12420
12335
|
return node;
|
|
12421
12336
|
}
|
|
12422
12337
|
|
|
@@ -12428,10 +12343,10 @@ function importDeclaration(specifiers, source, attributes = null) {
|
|
|
12428
12343
|
attributes,
|
|
12429
12344
|
};
|
|
12430
12345
|
|
|
12431
|
-
const
|
|
12432
|
-
validate(
|
|
12433
|
-
validate(
|
|
12434
|
-
validate(
|
|
12346
|
+
const defs2 = NODE_FIELDS.ImportDeclaration;
|
|
12347
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12348
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12349
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12435
12350
|
return node;
|
|
12436
12351
|
}
|
|
12437
12352
|
|
|
@@ -12441,8 +12356,8 @@ function importDefaultSpecifier(local) {
|
|
|
12441
12356
|
local,
|
|
12442
12357
|
};
|
|
12443
12358
|
|
|
12444
|
-
const
|
|
12445
|
-
validate(
|
|
12359
|
+
const defs2 = NODE_FIELDS.ImportDefaultSpecifier;
|
|
12360
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12446
12361
|
return node;
|
|
12447
12362
|
}
|
|
12448
12363
|
|
|
@@ -12452,8 +12367,8 @@ function importNamespaceSpecifier(local) {
|
|
|
12452
12367
|
local,
|
|
12453
12368
|
};
|
|
12454
12369
|
|
|
12455
|
-
const
|
|
12456
|
-
validate(
|
|
12370
|
+
const defs2 = NODE_FIELDS.ImportNamespaceSpecifier;
|
|
12371
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12457
12372
|
return node;
|
|
12458
12373
|
}
|
|
12459
12374
|
|
|
@@ -12464,9 +12379,9 @@ function importSpecifier(local, imported) {
|
|
|
12464
12379
|
imported,
|
|
12465
12380
|
};
|
|
12466
12381
|
|
|
12467
|
-
const
|
|
12468
|
-
validate(
|
|
12469
|
-
validate(
|
|
12382
|
+
const defs2 = NODE_FIELDS.ImportSpecifier;
|
|
12383
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12384
|
+
validate(defs2.imported, node, 'imported', imported, 1);
|
|
12470
12385
|
return node;
|
|
12471
12386
|
}
|
|
12472
12387
|
|
|
@@ -12477,9 +12392,9 @@ function importExpression(source, options = null) {
|
|
|
12477
12392
|
options,
|
|
12478
12393
|
};
|
|
12479
12394
|
|
|
12480
|
-
const
|
|
12481
|
-
validate(
|
|
12482
|
-
validate(
|
|
12395
|
+
const defs2 = NODE_FIELDS.ImportExpression;
|
|
12396
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12397
|
+
validate(defs2.options, node, 'options', options, 1);
|
|
12483
12398
|
return node;
|
|
12484
12399
|
}
|
|
12485
12400
|
|
|
@@ -12490,9 +12405,9 @@ function metaProperty(meta, property) {
|
|
|
12490
12405
|
property,
|
|
12491
12406
|
};
|
|
12492
12407
|
|
|
12493
|
-
const
|
|
12494
|
-
validate(
|
|
12495
|
-
validate(
|
|
12408
|
+
const defs2 = NODE_FIELDS.MetaProperty;
|
|
12409
|
+
validate(defs2.meta, node, 'meta', meta, 1);
|
|
12410
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
12496
12411
|
return node;
|
|
12497
12412
|
}
|
|
12498
12413
|
|
|
@@ -12509,15 +12424,15 @@ function classMethod(kind = 'method', key, params, body, computed = false, _stat
|
|
|
12509
12424
|
async,
|
|
12510
12425
|
};
|
|
12511
12426
|
|
|
12512
|
-
const
|
|
12513
|
-
validate(
|
|
12514
|
-
validate(
|
|
12515
|
-
validate(
|
|
12516
|
-
validate(
|
|
12517
|
-
validate(
|
|
12518
|
-
validate(
|
|
12519
|
-
validate(
|
|
12520
|
-
validate(
|
|
12427
|
+
const defs2 = NODE_FIELDS.ClassMethod;
|
|
12428
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12429
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12430
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12431
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12432
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12433
|
+
validate(defs2.static, node, 'static', _static);
|
|
12434
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
12435
|
+
validate(defs2.async, node, 'async', async);
|
|
12521
12436
|
return node;
|
|
12522
12437
|
}
|
|
12523
12438
|
|
|
@@ -12527,8 +12442,8 @@ function objectPattern(properties) {
|
|
|
12527
12442
|
properties,
|
|
12528
12443
|
};
|
|
12529
12444
|
|
|
12530
|
-
const
|
|
12531
|
-
validate(
|
|
12445
|
+
const defs2 = NODE_FIELDS.ObjectPattern;
|
|
12446
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
12532
12447
|
return node;
|
|
12533
12448
|
}
|
|
12534
12449
|
|
|
@@ -12538,8 +12453,8 @@ function spreadElement(argument) {
|
|
|
12538
12453
|
argument,
|
|
12539
12454
|
};
|
|
12540
12455
|
|
|
12541
|
-
const
|
|
12542
|
-
validate(
|
|
12456
|
+
const defs2 = NODE_FIELDS.SpreadElement;
|
|
12457
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12543
12458
|
return node;
|
|
12544
12459
|
}
|
|
12545
12460
|
|
|
@@ -12556,9 +12471,9 @@ function taggedTemplateExpression(tag, quasi) {
|
|
|
12556
12471
|
quasi,
|
|
12557
12472
|
};
|
|
12558
12473
|
|
|
12559
|
-
const
|
|
12560
|
-
validate(
|
|
12561
|
-
validate(
|
|
12474
|
+
const defs2 = NODE_FIELDS.TaggedTemplateExpression;
|
|
12475
|
+
validate(defs2.tag, node, 'tag', tag, 1);
|
|
12476
|
+
validate(defs2.quasi, node, 'quasi', quasi, 1);
|
|
12562
12477
|
return node;
|
|
12563
12478
|
}
|
|
12564
12479
|
|
|
@@ -12569,9 +12484,9 @@ function templateElement(value, tail = false) {
|
|
|
12569
12484
|
tail,
|
|
12570
12485
|
};
|
|
12571
12486
|
|
|
12572
|
-
const
|
|
12573
|
-
validate(
|
|
12574
|
-
validate(
|
|
12487
|
+
const defs2 = NODE_FIELDS.TemplateElement;
|
|
12488
|
+
validate(defs2.value, node, 'value', value);
|
|
12489
|
+
validate(defs2.tail, node, 'tail', tail);
|
|
12575
12490
|
return node;
|
|
12576
12491
|
}
|
|
12577
12492
|
|
|
@@ -12582,9 +12497,9 @@ function templateLiteral(quasis, expressions) {
|
|
|
12582
12497
|
expressions,
|
|
12583
12498
|
};
|
|
12584
12499
|
|
|
12585
|
-
const
|
|
12586
|
-
validate(
|
|
12587
|
-
validate(
|
|
12500
|
+
const defs2 = NODE_FIELDS.TemplateLiteral;
|
|
12501
|
+
validate(defs2.quasis, node, 'quasis', quasis, 1);
|
|
12502
|
+
validate(defs2.expressions, node, 'expressions', expressions, 1);
|
|
12588
12503
|
return node;
|
|
12589
12504
|
}
|
|
12590
12505
|
|
|
@@ -12595,9 +12510,9 @@ function yieldExpression(argument = null, delegate = false) {
|
|
|
12595
12510
|
delegate,
|
|
12596
12511
|
};
|
|
12597
12512
|
|
|
12598
|
-
const
|
|
12599
|
-
validate(
|
|
12600
|
-
validate(
|
|
12513
|
+
const defs2 = NODE_FIELDS.YieldExpression;
|
|
12514
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12515
|
+
validate(defs2.delegate, node, 'delegate', delegate);
|
|
12601
12516
|
return node;
|
|
12602
12517
|
}
|
|
12603
12518
|
|
|
@@ -12607,8 +12522,8 @@ function awaitExpression(argument) {
|
|
|
12607
12522
|
argument,
|
|
12608
12523
|
};
|
|
12609
12524
|
|
|
12610
|
-
const
|
|
12611
|
-
validate(
|
|
12525
|
+
const defs2 = NODE_FIELDS.AwaitExpression;
|
|
12526
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12612
12527
|
return node;
|
|
12613
12528
|
}
|
|
12614
12529
|
|
|
@@ -12624,8 +12539,8 @@ function bigIntLiteral(value) {
|
|
|
12624
12539
|
value,
|
|
12625
12540
|
};
|
|
12626
12541
|
|
|
12627
|
-
const
|
|
12628
|
-
validate(
|
|
12542
|
+
const defs2 = NODE_FIELDS.BigIntLiteral;
|
|
12543
|
+
validate(defs2.value, node, 'value', value);
|
|
12629
12544
|
return node;
|
|
12630
12545
|
}
|
|
12631
12546
|
|
|
@@ -12635,8 +12550,8 @@ function exportNamespaceSpecifier(exported) {
|
|
|
12635
12550
|
exported,
|
|
12636
12551
|
};
|
|
12637
12552
|
|
|
12638
|
-
const
|
|
12639
|
-
validate(
|
|
12553
|
+
const defs2 = NODE_FIELDS.ExportNamespaceSpecifier;
|
|
12554
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
12640
12555
|
return node;
|
|
12641
12556
|
}
|
|
12642
12557
|
|
|
@@ -12649,11 +12564,11 @@ function optionalMemberExpression(object, property, computed = false, optional)
|
|
|
12649
12564
|
optional,
|
|
12650
12565
|
};
|
|
12651
12566
|
|
|
12652
|
-
const
|
|
12653
|
-
validate(
|
|
12654
|
-
validate(
|
|
12655
|
-
validate(
|
|
12656
|
-
validate(
|
|
12567
|
+
const defs2 = NODE_FIELDS.OptionalMemberExpression;
|
|
12568
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
12569
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
12570
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12571
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
12657
12572
|
return node;
|
|
12658
12573
|
}
|
|
12659
12574
|
|
|
@@ -12665,10 +12580,10 @@ function optionalCallExpression(callee, _arguments, optional) {
|
|
|
12665
12580
|
optional,
|
|
12666
12581
|
};
|
|
12667
12582
|
|
|
12668
|
-
const
|
|
12669
|
-
validate(
|
|
12670
|
-
validate(
|
|
12671
|
-
validate(
|
|
12583
|
+
const defs2 = NODE_FIELDS.OptionalCallExpression;
|
|
12584
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
12585
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
12586
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
12672
12587
|
return node;
|
|
12673
12588
|
}
|
|
12674
12589
|
|
|
@@ -12683,13 +12598,13 @@ function classProperty(key, value = null, typeAnnotation2 = null, decorators = n
|
|
|
12683
12598
|
static: _static,
|
|
12684
12599
|
};
|
|
12685
12600
|
|
|
12686
|
-
const
|
|
12687
|
-
validate(
|
|
12688
|
-
validate(
|
|
12689
|
-
validate(
|
|
12690
|
-
validate(
|
|
12691
|
-
validate(
|
|
12692
|
-
validate(
|
|
12601
|
+
const defs2 = NODE_FIELDS.ClassProperty;
|
|
12602
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12603
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12604
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
12605
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12606
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12607
|
+
validate(defs2.static, node, 'static', _static);
|
|
12693
12608
|
return node;
|
|
12694
12609
|
}
|
|
12695
12610
|
|
|
@@ -12702,11 +12617,11 @@ function classPrivateProperty(key, value = null, decorators = null, _static = fa
|
|
|
12702
12617
|
static: _static,
|
|
12703
12618
|
};
|
|
12704
12619
|
|
|
12705
|
-
const
|
|
12706
|
-
validate(
|
|
12707
|
-
validate(
|
|
12708
|
-
validate(
|
|
12709
|
-
validate(
|
|
12620
|
+
const defs2 = NODE_FIELDS.ClassPrivateProperty;
|
|
12621
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12622
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12623
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12624
|
+
validate(defs2.static, node, 'static', _static);
|
|
12710
12625
|
return node;
|
|
12711
12626
|
}
|
|
12712
12627
|
|
|
@@ -12723,12 +12638,12 @@ function classPrivateMethod(kind = 'method', key, params, body, _static = false)
|
|
|
12723
12638
|
generator: false,
|
|
12724
12639
|
};
|
|
12725
12640
|
|
|
12726
|
-
const
|
|
12727
|
-
validate(
|
|
12728
|
-
validate(
|
|
12729
|
-
validate(
|
|
12730
|
-
validate(
|
|
12731
|
-
validate(
|
|
12641
|
+
const defs2 = NODE_FIELDS.ClassPrivateMethod;
|
|
12642
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12643
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12644
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12645
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12646
|
+
validate(defs2.static, node, 'static', _static);
|
|
12732
12647
|
return node;
|
|
12733
12648
|
}
|
|
12734
12649
|
|
|
@@ -12738,8 +12653,8 @@ function privateName(id) {
|
|
|
12738
12653
|
id,
|
|
12739
12654
|
};
|
|
12740
12655
|
|
|
12741
|
-
const
|
|
12742
|
-
validate(
|
|
12656
|
+
const defs2 = NODE_FIELDS.PrivateName;
|
|
12657
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12743
12658
|
return node;
|
|
12744
12659
|
}
|
|
12745
12660
|
|
|
@@ -12749,8 +12664,8 @@ function staticBlock(body) {
|
|
|
12749
12664
|
body,
|
|
12750
12665
|
};
|
|
12751
12666
|
|
|
12752
|
-
const
|
|
12753
|
-
validate(
|
|
12667
|
+
const defs2 = NODE_FIELDS.StaticBlock;
|
|
12668
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12754
12669
|
return node;
|
|
12755
12670
|
}
|
|
12756
12671
|
|
|
@@ -12761,9 +12676,9 @@ function importAttribute(key, value) {
|
|
|
12761
12676
|
value,
|
|
12762
12677
|
};
|
|
12763
12678
|
|
|
12764
|
-
const
|
|
12765
|
-
validate(
|
|
12766
|
-
validate(
|
|
12679
|
+
const defs2 = NODE_FIELDS.ImportAttribute;
|
|
12680
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12681
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12767
12682
|
return node;
|
|
12768
12683
|
}
|
|
12769
12684
|
|
|
@@ -12779,8 +12694,8 @@ function arrayTypeAnnotation(elementType) {
|
|
|
12779
12694
|
elementType,
|
|
12780
12695
|
};
|
|
12781
12696
|
|
|
12782
|
-
const
|
|
12783
|
-
validate(
|
|
12697
|
+
const defs2 = NODE_FIELDS.ArrayTypeAnnotation;
|
|
12698
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
12784
12699
|
return node;
|
|
12785
12700
|
}
|
|
12786
12701
|
|
|
@@ -12796,8 +12711,8 @@ function booleanLiteralTypeAnnotation(value) {
|
|
|
12796
12711
|
value,
|
|
12797
12712
|
};
|
|
12798
12713
|
|
|
12799
|
-
const
|
|
12800
|
-
validate(
|
|
12714
|
+
const defs2 = NODE_FIELDS.BooleanLiteralTypeAnnotation;
|
|
12715
|
+
validate(defs2.value, node, 'value', value);
|
|
12801
12716
|
return node;
|
|
12802
12717
|
}
|
|
12803
12718
|
|
|
@@ -12814,9 +12729,9 @@ function classImplements(id, typeParameters = null) {
|
|
|
12814
12729
|
typeParameters,
|
|
12815
12730
|
};
|
|
12816
12731
|
|
|
12817
|
-
const
|
|
12818
|
-
validate(
|
|
12819
|
-
validate(
|
|
12732
|
+
const defs2 = NODE_FIELDS.ClassImplements;
|
|
12733
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12734
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12820
12735
|
return node;
|
|
12821
12736
|
}
|
|
12822
12737
|
|
|
@@ -12829,11 +12744,11 @@ function declareClass(id, typeParameters = null, _extends = null, body) {
|
|
|
12829
12744
|
body,
|
|
12830
12745
|
};
|
|
12831
12746
|
|
|
12832
|
-
const
|
|
12833
|
-
validate(
|
|
12834
|
-
validate(
|
|
12835
|
-
validate(
|
|
12836
|
-
validate(
|
|
12747
|
+
const defs2 = NODE_FIELDS.DeclareClass;
|
|
12748
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12749
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12750
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12751
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12837
12752
|
return node;
|
|
12838
12753
|
}
|
|
12839
12754
|
|
|
@@ -12843,8 +12758,8 @@ function declareFunction(id) {
|
|
|
12843
12758
|
id,
|
|
12844
12759
|
};
|
|
12845
12760
|
|
|
12846
|
-
const
|
|
12847
|
-
validate(
|
|
12761
|
+
const defs2 = NODE_FIELDS.DeclareFunction;
|
|
12762
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12848
12763
|
return node;
|
|
12849
12764
|
}
|
|
12850
12765
|
|
|
@@ -12857,11 +12772,11 @@ function declareInterface(id, typeParameters = null, _extends = null, body) {
|
|
|
12857
12772
|
body,
|
|
12858
12773
|
};
|
|
12859
12774
|
|
|
12860
|
-
const
|
|
12861
|
-
validate(
|
|
12862
|
-
validate(
|
|
12863
|
-
validate(
|
|
12864
|
-
validate(
|
|
12775
|
+
const defs2 = NODE_FIELDS.DeclareInterface;
|
|
12776
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12777
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12778
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12779
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12865
12780
|
return node;
|
|
12866
12781
|
}
|
|
12867
12782
|
|
|
@@ -12873,10 +12788,10 @@ function declareModule(id, body, kind = null) {
|
|
|
12873
12788
|
kind,
|
|
12874
12789
|
};
|
|
12875
12790
|
|
|
12876
|
-
const
|
|
12877
|
-
validate(
|
|
12878
|
-
validate(
|
|
12879
|
-
validate(
|
|
12791
|
+
const defs2 = NODE_FIELDS.DeclareModule;
|
|
12792
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12793
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12794
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12880
12795
|
return node;
|
|
12881
12796
|
}
|
|
12882
12797
|
|
|
@@ -12886,8 +12801,8 @@ function declareModuleExports(typeAnnotation2) {
|
|
|
12886
12801
|
typeAnnotation: typeAnnotation2,
|
|
12887
12802
|
};
|
|
12888
12803
|
|
|
12889
|
-
const
|
|
12890
|
-
validate(
|
|
12804
|
+
const defs2 = NODE_FIELDS.DeclareModuleExports;
|
|
12805
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
12891
12806
|
return node;
|
|
12892
12807
|
}
|
|
12893
12808
|
|
|
@@ -12899,10 +12814,10 @@ function declareTypeAlias(id, typeParameters = null, right) {
|
|
|
12899
12814
|
right,
|
|
12900
12815
|
};
|
|
12901
12816
|
|
|
12902
|
-
const
|
|
12903
|
-
validate(
|
|
12904
|
-
validate(
|
|
12905
|
-
validate(
|
|
12817
|
+
const defs2 = NODE_FIELDS.DeclareTypeAlias;
|
|
12818
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12819
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12820
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12906
12821
|
return node;
|
|
12907
12822
|
}
|
|
12908
12823
|
|
|
@@ -12914,10 +12829,10 @@ function declareOpaqueType(id, typeParameters = null, supertype = null) {
|
|
|
12914
12829
|
supertype,
|
|
12915
12830
|
};
|
|
12916
12831
|
|
|
12917
|
-
const
|
|
12918
|
-
validate(
|
|
12919
|
-
validate(
|
|
12920
|
-
validate(
|
|
12832
|
+
const defs2 = NODE_FIELDS.DeclareOpaqueType;
|
|
12833
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12834
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12835
|
+
validate(defs2.supertype, node, 'supertype', supertype, 1);
|
|
12921
12836
|
return node;
|
|
12922
12837
|
}
|
|
12923
12838
|
|
|
@@ -12927,8 +12842,8 @@ function declareVariable(id) {
|
|
|
12927
12842
|
id,
|
|
12928
12843
|
};
|
|
12929
12844
|
|
|
12930
|
-
const
|
|
12931
|
-
validate(
|
|
12845
|
+
const defs2 = NODE_FIELDS.DeclareVariable;
|
|
12846
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12932
12847
|
return node;
|
|
12933
12848
|
}
|
|
12934
12849
|
|
|
@@ -12941,11 +12856,11 @@ function declareExportDeclaration(declaration = null, specifiers = null, source
|
|
|
12941
12856
|
attributes,
|
|
12942
12857
|
};
|
|
12943
12858
|
|
|
12944
|
-
const
|
|
12945
|
-
validate(
|
|
12946
|
-
validate(
|
|
12947
|
-
validate(
|
|
12948
|
-
validate(
|
|
12859
|
+
const defs2 = NODE_FIELDS.DeclareExportDeclaration;
|
|
12860
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12861
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12862
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12863
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12949
12864
|
return node;
|
|
12950
12865
|
}
|
|
12951
12866
|
|
|
@@ -12956,9 +12871,9 @@ function declareExportAllDeclaration(source, attributes = null) {
|
|
|
12956
12871
|
attributes,
|
|
12957
12872
|
};
|
|
12958
12873
|
|
|
12959
|
-
const
|
|
12960
|
-
validate(
|
|
12961
|
-
validate(
|
|
12874
|
+
const defs2 = NODE_FIELDS.DeclareExportAllDeclaration;
|
|
12875
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12876
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12962
12877
|
return node;
|
|
12963
12878
|
}
|
|
12964
12879
|
|
|
@@ -12968,8 +12883,8 @@ function declaredPredicate(value) {
|
|
|
12968
12883
|
value,
|
|
12969
12884
|
};
|
|
12970
12885
|
|
|
12971
|
-
const
|
|
12972
|
-
validate(
|
|
12886
|
+
const defs2 = NODE_FIELDS.DeclaredPredicate;
|
|
12887
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12973
12888
|
return node;
|
|
12974
12889
|
}
|
|
12975
12890
|
|
|
@@ -12988,11 +12903,11 @@ function functionTypeAnnotation(typeParameters = null, params, rest = null, retu
|
|
|
12988
12903
|
returnType,
|
|
12989
12904
|
};
|
|
12990
12905
|
|
|
12991
|
-
const
|
|
12992
|
-
validate(
|
|
12993
|
-
validate(
|
|
12994
|
-
validate(
|
|
12995
|
-
validate(
|
|
12906
|
+
const defs2 = NODE_FIELDS.FunctionTypeAnnotation;
|
|
12907
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12908
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12909
|
+
validate(defs2.rest, node, 'rest', rest, 1);
|
|
12910
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
12996
12911
|
return node;
|
|
12997
12912
|
}
|
|
12998
12913
|
|
|
@@ -13003,9 +12918,9 @@ function functionTypeParam(name = null, typeAnnotation2) {
|
|
|
13003
12918
|
typeAnnotation: typeAnnotation2,
|
|
13004
12919
|
};
|
|
13005
12920
|
|
|
13006
|
-
const
|
|
13007
|
-
validate(
|
|
13008
|
-
validate(
|
|
12921
|
+
const defs2 = NODE_FIELDS.FunctionTypeParam;
|
|
12922
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
12923
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13009
12924
|
return node;
|
|
13010
12925
|
}
|
|
13011
12926
|
|
|
@@ -13016,9 +12931,9 @@ function genericTypeAnnotation(id, typeParameters = null) {
|
|
|
13016
12931
|
typeParameters,
|
|
13017
12932
|
};
|
|
13018
12933
|
|
|
13019
|
-
const
|
|
13020
|
-
validate(
|
|
13021
|
-
validate(
|
|
12934
|
+
const defs2 = NODE_FIELDS.GenericTypeAnnotation;
|
|
12935
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12936
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13022
12937
|
return node;
|
|
13023
12938
|
}
|
|
13024
12939
|
|
|
@@ -13035,9 +12950,9 @@ function interfaceExtends(id, typeParameters = null) {
|
|
|
13035
12950
|
typeParameters,
|
|
13036
12951
|
};
|
|
13037
12952
|
|
|
13038
|
-
const
|
|
13039
|
-
validate(
|
|
13040
|
-
validate(
|
|
12953
|
+
const defs2 = NODE_FIELDS.InterfaceExtends;
|
|
12954
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12955
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13041
12956
|
return node;
|
|
13042
12957
|
}
|
|
13043
12958
|
|
|
@@ -13050,11 +12965,11 @@ function interfaceDeclaration(id, typeParameters = null, _extends = null, body)
|
|
|
13050
12965
|
body,
|
|
13051
12966
|
};
|
|
13052
12967
|
|
|
13053
|
-
const
|
|
13054
|
-
validate(
|
|
13055
|
-
validate(
|
|
13056
|
-
validate(
|
|
13057
|
-
validate(
|
|
12968
|
+
const defs2 = NODE_FIELDS.InterfaceDeclaration;
|
|
12969
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12970
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12971
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12972
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13058
12973
|
return node;
|
|
13059
12974
|
}
|
|
13060
12975
|
|
|
@@ -13065,9 +12980,9 @@ function interfaceTypeAnnotation(_extends = null, body) {
|
|
|
13065
12980
|
body,
|
|
13066
12981
|
};
|
|
13067
12982
|
|
|
13068
|
-
const
|
|
13069
|
-
validate(
|
|
13070
|
-
validate(
|
|
12983
|
+
const defs2 = NODE_FIELDS.InterfaceTypeAnnotation;
|
|
12984
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12985
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13071
12986
|
return node;
|
|
13072
12987
|
}
|
|
13073
12988
|
|
|
@@ -13077,8 +12992,8 @@ function intersectionTypeAnnotation(types2) {
|
|
|
13077
12992
|
types: types2,
|
|
13078
12993
|
};
|
|
13079
12994
|
|
|
13080
|
-
const
|
|
13081
|
-
validate(
|
|
12995
|
+
const defs2 = NODE_FIELDS.IntersectionTypeAnnotation;
|
|
12996
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13082
12997
|
return node;
|
|
13083
12998
|
}
|
|
13084
12999
|
|
|
@@ -13100,8 +13015,8 @@ function nullableTypeAnnotation(typeAnnotation2) {
|
|
|
13100
13015
|
typeAnnotation: typeAnnotation2,
|
|
13101
13016
|
};
|
|
13102
13017
|
|
|
13103
|
-
const
|
|
13104
|
-
validate(
|
|
13018
|
+
const defs2 = NODE_FIELDS.NullableTypeAnnotation;
|
|
13019
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13105
13020
|
return node;
|
|
13106
13021
|
}
|
|
13107
13022
|
|
|
@@ -13111,8 +13026,8 @@ function numberLiteralTypeAnnotation(value) {
|
|
|
13111
13026
|
value,
|
|
13112
13027
|
};
|
|
13113
13028
|
|
|
13114
|
-
const
|
|
13115
|
-
validate(
|
|
13029
|
+
const defs2 = NODE_FIELDS.NumberLiteralTypeAnnotation;
|
|
13030
|
+
validate(defs2.value, node, 'value', value);
|
|
13116
13031
|
return node;
|
|
13117
13032
|
}
|
|
13118
13033
|
|
|
@@ -13132,12 +13047,12 @@ function objectTypeAnnotation(properties, indexers = [], callProperties = [], in
|
|
|
13132
13047
|
exact,
|
|
13133
13048
|
};
|
|
13134
13049
|
|
|
13135
|
-
const
|
|
13136
|
-
validate(
|
|
13137
|
-
validate(
|
|
13138
|
-
validate(
|
|
13139
|
-
validate(
|
|
13140
|
-
validate(
|
|
13050
|
+
const defs2 = NODE_FIELDS.ObjectTypeAnnotation;
|
|
13051
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
13052
|
+
validate(defs2.indexers, node, 'indexers', indexers, 1);
|
|
13053
|
+
validate(defs2.callProperties, node, 'callProperties', callProperties, 1);
|
|
13054
|
+
validate(defs2.internalSlots, node, 'internalSlots', internalSlots, 1);
|
|
13055
|
+
validate(defs2.exact, node, 'exact', exact);
|
|
13141
13056
|
return node;
|
|
13142
13057
|
}
|
|
13143
13058
|
|
|
@@ -13151,12 +13066,12 @@ function objectTypeInternalSlot(id, value, optional, _static, method) {
|
|
|
13151
13066
|
method,
|
|
13152
13067
|
};
|
|
13153
13068
|
|
|
13154
|
-
const
|
|
13155
|
-
validate(
|
|
13156
|
-
validate(
|
|
13157
|
-
validate(
|
|
13158
|
-
validate(
|
|
13159
|
-
validate(
|
|
13069
|
+
const defs2 = NODE_FIELDS.ObjectTypeInternalSlot;
|
|
13070
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13071
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13072
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
13073
|
+
validate(defs2.static, node, 'static', _static);
|
|
13074
|
+
validate(defs2.method, node, 'method', method);
|
|
13160
13075
|
return node;
|
|
13161
13076
|
}
|
|
13162
13077
|
|
|
@@ -13167,8 +13082,8 @@ function objectTypeCallProperty(value) {
|
|
|
13167
13082
|
static: false,
|
|
13168
13083
|
};
|
|
13169
13084
|
|
|
13170
|
-
const
|
|
13171
|
-
validate(
|
|
13085
|
+
const defs2 = NODE_FIELDS.ObjectTypeCallProperty;
|
|
13086
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13172
13087
|
return node;
|
|
13173
13088
|
}
|
|
13174
13089
|
|
|
@@ -13182,11 +13097,11 @@ function objectTypeIndexer(id = null, key, value, variance2 = null) {
|
|
|
13182
13097
|
static: false,
|
|
13183
13098
|
};
|
|
13184
13099
|
|
|
13185
|
-
const
|
|
13186
|
-
validate(
|
|
13187
|
-
validate(
|
|
13188
|
-
validate(
|
|
13189
|
-
validate(
|
|
13100
|
+
const defs2 = NODE_FIELDS.ObjectTypeIndexer;
|
|
13101
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13102
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13103
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13104
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13190
13105
|
return node;
|
|
13191
13106
|
}
|
|
13192
13107
|
|
|
@@ -13203,10 +13118,10 @@ function objectTypeProperty(key, value, variance2 = null) {
|
|
|
13203
13118
|
static: false,
|
|
13204
13119
|
};
|
|
13205
13120
|
|
|
13206
|
-
const
|
|
13207
|
-
validate(
|
|
13208
|
-
validate(
|
|
13209
|
-
validate(
|
|
13121
|
+
const defs2 = NODE_FIELDS.ObjectTypeProperty;
|
|
13122
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13123
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13124
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13210
13125
|
return node;
|
|
13211
13126
|
}
|
|
13212
13127
|
|
|
@@ -13216,8 +13131,8 @@ function objectTypeSpreadProperty(argument) {
|
|
|
13216
13131
|
argument,
|
|
13217
13132
|
};
|
|
13218
13133
|
|
|
13219
|
-
const
|
|
13220
|
-
validate(
|
|
13134
|
+
const defs2 = NODE_FIELDS.ObjectTypeSpreadProperty;
|
|
13135
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13221
13136
|
return node;
|
|
13222
13137
|
}
|
|
13223
13138
|
|
|
@@ -13230,11 +13145,11 @@ function opaqueType(id, typeParameters = null, supertype = null, impltype) {
|
|
|
13230
13145
|
impltype,
|
|
13231
13146
|
};
|
|
13232
13147
|
|
|
13233
|
-
const
|
|
13234
|
-
validate(
|
|
13235
|
-
validate(
|
|
13236
|
-
validate(
|
|
13237
|
-
validate(
|
|
13148
|
+
const defs2 = NODE_FIELDS.OpaqueType;
|
|
13149
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13150
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13151
|
+
validate(defs2.supertype, node, 'supertype', supertype, 1);
|
|
13152
|
+
validate(defs2.impltype, node, 'impltype', impltype, 1);
|
|
13238
13153
|
return node;
|
|
13239
13154
|
}
|
|
13240
13155
|
|
|
@@ -13245,9 +13160,9 @@ function qualifiedTypeIdentifier(id, qualification) {
|
|
|
13245
13160
|
qualification,
|
|
13246
13161
|
};
|
|
13247
13162
|
|
|
13248
|
-
const
|
|
13249
|
-
validate(
|
|
13250
|
-
validate(
|
|
13163
|
+
const defs2 = NODE_FIELDS.QualifiedTypeIdentifier;
|
|
13164
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13165
|
+
validate(defs2.qualification, node, 'qualification', qualification, 1);
|
|
13251
13166
|
return node;
|
|
13252
13167
|
}
|
|
13253
13168
|
|
|
@@ -13257,8 +13172,8 @@ function stringLiteralTypeAnnotation(value) {
|
|
|
13257
13172
|
value,
|
|
13258
13173
|
};
|
|
13259
13174
|
|
|
13260
|
-
const
|
|
13261
|
-
validate(
|
|
13175
|
+
const defs2 = NODE_FIELDS.StringLiteralTypeAnnotation;
|
|
13176
|
+
validate(defs2.value, node, 'value', value);
|
|
13262
13177
|
return node;
|
|
13263
13178
|
}
|
|
13264
13179
|
|
|
@@ -13286,8 +13201,8 @@ function tupleTypeAnnotation(types2) {
|
|
|
13286
13201
|
types: types2,
|
|
13287
13202
|
};
|
|
13288
13203
|
|
|
13289
|
-
const
|
|
13290
|
-
validate(
|
|
13204
|
+
const defs2 = NODE_FIELDS.TupleTypeAnnotation;
|
|
13205
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13291
13206
|
return node;
|
|
13292
13207
|
}
|
|
13293
13208
|
|
|
@@ -13297,8 +13212,8 @@ function typeofTypeAnnotation(argument) {
|
|
|
13297
13212
|
argument,
|
|
13298
13213
|
};
|
|
13299
13214
|
|
|
13300
|
-
const
|
|
13301
|
-
validate(
|
|
13215
|
+
const defs2 = NODE_FIELDS.TypeofTypeAnnotation;
|
|
13216
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13302
13217
|
return node;
|
|
13303
13218
|
}
|
|
13304
13219
|
|
|
@@ -13310,10 +13225,10 @@ function typeAlias(id, typeParameters = null, right) {
|
|
|
13310
13225
|
right,
|
|
13311
13226
|
};
|
|
13312
13227
|
|
|
13313
|
-
const
|
|
13314
|
-
validate(
|
|
13315
|
-
validate(
|
|
13316
|
-
validate(
|
|
13228
|
+
const defs2 = NODE_FIELDS.TypeAlias;
|
|
13229
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13230
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13231
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
13317
13232
|
return node;
|
|
13318
13233
|
}
|
|
13319
13234
|
|
|
@@ -13323,8 +13238,8 @@ function typeAnnotation(typeAnnotation2) {
|
|
|
13323
13238
|
typeAnnotation: typeAnnotation2,
|
|
13324
13239
|
};
|
|
13325
13240
|
|
|
13326
|
-
const
|
|
13327
|
-
validate(
|
|
13241
|
+
const defs2 = NODE_FIELDS.TypeAnnotation;
|
|
13242
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13328
13243
|
return node;
|
|
13329
13244
|
}
|
|
13330
13245
|
|
|
@@ -13335,9 +13250,9 @@ function typeCastExpression(expression2, typeAnnotation2) {
|
|
|
13335
13250
|
typeAnnotation: typeAnnotation2,
|
|
13336
13251
|
};
|
|
13337
13252
|
|
|
13338
|
-
const
|
|
13339
|
-
validate(
|
|
13340
|
-
validate(
|
|
13253
|
+
const defs2 = NODE_FIELDS.TypeCastExpression;
|
|
13254
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13255
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13341
13256
|
return node;
|
|
13342
13257
|
}
|
|
13343
13258
|
|
|
@@ -13350,11 +13265,11 @@ function typeParameter(name, bound = null, _default = null, variance2 = null) {
|
|
|
13350
13265
|
variance: variance2,
|
|
13351
13266
|
};
|
|
13352
13267
|
|
|
13353
|
-
const
|
|
13354
|
-
validate(
|
|
13355
|
-
validate(
|
|
13356
|
-
validate(
|
|
13357
|
-
validate(
|
|
13268
|
+
const defs2 = NODE_FIELDS.TypeParameter;
|
|
13269
|
+
validate(defs2.name, node, 'name', name);
|
|
13270
|
+
validate(defs2.bound, node, 'bound', bound, 1);
|
|
13271
|
+
validate(defs2.default, node, 'default', _default, 1);
|
|
13272
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13358
13273
|
return node;
|
|
13359
13274
|
}
|
|
13360
13275
|
|
|
@@ -13364,8 +13279,8 @@ function typeParameterDeclaration(params) {
|
|
|
13364
13279
|
params,
|
|
13365
13280
|
};
|
|
13366
13281
|
|
|
13367
|
-
const
|
|
13368
|
-
validate(
|
|
13282
|
+
const defs2 = NODE_FIELDS.TypeParameterDeclaration;
|
|
13283
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13369
13284
|
return node;
|
|
13370
13285
|
}
|
|
13371
13286
|
|
|
@@ -13375,8 +13290,8 @@ function typeParameterInstantiation(params) {
|
|
|
13375
13290
|
params,
|
|
13376
13291
|
};
|
|
13377
13292
|
|
|
13378
|
-
const
|
|
13379
|
-
validate(
|
|
13293
|
+
const defs2 = NODE_FIELDS.TypeParameterInstantiation;
|
|
13294
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13380
13295
|
return node;
|
|
13381
13296
|
}
|
|
13382
13297
|
|
|
@@ -13386,8 +13301,8 @@ function unionTypeAnnotation(types2) {
|
|
|
13386
13301
|
types: types2,
|
|
13387
13302
|
};
|
|
13388
13303
|
|
|
13389
|
-
const
|
|
13390
|
-
validate(
|
|
13304
|
+
const defs2 = NODE_FIELDS.UnionTypeAnnotation;
|
|
13305
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13391
13306
|
return node;
|
|
13392
13307
|
}
|
|
13393
13308
|
|
|
@@ -13397,8 +13312,8 @@ function variance(kind) {
|
|
|
13397
13312
|
kind,
|
|
13398
13313
|
};
|
|
13399
13314
|
|
|
13400
|
-
const
|
|
13401
|
-
validate(
|
|
13315
|
+
const defs2 = NODE_FIELDS.Variance;
|
|
13316
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
13402
13317
|
return node;
|
|
13403
13318
|
}
|
|
13404
13319
|
|
|
@@ -13415,9 +13330,9 @@ function enumDeclaration(id, body) {
|
|
|
13415
13330
|
body,
|
|
13416
13331
|
};
|
|
13417
13332
|
|
|
13418
|
-
const
|
|
13419
|
-
validate(
|
|
13420
|
-
validate(
|
|
13333
|
+
const defs2 = NODE_FIELDS.EnumDeclaration;
|
|
13334
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13335
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13421
13336
|
return node;
|
|
13422
13337
|
}
|
|
13423
13338
|
|
|
@@ -13429,8 +13344,8 @@ function enumBooleanBody(members) {
|
|
|
13429
13344
|
hasUnknownMembers: false,
|
|
13430
13345
|
};
|
|
13431
13346
|
|
|
13432
|
-
const
|
|
13433
|
-
validate(
|
|
13347
|
+
const defs2 = NODE_FIELDS.EnumBooleanBody;
|
|
13348
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13434
13349
|
return node;
|
|
13435
13350
|
}
|
|
13436
13351
|
|
|
@@ -13442,8 +13357,8 @@ function enumNumberBody(members) {
|
|
|
13442
13357
|
hasUnknownMembers: false,
|
|
13443
13358
|
};
|
|
13444
13359
|
|
|
13445
|
-
const
|
|
13446
|
-
validate(
|
|
13360
|
+
const defs2 = NODE_FIELDS.EnumNumberBody;
|
|
13361
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13447
13362
|
return node;
|
|
13448
13363
|
}
|
|
13449
13364
|
|
|
@@ -13455,8 +13370,8 @@ function enumStringBody(members) {
|
|
|
13455
13370
|
hasUnknownMembers: false,
|
|
13456
13371
|
};
|
|
13457
13372
|
|
|
13458
|
-
const
|
|
13459
|
-
validate(
|
|
13373
|
+
const defs2 = NODE_FIELDS.EnumStringBody;
|
|
13374
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13460
13375
|
return node;
|
|
13461
13376
|
}
|
|
13462
13377
|
|
|
@@ -13467,8 +13382,8 @@ function enumSymbolBody(members) {
|
|
|
13467
13382
|
hasUnknownMembers: false,
|
|
13468
13383
|
};
|
|
13469
13384
|
|
|
13470
|
-
const
|
|
13471
|
-
validate(
|
|
13385
|
+
const defs2 = NODE_FIELDS.EnumSymbolBody;
|
|
13386
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13472
13387
|
return node;
|
|
13473
13388
|
}
|
|
13474
13389
|
|
|
@@ -13479,9 +13394,9 @@ function enumBooleanMember(id, init) {
|
|
|
13479
13394
|
init,
|
|
13480
13395
|
};
|
|
13481
13396
|
|
|
13482
|
-
const
|
|
13483
|
-
validate(
|
|
13484
|
-
validate(
|
|
13397
|
+
const defs2 = NODE_FIELDS.EnumBooleanMember;
|
|
13398
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13399
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13485
13400
|
return node;
|
|
13486
13401
|
}
|
|
13487
13402
|
|
|
@@ -13492,9 +13407,9 @@ function enumNumberMember(id, init) {
|
|
|
13492
13407
|
init,
|
|
13493
13408
|
};
|
|
13494
13409
|
|
|
13495
|
-
const
|
|
13496
|
-
validate(
|
|
13497
|
-
validate(
|
|
13410
|
+
const defs2 = NODE_FIELDS.EnumNumberMember;
|
|
13411
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13412
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13498
13413
|
return node;
|
|
13499
13414
|
}
|
|
13500
13415
|
|
|
@@ -13505,9 +13420,9 @@ function enumStringMember(id, init) {
|
|
|
13505
13420
|
init,
|
|
13506
13421
|
};
|
|
13507
13422
|
|
|
13508
|
-
const
|
|
13509
|
-
validate(
|
|
13510
|
-
validate(
|
|
13423
|
+
const defs2 = NODE_FIELDS.EnumStringMember;
|
|
13424
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13425
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13511
13426
|
return node;
|
|
13512
13427
|
}
|
|
13513
13428
|
|
|
@@ -13517,8 +13432,8 @@ function enumDefaultedMember(id) {
|
|
|
13517
13432
|
id,
|
|
13518
13433
|
};
|
|
13519
13434
|
|
|
13520
|
-
const
|
|
13521
|
-
validate(
|
|
13435
|
+
const defs2 = NODE_FIELDS.EnumDefaultedMember;
|
|
13436
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13522
13437
|
return node;
|
|
13523
13438
|
}
|
|
13524
13439
|
|
|
@@ -13529,9 +13444,9 @@ function indexedAccessType(objectType, indexType) {
|
|
|
13529
13444
|
indexType,
|
|
13530
13445
|
};
|
|
13531
13446
|
|
|
13532
|
-
const
|
|
13533
|
-
validate(
|
|
13534
|
-
validate(
|
|
13447
|
+
const defs2 = NODE_FIELDS.IndexedAccessType;
|
|
13448
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
13449
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
13535
13450
|
return node;
|
|
13536
13451
|
}
|
|
13537
13452
|
|
|
@@ -13543,9 +13458,9 @@ function optionalIndexedAccessType(objectType, indexType) {
|
|
|
13543
13458
|
optional: false,
|
|
13544
13459
|
};
|
|
13545
13460
|
|
|
13546
|
-
const
|
|
13547
|
-
validate(
|
|
13548
|
-
validate(
|
|
13461
|
+
const defs2 = NODE_FIELDS.OptionalIndexedAccessType;
|
|
13462
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
13463
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
13549
13464
|
return node;
|
|
13550
13465
|
}
|
|
13551
13466
|
|
|
@@ -13556,9 +13471,9 @@ function jsxAttribute(name, value = null) {
|
|
|
13556
13471
|
value,
|
|
13557
13472
|
};
|
|
13558
13473
|
|
|
13559
|
-
const
|
|
13560
|
-
validate(
|
|
13561
|
-
validate(
|
|
13474
|
+
const defs2 = NODE_FIELDS.JSXAttribute;
|
|
13475
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13476
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13562
13477
|
return node;
|
|
13563
13478
|
}
|
|
13564
13479
|
|
|
@@ -13568,8 +13483,8 @@ function jsxClosingElement(name) {
|
|
|
13568
13483
|
name,
|
|
13569
13484
|
};
|
|
13570
13485
|
|
|
13571
|
-
const
|
|
13572
|
-
validate(
|
|
13486
|
+
const defs2 = NODE_FIELDS.JSXClosingElement;
|
|
13487
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13573
13488
|
return node;
|
|
13574
13489
|
}
|
|
13575
13490
|
|
|
@@ -13581,10 +13496,10 @@ function jsxElement(openingElement, closingElement = null, children) {
|
|
|
13581
13496
|
children,
|
|
13582
13497
|
};
|
|
13583
13498
|
|
|
13584
|
-
const
|
|
13585
|
-
validate(
|
|
13586
|
-
validate(
|
|
13587
|
-
validate(
|
|
13499
|
+
const defs2 = NODE_FIELDS.JSXElement;
|
|
13500
|
+
validate(defs2.openingElement, node, 'openingElement', openingElement, 1);
|
|
13501
|
+
validate(defs2.closingElement, node, 'closingElement', closingElement, 1);
|
|
13502
|
+
validate(defs2.children, node, 'children', children, 1);
|
|
13588
13503
|
return node;
|
|
13589
13504
|
}
|
|
13590
13505
|
|
|
@@ -13600,8 +13515,8 @@ function jsxExpressionContainer(expression2) {
|
|
|
13600
13515
|
expression: expression2,
|
|
13601
13516
|
};
|
|
13602
13517
|
|
|
13603
|
-
const
|
|
13604
|
-
validate(
|
|
13518
|
+
const defs2 = NODE_FIELDS.JSXExpressionContainer;
|
|
13519
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13605
13520
|
return node;
|
|
13606
13521
|
}
|
|
13607
13522
|
|
|
@@ -13611,8 +13526,8 @@ function jsxSpreadChild(expression2) {
|
|
|
13611
13526
|
expression: expression2,
|
|
13612
13527
|
};
|
|
13613
13528
|
|
|
13614
|
-
const
|
|
13615
|
-
validate(
|
|
13529
|
+
const defs2 = NODE_FIELDS.JSXSpreadChild;
|
|
13530
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13616
13531
|
return node;
|
|
13617
13532
|
}
|
|
13618
13533
|
|
|
@@ -13622,8 +13537,8 @@ function jsxIdentifier(name) {
|
|
|
13622
13537
|
name,
|
|
13623
13538
|
};
|
|
13624
13539
|
|
|
13625
|
-
const
|
|
13626
|
-
validate(
|
|
13540
|
+
const defs2 = NODE_FIELDS.JSXIdentifier;
|
|
13541
|
+
validate(defs2.name, node, 'name', name);
|
|
13627
13542
|
return node;
|
|
13628
13543
|
}
|
|
13629
13544
|
|
|
@@ -13634,9 +13549,9 @@ function jsxMemberExpression(object, property) {
|
|
|
13634
13549
|
property,
|
|
13635
13550
|
};
|
|
13636
13551
|
|
|
13637
|
-
const
|
|
13638
|
-
validate(
|
|
13639
|
-
validate(
|
|
13552
|
+
const defs2 = NODE_FIELDS.JSXMemberExpression;
|
|
13553
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
13554
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
13640
13555
|
return node;
|
|
13641
13556
|
}
|
|
13642
13557
|
|
|
@@ -13647,9 +13562,9 @@ function jsxNamespacedName(namespace, name) {
|
|
|
13647
13562
|
name,
|
|
13648
13563
|
};
|
|
13649
13564
|
|
|
13650
|
-
const
|
|
13651
|
-
validate(
|
|
13652
|
-
validate(
|
|
13565
|
+
const defs2 = NODE_FIELDS.JSXNamespacedName;
|
|
13566
|
+
validate(defs2.namespace, node, 'namespace', namespace, 1);
|
|
13567
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13653
13568
|
return node;
|
|
13654
13569
|
}
|
|
13655
13570
|
|
|
@@ -13661,10 +13576,10 @@ function jsxOpeningElement(name, attributes, selfClosing = false) {
|
|
|
13661
13576
|
selfClosing,
|
|
13662
13577
|
};
|
|
13663
13578
|
|
|
13664
|
-
const
|
|
13665
|
-
validate(
|
|
13666
|
-
validate(
|
|
13667
|
-
validate(
|
|
13579
|
+
const defs2 = NODE_FIELDS.JSXOpeningElement;
|
|
13580
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13581
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
13582
|
+
validate(defs2.selfClosing, node, 'selfClosing', selfClosing);
|
|
13668
13583
|
return node;
|
|
13669
13584
|
}
|
|
13670
13585
|
|
|
@@ -13674,8 +13589,8 @@ function jsxSpreadAttribute(argument) {
|
|
|
13674
13589
|
argument,
|
|
13675
13590
|
};
|
|
13676
13591
|
|
|
13677
|
-
const
|
|
13678
|
-
validate(
|
|
13592
|
+
const defs2 = NODE_FIELDS.JSXSpreadAttribute;
|
|
13593
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13679
13594
|
return node;
|
|
13680
13595
|
}
|
|
13681
13596
|
|
|
@@ -13685,8 +13600,8 @@ function jsxText(value) {
|
|
|
13685
13600
|
value,
|
|
13686
13601
|
};
|
|
13687
13602
|
|
|
13688
|
-
const
|
|
13689
|
-
validate(
|
|
13603
|
+
const defs2 = NODE_FIELDS.JSXText;
|
|
13604
|
+
validate(defs2.value, node, 'value', value);
|
|
13690
13605
|
return node;
|
|
13691
13606
|
}
|
|
13692
13607
|
|
|
@@ -13698,10 +13613,10 @@ function jsxFragment(openingFragment, closingFragment, children) {
|
|
|
13698
13613
|
children,
|
|
13699
13614
|
};
|
|
13700
13615
|
|
|
13701
|
-
const
|
|
13702
|
-
validate(
|
|
13703
|
-
validate(
|
|
13704
|
-
validate(
|
|
13616
|
+
const defs2 = NODE_FIELDS.JSXFragment;
|
|
13617
|
+
validate(defs2.openingFragment, node, 'openingFragment', openingFragment, 1);
|
|
13618
|
+
validate(defs2.closingFragment, node, 'closingFragment', closingFragment, 1);
|
|
13619
|
+
validate(defs2.children, node, 'children', children, 1);
|
|
13705
13620
|
return node;
|
|
13706
13621
|
}
|
|
13707
13622
|
|
|
@@ -13724,9 +13639,9 @@ function placeholder(expectedNode, name) {
|
|
|
13724
13639
|
name,
|
|
13725
13640
|
};
|
|
13726
13641
|
|
|
13727
|
-
const
|
|
13728
|
-
validate(
|
|
13729
|
-
validate(
|
|
13642
|
+
const defs2 = NODE_FIELDS.Placeholder;
|
|
13643
|
+
validate(defs2.expectedNode, node, 'expectedNode', expectedNode);
|
|
13644
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13730
13645
|
return node;
|
|
13731
13646
|
}
|
|
13732
13647
|
|
|
@@ -13736,8 +13651,8 @@ function v8IntrinsicIdentifier(name) {
|
|
|
13736
13651
|
name,
|
|
13737
13652
|
};
|
|
13738
13653
|
|
|
13739
|
-
const
|
|
13740
|
-
validate(
|
|
13654
|
+
const defs2 = NODE_FIELDS.V8IntrinsicIdentifier;
|
|
13655
|
+
validate(defs2.name, node, 'name', name);
|
|
13741
13656
|
return node;
|
|
13742
13657
|
}
|
|
13743
13658
|
|
|
@@ -13754,9 +13669,9 @@ function bindExpression(object, callee) {
|
|
|
13754
13669
|
callee,
|
|
13755
13670
|
};
|
|
13756
13671
|
|
|
13757
|
-
const
|
|
13758
|
-
validate(
|
|
13759
|
-
validate(
|
|
13672
|
+
const defs2 = NODE_FIELDS.BindExpression;
|
|
13673
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
13674
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
13760
13675
|
return node;
|
|
13761
13676
|
}
|
|
13762
13677
|
|
|
@@ -13771,13 +13686,13 @@ function classAccessorProperty(key, value = null, typeAnnotation2 = null, decora
|
|
|
13771
13686
|
static: _static,
|
|
13772
13687
|
};
|
|
13773
13688
|
|
|
13774
|
-
const
|
|
13775
|
-
validate(
|
|
13776
|
-
validate(
|
|
13777
|
-
validate(
|
|
13778
|
-
validate(
|
|
13779
|
-
validate(
|
|
13780
|
-
validate(
|
|
13689
|
+
const defs2 = NODE_FIELDS.ClassAccessorProperty;
|
|
13690
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13691
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13692
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13693
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
13694
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
13695
|
+
validate(defs2.static, node, 'static', _static);
|
|
13781
13696
|
return node;
|
|
13782
13697
|
}
|
|
13783
13698
|
|
|
@@ -13787,8 +13702,8 @@ function decorator(expression2) {
|
|
|
13787
13702
|
expression: expression2,
|
|
13788
13703
|
};
|
|
13789
13704
|
|
|
13790
|
-
const
|
|
13791
|
-
validate(
|
|
13705
|
+
const defs2 = NODE_FIELDS.Decorator;
|
|
13706
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13792
13707
|
return node;
|
|
13793
13708
|
}
|
|
13794
13709
|
|
|
@@ -13799,9 +13714,9 @@ function doExpression(body, async = false) {
|
|
|
13799
13714
|
async,
|
|
13800
13715
|
};
|
|
13801
13716
|
|
|
13802
|
-
const
|
|
13803
|
-
validate(
|
|
13804
|
-
validate(
|
|
13717
|
+
const defs2 = NODE_FIELDS.DoExpression;
|
|
13718
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13719
|
+
validate(defs2.async, node, 'async', async);
|
|
13805
13720
|
return node;
|
|
13806
13721
|
}
|
|
13807
13722
|
|
|
@@ -13811,8 +13726,8 @@ function exportDefaultSpecifier(exported) {
|
|
|
13811
13726
|
exported,
|
|
13812
13727
|
};
|
|
13813
13728
|
|
|
13814
|
-
const
|
|
13815
|
-
validate(
|
|
13729
|
+
const defs2 = NODE_FIELDS.ExportDefaultSpecifier;
|
|
13730
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
13816
13731
|
return node;
|
|
13817
13732
|
}
|
|
13818
13733
|
|
|
@@ -13822,8 +13737,8 @@ function moduleExpression(body) {
|
|
|
13822
13737
|
body,
|
|
13823
13738
|
};
|
|
13824
13739
|
|
|
13825
|
-
const
|
|
13826
|
-
validate(
|
|
13740
|
+
const defs2 = NODE_FIELDS.ModuleExpression;
|
|
13741
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13827
13742
|
return node;
|
|
13828
13743
|
}
|
|
13829
13744
|
|
|
@@ -13845,8 +13760,8 @@ function tsParameterProperty(parameter) {
|
|
|
13845
13760
|
parameter,
|
|
13846
13761
|
};
|
|
13847
13762
|
|
|
13848
|
-
const
|
|
13849
|
-
validate(
|
|
13763
|
+
const defs2 = NODE_FIELDS.TSParameterProperty;
|
|
13764
|
+
validate(defs2.parameter, node, 'parameter', parameter, 1);
|
|
13850
13765
|
return node;
|
|
13851
13766
|
}
|
|
13852
13767
|
|
|
@@ -13861,11 +13776,11 @@ function tsDeclareFunction(id = null, typeParameters = null, params, returnType
|
|
|
13861
13776
|
generator: false,
|
|
13862
13777
|
};
|
|
13863
13778
|
|
|
13864
|
-
const
|
|
13865
|
-
validate(
|
|
13866
|
-
validate(
|
|
13867
|
-
validate(
|
|
13868
|
-
validate(
|
|
13779
|
+
const defs2 = NODE_FIELDS.TSDeclareFunction;
|
|
13780
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13781
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13782
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13783
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13869
13784
|
return node;
|
|
13870
13785
|
}
|
|
13871
13786
|
|
|
@@ -13884,12 +13799,12 @@ function tsDeclareMethod(decorators = null, key, typeParameters = null, params,
|
|
|
13884
13799
|
static: false,
|
|
13885
13800
|
};
|
|
13886
13801
|
|
|
13887
|
-
const
|
|
13888
|
-
validate(
|
|
13889
|
-
validate(
|
|
13890
|
-
validate(
|
|
13891
|
-
validate(
|
|
13892
|
-
validate(
|
|
13802
|
+
const defs2 = NODE_FIELDS.TSDeclareMethod;
|
|
13803
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
13804
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13805
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13806
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13807
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13893
13808
|
return node;
|
|
13894
13809
|
}
|
|
13895
13810
|
|
|
@@ -13900,9 +13815,9 @@ function tsQualifiedName(left, right) {
|
|
|
13900
13815
|
right,
|
|
13901
13816
|
};
|
|
13902
13817
|
|
|
13903
|
-
const
|
|
13904
|
-
validate(
|
|
13905
|
-
validate(
|
|
13818
|
+
const defs2 = NODE_FIELDS.TSQualifiedName;
|
|
13819
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
13820
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
13906
13821
|
return node;
|
|
13907
13822
|
}
|
|
13908
13823
|
|
|
@@ -13914,10 +13829,10 @@ function tsCallSignatureDeclaration(typeParameters = null, params, returnType =
|
|
|
13914
13829
|
returnType,
|
|
13915
13830
|
};
|
|
13916
13831
|
|
|
13917
|
-
const
|
|
13918
|
-
validate(
|
|
13919
|
-
validate(
|
|
13920
|
-
validate(
|
|
13832
|
+
const defs2 = NODE_FIELDS.TSCallSignatureDeclaration;
|
|
13833
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13834
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13835
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13921
13836
|
return node;
|
|
13922
13837
|
}
|
|
13923
13838
|
|
|
@@ -13929,10 +13844,10 @@ function tsConstructSignatureDeclaration(typeParameters = null, params, returnTy
|
|
|
13929
13844
|
returnType,
|
|
13930
13845
|
};
|
|
13931
13846
|
|
|
13932
|
-
const
|
|
13933
|
-
validate(
|
|
13934
|
-
validate(
|
|
13935
|
-
validate(
|
|
13847
|
+
const defs2 = NODE_FIELDS.TSConstructSignatureDeclaration;
|
|
13848
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13849
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13850
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13936
13851
|
return node;
|
|
13937
13852
|
}
|
|
13938
13853
|
|
|
@@ -13944,9 +13859,9 @@ function tsPropertySignature(key, typeAnnotation2 = null) {
|
|
|
13944
13859
|
computed: false,
|
|
13945
13860
|
};
|
|
13946
13861
|
|
|
13947
|
-
const
|
|
13948
|
-
validate(
|
|
13949
|
-
validate(
|
|
13862
|
+
const defs2 = NODE_FIELDS.TSPropertySignature;
|
|
13863
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13864
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13950
13865
|
return node;
|
|
13951
13866
|
}
|
|
13952
13867
|
|
|
@@ -13961,11 +13876,11 @@ function tsMethodSignature(key, typeParameters = null, params, returnType = null
|
|
|
13961
13876
|
kind: 'method',
|
|
13962
13877
|
};
|
|
13963
13878
|
|
|
13964
|
-
const
|
|
13965
|
-
validate(
|
|
13966
|
-
validate(
|
|
13967
|
-
validate(
|
|
13968
|
-
validate(
|
|
13879
|
+
const defs2 = NODE_FIELDS.TSMethodSignature;
|
|
13880
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13881
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13882
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13883
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13969
13884
|
return node;
|
|
13970
13885
|
}
|
|
13971
13886
|
|
|
@@ -13976,9 +13891,9 @@ function tsIndexSignature(parameters, typeAnnotation2 = null) {
|
|
|
13976
13891
|
typeAnnotation: typeAnnotation2,
|
|
13977
13892
|
};
|
|
13978
13893
|
|
|
13979
|
-
const
|
|
13980
|
-
validate(
|
|
13981
|
-
validate(
|
|
13894
|
+
const defs2 = NODE_FIELDS.TSIndexSignature;
|
|
13895
|
+
validate(defs2.parameters, node, 'parameters', parameters, 1);
|
|
13896
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13982
13897
|
return node;
|
|
13983
13898
|
}
|
|
13984
13899
|
|
|
@@ -14074,10 +13989,10 @@ function tsFunctionType(typeParameters = null, params, returnType = null) {
|
|
|
14074
13989
|
returnType,
|
|
14075
13990
|
};
|
|
14076
13991
|
|
|
14077
|
-
const
|
|
14078
|
-
validate(
|
|
14079
|
-
validate(
|
|
14080
|
-
validate(
|
|
13992
|
+
const defs2 = NODE_FIELDS.TSFunctionType;
|
|
13993
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13994
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13995
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14081
13996
|
return node;
|
|
14082
13997
|
}
|
|
14083
13998
|
|
|
@@ -14089,10 +14004,10 @@ function tsConstructorType(typeParameters = null, params, returnType = null) {
|
|
|
14089
14004
|
returnType,
|
|
14090
14005
|
};
|
|
14091
14006
|
|
|
14092
|
-
const
|
|
14093
|
-
validate(
|
|
14094
|
-
validate(
|
|
14095
|
-
validate(
|
|
14007
|
+
const defs2 = NODE_FIELDS.TSConstructorType;
|
|
14008
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14009
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14010
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14096
14011
|
return node;
|
|
14097
14012
|
}
|
|
14098
14013
|
|
|
@@ -14103,9 +14018,9 @@ function tsTypeReference(typeName, typeArguments = null) {
|
|
|
14103
14018
|
typeArguments,
|
|
14104
14019
|
};
|
|
14105
14020
|
|
|
14106
|
-
const
|
|
14107
|
-
validate(
|
|
14108
|
-
validate(
|
|
14021
|
+
const defs2 = NODE_FIELDS.TSTypeReference;
|
|
14022
|
+
validate(defs2.typeName, node, 'typeName', typeName, 1);
|
|
14023
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14109
14024
|
return node;
|
|
14110
14025
|
}
|
|
14111
14026
|
|
|
@@ -14117,10 +14032,10 @@ function tsTypePredicate(parameterName, typeAnnotation2 = null, asserts = null)
|
|
|
14117
14032
|
asserts,
|
|
14118
14033
|
};
|
|
14119
14034
|
|
|
14120
|
-
const
|
|
14121
|
-
validate(
|
|
14122
|
-
validate(
|
|
14123
|
-
validate(
|
|
14035
|
+
const defs2 = NODE_FIELDS.TSTypePredicate;
|
|
14036
|
+
validate(defs2.parameterName, node, 'parameterName', parameterName, 1);
|
|
14037
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14038
|
+
validate(defs2.asserts, node, 'asserts', asserts);
|
|
14124
14039
|
return node;
|
|
14125
14040
|
}
|
|
14126
14041
|
|
|
@@ -14131,9 +14046,9 @@ function tsTypeQuery(exprName, typeArguments = null) {
|
|
|
14131
14046
|
typeArguments,
|
|
14132
14047
|
};
|
|
14133
14048
|
|
|
14134
|
-
const
|
|
14135
|
-
validate(
|
|
14136
|
-
validate(
|
|
14049
|
+
const defs2 = NODE_FIELDS.TSTypeQuery;
|
|
14050
|
+
validate(defs2.exprName, node, 'exprName', exprName, 1);
|
|
14051
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14137
14052
|
return node;
|
|
14138
14053
|
}
|
|
14139
14054
|
|
|
@@ -14143,8 +14058,8 @@ function tsTypeLiteral(members) {
|
|
|
14143
14058
|
members,
|
|
14144
14059
|
};
|
|
14145
14060
|
|
|
14146
|
-
const
|
|
14147
|
-
validate(
|
|
14061
|
+
const defs2 = NODE_FIELDS.TSTypeLiteral;
|
|
14062
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
14148
14063
|
return node;
|
|
14149
14064
|
}
|
|
14150
14065
|
|
|
@@ -14154,8 +14069,8 @@ function tsArrayType(elementType) {
|
|
|
14154
14069
|
elementType,
|
|
14155
14070
|
};
|
|
14156
14071
|
|
|
14157
|
-
const
|
|
14158
|
-
validate(
|
|
14072
|
+
const defs2 = NODE_FIELDS.TSArrayType;
|
|
14073
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
14159
14074
|
return node;
|
|
14160
14075
|
}
|
|
14161
14076
|
|
|
@@ -14165,8 +14080,8 @@ function tsTupleType(elementTypes) {
|
|
|
14165
14080
|
elementTypes,
|
|
14166
14081
|
};
|
|
14167
14082
|
|
|
14168
|
-
const
|
|
14169
|
-
validate(
|
|
14083
|
+
const defs2 = NODE_FIELDS.TSTupleType;
|
|
14084
|
+
validate(defs2.elementTypes, node, 'elementTypes', elementTypes, 1);
|
|
14170
14085
|
return node;
|
|
14171
14086
|
}
|
|
14172
14087
|
|
|
@@ -14176,8 +14091,8 @@ function tsOptionalType(typeAnnotation2) {
|
|
|
14176
14091
|
typeAnnotation: typeAnnotation2,
|
|
14177
14092
|
};
|
|
14178
14093
|
|
|
14179
|
-
const
|
|
14180
|
-
validate(
|
|
14094
|
+
const defs2 = NODE_FIELDS.TSOptionalType;
|
|
14095
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14181
14096
|
return node;
|
|
14182
14097
|
}
|
|
14183
14098
|
|
|
@@ -14187,8 +14102,8 @@ function tsRestType(typeAnnotation2) {
|
|
|
14187
14102
|
typeAnnotation: typeAnnotation2,
|
|
14188
14103
|
};
|
|
14189
14104
|
|
|
14190
|
-
const
|
|
14191
|
-
validate(
|
|
14105
|
+
const defs2 = NODE_FIELDS.TSRestType;
|
|
14106
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14192
14107
|
return node;
|
|
14193
14108
|
}
|
|
14194
14109
|
|
|
@@ -14200,10 +14115,10 @@ function tsNamedTupleMember(label, elementType, optional = false) {
|
|
|
14200
14115
|
optional,
|
|
14201
14116
|
};
|
|
14202
14117
|
|
|
14203
|
-
const
|
|
14204
|
-
validate(
|
|
14205
|
-
validate(
|
|
14206
|
-
validate(
|
|
14118
|
+
const defs2 = NODE_FIELDS.TSNamedTupleMember;
|
|
14119
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
14120
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
14121
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
14207
14122
|
return node;
|
|
14208
14123
|
}
|
|
14209
14124
|
|
|
@@ -14213,8 +14128,8 @@ function tsUnionType(types2) {
|
|
|
14213
14128
|
types: types2,
|
|
14214
14129
|
};
|
|
14215
14130
|
|
|
14216
|
-
const
|
|
14217
|
-
validate(
|
|
14131
|
+
const defs2 = NODE_FIELDS.TSUnionType;
|
|
14132
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14218
14133
|
return node;
|
|
14219
14134
|
}
|
|
14220
14135
|
|
|
@@ -14224,8 +14139,8 @@ function tsIntersectionType(types2) {
|
|
|
14224
14139
|
types: types2,
|
|
14225
14140
|
};
|
|
14226
14141
|
|
|
14227
|
-
const
|
|
14228
|
-
validate(
|
|
14142
|
+
const defs2 = NODE_FIELDS.TSIntersectionType;
|
|
14143
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14229
14144
|
return node;
|
|
14230
14145
|
}
|
|
14231
14146
|
|
|
@@ -14238,11 +14153,11 @@ function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
|
14238
14153
|
falseType,
|
|
14239
14154
|
};
|
|
14240
14155
|
|
|
14241
|
-
const
|
|
14242
|
-
validate(
|
|
14243
|
-
validate(
|
|
14244
|
-
validate(
|
|
14245
|
-
validate(
|
|
14156
|
+
const defs2 = NODE_FIELDS.TSConditionalType;
|
|
14157
|
+
validate(defs2.checkType, node, 'checkType', checkType, 1);
|
|
14158
|
+
validate(defs2.extendsType, node, 'extendsType', extendsType, 1);
|
|
14159
|
+
validate(defs2.trueType, node, 'trueType', trueType, 1);
|
|
14160
|
+
validate(defs2.falseType, node, 'falseType', falseType, 1);
|
|
14246
14161
|
return node;
|
|
14247
14162
|
}
|
|
14248
14163
|
|
|
@@ -14252,8 +14167,8 @@ function tsInferType(typeParameter2) {
|
|
|
14252
14167
|
typeParameter: typeParameter2,
|
|
14253
14168
|
};
|
|
14254
14169
|
|
|
14255
|
-
const
|
|
14256
|
-
validate(
|
|
14170
|
+
const defs2 = NODE_FIELDS.TSInferType;
|
|
14171
|
+
validate(defs2.typeParameter, node, 'typeParameter', typeParameter2, 1);
|
|
14257
14172
|
return node;
|
|
14258
14173
|
}
|
|
14259
14174
|
|
|
@@ -14263,8 +14178,8 @@ function tsParenthesizedType(typeAnnotation2) {
|
|
|
14263
14178
|
typeAnnotation: typeAnnotation2,
|
|
14264
14179
|
};
|
|
14265
14180
|
|
|
14266
|
-
const
|
|
14267
|
-
validate(
|
|
14181
|
+
const defs2 = NODE_FIELDS.TSParenthesizedType;
|
|
14182
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14268
14183
|
return node;
|
|
14269
14184
|
}
|
|
14270
14185
|
|
|
@@ -14275,9 +14190,9 @@ function tsTypeOperator(typeAnnotation2, operator) {
|
|
|
14275
14190
|
operator,
|
|
14276
14191
|
};
|
|
14277
14192
|
|
|
14278
|
-
const
|
|
14279
|
-
validate(
|
|
14280
|
-
validate(
|
|
14193
|
+
const defs2 = NODE_FIELDS.TSTypeOperator;
|
|
14194
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14195
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
14281
14196
|
return node;
|
|
14282
14197
|
}
|
|
14283
14198
|
|
|
@@ -14288,9 +14203,9 @@ function tsIndexedAccessType(objectType, indexType) {
|
|
|
14288
14203
|
indexType,
|
|
14289
14204
|
};
|
|
14290
14205
|
|
|
14291
|
-
const
|
|
14292
|
-
validate(
|
|
14293
|
-
validate(
|
|
14206
|
+
const defs2 = NODE_FIELDS.TSIndexedAccessType;
|
|
14207
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
14208
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
14294
14209
|
return node;
|
|
14295
14210
|
}
|
|
14296
14211
|
|
|
@@ -14303,11 +14218,11 @@ function tsMappedType(key, constraint, nameType = null, typeAnnotation2 = null)
|
|
|
14303
14218
|
typeAnnotation: typeAnnotation2,
|
|
14304
14219
|
};
|
|
14305
14220
|
|
|
14306
|
-
const
|
|
14307
|
-
validate(
|
|
14308
|
-
validate(
|
|
14309
|
-
validate(
|
|
14310
|
-
validate(
|
|
14221
|
+
const defs2 = NODE_FIELDS.TSMappedType;
|
|
14222
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
14223
|
+
validate(defs2.constraint, node, 'constraint', constraint, 1);
|
|
14224
|
+
validate(defs2.nameType, node, 'nameType', nameType, 1);
|
|
14225
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14311
14226
|
return node;
|
|
14312
14227
|
}
|
|
14313
14228
|
|
|
@@ -14318,9 +14233,9 @@ function tsTemplateLiteralType(quasis, types2) {
|
|
|
14318
14233
|
types: types2,
|
|
14319
14234
|
};
|
|
14320
14235
|
|
|
14321
|
-
const
|
|
14322
|
-
validate(
|
|
14323
|
-
validate(
|
|
14236
|
+
const defs2 = NODE_FIELDS.TSTemplateLiteralType;
|
|
14237
|
+
validate(defs2.quasis, node, 'quasis', quasis, 1);
|
|
14238
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14324
14239
|
return node;
|
|
14325
14240
|
}
|
|
14326
14241
|
|
|
@@ -14330,8 +14245,8 @@ function tsLiteralType(literal) {
|
|
|
14330
14245
|
literal,
|
|
14331
14246
|
};
|
|
14332
14247
|
|
|
14333
|
-
const
|
|
14334
|
-
validate(
|
|
14248
|
+
const defs2 = NODE_FIELDS.TSLiteralType;
|
|
14249
|
+
validate(defs2.literal, node, 'literal', literal, 1);
|
|
14335
14250
|
return node;
|
|
14336
14251
|
}
|
|
14337
14252
|
|
|
@@ -14342,9 +14257,9 @@ function tsClassImplements(expression2, typeArguments = null) {
|
|
|
14342
14257
|
typeArguments,
|
|
14343
14258
|
};
|
|
14344
14259
|
|
|
14345
|
-
const
|
|
14346
|
-
validate(
|
|
14347
|
-
validate(
|
|
14260
|
+
const defs2 = NODE_FIELDS.TSClassImplements;
|
|
14261
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14262
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14348
14263
|
return node;
|
|
14349
14264
|
}
|
|
14350
14265
|
|
|
@@ -14355,9 +14270,9 @@ function tsInterfaceHeritage(expression2, typeArguments = null) {
|
|
|
14355
14270
|
typeArguments,
|
|
14356
14271
|
};
|
|
14357
14272
|
|
|
14358
|
-
const
|
|
14359
|
-
validate(
|
|
14360
|
-
validate(
|
|
14273
|
+
const defs2 = NODE_FIELDS.TSInterfaceHeritage;
|
|
14274
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14275
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14361
14276
|
return node;
|
|
14362
14277
|
}
|
|
14363
14278
|
|
|
@@ -14370,11 +14285,11 @@ function tsInterfaceDeclaration(id, typeParameters = null, _extends = null, body
|
|
|
14370
14285
|
body,
|
|
14371
14286
|
};
|
|
14372
14287
|
|
|
14373
|
-
const
|
|
14374
|
-
validate(
|
|
14375
|
-
validate(
|
|
14376
|
-
validate(
|
|
14377
|
-
validate(
|
|
14288
|
+
const defs2 = NODE_FIELDS.TSInterfaceDeclaration;
|
|
14289
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14290
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14291
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
14292
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14378
14293
|
return node;
|
|
14379
14294
|
}
|
|
14380
14295
|
|
|
@@ -14384,8 +14299,8 @@ function tsInterfaceBody(body) {
|
|
|
14384
14299
|
body,
|
|
14385
14300
|
};
|
|
14386
14301
|
|
|
14387
|
-
const
|
|
14388
|
-
validate(
|
|
14302
|
+
const defs2 = NODE_FIELDS.TSInterfaceBody;
|
|
14303
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14389
14304
|
return node;
|
|
14390
14305
|
}
|
|
14391
14306
|
|
|
@@ -14397,10 +14312,10 @@ function tsTypeAliasDeclaration(id, typeParameters = null, typeAnnotation2) {
|
|
|
14397
14312
|
typeAnnotation: typeAnnotation2,
|
|
14398
14313
|
};
|
|
14399
14314
|
|
|
14400
|
-
const
|
|
14401
|
-
validate(
|
|
14402
|
-
validate(
|
|
14403
|
-
validate(
|
|
14315
|
+
const defs2 = NODE_FIELDS.TSTypeAliasDeclaration;
|
|
14316
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14317
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14318
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14404
14319
|
return node;
|
|
14405
14320
|
}
|
|
14406
14321
|
|
|
@@ -14411,9 +14326,9 @@ function tsInstantiationExpression(expression2, typeArguments = null) {
|
|
|
14411
14326
|
typeArguments,
|
|
14412
14327
|
};
|
|
14413
14328
|
|
|
14414
|
-
const
|
|
14415
|
-
validate(
|
|
14416
|
-
validate(
|
|
14329
|
+
const defs2 = NODE_FIELDS.TSInstantiationExpression;
|
|
14330
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14331
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14417
14332
|
return node;
|
|
14418
14333
|
}
|
|
14419
14334
|
|
|
@@ -14424,9 +14339,9 @@ function tsAsExpression(expression2, typeAnnotation2) {
|
|
|
14424
14339
|
typeAnnotation: typeAnnotation2,
|
|
14425
14340
|
};
|
|
14426
14341
|
|
|
14427
|
-
const
|
|
14428
|
-
validate(
|
|
14429
|
-
validate(
|
|
14342
|
+
const defs2 = NODE_FIELDS.TSAsExpression;
|
|
14343
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14344
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14430
14345
|
return node;
|
|
14431
14346
|
}
|
|
14432
14347
|
|
|
@@ -14437,9 +14352,9 @@ function tsSatisfiesExpression(expression2, typeAnnotation2) {
|
|
|
14437
14352
|
typeAnnotation: typeAnnotation2,
|
|
14438
14353
|
};
|
|
14439
14354
|
|
|
14440
|
-
const
|
|
14441
|
-
validate(
|
|
14442
|
-
validate(
|
|
14355
|
+
const defs2 = NODE_FIELDS.TSSatisfiesExpression;
|
|
14356
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14357
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14443
14358
|
return node;
|
|
14444
14359
|
}
|
|
14445
14360
|
|
|
@@ -14450,9 +14365,9 @@ function tsTypeAssertion(typeAnnotation2, expression2) {
|
|
|
14450
14365
|
expression: expression2,
|
|
14451
14366
|
};
|
|
14452
14367
|
|
|
14453
|
-
const
|
|
14454
|
-
validate(
|
|
14455
|
-
validate(
|
|
14368
|
+
const defs2 = NODE_FIELDS.TSTypeAssertion;
|
|
14369
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14370
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14456
14371
|
return node;
|
|
14457
14372
|
}
|
|
14458
14373
|
|
|
@@ -14462,8 +14377,8 @@ function tsEnumBody(members) {
|
|
|
14462
14377
|
members,
|
|
14463
14378
|
};
|
|
14464
14379
|
|
|
14465
|
-
const
|
|
14466
|
-
validate(
|
|
14380
|
+
const defs2 = NODE_FIELDS.TSEnumBody;
|
|
14381
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
14467
14382
|
return node;
|
|
14468
14383
|
}
|
|
14469
14384
|
|
|
@@ -14474,9 +14389,9 @@ function tsEnumDeclaration(id, body) {
|
|
|
14474
14389
|
body,
|
|
14475
14390
|
};
|
|
14476
14391
|
|
|
14477
|
-
const
|
|
14478
|
-
validate(
|
|
14479
|
-
validate(
|
|
14392
|
+
const defs2 = NODE_FIELDS.TSEnumDeclaration;
|
|
14393
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14394
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14480
14395
|
return node;
|
|
14481
14396
|
}
|
|
14482
14397
|
|
|
@@ -14487,9 +14402,9 @@ function tsEnumMember(id, initializer = null) {
|
|
|
14487
14402
|
initializer,
|
|
14488
14403
|
};
|
|
14489
14404
|
|
|
14490
|
-
const
|
|
14491
|
-
validate(
|
|
14492
|
-
validate(
|
|
14405
|
+
const defs2 = NODE_FIELDS.TSEnumMember;
|
|
14406
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14407
|
+
validate(defs2.initializer, node, 'initializer', initializer, 1);
|
|
14493
14408
|
return node;
|
|
14494
14409
|
}
|
|
14495
14410
|
|
|
@@ -14501,9 +14416,9 @@ function tsModuleDeclaration(id, body) {
|
|
|
14501
14416
|
kind: 'namespace',
|
|
14502
14417
|
};
|
|
14503
14418
|
|
|
14504
|
-
const
|
|
14505
|
-
validate(
|
|
14506
|
-
validate(
|
|
14419
|
+
const defs2 = NODE_FIELDS.TSModuleDeclaration;
|
|
14420
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14421
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14507
14422
|
return node;
|
|
14508
14423
|
}
|
|
14509
14424
|
|
|
@@ -14513,8 +14428,8 @@ function tsModuleBlock(body) {
|
|
|
14513
14428
|
body,
|
|
14514
14429
|
};
|
|
14515
14430
|
|
|
14516
|
-
const
|
|
14517
|
-
validate(
|
|
14431
|
+
const defs2 = NODE_FIELDS.TSModuleBlock;
|
|
14432
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14518
14433
|
return node;
|
|
14519
14434
|
}
|
|
14520
14435
|
|
|
@@ -14526,10 +14441,10 @@ function tsImportType(source, qualifier = null, typeArguments = null) {
|
|
|
14526
14441
|
typeArguments,
|
|
14527
14442
|
};
|
|
14528
14443
|
|
|
14529
|
-
const
|
|
14530
|
-
validate(
|
|
14531
|
-
validate(
|
|
14532
|
-
validate(
|
|
14444
|
+
const defs2 = NODE_FIELDS.TSImportType;
|
|
14445
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
14446
|
+
validate(defs2.qualifier, node, 'qualifier', qualifier, 1);
|
|
14447
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14533
14448
|
return node;
|
|
14534
14449
|
}
|
|
14535
14450
|
|
|
@@ -14540,9 +14455,9 @@ function tsImportEqualsDeclaration(id, moduleReference) {
|
|
|
14540
14455
|
moduleReference,
|
|
14541
14456
|
};
|
|
14542
14457
|
|
|
14543
|
-
const
|
|
14544
|
-
validate(
|
|
14545
|
-
validate(
|
|
14458
|
+
const defs2 = NODE_FIELDS.TSImportEqualsDeclaration;
|
|
14459
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14460
|
+
validate(defs2.moduleReference, node, 'moduleReference', moduleReference, 1);
|
|
14546
14461
|
return node;
|
|
14547
14462
|
}
|
|
14548
14463
|
|
|
@@ -14552,8 +14467,8 @@ function tsExternalModuleReference(expression2) {
|
|
|
14552
14467
|
expression: expression2,
|
|
14553
14468
|
};
|
|
14554
14469
|
|
|
14555
|
-
const
|
|
14556
|
-
validate(
|
|
14470
|
+
const defs2 = NODE_FIELDS.TSExternalModuleReference;
|
|
14471
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14557
14472
|
return node;
|
|
14558
14473
|
}
|
|
14559
14474
|
|
|
@@ -14563,8 +14478,8 @@ function tsNonNullExpression(expression2) {
|
|
|
14563
14478
|
expression: expression2,
|
|
14564
14479
|
};
|
|
14565
14480
|
|
|
14566
|
-
const
|
|
14567
|
-
validate(
|
|
14481
|
+
const defs2 = NODE_FIELDS.TSNonNullExpression;
|
|
14482
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14568
14483
|
return node;
|
|
14569
14484
|
}
|
|
14570
14485
|
|
|
@@ -14574,8 +14489,8 @@ function tsExportAssignment(expression2) {
|
|
|
14574
14489
|
expression: expression2,
|
|
14575
14490
|
};
|
|
14576
14491
|
|
|
14577
|
-
const
|
|
14578
|
-
validate(
|
|
14492
|
+
const defs2 = NODE_FIELDS.TSExportAssignment;
|
|
14493
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14579
14494
|
return node;
|
|
14580
14495
|
}
|
|
14581
14496
|
|
|
@@ -14585,8 +14500,8 @@ function tsNamespaceExportDeclaration(id) {
|
|
|
14585
14500
|
id,
|
|
14586
14501
|
};
|
|
14587
14502
|
|
|
14588
|
-
const
|
|
14589
|
-
validate(
|
|
14503
|
+
const defs2 = NODE_FIELDS.TSNamespaceExportDeclaration;
|
|
14504
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14590
14505
|
return node;
|
|
14591
14506
|
}
|
|
14592
14507
|
|
|
@@ -14596,8 +14511,8 @@ function tsTypeAnnotation(typeAnnotation2) {
|
|
|
14596
14511
|
typeAnnotation: typeAnnotation2,
|
|
14597
14512
|
};
|
|
14598
14513
|
|
|
14599
|
-
const
|
|
14600
|
-
validate(
|
|
14514
|
+
const defs2 = NODE_FIELDS.TSTypeAnnotation;
|
|
14515
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14601
14516
|
return node;
|
|
14602
14517
|
}
|
|
14603
14518
|
|
|
@@ -14607,8 +14522,8 @@ function tsTypeParameterInstantiation(params) {
|
|
|
14607
14522
|
params,
|
|
14608
14523
|
};
|
|
14609
14524
|
|
|
14610
|
-
const
|
|
14611
|
-
validate(
|
|
14525
|
+
const defs2 = NODE_FIELDS.TSTypeParameterInstantiation;
|
|
14526
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14612
14527
|
return node;
|
|
14613
14528
|
}
|
|
14614
14529
|
|
|
@@ -14618,8 +14533,8 @@ function tsTypeParameterDeclaration(params) {
|
|
|
14618
14533
|
params,
|
|
14619
14534
|
};
|
|
14620
14535
|
|
|
14621
|
-
const
|
|
14622
|
-
validate(
|
|
14536
|
+
const defs2 = NODE_FIELDS.TSTypeParameterDeclaration;
|
|
14537
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14623
14538
|
return node;
|
|
14624
14539
|
}
|
|
14625
14540
|
|
|
@@ -14631,10 +14546,10 @@ function tsTypeParameter(constraint = null, _default = null, name) {
|
|
|
14631
14546
|
name,
|
|
14632
14547
|
};
|
|
14633
14548
|
|
|
14634
|
-
const
|
|
14635
|
-
validate(
|
|
14636
|
-
validate(
|
|
14637
|
-
validate(
|
|
14549
|
+
const defs2 = NODE_FIELDS.TSTypeParameter;
|
|
14550
|
+
validate(defs2.constraint, node, 'constraint', constraint, 1);
|
|
14551
|
+
validate(defs2.default, node, 'default', _default, 1);
|
|
14552
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
14638
14553
|
return node;
|
|
14639
14554
|
}
|
|
14640
14555
|
|
|
@@ -24300,6 +24215,10 @@ var NodeUtils = class extends UtilParser {
|
|
|
24300
24215
|
}
|
|
24301
24216
|
|
|
24302
24217
|
finishNodeAt(node, type, endLoc) {
|
|
24218
|
+
if (process.env.NODE_ENV !== 'production' && node.end > 0) {
|
|
24219
|
+
throw new Error('Do not call finishNode*() twice on the same node. Instead use resetEndLocation() or change type directly.');
|
|
24220
|
+
}
|
|
24221
|
+
|
|
24303
24222
|
node.type = type;
|
|
24304
24223
|
node.end = endLoc.index;
|
|
24305
24224
|
node.loc.end = endLoc;
|
|
@@ -33470,8 +33389,163 @@ function getParserClass(pluginsMap) {
|
|
|
33470
33389
|
return cls;
|
|
33471
33390
|
}
|
|
33472
33391
|
|
|
33392
|
+
// ../babel-babel/packages/babel-code-frame/lib/common-BO7XIBW3.js
|
|
33393
|
+
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
33394
|
+
|
|
33395
|
+
function getMarkerLines(loc, source, opts, startLineBaseZero) {
|
|
33396
|
+
const startLoc = {
|
|
33397
|
+
column: 0,
|
|
33398
|
+
line: -1,
|
|
33399
|
+
...loc.start,
|
|
33400
|
+
};
|
|
33401
|
+
|
|
33402
|
+
const endLoc = {
|
|
33403
|
+
...startLoc,
|
|
33404
|
+
...loc.end,
|
|
33405
|
+
};
|
|
33406
|
+
|
|
33407
|
+
const {linesAbove = 2, linesBelow = 3} = opts || {};
|
|
33408
|
+
|
|
33409
|
+
const startLine = startLoc.line - startLineBaseZero;
|
|
33410
|
+
const startColumn = startLoc.column;
|
|
33411
|
+
const endLine = endLoc.line - startLineBaseZero;
|
|
33412
|
+
const endColumn = endLoc.column;
|
|
33413
|
+
let start = Math.max(startLine - (linesAbove + 1), 0);
|
|
33414
|
+
let end = Math.min(source.length, endLine + linesBelow);
|
|
33415
|
+
|
|
33416
|
+
if (startLine === -1) {
|
|
33417
|
+
start = 0;
|
|
33418
|
+
}
|
|
33419
|
+
|
|
33420
|
+
if (endLine === -1) {
|
|
33421
|
+
end = source.length;
|
|
33422
|
+
}
|
|
33423
|
+
|
|
33424
|
+
const lineDiff = endLine - startLine;
|
|
33425
|
+
const markerLines = {};
|
|
33426
|
+
|
|
33427
|
+
if (lineDiff) {
|
|
33428
|
+
for (let i = 0; i <= lineDiff; i++) {
|
|
33429
|
+
const lineNumber = i + startLine;
|
|
33430
|
+
|
|
33431
|
+
if (!startColumn) {
|
|
33432
|
+
markerLines[lineNumber] = true;
|
|
33433
|
+
} else if (i === 0) {
|
|
33434
|
+
const sourceLength = source[lineNumber - 1].length;
|
|
33435
|
+
markerLines[lineNumber] = [
|
|
33436
|
+
startColumn,
|
|
33437
|
+
sourceLength - startColumn + 1,
|
|
33438
|
+
];
|
|
33439
|
+
} else if (i === lineDiff) {
|
|
33440
|
+
markerLines[lineNumber] = [0, endColumn];
|
|
33441
|
+
} else {
|
|
33442
|
+
const sourceLength = source[lineNumber - i].length;
|
|
33443
|
+
markerLines[lineNumber] = [0, sourceLength];
|
|
33444
|
+
}
|
|
33445
|
+
|
|
33446
|
+
}
|
|
33447
|
+
} else {
|
|
33448
|
+
if (startColumn === endColumn) {
|
|
33449
|
+
if (startColumn) {
|
|
33450
|
+
markerLines[startLine] = [startColumn, 0];
|
|
33451
|
+
} else {
|
|
33452
|
+
markerLines[startLine] = true;
|
|
33453
|
+
}
|
|
33454
|
+
} else {
|
|
33455
|
+
markerLines[startLine] = [
|
|
33456
|
+
startColumn,
|
|
33457
|
+
endColumn - startColumn,
|
|
33458
|
+
];
|
|
33459
|
+
}
|
|
33460
|
+
}
|
|
33461
|
+
|
|
33462
|
+
return {
|
|
33463
|
+
start,
|
|
33464
|
+
end,
|
|
33465
|
+
markerLines,
|
|
33466
|
+
};
|
|
33467
|
+
}
|
|
33468
|
+
|
|
33469
|
+
function _codeFrameColumns(rawLines, loc, opts = {}, colorOpts) {
|
|
33470
|
+
const {defs: defs2, highlight: highlight2} = colorOpts || {
|
|
33471
|
+
defs: {
|
|
33472
|
+
gutter: String,
|
|
33473
|
+
marker: String,
|
|
33474
|
+
message: String,
|
|
33475
|
+
reset: String,
|
|
33476
|
+
},
|
|
33477
|
+
highlight: String,
|
|
33478
|
+
};
|
|
33479
|
+
|
|
33480
|
+
const startLineBaseZero = (opts.startLine || 1) - 1;
|
|
33481
|
+
const lines = rawLines.split(NEWLINE);
|
|
33482
|
+
|
|
33483
|
+
const {
|
|
33484
|
+
start,
|
|
33485
|
+
end,
|
|
33486
|
+
markerLines,
|
|
33487
|
+
} = getMarkerLines(loc, lines, opts, startLineBaseZero);
|
|
33488
|
+
|
|
33489
|
+
const hasColumns = loc.start && typeof loc.start.column === 'number';
|
|
33490
|
+
const numberMaxWidth = String(end + startLineBaseZero).length;
|
|
33491
|
+
const highlightedLines = highlight2(rawLines);
|
|
33492
|
+
|
|
33493
|
+
let frame = highlightedLines
|
|
33494
|
+
.split(NEWLINE, end)
|
|
33495
|
+
.slice(start, end)
|
|
33496
|
+
.map((line, index3) => {
|
|
33497
|
+
const number = start + 1 + index3;
|
|
33498
|
+
const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);
|
|
33499
|
+
const gutter = ` ${paddedNumber} |`;
|
|
33500
|
+
const hasMarker = markerLines[number];
|
|
33501
|
+
const lastMarkerLine = !markerLines[number + 1];
|
|
33502
|
+
|
|
33503
|
+
if (hasMarker) {
|
|
33504
|
+
let markerLine = '';
|
|
33505
|
+
|
|
33506
|
+
if (Array.isArray(hasMarker)) {
|
|
33507
|
+
const markerSpacing = line
|
|
33508
|
+
.slice(0, Math.max(hasMarker[0] - 1, 0))
|
|
33509
|
+
.replace(/[^\t]/g, ' ');
|
|
33510
|
+
const numberOfMarkers = hasMarker[1] || 1;
|
|
33511
|
+
|
|
33512
|
+
markerLine = [
|
|
33513
|
+
'\n ',
|
|
33514
|
+
defs2.gutter(gutter.replace(/\d/g, ' ')),
|
|
33515
|
+
' ',
|
|
33516
|
+
markerSpacing,
|
|
33517
|
+
defs2
|
|
33518
|
+
.marker('^')
|
|
33519
|
+
.repeat(numberOfMarkers),
|
|
33520
|
+
].join('');
|
|
33521
|
+
|
|
33522
|
+
if (lastMarkerLine && opts.message) {
|
|
33523
|
+
markerLine += ' ' + defs2.message(opts.message);
|
|
33524
|
+
}
|
|
33525
|
+
}
|
|
33526
|
+
|
|
33527
|
+
return [
|
|
33528
|
+
defs2.marker('>'),
|
|
33529
|
+
defs2.gutter(gutter),
|
|
33530
|
+
line.length > 0 ? ` ${line}` : '',
|
|
33531
|
+
markerLine,
|
|
33532
|
+
].join('');
|
|
33533
|
+
} else {
|
|
33534
|
+
return ` ${defs2.gutter(gutter)}${line.length > 0 ? ` ${line}` : ''}`;
|
|
33535
|
+
}
|
|
33536
|
+
})
|
|
33537
|
+
.join('\n');
|
|
33538
|
+
|
|
33539
|
+
if (opts.message && !hasColumns) {
|
|
33540
|
+
frame = `${' '.repeat(numberMaxWidth + 1)}${opts.message}
|
|
33541
|
+
${frame}`;
|
|
33542
|
+
}
|
|
33543
|
+
|
|
33544
|
+
return defs2.reset(frame);
|
|
33545
|
+
}
|
|
33546
|
+
|
|
33473
33547
|
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
33474
|
-
|
|
33548
|
+
import {styleText} from 'util';
|
|
33475
33549
|
|
|
33476
33550
|
// ../babel-babel/node_modules/js-tokens/index.js
|
|
33477
33551
|
var HashbangComment;
|
|
@@ -33985,35 +34059,30 @@ var js_tokens_default = jsTokens;
|
|
|
33985
34059
|
|
|
33986
34060
|
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
33987
34061
|
function isColorSupported() {
|
|
33988
|
-
return
|
|
34062
|
+
return styleText('red', '-') !== '-';
|
|
33989
34063
|
}
|
|
33990
34064
|
|
|
33991
|
-
|
|
33992
|
-
|
|
33993
|
-
|
|
33994
|
-
|
|
33995
|
-
keyword: colors2.cyan,
|
|
33996
|
-
capitalized: colors2.yellow,
|
|
33997
|
-
jsxIdentifier: colors2.yellow,
|
|
33998
|
-
punctuator: colors2.yellow,
|
|
33999
|
-
number: colors2.magenta,
|
|
34000
|
-
string: colors2.green,
|
|
34001
|
-
regex: colors2.magenta,
|
|
34002
|
-
comment: colors2.gray,
|
|
34003
|
-
invalid: compose(compose(colors2.white, colors2.bgRed), colors2.bold),
|
|
34004
|
-
gutter: colors2.gray,
|
|
34005
|
-
marker: compose(colors2.red, colors2.bold),
|
|
34006
|
-
message: compose(colors2.red, colors2.bold),
|
|
34007
|
-
reset: colors2.reset,
|
|
34008
|
-
};
|
|
34065
|
+
function createFormatter(format) {
|
|
34066
|
+
return (input) => styleText(format, String(input ?? ''), {
|
|
34067
|
+
validateStream: false,
|
|
34068
|
+
});
|
|
34009
34069
|
}
|
|
34010
34070
|
|
|
34011
|
-
var
|
|
34012
|
-
|
|
34013
|
-
|
|
34014
|
-
|
|
34015
|
-
|
|
34016
|
-
|
|
34071
|
+
var defs = {
|
|
34072
|
+
keyword: createFormatter('cyan'),
|
|
34073
|
+
capitalized: createFormatter('yellow'),
|
|
34074
|
+
jsxIdentifier: createFormatter('yellow'),
|
|
34075
|
+
punctuator: createFormatter('yellow'),
|
|
34076
|
+
number: createFormatter('magenta'),
|
|
34077
|
+
string: createFormatter('green'),
|
|
34078
|
+
regex: createFormatter('magenta'),
|
|
34079
|
+
comment: createFormatter('gray'),
|
|
34080
|
+
invalid: createFormatter(['white', 'bgRed', 'bold']),
|
|
34081
|
+
gutter: createFormatter('gray'),
|
|
34082
|
+
marker: createFormatter(['red', 'bold']),
|
|
34083
|
+
message: createFormatter(['red', 'bold']),
|
|
34084
|
+
reset: createFormatter('reset'),
|
|
34085
|
+
};
|
|
34017
34086
|
|
|
34018
34087
|
var sometimesKeywords = /* @__PURE__ */new Set([
|
|
34019
34088
|
'as',
|
|
@@ -34023,7 +34092,7 @@ var sometimesKeywords = /* @__PURE__ */new Set([
|
|
|
34023
34092
|
'of',
|
|
34024
34093
|
'set',
|
|
34025
34094
|
]);
|
|
34026
|
-
var
|
|
34095
|
+
var NEWLINE2 = /\r\n|[\n\r\u2028\u2029]/;
|
|
34027
34096
|
var BRACKET = /^[()[\]{}]$/;
|
|
34028
34097
|
|
|
34029
34098
|
var getTokenType = function(token) {
|
|
@@ -34142,13 +34211,12 @@ function highlight(text) {
|
|
|
34142
34211
|
if (text === '')
|
|
34143
34212
|
return '';
|
|
34144
34213
|
|
|
34145
|
-
const defs = getDefs(true);
|
|
34146
34214
|
let highlighted = '';
|
|
34147
34215
|
|
|
34148
34216
|
for (const {type, value} of tokenize(text)) {
|
|
34149
34217
|
if (type in defs) {
|
|
34150
34218
|
highlighted += value
|
|
34151
|
-
.split(
|
|
34219
|
+
.split(NEWLINE2)
|
|
34152
34220
|
.map((str) => defs[type](str))
|
|
34153
34221
|
.join('\n');
|
|
34154
34222
|
} else {
|
|
@@ -34159,154 +34227,13 @@ function highlight(text) {
|
|
|
34159
34227
|
return highlighted;
|
|
34160
34228
|
}
|
|
34161
34229
|
|
|
34162
|
-
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
34163
|
-
|
|
34164
|
-
function getMarkerLines(loc, source, opts, startLineBaseZero) {
|
|
34165
|
-
const startLoc = {
|
|
34166
|
-
column: 0,
|
|
34167
|
-
line: -1,
|
|
34168
|
-
...loc.start,
|
|
34169
|
-
};
|
|
34170
|
-
|
|
34171
|
-
const endLoc = {
|
|
34172
|
-
...startLoc,
|
|
34173
|
-
...loc.end,
|
|
34174
|
-
};
|
|
34175
|
-
|
|
34176
|
-
const {linesAbove = 2, linesBelow = 3} = opts || {};
|
|
34177
|
-
|
|
34178
|
-
const startLine = startLoc.line - startLineBaseZero;
|
|
34179
|
-
const startColumn = startLoc.column;
|
|
34180
|
-
const endLine = endLoc.line - startLineBaseZero;
|
|
34181
|
-
const endColumn = endLoc.column;
|
|
34182
|
-
let start = Math.max(startLine - (linesAbove + 1), 0);
|
|
34183
|
-
let end = Math.min(source.length, endLine + linesBelow);
|
|
34184
|
-
|
|
34185
|
-
if (startLine === -1) {
|
|
34186
|
-
start = 0;
|
|
34187
|
-
}
|
|
34188
|
-
|
|
34189
|
-
if (endLine === -1) {
|
|
34190
|
-
end = source.length;
|
|
34191
|
-
}
|
|
34192
|
-
|
|
34193
|
-
const lineDiff = endLine - startLine;
|
|
34194
|
-
const markerLines = {};
|
|
34195
|
-
|
|
34196
|
-
if (lineDiff) {
|
|
34197
|
-
for (let i = 0; i <= lineDiff; i++) {
|
|
34198
|
-
const lineNumber = i + startLine;
|
|
34199
|
-
|
|
34200
|
-
if (!startColumn) {
|
|
34201
|
-
markerLines[lineNumber] = true;
|
|
34202
|
-
} else if (i === 0) {
|
|
34203
|
-
const sourceLength = source[lineNumber - 1].length;
|
|
34204
|
-
markerLines[lineNumber] = [
|
|
34205
|
-
startColumn,
|
|
34206
|
-
sourceLength - startColumn + 1,
|
|
34207
|
-
];
|
|
34208
|
-
} else if (i === lineDiff) {
|
|
34209
|
-
markerLines[lineNumber] = [0, endColumn];
|
|
34210
|
-
} else {
|
|
34211
|
-
const sourceLength = source[lineNumber - i].length;
|
|
34212
|
-
markerLines[lineNumber] = [0, sourceLength];
|
|
34213
|
-
}
|
|
34214
|
-
|
|
34215
|
-
}
|
|
34216
|
-
} else {
|
|
34217
|
-
if (startColumn === endColumn) {
|
|
34218
|
-
if (startColumn) {
|
|
34219
|
-
markerLines[startLine] = [startColumn, 0];
|
|
34220
|
-
} else {
|
|
34221
|
-
markerLines[startLine] = true;
|
|
34222
|
-
}
|
|
34223
|
-
} else {
|
|
34224
|
-
markerLines[startLine] = [
|
|
34225
|
-
startColumn,
|
|
34226
|
-
endColumn - startColumn,
|
|
34227
|
-
];
|
|
34228
|
-
}
|
|
34229
|
-
}
|
|
34230
|
-
|
|
34231
|
-
return {
|
|
34232
|
-
start,
|
|
34233
|
-
end,
|
|
34234
|
-
markerLines,
|
|
34235
|
-
};
|
|
34236
|
-
}
|
|
34237
|
-
|
|
34238
34230
|
function codeFrameColumns(rawLines, loc, opts = {}) {
|
|
34239
34231
|
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
34240
|
-
const startLineBaseZero = (opts.startLine || 1) - 1;
|
|
34241
|
-
const defs = getDefs(shouldHighlight);
|
|
34242
|
-
const lines = rawLines.split(NEWLINE);
|
|
34243
34232
|
|
|
34244
|
-
|
|
34245
|
-
|
|
34246
|
-
|
|
34247
|
-
|
|
34248
|
-
} = getMarkerLines(loc, lines, opts, startLineBaseZero);
|
|
34249
|
-
|
|
34250
|
-
const hasColumns = loc.start && typeof loc.start.column === 'number';
|
|
34251
|
-
const numberMaxWidth = String(end + startLineBaseZero).length;
|
|
34252
|
-
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
|
|
34253
|
-
|
|
34254
|
-
let frame = highlightedLines
|
|
34255
|
-
.split(NEWLINE, end)
|
|
34256
|
-
.slice(start, end)
|
|
34257
|
-
.map((line, index3) => {
|
|
34258
|
-
const number = start + 1 + index3;
|
|
34259
|
-
const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);
|
|
34260
|
-
const gutter = ` ${paddedNumber} |`;
|
|
34261
|
-
const hasMarker = markerLines[number];
|
|
34262
|
-
const lastMarkerLine = !markerLines[number + 1];
|
|
34263
|
-
|
|
34264
|
-
if (hasMarker) {
|
|
34265
|
-
let markerLine = '';
|
|
34266
|
-
|
|
34267
|
-
if (Array.isArray(hasMarker)) {
|
|
34268
|
-
const markerSpacing = line
|
|
34269
|
-
.slice(0, Math.max(hasMarker[0] - 1, 0))
|
|
34270
|
-
.replace(/[^\t]/g, ' ');
|
|
34271
|
-
const numberOfMarkers = hasMarker[1] || 1;
|
|
34272
|
-
|
|
34273
|
-
markerLine = [
|
|
34274
|
-
'\n ',
|
|
34275
|
-
defs.gutter(gutter.replace(/\d/g, ' ')),
|
|
34276
|
-
' ',
|
|
34277
|
-
markerSpacing,
|
|
34278
|
-
defs
|
|
34279
|
-
.marker('^')
|
|
34280
|
-
.repeat(numberOfMarkers),
|
|
34281
|
-
].join('');
|
|
34282
|
-
|
|
34283
|
-
if (lastMarkerLine && opts.message) {
|
|
34284
|
-
markerLine += ' ' + defs.message(opts.message);
|
|
34285
|
-
}
|
|
34286
|
-
}
|
|
34287
|
-
|
|
34288
|
-
return [
|
|
34289
|
-
defs.marker('>'),
|
|
34290
|
-
defs.gutter(gutter),
|
|
34291
|
-
line.length > 0 ? ` ${line}` : '',
|
|
34292
|
-
markerLine,
|
|
34293
|
-
].join('');
|
|
34294
|
-
} else {
|
|
34295
|
-
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ''}`;
|
|
34296
|
-
}
|
|
34297
|
-
})
|
|
34298
|
-
.join('\n');
|
|
34299
|
-
|
|
34300
|
-
if (opts.message && !hasColumns) {
|
|
34301
|
-
frame = `${' '.repeat(numberMaxWidth + 1)}${opts.message}
|
|
34302
|
-
${frame}`;
|
|
34303
|
-
}
|
|
34304
|
-
|
|
34305
|
-
if (shouldHighlight) {
|
|
34306
|
-
return defs.reset(frame);
|
|
34307
|
-
} else {
|
|
34308
|
-
return frame;
|
|
34309
|
-
}
|
|
34233
|
+
return _codeFrameColumns(rawLines, loc, opts, shouldHighlight ? {
|
|
34234
|
+
defs,
|
|
34235
|
+
highlight,
|
|
34236
|
+
} : void 0);
|
|
34310
34237
|
}
|
|
34311
34238
|
|
|
34312
34239
|
// ../babel-babel/packages/babel-template/lib/index.js
|