ast-types 0.11.5 → 0.12.1
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/.travis.yml +2 -2
- package/def/babel-core.d.ts +2 -0
- package/def/babel-core.js +250 -290
- package/def/babel.d.ts +2 -0
- package/def/babel.js +12 -3
- package/def/core.d.ts +2 -0
- package/def/core.js +57 -126
- package/def/es-proposals.d.ts +2 -0
- package/def/es-proposals.js +34 -32
- package/def/es6.d.ts +2 -0
- package/def/es6.js +210 -253
- package/def/es7.d.ts +2 -0
- package/def/es7.js +35 -41
- package/def/esprima.d.ts +2 -0
- package/def/esprima.js +50 -71
- package/def/flow.d.ts +2 -0
- package/def/flow.js +289 -393
- package/def/jsx.d.ts +2 -0
- package/def/jsx.js +99 -125
- package/def/type-annotations.d.ts +7 -0
- package/def/type-annotations.js +42 -0
- package/def/typescript.d.ts +2 -0
- package/def/typescript.js +326 -444
- package/fork.d.ts +46 -0
- package/fork.js +40 -31
- package/gen/builders.d.ts +2539 -0
- package/gen/builders.js +2 -0
- package/gen/kinds.d.ts +259 -0
- package/gen/kinds.js +2 -0
- package/gen/namedTypes.d.ts +262 -0
- package/gen/namedTypes.js +2 -0
- package/gen/nodes.d.ts +1255 -0
- package/gen/nodes.js +2 -0
- package/gen/visitor.d.ts +263 -0
- package/gen/visitor.js +2 -0
- package/lib/equiv.d.ts +5 -0
- package/lib/equiv.js +19 -49
- package/lib/node-path.d.ts +22 -0
- package/lib/node-path.js +60 -125
- package/lib/path-visitor.d.ts +52 -0
- package/lib/path-visitor.js +117 -194
- package/lib/path.d.ts +25 -0
- package/lib/path.js +71 -107
- package/lib/scope.d.ts +26 -0
- package/lib/scope.js +100 -143
- package/lib/shared.d.ts +13 -0
- package/lib/shared.js +34 -31
- package/lib/types.d.ts +140 -0
- package/lib/types.js +584 -676
- package/main.d.ts +16 -0
- package/main.js +33 -18
- package/package.json +24 -7
- package/tsconfig.json +20 -0
- package/types.d.ts +6 -0
- package/types.js +2 -0
- package/def/e4x.js +0 -86
- package/def/mozilla.js +0 -42
package/.travis.yml
CHANGED
package/def/babel-core.js
CHANGED
|
@@ -1,298 +1,258 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.build("body")
|
|
127
|
-
.field("body", [def("Statement")])
|
|
128
|
-
.field("directives", [def("Directive")], defaults.emptyArray);
|
|
129
|
-
|
|
130
|
-
// Split Literal
|
|
131
|
-
def("StringLiteral")
|
|
132
|
-
.bases("Literal")
|
|
133
|
-
.build("value")
|
|
134
|
-
.field("value", String);
|
|
135
|
-
|
|
136
|
-
def("NumericLiteral")
|
|
137
|
-
.bases("Literal")
|
|
138
|
-
.build("value")
|
|
139
|
-
.field("value", Number)
|
|
140
|
-
.field("raw", or(String, null), defaults["null"])
|
|
141
|
-
.field("extra", {
|
|
142
|
-
rawValue: Number,
|
|
143
|
-
raw: String
|
|
1
|
+
"use strict";;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var types_1 = __importDefault(require("../lib/types"));
|
|
7
|
+
var shared_1 = __importDefault(require("../lib/shared"));
|
|
8
|
+
var es7_1 = __importDefault(require("./es7"));
|
|
9
|
+
function default_1(fork) {
|
|
10
|
+
fork.use(es7_1.default);
|
|
11
|
+
var types = fork.use(types_1.default);
|
|
12
|
+
var defaults = fork.use(shared_1.default).defaults;
|
|
13
|
+
var def = types.Type.def;
|
|
14
|
+
var or = types.Type.or;
|
|
15
|
+
def("Noop")
|
|
16
|
+
.bases("Statement")
|
|
17
|
+
.build();
|
|
18
|
+
def("DoExpression")
|
|
19
|
+
.bases("Expression")
|
|
20
|
+
.build("body")
|
|
21
|
+
.field("body", [def("Statement")]);
|
|
22
|
+
def("Super")
|
|
23
|
+
.bases("Expression")
|
|
24
|
+
.build();
|
|
25
|
+
def("BindExpression")
|
|
26
|
+
.bases("Expression")
|
|
27
|
+
.build("object", "callee")
|
|
28
|
+
.field("object", or(def("Expression"), null))
|
|
29
|
+
.field("callee", def("Expression"));
|
|
30
|
+
def("Decorator")
|
|
31
|
+
.bases("Node")
|
|
32
|
+
.build("expression")
|
|
33
|
+
.field("expression", def("Expression"));
|
|
34
|
+
def("Property")
|
|
35
|
+
.field("decorators", or([def("Decorator")], null), defaults["null"]);
|
|
36
|
+
def("MethodDefinition")
|
|
37
|
+
.field("decorators", or([def("Decorator")], null), defaults["null"]);
|
|
38
|
+
def("MetaProperty")
|
|
39
|
+
.bases("Expression")
|
|
40
|
+
.build("meta", "property")
|
|
41
|
+
.field("meta", def("Identifier"))
|
|
42
|
+
.field("property", def("Identifier"));
|
|
43
|
+
def("ParenthesizedExpression")
|
|
44
|
+
.bases("Expression")
|
|
45
|
+
.build("expression")
|
|
46
|
+
.field("expression", def("Expression"));
|
|
47
|
+
def("ImportSpecifier")
|
|
48
|
+
.bases("ModuleSpecifier")
|
|
49
|
+
.build("imported", "local")
|
|
50
|
+
.field("imported", def("Identifier"));
|
|
51
|
+
def("ImportDefaultSpecifier")
|
|
52
|
+
.bases("ModuleSpecifier")
|
|
53
|
+
.build("local");
|
|
54
|
+
def("ImportNamespaceSpecifier")
|
|
55
|
+
.bases("ModuleSpecifier")
|
|
56
|
+
.build("local");
|
|
57
|
+
def("ExportDefaultDeclaration")
|
|
58
|
+
.bases("Declaration")
|
|
59
|
+
.build("declaration")
|
|
60
|
+
.field("declaration", or(def("Declaration"), def("Expression")));
|
|
61
|
+
def("ExportNamedDeclaration")
|
|
62
|
+
.bases("Declaration")
|
|
63
|
+
.build("declaration", "specifiers", "source")
|
|
64
|
+
.field("declaration", or(def("Declaration"), null))
|
|
65
|
+
.field("specifiers", [def("ExportSpecifier")], defaults.emptyArray)
|
|
66
|
+
.field("source", or(def("Literal"), null), defaults["null"]);
|
|
67
|
+
def("ExportSpecifier")
|
|
68
|
+
.bases("ModuleSpecifier")
|
|
69
|
+
.build("local", "exported")
|
|
70
|
+
.field("exported", def("Identifier"));
|
|
71
|
+
def("ExportNamespaceSpecifier")
|
|
72
|
+
.bases("Specifier")
|
|
73
|
+
.build("exported")
|
|
74
|
+
.field("exported", def("Identifier"));
|
|
75
|
+
def("ExportDefaultSpecifier")
|
|
76
|
+
.bases("Specifier")
|
|
77
|
+
.build("exported")
|
|
78
|
+
.field("exported", def("Identifier"));
|
|
79
|
+
def("ExportAllDeclaration")
|
|
80
|
+
.bases("Declaration")
|
|
81
|
+
.build("exported", "source")
|
|
82
|
+
.field("exported", or(def("Identifier"), null))
|
|
83
|
+
.field("source", def("Literal"));
|
|
84
|
+
def("CommentBlock")
|
|
85
|
+
.bases("Comment")
|
|
86
|
+
.build("value", /*optional:*/ "leading", "trailing");
|
|
87
|
+
def("CommentLine")
|
|
88
|
+
.bases("Comment")
|
|
89
|
+
.build("value", /*optional:*/ "leading", "trailing");
|
|
90
|
+
def("Directive")
|
|
91
|
+
.bases("Node")
|
|
92
|
+
.build("value")
|
|
93
|
+
.field("value", def("DirectiveLiteral"));
|
|
94
|
+
def("DirectiveLiteral")
|
|
95
|
+
.bases("Node", "Expression")
|
|
96
|
+
.build("value")
|
|
97
|
+
.field("value", String, defaults["use strict"]);
|
|
98
|
+
def("InterpreterDirective")
|
|
99
|
+
.bases("Node")
|
|
100
|
+
.build("value")
|
|
101
|
+
.field("value", String);
|
|
102
|
+
def("BlockStatement")
|
|
103
|
+
.bases("Statement")
|
|
104
|
+
.build("body")
|
|
105
|
+
.field("body", [def("Statement")])
|
|
106
|
+
.field("directives", [def("Directive")], defaults.emptyArray);
|
|
107
|
+
def("Program")
|
|
108
|
+
.bases("Node")
|
|
109
|
+
.build("body")
|
|
110
|
+
.field("body", [def("Statement")])
|
|
111
|
+
.field("directives", [def("Directive")], defaults.emptyArray)
|
|
112
|
+
.field("interpreter", or(def("InterpreterDirective"), null), defaults["null"]);
|
|
113
|
+
// Split Literal
|
|
114
|
+
def("StringLiteral")
|
|
115
|
+
.bases("Literal")
|
|
116
|
+
.build("value")
|
|
117
|
+
.field("value", String);
|
|
118
|
+
def("NumericLiteral")
|
|
119
|
+
.bases("Literal")
|
|
120
|
+
.build("value")
|
|
121
|
+
.field("value", Number)
|
|
122
|
+
.field("raw", or(String, null), defaults["null"])
|
|
123
|
+
.field("extra", {
|
|
124
|
+
rawValue: Number,
|
|
125
|
+
raw: String
|
|
144
126
|
}, function getDefault() {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
127
|
+
return {
|
|
128
|
+
rawValue: this.value,
|
|
129
|
+
raw: this.value + ""
|
|
130
|
+
};
|
|
149
131
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
raw: String
|
|
132
|
+
def("BigIntLiteral")
|
|
133
|
+
.bases("Literal")
|
|
134
|
+
.build("value")
|
|
135
|
+
// Only String really seems appropriate here, since BigInt values
|
|
136
|
+
// often exceed the limits of JS numbers.
|
|
137
|
+
.field("value", or(String, Number))
|
|
138
|
+
.field("extra", {
|
|
139
|
+
rawValue: String,
|
|
140
|
+
raw: String
|
|
160
141
|
}, function getDefault() {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
142
|
+
return {
|
|
143
|
+
rawValue: String(this.value),
|
|
144
|
+
raw: this.value + "n"
|
|
145
|
+
};
|
|
165
146
|
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
.field("flags", String)
|
|
182
|
-
.field("value", RegExp, function () {
|
|
183
|
-
return new RegExp(this.pattern, this.flags);
|
|
147
|
+
def("NullLiteral")
|
|
148
|
+
.bases("Literal")
|
|
149
|
+
.build()
|
|
150
|
+
.field("value", null, defaults["null"]);
|
|
151
|
+
def("BooleanLiteral")
|
|
152
|
+
.bases("Literal")
|
|
153
|
+
.build("value")
|
|
154
|
+
.field("value", Boolean);
|
|
155
|
+
def("RegExpLiteral")
|
|
156
|
+
.bases("Literal")
|
|
157
|
+
.build("pattern", "flags")
|
|
158
|
+
.field("pattern", String)
|
|
159
|
+
.field("flags", String)
|
|
160
|
+
.field("value", RegExp, function () {
|
|
161
|
+
return new RegExp(this.pattern, this.flags);
|
|
184
162
|
});
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
def("
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.bases("Node")
|
|
220
|
-
.build("key", "value")
|
|
221
|
-
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
|
|
222
|
-
.field("value", or(def("Expression"), def("Pattern")))
|
|
223
|
-
.field("accessibility", // TypeScript
|
|
224
|
-
or(def("Literal"), null),
|
|
225
|
-
defaults["null"])
|
|
226
|
-
.field("computed", Boolean, defaults["false"]);
|
|
227
|
-
|
|
228
|
-
var ClassBodyElement = or(
|
|
229
|
-
def("MethodDefinition"),
|
|
230
|
-
def("VariableDeclarator"),
|
|
231
|
-
def("ClassPropertyDefinition"),
|
|
232
|
-
def("ClassProperty"),
|
|
163
|
+
var ObjectExpressionProperty = or(def("Property"), def("ObjectMethod"), def("ObjectProperty"), def("SpreadProperty"), def("SpreadElement"));
|
|
164
|
+
// Split Property -> ObjectProperty and ObjectMethod
|
|
165
|
+
def("ObjectExpression")
|
|
166
|
+
.bases("Expression")
|
|
167
|
+
.build("properties")
|
|
168
|
+
.field("properties", [ObjectExpressionProperty]);
|
|
169
|
+
// ObjectMethod hoist .value properties to own properties
|
|
170
|
+
def("ObjectMethod")
|
|
171
|
+
.bases("Node", "Function")
|
|
172
|
+
.build("kind", "key", "params", "body", "computed")
|
|
173
|
+
.field("kind", or("method", "get", "set"))
|
|
174
|
+
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
|
|
175
|
+
.field("params", [def("Pattern")])
|
|
176
|
+
.field("body", def("BlockStatement"))
|
|
177
|
+
.field("computed", Boolean, defaults["false"])
|
|
178
|
+
.field("generator", Boolean, defaults["false"])
|
|
179
|
+
.field("async", Boolean, defaults["false"])
|
|
180
|
+
.field("accessibility", // TypeScript
|
|
181
|
+
or(def("Literal"), null), defaults["null"])
|
|
182
|
+
.field("decorators", or([def("Decorator")], null), defaults["null"]);
|
|
183
|
+
def("ObjectProperty")
|
|
184
|
+
.bases("Node")
|
|
185
|
+
.build("key", "value")
|
|
186
|
+
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
|
|
187
|
+
.field("value", or(def("Expression"), def("Pattern")))
|
|
188
|
+
.field("accessibility", // TypeScript
|
|
189
|
+
or(def("Literal"), null), defaults["null"])
|
|
190
|
+
.field("computed", Boolean, defaults["false"]);
|
|
191
|
+
var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"));
|
|
192
|
+
// MethodDefinition -> ClassMethod
|
|
193
|
+
def("ClassBody")
|
|
194
|
+
.bases("Declaration")
|
|
195
|
+
.build("body")
|
|
196
|
+
.field("body", [ClassBodyElement]);
|
|
233
197
|
def("ClassMethod")
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
def("
|
|
261
|
-
|
|
198
|
+
.bases("Declaration", "Function")
|
|
199
|
+
.build("kind", "key", "params", "body", "computed", "static")
|
|
200
|
+
.field("key", or(def("Literal"), def("Identifier"), def("Expression")));
|
|
201
|
+
def("ClassPrivateMethod")
|
|
202
|
+
.bases("Declaration", "Function")
|
|
203
|
+
.build("key", "params", "body", "kind", "computed", "static")
|
|
204
|
+
.field("key", def("PrivateName"));
|
|
205
|
+
["ClassMethod",
|
|
206
|
+
"ClassPrivateMethod",
|
|
207
|
+
].forEach(function (typeName) {
|
|
208
|
+
def(typeName)
|
|
209
|
+
.field("kind", or("get", "set", "method", "constructor"), function () { return "method"; })
|
|
210
|
+
.field("body", def("BlockStatement"))
|
|
211
|
+
.field("computed", Boolean, defaults["false"])
|
|
212
|
+
.field("static", or(Boolean, null), defaults["null"])
|
|
213
|
+
.field("abstract", or(Boolean, null), defaults["null"])
|
|
214
|
+
.field("access", or("public", "private", "protected", null), defaults["null"])
|
|
215
|
+
.field("accessibility", or("public", "private", "protected", null), defaults["null"])
|
|
216
|
+
.field("decorators", or([def("Decorator")], null), defaults["null"])
|
|
217
|
+
.field("optional", or(Boolean, null), defaults["null"]);
|
|
218
|
+
});
|
|
219
|
+
def("ClassPrivateProperty")
|
|
220
|
+
.bases("ClassProperty")
|
|
221
|
+
.build("key", "value")
|
|
222
|
+
.field("key", def("PrivateName"))
|
|
223
|
+
.field("value", or(def("Expression"), null), defaults["null"]);
|
|
224
|
+
def("PrivateName")
|
|
225
|
+
.bases("Expression", "Pattern")
|
|
226
|
+
.build("id")
|
|
227
|
+
.field("id", def("Identifier"));
|
|
228
|
+
var ObjectPatternProperty = or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty"), // Used by Esprima
|
|
262
229
|
def("ObjectProperty"), // Babel 6
|
|
263
230
|
def("RestProperty") // Babel 6
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
.field("body", def("Statement"));
|
|
293
|
-
|
|
294
|
-
// The callee node of a dynamic import(...) expression.
|
|
295
|
-
def("Import")
|
|
296
|
-
.bases("Expression")
|
|
297
|
-
.build();
|
|
298
|
-
};
|
|
231
|
+
);
|
|
232
|
+
// Split into RestProperty and SpreadProperty
|
|
233
|
+
def("ObjectPattern")
|
|
234
|
+
.bases("Pattern")
|
|
235
|
+
.build("properties")
|
|
236
|
+
.field("properties", [ObjectPatternProperty])
|
|
237
|
+
.field("decorators", or([def("Decorator")], null), defaults["null"]);
|
|
238
|
+
def("SpreadProperty")
|
|
239
|
+
.bases("Node")
|
|
240
|
+
.build("argument")
|
|
241
|
+
.field("argument", def("Expression"));
|
|
242
|
+
def("RestProperty")
|
|
243
|
+
.bases("Node")
|
|
244
|
+
.build("argument")
|
|
245
|
+
.field("argument", def("Expression"));
|
|
246
|
+
def("ForAwaitStatement")
|
|
247
|
+
.bases("Statement")
|
|
248
|
+
.build("left", "right", "body")
|
|
249
|
+
.field("left", or(def("VariableDeclaration"), def("Expression")))
|
|
250
|
+
.field("right", def("Expression"))
|
|
251
|
+
.field("body", def("Statement"));
|
|
252
|
+
// The callee node of a dynamic import(...) expression.
|
|
253
|
+
def("Import")
|
|
254
|
+
.bases("Expression")
|
|
255
|
+
.build();
|
|
256
|
+
}
|
|
257
|
+
exports.default = default_1;
|
|
258
|
+
module.exports = exports["default"];
|
package/def/babel.d.ts
ADDED
package/def/babel.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var babel_core_1 = __importDefault(require("./babel-core"));
|
|
7
|
+
var flow_1 = __importDefault(require("./flow"));
|
|
8
|
+
function default_1(fork) {
|
|
9
|
+
fork.use(babel_core_1.default);
|
|
10
|
+
fork.use(flow_1.default);
|
|
11
|
+
}
|
|
12
|
+
exports.default = default_1;
|
|
13
|
+
module.exports = exports["default"];
|
package/def/core.d.ts
ADDED