hermes-transform 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/detachedNode.js +1 -2
- package/dist/detachedNode.js.flow +7 -8
- package/dist/generated/TransformCloneSignatures.js.flow +34 -1
- package/dist/generated/TransformModifySignatures.js.flow +22 -1
- package/dist/generated/TransformReplaceSignatures.js.flow +22 -1
- package/dist/generated/node-types.js +40 -3
- package/dist/generated/node-types.js.flow +1037 -761
- package/dist/transform/TransformContext.js +4 -5
- package/dist/transform/TransformContext.js.flow +24 -31
- package/dist/transform/mutations/RemoveNode.js +5 -3
- package/dist/transform/mutations/RemoveNode.js.flow +5 -2
- package/dist/transform/mutations/ReplaceNode.js +7 -6
- package/dist/transform/mutations/ReplaceNode.js.flow +6 -10
- package/dist/traverse/traverse.js +0 -2
- package/dist/traverse/traverse.js.flow +1 -3
- package/package.json +6 -5
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// lint directives to let us do some basic validation of generated files
|
|
19
19
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
|
-
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray */
|
|
20
|
+
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray, $FlowFixMe */
|
|
21
21
|
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
ArrayExpression as ArrayExpressionType,
|
|
28
28
|
ArrayPattern as ArrayPatternType,
|
|
29
29
|
ArrayTypeAnnotation as ArrayTypeAnnotationType,
|
|
30
|
+
AsConstExpression as AsConstExpressionType,
|
|
30
31
|
AsExpression as AsExpressionType,
|
|
31
32
|
AssignmentExpression as AssignmentExpressionType,
|
|
32
33
|
AssignmentPattern as AssignmentPatternType,
|
|
@@ -67,6 +68,8 @@ import type {
|
|
|
67
68
|
DoWhileStatement as DoWhileStatementType,
|
|
68
69
|
EmptyStatement as EmptyStatementType,
|
|
69
70
|
EmptyTypeAnnotation as EmptyTypeAnnotationType,
|
|
71
|
+
EnumBigIntBody as EnumBigIntBodyType,
|
|
72
|
+
EnumBigIntMember as EnumBigIntMemberType,
|
|
70
73
|
EnumBooleanBody as EnumBooleanBodyType,
|
|
71
74
|
EnumBooleanMember as EnumBooleanMemberType,
|
|
72
75
|
EnumDeclaration as EnumDeclarationType,
|
|
@@ -213,6 +216,10 @@ export type ArrayTypeAnnotationProps = {
|
|
|
213
216
|
+elementType: MaybeDetachedNode<ArrayTypeAnnotationType['elementType']>,
|
|
214
217
|
};
|
|
215
218
|
|
|
219
|
+
export type AsConstExpressionProps = {
|
|
220
|
+
+expression: MaybeDetachedNode<AsConstExpressionType['expression']>,
|
|
221
|
+
};
|
|
222
|
+
|
|
216
223
|
export type AsExpressionProps = {
|
|
217
224
|
+expression: MaybeDetachedNode<AsExpressionType['expression']>,
|
|
218
225
|
+typeAnnotation: MaybeDetachedNode<AsExpressionType['typeAnnotation']>,
|
|
@@ -448,6 +455,19 @@ export type EmptyStatementProps = {};
|
|
|
448
455
|
|
|
449
456
|
export type EmptyTypeAnnotationProps = {};
|
|
450
457
|
|
|
458
|
+
export type EnumBigIntBodyProps = {
|
|
459
|
+
+members: $ReadOnlyArray<
|
|
460
|
+
MaybeDetachedNode<EnumBigIntBodyType['members'][number]>,
|
|
461
|
+
>,
|
|
462
|
+
+explicitType: EnumBigIntBodyType['explicitType'],
|
|
463
|
+
+hasUnknownMembers: EnumBigIntBodyType['hasUnknownMembers'],
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
export type EnumBigIntMemberProps = {
|
|
467
|
+
+id: MaybeDetachedNode<EnumBigIntMemberType['id']>,
|
|
468
|
+
+init: MaybeDetachedNode<EnumBigIntMemberType['init']>,
|
|
469
|
+
};
|
|
470
|
+
|
|
451
471
|
export type EnumBooleanBodyProps = {
|
|
452
472
|
+members: $ReadOnlyArray<
|
|
453
473
|
MaybeDetachedNode<EnumBooleanBodyType['members'][number]>,
|
|
@@ -1019,6 +1039,7 @@ export type TupleTypeAnnotationProps = {
|
|
|
1019
1039
|
+types: $ReadOnlyArray<
|
|
1020
1040
|
MaybeDetachedNode<TupleTypeAnnotationType['types'][number]>,
|
|
1021
1041
|
>,
|
|
1042
|
+
+inexact: TupleTypeAnnotationType['inexact'],
|
|
1022
1043
|
};
|
|
1023
1044
|
|
|
1024
1045
|
export type TupleTypeLabeledElementProps = {
|
|
@@ -1085,7 +1106,7 @@ export type TypeParameterInstantiationProps = {
|
|
|
1085
1106
|
export type TypePredicateProps = {
|
|
1086
1107
|
+parameterName: MaybeDetachedNode<TypePredicateType['parameterName']>,
|
|
1087
1108
|
+typeAnnotation?: ?MaybeDetachedNode<TypePredicateType['typeAnnotation']>,
|
|
1088
|
-
+
|
|
1109
|
+
+kind?: ?TypePredicateType['kind'],
|
|
1089
1110
|
};
|
|
1090
1111
|
|
|
1091
1112
|
export type UnaryExpressionProps = {
|
|
@@ -1144,110 +1165,137 @@ export function AnyTypeAnnotation(
|
|
|
1144
1165
|
+parent?: ESNode,
|
|
1145
1166
|
} = {...null},
|
|
1146
1167
|
): DetachedNode<AnyTypeAnnotationType> {
|
|
1147
|
-
return detachedProps<AnyTypeAnnotationType>(props.parent, {
|
|
1168
|
+
return detachedProps<AnyTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
1148
1169
|
type: 'AnyTypeAnnotation',
|
|
1149
1170
|
});
|
|
1150
1171
|
}
|
|
1151
1172
|
|
|
1152
1173
|
export function ArrayExpression(props: {
|
|
1153
|
-
|
|
1174
|
+
...ArrayExpressionProps,
|
|
1154
1175
|
+parent?: ESNode,
|
|
1155
1176
|
}): DetachedNode<ArrayExpressionType> {
|
|
1156
|
-
const node = detachedProps<ArrayExpressionType>(props.parent, {
|
|
1177
|
+
const node = detachedProps<ArrayExpressionType>((props.parent: $FlowFixMe), {
|
|
1157
1178
|
type: 'ArrayExpression',
|
|
1158
1179
|
elements: props.elements.map(n => asDetachedNodeForCodeGen(n)),
|
|
1159
1180
|
trailingComma: props.trailingComma,
|
|
1160
1181
|
});
|
|
1161
|
-
setParentPointersInDirectChildren(node);
|
|
1182
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1162
1183
|
return node;
|
|
1163
1184
|
}
|
|
1164
1185
|
|
|
1165
1186
|
export function ArrayPattern(props: {
|
|
1166
|
-
|
|
1187
|
+
...ArrayPatternProps,
|
|
1167
1188
|
+parent?: ESNode,
|
|
1168
1189
|
}): DetachedNode<ArrayPatternType> {
|
|
1169
|
-
const node = detachedProps<ArrayPatternType>(props.parent, {
|
|
1190
|
+
const node = detachedProps<ArrayPatternType>((props.parent: $FlowFixMe), {
|
|
1170
1191
|
type: 'ArrayPattern',
|
|
1171
1192
|
elements: props.elements.map(n => asDetachedNodeForCodeGen(n)),
|
|
1172
1193
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
1173
1194
|
});
|
|
1174
|
-
setParentPointersInDirectChildren(node);
|
|
1195
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1175
1196
|
return node;
|
|
1176
1197
|
}
|
|
1177
1198
|
|
|
1178
1199
|
export function ArrayTypeAnnotation(props: {
|
|
1179
|
-
|
|
1200
|
+
...ArrayTypeAnnotationProps,
|
|
1180
1201
|
+parent?: ESNode,
|
|
1181
1202
|
}): DetachedNode<ArrayTypeAnnotationType> {
|
|
1182
|
-
const node = detachedProps<ArrayTypeAnnotationType>(
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1203
|
+
const node = detachedProps<ArrayTypeAnnotationType>(
|
|
1204
|
+
(props.parent: $FlowFixMe),
|
|
1205
|
+
{
|
|
1206
|
+
type: 'ArrayTypeAnnotation',
|
|
1207
|
+
elementType: asDetachedNodeForCodeGen(props.elementType),
|
|
1208
|
+
},
|
|
1209
|
+
);
|
|
1210
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1211
|
+
return node;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
export function AsConstExpression(props: {
|
|
1215
|
+
...AsConstExpressionProps,
|
|
1216
|
+
+parent?: ESNode,
|
|
1217
|
+
}): DetachedNode<AsConstExpressionType> {
|
|
1218
|
+
const node = detachedProps<AsConstExpressionType>(
|
|
1219
|
+
(props.parent: $FlowFixMe),
|
|
1220
|
+
{
|
|
1221
|
+
type: 'AsConstExpression',
|
|
1222
|
+
expression: asDetachedNodeForCodeGen(props.expression),
|
|
1223
|
+
},
|
|
1224
|
+
);
|
|
1225
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1187
1226
|
return node;
|
|
1188
1227
|
}
|
|
1189
1228
|
|
|
1190
1229
|
export function AsExpression(props: {
|
|
1191
|
-
|
|
1230
|
+
...AsExpressionProps,
|
|
1192
1231
|
+parent?: ESNode,
|
|
1193
1232
|
}): DetachedNode<AsExpressionType> {
|
|
1194
|
-
const node = detachedProps<AsExpressionType>(props.parent, {
|
|
1233
|
+
const node = detachedProps<AsExpressionType>((props.parent: $FlowFixMe), {
|
|
1195
1234
|
type: 'AsExpression',
|
|
1196
1235
|
expression: asDetachedNodeForCodeGen(props.expression),
|
|
1197
1236
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
1198
1237
|
});
|
|
1199
|
-
setParentPointersInDirectChildren(node);
|
|
1238
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1200
1239
|
return node;
|
|
1201
1240
|
}
|
|
1202
1241
|
|
|
1203
1242
|
export function AssignmentExpression(props: {
|
|
1204
|
-
|
|
1243
|
+
...AssignmentExpressionProps,
|
|
1205
1244
|
+parent?: ESNode,
|
|
1206
1245
|
}): DetachedNode<AssignmentExpressionType> {
|
|
1207
|
-
const node = detachedProps<AssignmentExpressionType>(
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1246
|
+
const node = detachedProps<AssignmentExpressionType>(
|
|
1247
|
+
(props.parent: $FlowFixMe),
|
|
1248
|
+
{
|
|
1249
|
+
type: 'AssignmentExpression',
|
|
1250
|
+
operator: props.operator,
|
|
1251
|
+
left: asDetachedNodeForCodeGen(props.left),
|
|
1252
|
+
right: asDetachedNodeForCodeGen(props.right),
|
|
1253
|
+
},
|
|
1254
|
+
);
|
|
1255
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1214
1256
|
return node;
|
|
1215
1257
|
}
|
|
1216
1258
|
|
|
1217
1259
|
export function AssignmentPattern(props: {
|
|
1218
|
-
|
|
1260
|
+
...AssignmentPatternProps,
|
|
1219
1261
|
+parent?: ESNode,
|
|
1220
1262
|
}): DetachedNode<AssignmentPatternType> {
|
|
1221
|
-
const node = detachedProps<AssignmentPatternType>(
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1263
|
+
const node = detachedProps<AssignmentPatternType>(
|
|
1264
|
+
(props.parent: $FlowFixMe),
|
|
1265
|
+
{
|
|
1266
|
+
type: 'AssignmentPattern',
|
|
1267
|
+
left: asDetachedNodeForCodeGen(props.left),
|
|
1268
|
+
right: asDetachedNodeForCodeGen(props.right),
|
|
1269
|
+
},
|
|
1270
|
+
);
|
|
1271
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1227
1272
|
return node;
|
|
1228
1273
|
}
|
|
1229
1274
|
|
|
1230
1275
|
export function AwaitExpression(props: {
|
|
1231
|
-
|
|
1276
|
+
...AwaitExpressionProps,
|
|
1232
1277
|
+parent?: ESNode,
|
|
1233
1278
|
}): DetachedNode<AwaitExpressionType> {
|
|
1234
|
-
const node = detachedProps<AwaitExpressionType>(props.parent, {
|
|
1279
|
+
const node = detachedProps<AwaitExpressionType>((props.parent: $FlowFixMe), {
|
|
1235
1280
|
type: 'AwaitExpression',
|
|
1236
1281
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
1237
1282
|
});
|
|
1238
|
-
setParentPointersInDirectChildren(node);
|
|
1283
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1239
1284
|
return node;
|
|
1240
1285
|
}
|
|
1241
1286
|
|
|
1242
1287
|
export function BigIntLiteralTypeAnnotation(props: {
|
|
1243
|
-
|
|
1288
|
+
...BigIntLiteralTypeAnnotationProps,
|
|
1244
1289
|
+parent?: ESNode,
|
|
1245
1290
|
}): DetachedNode<BigIntLiteralTypeAnnotationType> {
|
|
1246
|
-
const node = detachedProps<BigIntLiteralTypeAnnotationType>(
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1291
|
+
const node = detachedProps<BigIntLiteralTypeAnnotationType>(
|
|
1292
|
+
(props.parent: $FlowFixMe),
|
|
1293
|
+
{
|
|
1294
|
+
type: 'BigIntLiteralTypeAnnotation',
|
|
1295
|
+
raw: props.raw,
|
|
1296
|
+
},
|
|
1297
|
+
);
|
|
1298
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1251
1299
|
return node;
|
|
1252
1300
|
}
|
|
1253
1301
|
|
|
@@ -1256,47 +1304,50 @@ export function BigIntTypeAnnotation(
|
|
|
1256
1304
|
+parent?: ESNode,
|
|
1257
1305
|
} = {...null},
|
|
1258
1306
|
): DetachedNode<BigIntTypeAnnotationType> {
|
|
1259
|
-
return detachedProps<BigIntTypeAnnotationType>(props.parent, {
|
|
1307
|
+
return detachedProps<BigIntTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
1260
1308
|
type: 'BigIntTypeAnnotation',
|
|
1261
1309
|
});
|
|
1262
1310
|
}
|
|
1263
1311
|
|
|
1264
1312
|
export function BinaryExpression(props: {
|
|
1265
|
-
|
|
1313
|
+
...BinaryExpressionProps,
|
|
1266
1314
|
+parent?: ESNode,
|
|
1267
1315
|
}): DetachedNode<BinaryExpressionType> {
|
|
1268
|
-
const node = detachedProps<BinaryExpressionType>(props.parent, {
|
|
1316
|
+
const node = detachedProps<BinaryExpressionType>((props.parent: $FlowFixMe), {
|
|
1269
1317
|
type: 'BinaryExpression',
|
|
1270
1318
|
left: asDetachedNodeForCodeGen(props.left),
|
|
1271
1319
|
right: asDetachedNodeForCodeGen(props.right),
|
|
1272
1320
|
operator: props.operator,
|
|
1273
1321
|
});
|
|
1274
|
-
setParentPointersInDirectChildren(node);
|
|
1322
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1275
1323
|
return node;
|
|
1276
1324
|
}
|
|
1277
1325
|
|
|
1278
1326
|
export function BlockStatement(props: {
|
|
1279
|
-
|
|
1327
|
+
...BlockStatementProps,
|
|
1280
1328
|
+parent?: ESNode,
|
|
1281
1329
|
}): DetachedNode<BlockStatementType> {
|
|
1282
|
-
const node = detachedProps<BlockStatementType>(props.parent, {
|
|
1330
|
+
const node = detachedProps<BlockStatementType>((props.parent: $FlowFixMe), {
|
|
1283
1331
|
type: 'BlockStatement',
|
|
1284
1332
|
body: props.body.map(n => asDetachedNodeForCodeGen(n)),
|
|
1285
1333
|
});
|
|
1286
|
-
setParentPointersInDirectChildren(node);
|
|
1334
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1287
1335
|
return node;
|
|
1288
1336
|
}
|
|
1289
1337
|
|
|
1290
1338
|
export function BooleanLiteralTypeAnnotation(props: {
|
|
1291
|
-
|
|
1339
|
+
...BooleanLiteralTypeAnnotationProps,
|
|
1292
1340
|
+parent?: ESNode,
|
|
1293
1341
|
}): DetachedNode<BooleanLiteralTypeAnnotationType> {
|
|
1294
|
-
const node = detachedProps<BooleanLiteralTypeAnnotationType>(
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1342
|
+
const node = detachedProps<BooleanLiteralTypeAnnotationType>(
|
|
1343
|
+
(props.parent: $FlowFixMe),
|
|
1344
|
+
{
|
|
1345
|
+
type: 'BooleanLiteralTypeAnnotation',
|
|
1346
|
+
value: props.value,
|
|
1347
|
+
raw: props.raw,
|
|
1348
|
+
},
|
|
1349
|
+
);
|
|
1350
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1300
1351
|
return node;
|
|
1301
1352
|
}
|
|
1302
1353
|
|
|
@@ -1305,79 +1356,79 @@ export function BooleanTypeAnnotation(
|
|
|
1305
1356
|
+parent?: ESNode,
|
|
1306
1357
|
} = {...null},
|
|
1307
1358
|
): DetachedNode<BooleanTypeAnnotationType> {
|
|
1308
|
-
return detachedProps<BooleanTypeAnnotationType>(props.parent, {
|
|
1359
|
+
return detachedProps<BooleanTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
1309
1360
|
type: 'BooleanTypeAnnotation',
|
|
1310
1361
|
});
|
|
1311
1362
|
}
|
|
1312
1363
|
|
|
1313
1364
|
export function BreakStatement(props: {
|
|
1314
|
-
|
|
1365
|
+
...BreakStatementProps,
|
|
1315
1366
|
+parent?: ESNode,
|
|
1316
1367
|
}): DetachedNode<BreakStatementType> {
|
|
1317
|
-
const node = detachedProps<BreakStatementType>(props.parent, {
|
|
1368
|
+
const node = detachedProps<BreakStatementType>((props.parent: $FlowFixMe), {
|
|
1318
1369
|
type: 'BreakStatement',
|
|
1319
1370
|
label: asDetachedNodeForCodeGen(props.label),
|
|
1320
1371
|
});
|
|
1321
|
-
setParentPointersInDirectChildren(node);
|
|
1372
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1322
1373
|
return node;
|
|
1323
1374
|
}
|
|
1324
1375
|
|
|
1325
1376
|
export function CallExpression(props: {
|
|
1326
|
-
|
|
1377
|
+
...CallExpressionProps,
|
|
1327
1378
|
+parent?: ESNode,
|
|
1328
1379
|
}): DetachedNode<CallExpressionType> {
|
|
1329
|
-
const node = detachedProps<CallExpressionType>(props.parent, {
|
|
1380
|
+
const node = detachedProps<CallExpressionType>((props.parent: $FlowFixMe), {
|
|
1330
1381
|
type: 'CallExpression',
|
|
1331
1382
|
callee: asDetachedNodeForCodeGen(props.callee),
|
|
1332
1383
|
typeArguments: asDetachedNodeForCodeGen(props.typeArguments),
|
|
1333
1384
|
arguments: props.arguments.map(n => asDetachedNodeForCodeGen(n)),
|
|
1334
1385
|
});
|
|
1335
|
-
setParentPointersInDirectChildren(node);
|
|
1386
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1336
1387
|
return node;
|
|
1337
1388
|
}
|
|
1338
1389
|
|
|
1339
1390
|
export function CatchClause(props: {
|
|
1340
|
-
|
|
1391
|
+
...CatchClauseProps,
|
|
1341
1392
|
+parent?: ESNode,
|
|
1342
1393
|
}): DetachedNode<CatchClauseType> {
|
|
1343
|
-
const node = detachedProps<CatchClauseType>(props.parent, {
|
|
1394
|
+
const node = detachedProps<CatchClauseType>((props.parent: $FlowFixMe), {
|
|
1344
1395
|
type: 'CatchClause',
|
|
1345
1396
|
param: asDetachedNodeForCodeGen(props.param),
|
|
1346
1397
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1347
1398
|
});
|
|
1348
|
-
setParentPointersInDirectChildren(node);
|
|
1399
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1349
1400
|
return node;
|
|
1350
1401
|
}
|
|
1351
1402
|
|
|
1352
1403
|
export function ChainExpression(props: {
|
|
1353
|
-
|
|
1404
|
+
...ChainExpressionProps,
|
|
1354
1405
|
+parent?: ESNode,
|
|
1355
1406
|
}): DetachedNode<ChainExpressionType> {
|
|
1356
|
-
const node = detachedProps<ChainExpressionType>(props.parent, {
|
|
1407
|
+
const node = detachedProps<ChainExpressionType>((props.parent: $FlowFixMe), {
|
|
1357
1408
|
type: 'ChainExpression',
|
|
1358
1409
|
expression: asDetachedNodeForCodeGen(props.expression),
|
|
1359
1410
|
});
|
|
1360
|
-
setParentPointersInDirectChildren(node);
|
|
1411
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1361
1412
|
return node;
|
|
1362
1413
|
}
|
|
1363
1414
|
|
|
1364
1415
|
export function ClassBody(props: {
|
|
1365
|
-
|
|
1416
|
+
...ClassBodyProps,
|
|
1366
1417
|
+parent?: ESNode,
|
|
1367
1418
|
}): DetachedNode<ClassBodyType> {
|
|
1368
|
-
const node = detachedProps<ClassBodyType>(props.parent, {
|
|
1419
|
+
const node = detachedProps<ClassBodyType>((props.parent: $FlowFixMe), {
|
|
1369
1420
|
type: 'ClassBody',
|
|
1370
1421
|
body: props.body.map(n => asDetachedNodeForCodeGen(n)),
|
|
1371
1422
|
});
|
|
1372
|
-
setParentPointersInDirectChildren(node);
|
|
1423
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1373
1424
|
return node;
|
|
1374
1425
|
}
|
|
1375
1426
|
|
|
1376
1427
|
export function ClassExpression(props: {
|
|
1377
|
-
|
|
1428
|
+
...ClassExpressionProps,
|
|
1378
1429
|
+parent?: ESNode,
|
|
1379
1430
|
}): DetachedNode<ClassExpressionType> {
|
|
1380
|
-
const node = detachedProps<ClassExpressionType>(props.parent, {
|
|
1431
|
+
const node = detachedProps<ClassExpressionType>((props.parent: $FlowFixMe), {
|
|
1381
1432
|
type: 'ClassExpression',
|
|
1382
1433
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1383
1434
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
@@ -1387,120 +1438,141 @@ export function ClassExpression(props: {
|
|
|
1387
1438
|
decorators: props.decorators.map(n => asDetachedNodeForCodeGen(n)),
|
|
1388
1439
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1389
1440
|
});
|
|
1390
|
-
setParentPointersInDirectChildren(node);
|
|
1441
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1391
1442
|
return node;
|
|
1392
1443
|
}
|
|
1393
1444
|
|
|
1394
1445
|
export function ClassImplements(props: {
|
|
1395
|
-
|
|
1446
|
+
...ClassImplementsProps,
|
|
1396
1447
|
+parent?: ESNode,
|
|
1397
1448
|
}): DetachedNode<ClassImplementsType> {
|
|
1398
|
-
const node = detachedProps<ClassImplementsType>(props.parent, {
|
|
1449
|
+
const node = detachedProps<ClassImplementsType>((props.parent: $FlowFixMe), {
|
|
1399
1450
|
type: 'ClassImplements',
|
|
1400
1451
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1401
1452
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1402
1453
|
});
|
|
1403
|
-
setParentPointersInDirectChildren(node);
|
|
1454
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1404
1455
|
return node;
|
|
1405
1456
|
}
|
|
1406
1457
|
|
|
1407
1458
|
export function ComponentDeclaration(props: {
|
|
1408
|
-
|
|
1459
|
+
...ComponentDeclarationProps,
|
|
1409
1460
|
+parent?: ESNode,
|
|
1410
1461
|
}): DetachedNode<ComponentDeclarationType> {
|
|
1411
|
-
const node = detachedProps<ComponentDeclarationType>(
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1462
|
+
const node = detachedProps<ComponentDeclarationType>(
|
|
1463
|
+
(props.parent: $FlowFixMe),
|
|
1464
|
+
{
|
|
1465
|
+
type: 'ComponentDeclaration',
|
|
1466
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
1467
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
1468
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
1469
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1470
|
+
rendersType: asDetachedNodeForCodeGen(props.rendersType),
|
|
1471
|
+
},
|
|
1472
|
+
);
|
|
1473
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1420
1474
|
return node;
|
|
1421
1475
|
}
|
|
1422
1476
|
|
|
1423
1477
|
export function ComponentParameter(props: {
|
|
1424
|
-
|
|
1478
|
+
...ComponentParameterProps,
|
|
1425
1479
|
+parent?: ESNode,
|
|
1426
1480
|
}): DetachedNode<ComponentParameterType> {
|
|
1427
|
-
const node = detachedProps<ComponentParameterType>(
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1481
|
+
const node = detachedProps<ComponentParameterType>(
|
|
1482
|
+
(props.parent: $FlowFixMe),
|
|
1483
|
+
{
|
|
1484
|
+
type: 'ComponentParameter',
|
|
1485
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
1486
|
+
local: asDetachedNodeForCodeGen(props.local),
|
|
1487
|
+
shorthand: props.shorthand,
|
|
1488
|
+
},
|
|
1489
|
+
);
|
|
1490
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1434
1491
|
return node;
|
|
1435
1492
|
}
|
|
1436
1493
|
|
|
1437
1494
|
export function ComponentTypeAnnotation(props: {
|
|
1438
|
-
|
|
1495
|
+
...ComponentTypeAnnotationProps,
|
|
1439
1496
|
+parent?: ESNode,
|
|
1440
1497
|
}): DetachedNode<ComponentTypeAnnotationType> {
|
|
1441
|
-
const node = detachedProps<ComponentTypeAnnotationType>(
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1498
|
+
const node = detachedProps<ComponentTypeAnnotationType>(
|
|
1499
|
+
(props.parent: $FlowFixMe),
|
|
1500
|
+
{
|
|
1501
|
+
type: 'ComponentTypeAnnotation',
|
|
1502
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
1503
|
+
rest: asDetachedNodeForCodeGen(props.rest),
|
|
1504
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1505
|
+
rendersType: asDetachedNodeForCodeGen(props.rendersType),
|
|
1506
|
+
},
|
|
1507
|
+
);
|
|
1508
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1449
1509
|
return node;
|
|
1450
1510
|
}
|
|
1451
1511
|
|
|
1452
1512
|
export function ComponentTypeParameter(props: {
|
|
1453
|
-
|
|
1513
|
+
...ComponentTypeParameterProps,
|
|
1454
1514
|
+parent?: ESNode,
|
|
1455
1515
|
}): DetachedNode<ComponentTypeParameterType> {
|
|
1456
|
-
const node = detachedProps<ComponentTypeParameterType>(
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1516
|
+
const node = detachedProps<ComponentTypeParameterType>(
|
|
1517
|
+
(props.parent: $FlowFixMe),
|
|
1518
|
+
{
|
|
1519
|
+
type: 'ComponentTypeParameter',
|
|
1520
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
1521
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
1522
|
+
optional: props.optional,
|
|
1523
|
+
},
|
|
1524
|
+
);
|
|
1525
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1463
1526
|
return node;
|
|
1464
1527
|
}
|
|
1465
1528
|
|
|
1466
1529
|
export function ConditionalExpression(props: {
|
|
1467
|
-
|
|
1530
|
+
...ConditionalExpressionProps,
|
|
1468
1531
|
+parent?: ESNode,
|
|
1469
1532
|
}): DetachedNode<ConditionalExpressionType> {
|
|
1470
|
-
const node = detachedProps<ConditionalExpressionType>(
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1533
|
+
const node = detachedProps<ConditionalExpressionType>(
|
|
1534
|
+
(props.parent: $FlowFixMe),
|
|
1535
|
+
{
|
|
1536
|
+
type: 'ConditionalExpression',
|
|
1537
|
+
test: asDetachedNodeForCodeGen(props.test),
|
|
1538
|
+
alternate: asDetachedNodeForCodeGen(props.alternate),
|
|
1539
|
+
consequent: asDetachedNodeForCodeGen(props.consequent),
|
|
1540
|
+
},
|
|
1541
|
+
);
|
|
1542
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1477
1543
|
return node;
|
|
1478
1544
|
}
|
|
1479
1545
|
|
|
1480
1546
|
export function ConditionalTypeAnnotation(props: {
|
|
1481
|
-
|
|
1547
|
+
...ConditionalTypeAnnotationProps,
|
|
1482
1548
|
+parent?: ESNode,
|
|
1483
1549
|
}): DetachedNode<ConditionalTypeAnnotationType> {
|
|
1484
|
-
const node = detachedProps<ConditionalTypeAnnotationType>(
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1550
|
+
const node = detachedProps<ConditionalTypeAnnotationType>(
|
|
1551
|
+
(props.parent: $FlowFixMe),
|
|
1552
|
+
{
|
|
1553
|
+
type: 'ConditionalTypeAnnotation',
|
|
1554
|
+
checkType: asDetachedNodeForCodeGen(props.checkType),
|
|
1555
|
+
extendsType: asDetachedNodeForCodeGen(props.extendsType),
|
|
1556
|
+
trueType: asDetachedNodeForCodeGen(props.trueType),
|
|
1557
|
+
falseType: asDetachedNodeForCodeGen(props.falseType),
|
|
1558
|
+
},
|
|
1559
|
+
);
|
|
1560
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1492
1561
|
return node;
|
|
1493
1562
|
}
|
|
1494
1563
|
|
|
1495
1564
|
export function ContinueStatement(props: {
|
|
1496
|
-
|
|
1565
|
+
...ContinueStatementProps,
|
|
1497
1566
|
+parent?: ESNode,
|
|
1498
1567
|
}): DetachedNode<ContinueStatementType> {
|
|
1499
|
-
const node = detachedProps<ContinueStatementType>(
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1568
|
+
const node = detachedProps<ContinueStatementType>(
|
|
1569
|
+
(props.parent: $FlowFixMe),
|
|
1570
|
+
{
|
|
1571
|
+
type: 'ContinueStatement',
|
|
1572
|
+
label: asDetachedNodeForCodeGen(props.label),
|
|
1573
|
+
},
|
|
1574
|
+
);
|
|
1575
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1504
1576
|
return node;
|
|
1505
1577
|
}
|
|
1506
1578
|
|
|
@@ -1509,16 +1581,16 @@ export function DebuggerStatement(
|
|
|
1509
1581
|
+parent?: ESNode,
|
|
1510
1582
|
} = {...null},
|
|
1511
1583
|
): DetachedNode<DebuggerStatementType> {
|
|
1512
|
-
return detachedProps<DebuggerStatementType>(props.parent, {
|
|
1584
|
+
return detachedProps<DebuggerStatementType>((props.parent: $FlowFixMe), {
|
|
1513
1585
|
type: 'DebuggerStatement',
|
|
1514
1586
|
});
|
|
1515
1587
|
}
|
|
1516
1588
|
|
|
1517
1589
|
export function DeclareClass(props: {
|
|
1518
|
-
|
|
1590
|
+
...DeclareClassProps,
|
|
1519
1591
|
+parent?: ESNode,
|
|
1520
1592
|
}): DetachedNode<DeclareClassType> {
|
|
1521
|
-
const node = detachedProps<DeclareClassType>(props.parent, {
|
|
1593
|
+
const node = detachedProps<DeclareClassType>((props.parent: $FlowFixMe), {
|
|
1522
1594
|
type: 'DeclareClass',
|
|
1523
1595
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1524
1596
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
@@ -1527,15 +1599,15 @@ export function DeclareClass(props: {
|
|
|
1527
1599
|
mixins: props.mixins.map(n => asDetachedNodeForCodeGen(n)),
|
|
1528
1600
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1529
1601
|
});
|
|
1530
|
-
setParentPointersInDirectChildren(node);
|
|
1602
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1531
1603
|
return node;
|
|
1532
1604
|
}
|
|
1533
1605
|
|
|
1534
1606
|
export function DeclareComponent(props: {
|
|
1535
|
-
|
|
1607
|
+
...DeclareComponentProps,
|
|
1536
1608
|
+parent?: ESNode,
|
|
1537
1609
|
}): DetachedNode<DeclareComponentType> {
|
|
1538
|
-
const node = detachedProps<DeclareComponentType>(props.parent, {
|
|
1610
|
+
const node = detachedProps<DeclareComponentType>((props.parent: $FlowFixMe), {
|
|
1539
1611
|
type: 'DeclareComponent',
|
|
1540
1612
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1541
1613
|
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
@@ -1543,152 +1615,164 @@ export function DeclareComponent(props: {
|
|
|
1543
1615
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1544
1616
|
rendersType: asDetachedNodeForCodeGen(props.rendersType),
|
|
1545
1617
|
});
|
|
1546
|
-
setParentPointersInDirectChildren(node);
|
|
1618
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1547
1619
|
return node;
|
|
1548
1620
|
}
|
|
1549
1621
|
|
|
1550
1622
|
export function DeclaredPredicate(props: {
|
|
1551
|
-
|
|
1623
|
+
...DeclaredPredicateProps,
|
|
1552
1624
|
+parent?: ESNode,
|
|
1553
1625
|
}): DetachedNode<DeclaredPredicateType> {
|
|
1554
|
-
const node = detachedProps<DeclaredPredicateType>(
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1626
|
+
const node = detachedProps<DeclaredPredicateType>(
|
|
1627
|
+
(props.parent: $FlowFixMe),
|
|
1628
|
+
{
|
|
1629
|
+
type: 'DeclaredPredicate',
|
|
1630
|
+
value: asDetachedNodeForCodeGen(props.value),
|
|
1631
|
+
},
|
|
1632
|
+
);
|
|
1633
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1559
1634
|
return node;
|
|
1560
1635
|
}
|
|
1561
1636
|
|
|
1562
1637
|
export function DeclareEnum(props: {
|
|
1563
|
-
|
|
1638
|
+
...DeclareEnumProps,
|
|
1564
1639
|
+parent?: ESNode,
|
|
1565
1640
|
}): DetachedNode<DeclareEnumType> {
|
|
1566
|
-
const node = detachedProps<DeclareEnumType>(props.parent, {
|
|
1641
|
+
const node = detachedProps<DeclareEnumType>((props.parent: $FlowFixMe), {
|
|
1567
1642
|
type: 'DeclareEnum',
|
|
1568
1643
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1569
1644
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1570
1645
|
});
|
|
1571
|
-
setParentPointersInDirectChildren(node);
|
|
1646
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1572
1647
|
return node;
|
|
1573
1648
|
}
|
|
1574
1649
|
|
|
1575
1650
|
export function DeclareExportAllDeclaration(props: {
|
|
1576
|
-
|
|
1651
|
+
...DeclareExportAllDeclarationProps,
|
|
1577
1652
|
+parent?: ESNode,
|
|
1578
1653
|
}): DetachedNode<DeclareExportAllDeclarationType> {
|
|
1579
|
-
const node = detachedProps<DeclareExportAllDeclarationType>(
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1654
|
+
const node = detachedProps<DeclareExportAllDeclarationType>(
|
|
1655
|
+
(props.parent: $FlowFixMe),
|
|
1656
|
+
{
|
|
1657
|
+
type: 'DeclareExportAllDeclaration',
|
|
1658
|
+
source: asDetachedNodeForCodeGen(props.source),
|
|
1659
|
+
},
|
|
1660
|
+
);
|
|
1661
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1584
1662
|
return node;
|
|
1585
1663
|
}
|
|
1586
1664
|
|
|
1587
1665
|
export function DeclareInterface(props: {
|
|
1588
|
-
|
|
1666
|
+
...DeclareInterfaceProps,
|
|
1589
1667
|
+parent?: ESNode,
|
|
1590
1668
|
}): DetachedNode<DeclareInterfaceType> {
|
|
1591
|
-
const node = detachedProps<DeclareInterfaceType>(props.parent, {
|
|
1669
|
+
const node = detachedProps<DeclareInterfaceType>((props.parent: $FlowFixMe), {
|
|
1592
1670
|
type: 'DeclareInterface',
|
|
1593
1671
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1594
1672
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1595
1673
|
extends: props.extends.map(n => asDetachedNodeForCodeGen(n)),
|
|
1596
1674
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1597
1675
|
});
|
|
1598
|
-
setParentPointersInDirectChildren(node);
|
|
1676
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1599
1677
|
return node;
|
|
1600
1678
|
}
|
|
1601
1679
|
|
|
1602
1680
|
export function DeclareModule(props: {
|
|
1603
|
-
|
|
1681
|
+
...DeclareModuleProps,
|
|
1604
1682
|
+parent?: ESNode,
|
|
1605
1683
|
}): DetachedNode<DeclareModuleType> {
|
|
1606
|
-
const node = detachedProps<DeclareModuleType>(props.parent, {
|
|
1684
|
+
const node = detachedProps<DeclareModuleType>((props.parent: $FlowFixMe), {
|
|
1607
1685
|
type: 'DeclareModule',
|
|
1608
1686
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1609
1687
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1610
1688
|
});
|
|
1611
|
-
setParentPointersInDirectChildren(node);
|
|
1689
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1612
1690
|
return node;
|
|
1613
1691
|
}
|
|
1614
1692
|
|
|
1615
1693
|
export function DeclareModuleExports(props: {
|
|
1616
|
-
|
|
1694
|
+
...DeclareModuleExportsProps,
|
|
1617
1695
|
+parent?: ESNode,
|
|
1618
1696
|
}): DetachedNode<DeclareModuleExportsType> {
|
|
1619
|
-
const node = detachedProps<DeclareModuleExportsType>(
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1697
|
+
const node = detachedProps<DeclareModuleExportsType>(
|
|
1698
|
+
(props.parent: $FlowFixMe),
|
|
1699
|
+
{
|
|
1700
|
+
type: 'DeclareModuleExports',
|
|
1701
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
1702
|
+
},
|
|
1703
|
+
);
|
|
1704
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1624
1705
|
return node;
|
|
1625
1706
|
}
|
|
1626
1707
|
|
|
1627
1708
|
export function DeclareNamespace(props: {
|
|
1628
|
-
|
|
1709
|
+
...DeclareNamespaceProps,
|
|
1629
1710
|
+parent?: ESNode,
|
|
1630
1711
|
}): DetachedNode<DeclareNamespaceType> {
|
|
1631
|
-
const node = detachedProps<DeclareNamespaceType>(props.parent, {
|
|
1712
|
+
const node = detachedProps<DeclareNamespaceType>((props.parent: $FlowFixMe), {
|
|
1632
1713
|
type: 'DeclareNamespace',
|
|
1633
1714
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1634
1715
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1635
1716
|
});
|
|
1636
|
-
setParentPointersInDirectChildren(node);
|
|
1717
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1637
1718
|
return node;
|
|
1638
1719
|
}
|
|
1639
1720
|
|
|
1640
1721
|
export function DeclareOpaqueType(props: {
|
|
1641
|
-
|
|
1722
|
+
...DeclareOpaqueTypeProps,
|
|
1642
1723
|
+parent?: ESNode,
|
|
1643
1724
|
}): DetachedNode<DeclareOpaqueTypeType> {
|
|
1644
|
-
const node = detachedProps<DeclareOpaqueTypeType>(
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1725
|
+
const node = detachedProps<DeclareOpaqueTypeType>(
|
|
1726
|
+
(props.parent: $FlowFixMe),
|
|
1727
|
+
{
|
|
1728
|
+
type: 'DeclareOpaqueType',
|
|
1729
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
1730
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1731
|
+
impltype: asDetachedNodeForCodeGen(props.impltype),
|
|
1732
|
+
supertype: asDetachedNodeForCodeGen(props.supertype),
|
|
1733
|
+
},
|
|
1734
|
+
);
|
|
1735
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1652
1736
|
return node;
|
|
1653
1737
|
}
|
|
1654
1738
|
|
|
1655
1739
|
export function DeclareTypeAlias(props: {
|
|
1656
|
-
|
|
1740
|
+
...DeclareTypeAliasProps,
|
|
1657
1741
|
+parent?: ESNode,
|
|
1658
1742
|
}): DetachedNode<DeclareTypeAliasType> {
|
|
1659
|
-
const node = detachedProps<DeclareTypeAliasType>(props.parent, {
|
|
1743
|
+
const node = detachedProps<DeclareTypeAliasType>((props.parent: $FlowFixMe), {
|
|
1660
1744
|
type: 'DeclareTypeAlias',
|
|
1661
1745
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1662
1746
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
1663
1747
|
right: asDetachedNodeForCodeGen(props.right),
|
|
1664
1748
|
});
|
|
1665
|
-
setParentPointersInDirectChildren(node);
|
|
1749
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1666
1750
|
return node;
|
|
1667
1751
|
}
|
|
1668
1752
|
|
|
1669
1753
|
export function DeclareVariable(props: {
|
|
1670
|
-
|
|
1754
|
+
...DeclareVariableProps,
|
|
1671
1755
|
+parent?: ESNode,
|
|
1672
1756
|
}): DetachedNode<DeclareVariableType> {
|
|
1673
|
-
const node = detachedProps<DeclareVariableType>(props.parent, {
|
|
1757
|
+
const node = detachedProps<DeclareVariableType>((props.parent: $FlowFixMe), {
|
|
1674
1758
|
type: 'DeclareVariable',
|
|
1675
1759
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1676
1760
|
kind: props.kind,
|
|
1677
1761
|
});
|
|
1678
|
-
setParentPointersInDirectChildren(node);
|
|
1762
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1679
1763
|
return node;
|
|
1680
1764
|
}
|
|
1681
1765
|
|
|
1682
1766
|
export function DoWhileStatement(props: {
|
|
1683
|
-
|
|
1767
|
+
...DoWhileStatementProps,
|
|
1684
1768
|
+parent?: ESNode,
|
|
1685
1769
|
}): DetachedNode<DoWhileStatementType> {
|
|
1686
|
-
const node = detachedProps<DoWhileStatementType>(props.parent, {
|
|
1770
|
+
const node = detachedProps<DoWhileStatementType>((props.parent: $FlowFixMe), {
|
|
1687
1771
|
type: 'DoWhileStatement',
|
|
1688
1772
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1689
1773
|
test: asDetachedNodeForCodeGen(props.test),
|
|
1690
1774
|
});
|
|
1691
|
-
setParentPointersInDirectChildren(node);
|
|
1775
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1692
1776
|
return node;
|
|
1693
1777
|
}
|
|
1694
1778
|
|
|
@@ -1697,7 +1781,7 @@ export function EmptyStatement(
|
|
|
1697
1781
|
+parent?: ESNode,
|
|
1698
1782
|
} = {...null},
|
|
1699
1783
|
): DetachedNode<EmptyStatementType> {
|
|
1700
|
-
return detachedProps<EmptyStatementType>(props.parent, {
|
|
1784
|
+
return detachedProps<EmptyStatementType>((props.parent: $FlowFixMe), {
|
|
1701
1785
|
type: 'EmptyStatement',
|
|
1702
1786
|
});
|
|
1703
1787
|
}
|
|
@@ -1707,127 +1791,160 @@ export function EmptyTypeAnnotation(
|
|
|
1707
1791
|
+parent?: ESNode,
|
|
1708
1792
|
} = {...null},
|
|
1709
1793
|
): DetachedNode<EmptyTypeAnnotationType> {
|
|
1710
|
-
return detachedProps<EmptyTypeAnnotationType>(props.parent, {
|
|
1794
|
+
return detachedProps<EmptyTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
1711
1795
|
type: 'EmptyTypeAnnotation',
|
|
1712
1796
|
});
|
|
1713
1797
|
}
|
|
1714
1798
|
|
|
1799
|
+
export function EnumBigIntBody(props: {
|
|
1800
|
+
...EnumBigIntBodyProps,
|
|
1801
|
+
+parent?: ESNode,
|
|
1802
|
+
}): DetachedNode<EnumBigIntBodyType> {
|
|
1803
|
+
const node = detachedProps<EnumBigIntBodyType>((props.parent: $FlowFixMe), {
|
|
1804
|
+
type: 'EnumBigIntBody',
|
|
1805
|
+
members: props.members.map(n => asDetachedNodeForCodeGen(n)),
|
|
1806
|
+
explicitType: props.explicitType,
|
|
1807
|
+
hasUnknownMembers: props.hasUnknownMembers,
|
|
1808
|
+
});
|
|
1809
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1810
|
+
return node;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
export function EnumBigIntMember(props: {
|
|
1814
|
+
...EnumBigIntMemberProps,
|
|
1815
|
+
+parent?: ESNode,
|
|
1816
|
+
}): DetachedNode<EnumBigIntMemberType> {
|
|
1817
|
+
const node = detachedProps<EnumBigIntMemberType>((props.parent: $FlowFixMe), {
|
|
1818
|
+
type: 'EnumBigIntMember',
|
|
1819
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
1820
|
+
init: asDetachedNodeForCodeGen(props.init),
|
|
1821
|
+
});
|
|
1822
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1823
|
+
return node;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1715
1826
|
export function EnumBooleanBody(props: {
|
|
1716
|
-
|
|
1827
|
+
...EnumBooleanBodyProps,
|
|
1717
1828
|
+parent?: ESNode,
|
|
1718
1829
|
}): DetachedNode<EnumBooleanBodyType> {
|
|
1719
|
-
const node = detachedProps<EnumBooleanBodyType>(props.parent, {
|
|
1830
|
+
const node = detachedProps<EnumBooleanBodyType>((props.parent: $FlowFixMe), {
|
|
1720
1831
|
type: 'EnumBooleanBody',
|
|
1721
1832
|
members: props.members.map(n => asDetachedNodeForCodeGen(n)),
|
|
1722
1833
|
explicitType: props.explicitType,
|
|
1723
1834
|
hasUnknownMembers: props.hasUnknownMembers,
|
|
1724
1835
|
});
|
|
1725
|
-
setParentPointersInDirectChildren(node);
|
|
1836
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1726
1837
|
return node;
|
|
1727
1838
|
}
|
|
1728
1839
|
|
|
1729
1840
|
export function EnumBooleanMember(props: {
|
|
1730
|
-
|
|
1841
|
+
...EnumBooleanMemberProps,
|
|
1731
1842
|
+parent?: ESNode,
|
|
1732
1843
|
}): DetachedNode<EnumBooleanMemberType> {
|
|
1733
|
-
const node = detachedProps<EnumBooleanMemberType>(
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1844
|
+
const node = detachedProps<EnumBooleanMemberType>(
|
|
1845
|
+
(props.parent: $FlowFixMe),
|
|
1846
|
+
{
|
|
1847
|
+
type: 'EnumBooleanMember',
|
|
1848
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
1849
|
+
init: asDetachedNodeForCodeGen(props.init),
|
|
1850
|
+
},
|
|
1851
|
+
);
|
|
1852
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1739
1853
|
return node;
|
|
1740
1854
|
}
|
|
1741
1855
|
|
|
1742
1856
|
export function EnumDeclaration(props: {
|
|
1743
|
-
|
|
1857
|
+
...EnumDeclarationProps,
|
|
1744
1858
|
+parent?: ESNode,
|
|
1745
1859
|
}): DetachedNode<EnumDeclarationType> {
|
|
1746
|
-
const node = detachedProps<EnumDeclarationType>(props.parent, {
|
|
1860
|
+
const node = detachedProps<EnumDeclarationType>((props.parent: $FlowFixMe), {
|
|
1747
1861
|
type: 'EnumDeclaration',
|
|
1748
1862
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1749
1863
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1750
1864
|
});
|
|
1751
|
-
setParentPointersInDirectChildren(node);
|
|
1865
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1752
1866
|
return node;
|
|
1753
1867
|
}
|
|
1754
1868
|
|
|
1755
1869
|
export function EnumDefaultedMember(props: {
|
|
1756
|
-
|
|
1870
|
+
...EnumDefaultedMemberProps,
|
|
1757
1871
|
+parent?: ESNode,
|
|
1758
1872
|
}): DetachedNode<EnumDefaultedMemberType> {
|
|
1759
|
-
const node = detachedProps<EnumDefaultedMemberType>(
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1873
|
+
const node = detachedProps<EnumDefaultedMemberType>(
|
|
1874
|
+
(props.parent: $FlowFixMe),
|
|
1875
|
+
{
|
|
1876
|
+
type: 'EnumDefaultedMember',
|
|
1877
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
1878
|
+
},
|
|
1879
|
+
);
|
|
1880
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1764
1881
|
return node;
|
|
1765
1882
|
}
|
|
1766
1883
|
|
|
1767
1884
|
export function EnumNumberBody(props: {
|
|
1768
|
-
|
|
1885
|
+
...EnumNumberBodyProps,
|
|
1769
1886
|
+parent?: ESNode,
|
|
1770
1887
|
}): DetachedNode<EnumNumberBodyType> {
|
|
1771
|
-
const node = detachedProps<EnumNumberBodyType>(props.parent, {
|
|
1888
|
+
const node = detachedProps<EnumNumberBodyType>((props.parent: $FlowFixMe), {
|
|
1772
1889
|
type: 'EnumNumberBody',
|
|
1773
1890
|
members: props.members.map(n => asDetachedNodeForCodeGen(n)),
|
|
1774
1891
|
explicitType: props.explicitType,
|
|
1775
1892
|
hasUnknownMembers: props.hasUnknownMembers,
|
|
1776
1893
|
});
|
|
1777
|
-
setParentPointersInDirectChildren(node);
|
|
1894
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1778
1895
|
return node;
|
|
1779
1896
|
}
|
|
1780
1897
|
|
|
1781
1898
|
export function EnumNumberMember(props: {
|
|
1782
|
-
|
|
1899
|
+
...EnumNumberMemberProps,
|
|
1783
1900
|
+parent?: ESNode,
|
|
1784
1901
|
}): DetachedNode<EnumNumberMemberType> {
|
|
1785
|
-
const node = detachedProps<EnumNumberMemberType>(props.parent, {
|
|
1902
|
+
const node = detachedProps<EnumNumberMemberType>((props.parent: $FlowFixMe), {
|
|
1786
1903
|
type: 'EnumNumberMember',
|
|
1787
1904
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1788
1905
|
init: asDetachedNodeForCodeGen(props.init),
|
|
1789
1906
|
});
|
|
1790
|
-
setParentPointersInDirectChildren(node);
|
|
1907
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1791
1908
|
return node;
|
|
1792
1909
|
}
|
|
1793
1910
|
|
|
1794
1911
|
export function EnumStringBody(props: {
|
|
1795
|
-
|
|
1912
|
+
...EnumStringBodyProps,
|
|
1796
1913
|
+parent?: ESNode,
|
|
1797
1914
|
}): DetachedNode<EnumStringBodyType> {
|
|
1798
|
-
const node = detachedProps<EnumStringBodyType>(props.parent, {
|
|
1915
|
+
const node = detachedProps<EnumStringBodyType>((props.parent: $FlowFixMe), {
|
|
1799
1916
|
type: 'EnumStringBody',
|
|
1800
1917
|
members: props.members.map(n => asDetachedNodeForCodeGen(n)),
|
|
1801
1918
|
explicitType: props.explicitType,
|
|
1802
1919
|
hasUnknownMembers: props.hasUnknownMembers,
|
|
1803
1920
|
});
|
|
1804
|
-
setParentPointersInDirectChildren(node);
|
|
1921
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1805
1922
|
return node;
|
|
1806
1923
|
}
|
|
1807
1924
|
|
|
1808
1925
|
export function EnumStringMember(props: {
|
|
1809
|
-
|
|
1926
|
+
...EnumStringMemberProps,
|
|
1810
1927
|
+parent?: ESNode,
|
|
1811
1928
|
}): DetachedNode<EnumStringMemberType> {
|
|
1812
|
-
const node = detachedProps<EnumStringMemberType>(props.parent, {
|
|
1929
|
+
const node = detachedProps<EnumStringMemberType>((props.parent: $FlowFixMe), {
|
|
1813
1930
|
type: 'EnumStringMember',
|
|
1814
1931
|
id: asDetachedNodeForCodeGen(props.id),
|
|
1815
1932
|
init: asDetachedNodeForCodeGen(props.init),
|
|
1816
1933
|
});
|
|
1817
|
-
setParentPointersInDirectChildren(node);
|
|
1934
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1818
1935
|
return node;
|
|
1819
1936
|
}
|
|
1820
1937
|
|
|
1821
1938
|
export function EnumSymbolBody(props: {
|
|
1822
|
-
|
|
1939
|
+
...EnumSymbolBodyProps,
|
|
1823
1940
|
+parent?: ESNode,
|
|
1824
1941
|
}): DetachedNode<EnumSymbolBodyType> {
|
|
1825
|
-
const node = detachedProps<EnumSymbolBodyType>(props.parent, {
|
|
1942
|
+
const node = detachedProps<EnumSymbolBodyType>((props.parent: $FlowFixMe), {
|
|
1826
1943
|
type: 'EnumSymbolBody',
|
|
1827
1944
|
members: props.members.map(n => asDetachedNodeForCodeGen(n)),
|
|
1828
1945
|
hasUnknownMembers: props.hasUnknownMembers,
|
|
1829
1946
|
});
|
|
1830
|
-
setParentPointersInDirectChildren(node);
|
|
1947
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1831
1948
|
return node;
|
|
1832
1949
|
}
|
|
1833
1950
|
|
|
@@ -1836,193 +1953,217 @@ export function ExistsTypeAnnotation(
|
|
|
1836
1953
|
+parent?: ESNode,
|
|
1837
1954
|
} = {...null},
|
|
1838
1955
|
): DetachedNode<ExistsTypeAnnotationType> {
|
|
1839
|
-
return detachedProps<ExistsTypeAnnotationType>(props.parent, {
|
|
1956
|
+
return detachedProps<ExistsTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
1840
1957
|
type: 'ExistsTypeAnnotation',
|
|
1841
1958
|
});
|
|
1842
1959
|
}
|
|
1843
1960
|
|
|
1844
1961
|
export function ExportAllDeclaration(props: {
|
|
1845
|
-
|
|
1962
|
+
...ExportAllDeclarationProps,
|
|
1846
1963
|
+parent?: ESNode,
|
|
1847
1964
|
}): DetachedNode<ExportAllDeclarationType> {
|
|
1848
|
-
const node = detachedProps<ExportAllDeclarationType>(
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1965
|
+
const node = detachedProps<ExportAllDeclarationType>(
|
|
1966
|
+
(props.parent: $FlowFixMe),
|
|
1967
|
+
{
|
|
1968
|
+
type: 'ExportAllDeclaration',
|
|
1969
|
+
exported: asDetachedNodeForCodeGen(props.exported),
|
|
1970
|
+
source: asDetachedNodeForCodeGen(props.source),
|
|
1971
|
+
exportKind: props.exportKind,
|
|
1972
|
+
},
|
|
1973
|
+
);
|
|
1974
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1855
1975
|
return node;
|
|
1856
1976
|
}
|
|
1857
1977
|
|
|
1858
1978
|
export function ExportDefaultDeclaration(props: {
|
|
1859
|
-
|
|
1979
|
+
...ExportDefaultDeclarationProps,
|
|
1860
1980
|
+parent?: ESNode,
|
|
1861
1981
|
}): DetachedNode<ExportDefaultDeclarationType> {
|
|
1862
|
-
const node = detachedProps<ExportDefaultDeclarationType>(
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1982
|
+
const node = detachedProps<ExportDefaultDeclarationType>(
|
|
1983
|
+
(props.parent: $FlowFixMe),
|
|
1984
|
+
{
|
|
1985
|
+
type: 'ExportDefaultDeclaration',
|
|
1986
|
+
declaration: asDetachedNodeForCodeGen(props.declaration),
|
|
1987
|
+
},
|
|
1988
|
+
);
|
|
1989
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1867
1990
|
return node;
|
|
1868
1991
|
}
|
|
1869
1992
|
|
|
1870
1993
|
export function ExportSpecifier(props: {
|
|
1871
|
-
|
|
1994
|
+
...ExportSpecifierProps,
|
|
1872
1995
|
+parent?: ESNode,
|
|
1873
1996
|
}): DetachedNode<ExportSpecifierType> {
|
|
1874
|
-
const node = detachedProps<ExportSpecifierType>(props.parent, {
|
|
1997
|
+
const node = detachedProps<ExportSpecifierType>((props.parent: $FlowFixMe), {
|
|
1875
1998
|
type: 'ExportSpecifier',
|
|
1876
1999
|
exported: asDetachedNodeForCodeGen(props.exported),
|
|
1877
2000
|
local: asDetachedNodeForCodeGen(props.local),
|
|
1878
2001
|
});
|
|
1879
|
-
setParentPointersInDirectChildren(node);
|
|
2002
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1880
2003
|
return node;
|
|
1881
2004
|
}
|
|
1882
2005
|
|
|
1883
2006
|
export function ExpressionStatement(props: {
|
|
1884
|
-
|
|
2007
|
+
...ExpressionStatementProps,
|
|
1885
2008
|
+parent?: ESNode,
|
|
1886
2009
|
}): DetachedNode<ExpressionStatementType> {
|
|
1887
|
-
const node = detachedProps<ExpressionStatementType>(
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
2010
|
+
const node = detachedProps<ExpressionStatementType>(
|
|
2011
|
+
(props.parent: $FlowFixMe),
|
|
2012
|
+
{
|
|
2013
|
+
type: 'ExpressionStatement',
|
|
2014
|
+
expression: asDetachedNodeForCodeGen(props.expression),
|
|
2015
|
+
directive: props.directive,
|
|
2016
|
+
},
|
|
2017
|
+
);
|
|
2018
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1893
2019
|
return node;
|
|
1894
2020
|
}
|
|
1895
2021
|
|
|
1896
2022
|
export function ForInStatement(props: {
|
|
1897
|
-
|
|
2023
|
+
...ForInStatementProps,
|
|
1898
2024
|
+parent?: ESNode,
|
|
1899
2025
|
}): DetachedNode<ForInStatementType> {
|
|
1900
|
-
const node = detachedProps<ForInStatementType>(props.parent, {
|
|
2026
|
+
const node = detachedProps<ForInStatementType>((props.parent: $FlowFixMe), {
|
|
1901
2027
|
type: 'ForInStatement',
|
|
1902
2028
|
left: asDetachedNodeForCodeGen(props.left),
|
|
1903
2029
|
right: asDetachedNodeForCodeGen(props.right),
|
|
1904
2030
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1905
2031
|
});
|
|
1906
|
-
setParentPointersInDirectChildren(node);
|
|
2032
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1907
2033
|
return node;
|
|
1908
2034
|
}
|
|
1909
2035
|
|
|
1910
2036
|
export function ForOfStatement(props: {
|
|
1911
|
-
|
|
2037
|
+
...ForOfStatementProps,
|
|
1912
2038
|
+parent?: ESNode,
|
|
1913
2039
|
}): DetachedNode<ForOfStatementType> {
|
|
1914
|
-
const node = detachedProps<ForOfStatementType>(props.parent, {
|
|
2040
|
+
const node = detachedProps<ForOfStatementType>((props.parent: $FlowFixMe), {
|
|
1915
2041
|
type: 'ForOfStatement',
|
|
1916
2042
|
left: asDetachedNodeForCodeGen(props.left),
|
|
1917
2043
|
right: asDetachedNodeForCodeGen(props.right),
|
|
1918
2044
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1919
2045
|
await: props.await,
|
|
1920
2046
|
});
|
|
1921
|
-
setParentPointersInDirectChildren(node);
|
|
2047
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1922
2048
|
return node;
|
|
1923
2049
|
}
|
|
1924
2050
|
|
|
1925
2051
|
export function ForStatement(props: {
|
|
1926
|
-
|
|
2052
|
+
...ForStatementProps,
|
|
1927
2053
|
+parent?: ESNode,
|
|
1928
2054
|
}): DetachedNode<ForStatementType> {
|
|
1929
|
-
const node = detachedProps<ForStatementType>(props.parent, {
|
|
2055
|
+
const node = detachedProps<ForStatementType>((props.parent: $FlowFixMe), {
|
|
1930
2056
|
type: 'ForStatement',
|
|
1931
2057
|
init: asDetachedNodeForCodeGen(props.init),
|
|
1932
2058
|
test: asDetachedNodeForCodeGen(props.test),
|
|
1933
2059
|
update: asDetachedNodeForCodeGen(props.update),
|
|
1934
2060
|
body: asDetachedNodeForCodeGen(props.body),
|
|
1935
2061
|
});
|
|
1936
|
-
setParentPointersInDirectChildren(node);
|
|
2062
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1937
2063
|
return node;
|
|
1938
2064
|
}
|
|
1939
2065
|
|
|
1940
2066
|
export function FunctionDeclaration(props: {
|
|
1941
|
-
|
|
2067
|
+
...FunctionDeclarationProps,
|
|
1942
2068
|
+parent?: ESNode,
|
|
1943
2069
|
}): DetachedNode<FunctionDeclarationType> {
|
|
1944
|
-
const node = detachedProps<FunctionDeclarationType>(
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
2070
|
+
const node = detachedProps<FunctionDeclarationType>(
|
|
2071
|
+
(props.parent: $FlowFixMe),
|
|
2072
|
+
{
|
|
2073
|
+
type: 'FunctionDeclaration',
|
|
2074
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2075
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
2076
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2077
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2078
|
+
returnType: asDetachedNodeForCodeGen(props.returnType),
|
|
2079
|
+
predicate: asDetachedNodeForCodeGen(props.predicate),
|
|
2080
|
+
generator: props.generator,
|
|
2081
|
+
async: props.async,
|
|
2082
|
+
},
|
|
2083
|
+
);
|
|
2084
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1956
2085
|
return node;
|
|
1957
2086
|
}
|
|
1958
2087
|
|
|
1959
2088
|
export function FunctionExpression(props: {
|
|
1960
|
-
|
|
2089
|
+
...FunctionExpressionProps,
|
|
1961
2090
|
+parent?: ESNode,
|
|
1962
2091
|
}): DetachedNode<FunctionExpressionType> {
|
|
1963
|
-
const node = detachedProps<FunctionExpressionType>(
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2092
|
+
const node = detachedProps<FunctionExpressionType>(
|
|
2093
|
+
(props.parent: $FlowFixMe),
|
|
2094
|
+
{
|
|
2095
|
+
type: 'FunctionExpression',
|
|
2096
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2097
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
2098
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2099
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2100
|
+
returnType: asDetachedNodeForCodeGen(props.returnType),
|
|
2101
|
+
predicate: asDetachedNodeForCodeGen(props.predicate),
|
|
2102
|
+
generator: props.generator,
|
|
2103
|
+
async: props.async,
|
|
2104
|
+
},
|
|
2105
|
+
);
|
|
2106
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1975
2107
|
return node;
|
|
1976
2108
|
}
|
|
1977
2109
|
|
|
1978
2110
|
export function FunctionTypeAnnotation(props: {
|
|
1979
|
-
|
|
2111
|
+
...FunctionTypeAnnotationProps,
|
|
1980
2112
|
+parent?: ESNode,
|
|
1981
2113
|
}): DetachedNode<FunctionTypeAnnotationType> {
|
|
1982
|
-
const node = detachedProps<FunctionTypeAnnotationType>(
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
2114
|
+
const node = detachedProps<FunctionTypeAnnotationType>(
|
|
2115
|
+
(props.parent: $FlowFixMe),
|
|
2116
|
+
{
|
|
2117
|
+
type: 'FunctionTypeAnnotation',
|
|
2118
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
2119
|
+
this: asDetachedNodeForCodeGen(props.this),
|
|
2120
|
+
returnType: asDetachedNodeForCodeGen(props.returnType),
|
|
2121
|
+
rest: asDetachedNodeForCodeGen(props.rest),
|
|
2122
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2123
|
+
},
|
|
2124
|
+
);
|
|
2125
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
1991
2126
|
return node;
|
|
1992
2127
|
}
|
|
1993
2128
|
|
|
1994
2129
|
export function FunctionTypeParam(props: {
|
|
1995
|
-
|
|
2130
|
+
...FunctionTypeParamProps,
|
|
1996
2131
|
+parent?: ESNode,
|
|
1997
2132
|
}): DetachedNode<FunctionTypeParamType> {
|
|
1998
|
-
const node = detachedProps<FunctionTypeParamType>(
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2133
|
+
const node = detachedProps<FunctionTypeParamType>(
|
|
2134
|
+
(props.parent: $FlowFixMe),
|
|
2135
|
+
{
|
|
2136
|
+
type: 'FunctionTypeParam',
|
|
2137
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
2138
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
2139
|
+
optional: props.optional,
|
|
2140
|
+
},
|
|
2141
|
+
);
|
|
2142
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2005
2143
|
return node;
|
|
2006
2144
|
}
|
|
2007
2145
|
|
|
2008
2146
|
export function GenericTypeAnnotation(props: {
|
|
2009
|
-
|
|
2147
|
+
...GenericTypeAnnotationProps,
|
|
2010
2148
|
+parent?: ESNode,
|
|
2011
2149
|
}): DetachedNode<GenericTypeAnnotationType> {
|
|
2012
|
-
const node = detachedProps<GenericTypeAnnotationType>(
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2150
|
+
const node = detachedProps<GenericTypeAnnotationType>(
|
|
2151
|
+
(props.parent: $FlowFixMe),
|
|
2152
|
+
{
|
|
2153
|
+
type: 'GenericTypeAnnotation',
|
|
2154
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2155
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2156
|
+
},
|
|
2157
|
+
);
|
|
2158
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2018
2159
|
return node;
|
|
2019
2160
|
}
|
|
2020
2161
|
|
|
2021
2162
|
export function HookDeclaration(props: {
|
|
2022
|
-
|
|
2163
|
+
...HookDeclarationProps,
|
|
2023
2164
|
+parent?: ESNode,
|
|
2024
2165
|
}): DetachedNode<HookDeclarationType> {
|
|
2025
|
-
const node = detachedProps<HookDeclarationType>(props.parent, {
|
|
2166
|
+
const node = detachedProps<HookDeclarationType>((props.parent: $FlowFixMe), {
|
|
2026
2167
|
type: 'HookDeclaration',
|
|
2027
2168
|
id: asDetachedNodeForCodeGen(props.id),
|
|
2028
2169
|
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
@@ -2030,128 +2171,143 @@ export function HookDeclaration(props: {
|
|
|
2030
2171
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2031
2172
|
returnType: asDetachedNodeForCodeGen(props.returnType),
|
|
2032
2173
|
});
|
|
2033
|
-
setParentPointersInDirectChildren(node);
|
|
2174
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2034
2175
|
return node;
|
|
2035
2176
|
}
|
|
2036
2177
|
|
|
2037
2178
|
export function HookTypeAnnotation(props: {
|
|
2038
|
-
|
|
2179
|
+
...HookTypeAnnotationProps,
|
|
2039
2180
|
+parent?: ESNode,
|
|
2040
2181
|
}): DetachedNode<HookTypeAnnotationType> {
|
|
2041
|
-
const node = detachedProps<HookTypeAnnotationType>(
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2182
|
+
const node = detachedProps<HookTypeAnnotationType>(
|
|
2183
|
+
(props.parent: $FlowFixMe),
|
|
2184
|
+
{
|
|
2185
|
+
type: 'HookTypeAnnotation',
|
|
2186
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
2187
|
+
returnType: asDetachedNodeForCodeGen(props.returnType),
|
|
2188
|
+
rest: asDetachedNodeForCodeGen(props.rest),
|
|
2189
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2190
|
+
},
|
|
2191
|
+
);
|
|
2192
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2049
2193
|
return node;
|
|
2050
2194
|
}
|
|
2051
2195
|
|
|
2052
2196
|
export function IfStatement(props: {
|
|
2053
|
-
|
|
2197
|
+
...IfStatementProps,
|
|
2054
2198
|
+parent?: ESNode,
|
|
2055
2199
|
}): DetachedNode<IfStatementType> {
|
|
2056
|
-
const node = detachedProps<IfStatementType>(props.parent, {
|
|
2200
|
+
const node = detachedProps<IfStatementType>((props.parent: $FlowFixMe), {
|
|
2057
2201
|
type: 'IfStatement',
|
|
2058
2202
|
test: asDetachedNodeForCodeGen(props.test),
|
|
2059
2203
|
consequent: asDetachedNodeForCodeGen(props.consequent),
|
|
2060
2204
|
alternate: asDetachedNodeForCodeGen(props.alternate),
|
|
2061
2205
|
});
|
|
2062
|
-
setParentPointersInDirectChildren(node);
|
|
2206
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2063
2207
|
return node;
|
|
2064
2208
|
}
|
|
2065
2209
|
|
|
2066
2210
|
export function ImportAttribute(props: {
|
|
2067
|
-
|
|
2211
|
+
...ImportAttributeProps,
|
|
2068
2212
|
+parent?: ESNode,
|
|
2069
2213
|
}): DetachedNode<ImportAttributeType> {
|
|
2070
|
-
const node = detachedProps<ImportAttributeType>(props.parent, {
|
|
2214
|
+
const node = detachedProps<ImportAttributeType>((props.parent: $FlowFixMe), {
|
|
2071
2215
|
type: 'ImportAttribute',
|
|
2072
2216
|
key: asDetachedNodeForCodeGen(props.key),
|
|
2073
2217
|
value: asDetachedNodeForCodeGen(props.value),
|
|
2074
2218
|
});
|
|
2075
|
-
setParentPointersInDirectChildren(node);
|
|
2219
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2076
2220
|
return node;
|
|
2077
2221
|
}
|
|
2078
2222
|
|
|
2079
2223
|
export function ImportDeclaration(props: {
|
|
2080
|
-
|
|
2224
|
+
...ImportDeclarationProps,
|
|
2081
2225
|
+parent?: ESNode,
|
|
2082
2226
|
}): DetachedNode<ImportDeclarationType> {
|
|
2083
|
-
const node = detachedProps<ImportDeclarationType>(
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2227
|
+
const node = detachedProps<ImportDeclarationType>(
|
|
2228
|
+
(props.parent: $FlowFixMe),
|
|
2229
|
+
{
|
|
2230
|
+
type: 'ImportDeclaration',
|
|
2231
|
+
specifiers: props.specifiers.map(n => asDetachedNodeForCodeGen(n)),
|
|
2232
|
+
source: asDetachedNodeForCodeGen(props.source),
|
|
2233
|
+
assertions: props.assertions?.map(n => asDetachedNodeForCodeGen(n)),
|
|
2234
|
+
importKind: props.importKind,
|
|
2235
|
+
},
|
|
2236
|
+
);
|
|
2237
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2091
2238
|
return node;
|
|
2092
2239
|
}
|
|
2093
2240
|
|
|
2094
2241
|
export function ImportDefaultSpecifier(props: {
|
|
2095
|
-
|
|
2242
|
+
...ImportDefaultSpecifierProps,
|
|
2096
2243
|
+parent?: ESNode,
|
|
2097
2244
|
}): DetachedNode<ImportDefaultSpecifierType> {
|
|
2098
|
-
const node = detachedProps<ImportDefaultSpecifierType>(
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2245
|
+
const node = detachedProps<ImportDefaultSpecifierType>(
|
|
2246
|
+
(props.parent: $FlowFixMe),
|
|
2247
|
+
{
|
|
2248
|
+
type: 'ImportDefaultSpecifier',
|
|
2249
|
+
local: asDetachedNodeForCodeGen(props.local),
|
|
2250
|
+
},
|
|
2251
|
+
);
|
|
2252
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2103
2253
|
return node;
|
|
2104
2254
|
}
|
|
2105
2255
|
|
|
2106
2256
|
export function ImportExpression(props: {
|
|
2107
|
-
|
|
2257
|
+
...ImportExpressionProps,
|
|
2108
2258
|
+parent?: ESNode,
|
|
2109
2259
|
}): DetachedNode<ImportExpressionType> {
|
|
2110
|
-
const node = detachedProps<ImportExpressionType>(props.parent, {
|
|
2260
|
+
const node = detachedProps<ImportExpressionType>((props.parent: $FlowFixMe), {
|
|
2111
2261
|
type: 'ImportExpression',
|
|
2112
2262
|
source: asDetachedNodeForCodeGen(props.source),
|
|
2113
2263
|
attributes: asDetachedNodeForCodeGen(props.attributes),
|
|
2114
2264
|
});
|
|
2115
|
-
setParentPointersInDirectChildren(node);
|
|
2265
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2116
2266
|
return node;
|
|
2117
2267
|
}
|
|
2118
2268
|
|
|
2119
2269
|
export function ImportNamespaceSpecifier(props: {
|
|
2120
|
-
|
|
2270
|
+
...ImportNamespaceSpecifierProps,
|
|
2121
2271
|
+parent?: ESNode,
|
|
2122
2272
|
}): DetachedNode<ImportNamespaceSpecifierType> {
|
|
2123
|
-
const node = detachedProps<ImportNamespaceSpecifierType>(
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2273
|
+
const node = detachedProps<ImportNamespaceSpecifierType>(
|
|
2274
|
+
(props.parent: $FlowFixMe),
|
|
2275
|
+
{
|
|
2276
|
+
type: 'ImportNamespaceSpecifier',
|
|
2277
|
+
local: asDetachedNodeForCodeGen(props.local),
|
|
2278
|
+
},
|
|
2279
|
+
);
|
|
2280
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2128
2281
|
return node;
|
|
2129
2282
|
}
|
|
2130
2283
|
|
|
2131
2284
|
export function ImportSpecifier(props: {
|
|
2132
|
-
|
|
2285
|
+
...ImportSpecifierProps,
|
|
2133
2286
|
+parent?: ESNode,
|
|
2134
2287
|
}): DetachedNode<ImportSpecifierType> {
|
|
2135
|
-
const node = detachedProps<ImportSpecifierType>(props.parent, {
|
|
2288
|
+
const node = detachedProps<ImportSpecifierType>((props.parent: $FlowFixMe), {
|
|
2136
2289
|
type: 'ImportSpecifier',
|
|
2137
2290
|
imported: asDetachedNodeForCodeGen(props.imported),
|
|
2138
2291
|
local: asDetachedNodeForCodeGen(props.local),
|
|
2139
2292
|
importKind: props.importKind,
|
|
2140
2293
|
});
|
|
2141
|
-
setParentPointersInDirectChildren(node);
|
|
2294
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2142
2295
|
return node;
|
|
2143
2296
|
}
|
|
2144
2297
|
|
|
2145
2298
|
export function IndexedAccessType(props: {
|
|
2146
|
-
|
|
2299
|
+
...IndexedAccessTypeProps,
|
|
2147
2300
|
+parent?: ESNode,
|
|
2148
2301
|
}): DetachedNode<IndexedAccessTypeType> {
|
|
2149
|
-
const node = detachedProps<IndexedAccessTypeType>(
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2302
|
+
const node = detachedProps<IndexedAccessTypeType>(
|
|
2303
|
+
(props.parent: $FlowFixMe),
|
|
2304
|
+
{
|
|
2305
|
+
type: 'IndexedAccessType',
|
|
2306
|
+
objectType: asDetachedNodeForCodeGen(props.objectType),
|
|
2307
|
+
indexType: asDetachedNodeForCodeGen(props.indexType),
|
|
2308
|
+
},
|
|
2309
|
+
);
|
|
2310
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2155
2311
|
return node;
|
|
2156
2312
|
}
|
|
2157
2313
|
|
|
@@ -2160,98 +2316,113 @@ export function InferredPredicate(
|
|
|
2160
2316
|
+parent?: ESNode,
|
|
2161
2317
|
} = {...null},
|
|
2162
2318
|
): DetachedNode<InferredPredicateType> {
|
|
2163
|
-
return detachedProps<InferredPredicateType>(props.parent, {
|
|
2319
|
+
return detachedProps<InferredPredicateType>((props.parent: $FlowFixMe), {
|
|
2164
2320
|
type: 'InferredPredicate',
|
|
2165
2321
|
});
|
|
2166
2322
|
}
|
|
2167
2323
|
|
|
2168
2324
|
export function InferTypeAnnotation(props: {
|
|
2169
|
-
|
|
2325
|
+
...InferTypeAnnotationProps,
|
|
2170
2326
|
+parent?: ESNode,
|
|
2171
2327
|
}): DetachedNode<InferTypeAnnotationType> {
|
|
2172
|
-
const node = detachedProps<InferTypeAnnotationType>(
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2328
|
+
const node = detachedProps<InferTypeAnnotationType>(
|
|
2329
|
+
(props.parent: $FlowFixMe),
|
|
2330
|
+
{
|
|
2331
|
+
type: 'InferTypeAnnotation',
|
|
2332
|
+
typeParameter: asDetachedNodeForCodeGen(props.typeParameter),
|
|
2333
|
+
},
|
|
2334
|
+
);
|
|
2335
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2177
2336
|
return node;
|
|
2178
2337
|
}
|
|
2179
2338
|
|
|
2180
2339
|
export function InterfaceDeclaration(props: {
|
|
2181
|
-
|
|
2340
|
+
...InterfaceDeclarationProps,
|
|
2182
2341
|
+parent?: ESNode,
|
|
2183
2342
|
}): DetachedNode<InterfaceDeclarationType> {
|
|
2184
|
-
const node = detachedProps<InterfaceDeclarationType>(
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2343
|
+
const node = detachedProps<InterfaceDeclarationType>(
|
|
2344
|
+
(props.parent: $FlowFixMe),
|
|
2345
|
+
{
|
|
2346
|
+
type: 'InterfaceDeclaration',
|
|
2347
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2348
|
+
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2349
|
+
extends: props.extends.map(n => asDetachedNodeForCodeGen(n)),
|
|
2350
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2351
|
+
},
|
|
2352
|
+
);
|
|
2353
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2192
2354
|
return node;
|
|
2193
2355
|
}
|
|
2194
2356
|
|
|
2195
2357
|
export function InterfaceExtends(props: {
|
|
2196
|
-
|
|
2358
|
+
...InterfaceExtendsProps,
|
|
2197
2359
|
+parent?: ESNode,
|
|
2198
2360
|
}): DetachedNode<InterfaceExtendsType> {
|
|
2199
|
-
const node = detachedProps<InterfaceExtendsType>(props.parent, {
|
|
2361
|
+
const node = detachedProps<InterfaceExtendsType>((props.parent: $FlowFixMe), {
|
|
2200
2362
|
type: 'InterfaceExtends',
|
|
2201
2363
|
id: asDetachedNodeForCodeGen(props.id),
|
|
2202
2364
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2203
2365
|
});
|
|
2204
|
-
setParentPointersInDirectChildren(node);
|
|
2366
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2205
2367
|
return node;
|
|
2206
2368
|
}
|
|
2207
2369
|
|
|
2208
2370
|
export function InterfaceTypeAnnotation(props: {
|
|
2209
|
-
|
|
2371
|
+
...InterfaceTypeAnnotationProps,
|
|
2210
2372
|
+parent?: ESNode,
|
|
2211
2373
|
}): DetachedNode<InterfaceTypeAnnotationType> {
|
|
2212
|
-
const node = detachedProps<InterfaceTypeAnnotationType>(
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2374
|
+
const node = detachedProps<InterfaceTypeAnnotationType>(
|
|
2375
|
+
(props.parent: $FlowFixMe),
|
|
2376
|
+
{
|
|
2377
|
+
type: 'InterfaceTypeAnnotation',
|
|
2378
|
+
extends: props.extends.map(n => asDetachedNodeForCodeGen(n)),
|
|
2379
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2380
|
+
},
|
|
2381
|
+
);
|
|
2382
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2218
2383
|
return node;
|
|
2219
2384
|
}
|
|
2220
2385
|
|
|
2221
2386
|
export function IntersectionTypeAnnotation(props: {
|
|
2222
|
-
|
|
2387
|
+
...IntersectionTypeAnnotationProps,
|
|
2223
2388
|
+parent?: ESNode,
|
|
2224
2389
|
}): DetachedNode<IntersectionTypeAnnotationType> {
|
|
2225
|
-
const node = detachedProps<IntersectionTypeAnnotationType>(
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2390
|
+
const node = detachedProps<IntersectionTypeAnnotationType>(
|
|
2391
|
+
(props.parent: $FlowFixMe),
|
|
2392
|
+
{
|
|
2393
|
+
type: 'IntersectionTypeAnnotation',
|
|
2394
|
+
types: props.types.map(n => asDetachedNodeForCodeGen(n)),
|
|
2395
|
+
},
|
|
2396
|
+
);
|
|
2397
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2230
2398
|
return node;
|
|
2231
2399
|
}
|
|
2232
2400
|
|
|
2233
2401
|
export function JSXAttribute(props: {
|
|
2234
|
-
|
|
2402
|
+
...JSXAttributeProps,
|
|
2235
2403
|
+parent?: ESNode,
|
|
2236
2404
|
}): DetachedNode<JSXAttributeType> {
|
|
2237
|
-
const node = detachedProps<JSXAttributeType>(props.parent, {
|
|
2405
|
+
const node = detachedProps<JSXAttributeType>((props.parent: $FlowFixMe), {
|
|
2238
2406
|
type: 'JSXAttribute',
|
|
2239
2407
|
name: asDetachedNodeForCodeGen(props.name),
|
|
2240
2408
|
value: asDetachedNodeForCodeGen(props.value),
|
|
2241
2409
|
});
|
|
2242
|
-
setParentPointersInDirectChildren(node);
|
|
2410
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2243
2411
|
return node;
|
|
2244
2412
|
}
|
|
2245
2413
|
|
|
2246
2414
|
export function JSXClosingElement(props: {
|
|
2247
|
-
|
|
2415
|
+
...JSXClosingElementProps,
|
|
2248
2416
|
+parent?: ESNode,
|
|
2249
2417
|
}): DetachedNode<JSXClosingElementType> {
|
|
2250
|
-
const node = detachedProps<JSXClosingElementType>(
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2418
|
+
const node = detachedProps<JSXClosingElementType>(
|
|
2419
|
+
(props.parent: $FlowFixMe),
|
|
2420
|
+
{
|
|
2421
|
+
type: 'JSXClosingElement',
|
|
2422
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
2423
|
+
},
|
|
2424
|
+
);
|
|
2425
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2255
2426
|
return node;
|
|
2256
2427
|
}
|
|
2257
2428
|
|
|
@@ -2260,22 +2431,22 @@ export function JSXClosingFragment(
|
|
|
2260
2431
|
+parent?: ESNode,
|
|
2261
2432
|
} = {...null},
|
|
2262
2433
|
): DetachedNode<JSXClosingFragmentType> {
|
|
2263
|
-
return detachedProps<JSXClosingFragmentType>(props.parent, {
|
|
2434
|
+
return detachedProps<JSXClosingFragmentType>((props.parent: $FlowFixMe), {
|
|
2264
2435
|
type: 'JSXClosingFragment',
|
|
2265
2436
|
});
|
|
2266
2437
|
}
|
|
2267
2438
|
|
|
2268
2439
|
export function JSXElement(props: {
|
|
2269
|
-
|
|
2440
|
+
...JSXElementProps,
|
|
2270
2441
|
+parent?: ESNode,
|
|
2271
2442
|
}): DetachedNode<JSXElementType> {
|
|
2272
|
-
const node = detachedProps<JSXElementType>(props.parent, {
|
|
2443
|
+
const node = detachedProps<JSXElementType>((props.parent: $FlowFixMe), {
|
|
2273
2444
|
type: 'JSXElement',
|
|
2274
2445
|
openingElement: asDetachedNodeForCodeGen(props.openingElement),
|
|
2275
2446
|
children: props.children.map(n => asDetachedNodeForCodeGen(n)),
|
|
2276
2447
|
closingElement: asDetachedNodeForCodeGen(props.closingElement),
|
|
2277
2448
|
});
|
|
2278
|
-
setParentPointersInDirectChildren(node);
|
|
2449
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2279
2450
|
return node;
|
|
2280
2451
|
}
|
|
2281
2452
|
|
|
@@ -2284,87 +2455,99 @@ export function JSXEmptyExpression(
|
|
|
2284
2455
|
+parent?: ESNode,
|
|
2285
2456
|
} = {...null},
|
|
2286
2457
|
): DetachedNode<JSXEmptyExpressionType> {
|
|
2287
|
-
return detachedProps<JSXEmptyExpressionType>(props.parent, {
|
|
2458
|
+
return detachedProps<JSXEmptyExpressionType>((props.parent: $FlowFixMe), {
|
|
2288
2459
|
type: 'JSXEmptyExpression',
|
|
2289
2460
|
});
|
|
2290
2461
|
}
|
|
2291
2462
|
|
|
2292
2463
|
export function JSXExpressionContainer(props: {
|
|
2293
|
-
|
|
2464
|
+
...JSXExpressionContainerProps,
|
|
2294
2465
|
+parent?: ESNode,
|
|
2295
2466
|
}): DetachedNode<JSXExpressionContainerType> {
|
|
2296
|
-
const node = detachedProps<JSXExpressionContainerType>(
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2467
|
+
const node = detachedProps<JSXExpressionContainerType>(
|
|
2468
|
+
(props.parent: $FlowFixMe),
|
|
2469
|
+
{
|
|
2470
|
+
type: 'JSXExpressionContainer',
|
|
2471
|
+
expression: asDetachedNodeForCodeGen(props.expression),
|
|
2472
|
+
},
|
|
2473
|
+
);
|
|
2474
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2301
2475
|
return node;
|
|
2302
2476
|
}
|
|
2303
2477
|
|
|
2304
2478
|
export function JSXFragment(props: {
|
|
2305
|
-
|
|
2479
|
+
...JSXFragmentProps,
|
|
2306
2480
|
+parent?: ESNode,
|
|
2307
2481
|
}): DetachedNode<JSXFragmentType> {
|
|
2308
|
-
const node = detachedProps<JSXFragmentType>(props.parent, {
|
|
2482
|
+
const node = detachedProps<JSXFragmentType>((props.parent: $FlowFixMe), {
|
|
2309
2483
|
type: 'JSXFragment',
|
|
2310
2484
|
openingFragment: asDetachedNodeForCodeGen(props.openingFragment),
|
|
2311
2485
|
children: props.children.map(n => asDetachedNodeForCodeGen(n)),
|
|
2312
2486
|
closingFragment: asDetachedNodeForCodeGen(props.closingFragment),
|
|
2313
2487
|
});
|
|
2314
|
-
setParentPointersInDirectChildren(node);
|
|
2488
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2315
2489
|
return node;
|
|
2316
2490
|
}
|
|
2317
2491
|
|
|
2318
2492
|
export function JSXIdentifier(props: {
|
|
2319
|
-
|
|
2493
|
+
...JSXIdentifierProps,
|
|
2320
2494
|
+parent?: ESNode,
|
|
2321
2495
|
}): DetachedNode<JSXIdentifierType> {
|
|
2322
|
-
const node = detachedProps<JSXIdentifierType>(props.parent, {
|
|
2496
|
+
const node = detachedProps<JSXIdentifierType>((props.parent: $FlowFixMe), {
|
|
2323
2497
|
type: 'JSXIdentifier',
|
|
2324
2498
|
name: props.name,
|
|
2325
2499
|
});
|
|
2326
|
-
setParentPointersInDirectChildren(node);
|
|
2500
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2327
2501
|
return node;
|
|
2328
2502
|
}
|
|
2329
2503
|
|
|
2330
2504
|
export function JSXMemberExpression(props: {
|
|
2331
|
-
|
|
2505
|
+
...JSXMemberExpressionProps,
|
|
2332
2506
|
+parent?: ESNode,
|
|
2333
2507
|
}): DetachedNode<JSXMemberExpressionType> {
|
|
2334
|
-
const node = detachedProps<JSXMemberExpressionType>(
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2508
|
+
const node = detachedProps<JSXMemberExpressionType>(
|
|
2509
|
+
(props.parent: $FlowFixMe),
|
|
2510
|
+
{
|
|
2511
|
+
type: 'JSXMemberExpression',
|
|
2512
|
+
object: asDetachedNodeForCodeGen(props.object),
|
|
2513
|
+
property: asDetachedNodeForCodeGen(props.property),
|
|
2514
|
+
},
|
|
2515
|
+
);
|
|
2516
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2340
2517
|
return node;
|
|
2341
2518
|
}
|
|
2342
2519
|
|
|
2343
2520
|
export function JSXNamespacedName(props: {
|
|
2344
|
-
|
|
2521
|
+
...JSXNamespacedNameProps,
|
|
2345
2522
|
+parent?: ESNode,
|
|
2346
2523
|
}): DetachedNode<JSXNamespacedNameType> {
|
|
2347
|
-
const node = detachedProps<JSXNamespacedNameType>(
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2524
|
+
const node = detachedProps<JSXNamespacedNameType>(
|
|
2525
|
+
(props.parent: $FlowFixMe),
|
|
2526
|
+
{
|
|
2527
|
+
type: 'JSXNamespacedName',
|
|
2528
|
+
namespace: asDetachedNodeForCodeGen(props.namespace),
|
|
2529
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
2530
|
+
},
|
|
2531
|
+
);
|
|
2532
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2353
2533
|
return node;
|
|
2354
2534
|
}
|
|
2355
2535
|
|
|
2356
2536
|
export function JSXOpeningElement(props: {
|
|
2357
|
-
|
|
2537
|
+
...JSXOpeningElementProps,
|
|
2358
2538
|
+parent?: ESNode,
|
|
2359
2539
|
}): DetachedNode<JSXOpeningElementType> {
|
|
2360
|
-
const node = detachedProps<JSXOpeningElementType>(
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2540
|
+
const node = detachedProps<JSXOpeningElementType>(
|
|
2541
|
+
(props.parent: $FlowFixMe),
|
|
2542
|
+
{
|
|
2543
|
+
type: 'JSXOpeningElement',
|
|
2544
|
+
name: asDetachedNodeForCodeGen(props.name),
|
|
2545
|
+
attributes: props.attributes.map(n => asDetachedNodeForCodeGen(n)),
|
|
2546
|
+
selfClosing: props.selfClosing,
|
|
2547
|
+
typeArguments: asDetachedNodeForCodeGen(props.typeArguments),
|
|
2548
|
+
},
|
|
2549
|
+
);
|
|
2550
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2368
2551
|
return node;
|
|
2369
2552
|
}
|
|
2370
2553
|
|
|
@@ -2373,105 +2556,114 @@ export function JSXOpeningFragment(
|
|
|
2373
2556
|
+parent?: ESNode,
|
|
2374
2557
|
} = {...null},
|
|
2375
2558
|
): DetachedNode<JSXOpeningFragmentType> {
|
|
2376
|
-
return detachedProps<JSXOpeningFragmentType>(props.parent, {
|
|
2559
|
+
return detachedProps<JSXOpeningFragmentType>((props.parent: $FlowFixMe), {
|
|
2377
2560
|
type: 'JSXOpeningFragment',
|
|
2378
2561
|
});
|
|
2379
2562
|
}
|
|
2380
2563
|
|
|
2381
2564
|
export function JSXSpreadAttribute(props: {
|
|
2382
|
-
|
|
2565
|
+
...JSXSpreadAttributeProps,
|
|
2383
2566
|
+parent?: ESNode,
|
|
2384
2567
|
}): DetachedNode<JSXSpreadAttributeType> {
|
|
2385
|
-
const node = detachedProps<JSXSpreadAttributeType>(
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2568
|
+
const node = detachedProps<JSXSpreadAttributeType>(
|
|
2569
|
+
(props.parent: $FlowFixMe),
|
|
2570
|
+
{
|
|
2571
|
+
type: 'JSXSpreadAttribute',
|
|
2572
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2573
|
+
},
|
|
2574
|
+
);
|
|
2575
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2390
2576
|
return node;
|
|
2391
2577
|
}
|
|
2392
2578
|
|
|
2393
2579
|
export function JSXSpreadChild(props: {
|
|
2394
|
-
|
|
2580
|
+
...JSXSpreadChildProps,
|
|
2395
2581
|
+parent?: ESNode,
|
|
2396
2582
|
}): DetachedNode<JSXSpreadChildType> {
|
|
2397
|
-
const node = detachedProps<JSXSpreadChildType>(props.parent, {
|
|
2583
|
+
const node = detachedProps<JSXSpreadChildType>((props.parent: $FlowFixMe), {
|
|
2398
2584
|
type: 'JSXSpreadChild',
|
|
2399
2585
|
expression: asDetachedNodeForCodeGen(props.expression),
|
|
2400
2586
|
});
|
|
2401
|
-
setParentPointersInDirectChildren(node);
|
|
2587
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2402
2588
|
return node;
|
|
2403
2589
|
}
|
|
2404
2590
|
|
|
2405
2591
|
export function JSXText(props: {
|
|
2406
|
-
|
|
2592
|
+
...JSXTextProps,
|
|
2407
2593
|
+parent?: ESNode,
|
|
2408
2594
|
}): DetachedNode<JSXTextType> {
|
|
2409
|
-
const node = detachedProps<JSXTextType>(props.parent, {
|
|
2595
|
+
const node = detachedProps<JSXTextType>((props.parent: $FlowFixMe), {
|
|
2410
2596
|
type: 'JSXText',
|
|
2411
2597
|
value: props.value,
|
|
2412
2598
|
raw: props.raw,
|
|
2413
2599
|
});
|
|
2414
|
-
setParentPointersInDirectChildren(node);
|
|
2600
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2415
2601
|
return node;
|
|
2416
2602
|
}
|
|
2417
2603
|
|
|
2418
2604
|
export function KeyofTypeAnnotation(props: {
|
|
2419
|
-
|
|
2605
|
+
...KeyofTypeAnnotationProps,
|
|
2420
2606
|
+parent?: ESNode,
|
|
2421
2607
|
}): DetachedNode<KeyofTypeAnnotationType> {
|
|
2422
|
-
const node = detachedProps<KeyofTypeAnnotationType>(
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2608
|
+
const node = detachedProps<KeyofTypeAnnotationType>(
|
|
2609
|
+
(props.parent: $FlowFixMe),
|
|
2610
|
+
{
|
|
2611
|
+
type: 'KeyofTypeAnnotation',
|
|
2612
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2613
|
+
},
|
|
2614
|
+
);
|
|
2615
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2427
2616
|
return node;
|
|
2428
2617
|
}
|
|
2429
2618
|
|
|
2430
2619
|
export function LabeledStatement(props: {
|
|
2431
|
-
|
|
2620
|
+
...LabeledStatementProps,
|
|
2432
2621
|
+parent?: ESNode,
|
|
2433
2622
|
}): DetachedNode<LabeledStatementType> {
|
|
2434
|
-
const node = detachedProps<LabeledStatementType>(props.parent, {
|
|
2623
|
+
const node = detachedProps<LabeledStatementType>((props.parent: $FlowFixMe), {
|
|
2435
2624
|
type: 'LabeledStatement',
|
|
2436
2625
|
label: asDetachedNodeForCodeGen(props.label),
|
|
2437
2626
|
body: asDetachedNodeForCodeGen(props.body),
|
|
2438
2627
|
});
|
|
2439
|
-
setParentPointersInDirectChildren(node);
|
|
2628
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2440
2629
|
return node;
|
|
2441
2630
|
}
|
|
2442
2631
|
|
|
2443
2632
|
export function LogicalExpression(props: {
|
|
2444
|
-
|
|
2633
|
+
...LogicalExpressionProps,
|
|
2445
2634
|
+parent?: ESNode,
|
|
2446
2635
|
}): DetachedNode<LogicalExpressionType> {
|
|
2447
|
-
const node = detachedProps<LogicalExpressionType>(
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2636
|
+
const node = detachedProps<LogicalExpressionType>(
|
|
2637
|
+
(props.parent: $FlowFixMe),
|
|
2638
|
+
{
|
|
2639
|
+
type: 'LogicalExpression',
|
|
2640
|
+
left: asDetachedNodeForCodeGen(props.left),
|
|
2641
|
+
right: asDetachedNodeForCodeGen(props.right),
|
|
2642
|
+
operator: props.operator,
|
|
2643
|
+
},
|
|
2644
|
+
);
|
|
2645
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2454
2646
|
return node;
|
|
2455
2647
|
}
|
|
2456
2648
|
|
|
2457
2649
|
export function MetaProperty(props: {
|
|
2458
|
-
|
|
2650
|
+
...MetaPropertyProps,
|
|
2459
2651
|
+parent?: ESNode,
|
|
2460
2652
|
}): DetachedNode<MetaPropertyType> {
|
|
2461
|
-
const node = detachedProps<MetaPropertyType>(props.parent, {
|
|
2653
|
+
const node = detachedProps<MetaPropertyType>((props.parent: $FlowFixMe), {
|
|
2462
2654
|
type: 'MetaProperty',
|
|
2463
2655
|
meta: asDetachedNodeForCodeGen(props.meta),
|
|
2464
2656
|
property: asDetachedNodeForCodeGen(props.property),
|
|
2465
2657
|
});
|
|
2466
|
-
setParentPointersInDirectChildren(node);
|
|
2658
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2467
2659
|
return node;
|
|
2468
2660
|
}
|
|
2469
2661
|
|
|
2470
2662
|
export function MethodDefinition(props: {
|
|
2471
|
-
|
|
2663
|
+
...MethodDefinitionProps,
|
|
2472
2664
|
+parent?: ESNode,
|
|
2473
2665
|
}): DetachedNode<MethodDefinitionType> {
|
|
2474
|
-
const node = detachedProps<MethodDefinitionType>(props.parent, {
|
|
2666
|
+
const node = detachedProps<MethodDefinitionType>((props.parent: $FlowFixMe), {
|
|
2475
2667
|
type: 'MethodDefinition',
|
|
2476
2668
|
key: asDetachedNodeForCodeGen(props.key),
|
|
2477
2669
|
value: asDetachedNodeForCodeGen(props.value),
|
|
@@ -2479,7 +2671,7 @@ export function MethodDefinition(props: {
|
|
|
2479
2671
|
computed: props.computed,
|
|
2480
2672
|
static: props.static,
|
|
2481
2673
|
});
|
|
2482
|
-
setParentPointersInDirectChildren(node);
|
|
2674
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2483
2675
|
return node;
|
|
2484
2676
|
}
|
|
2485
2677
|
|
|
@@ -2488,34 +2680,37 @@ export function MixedTypeAnnotation(
|
|
|
2488
2680
|
+parent?: ESNode,
|
|
2489
2681
|
} = {...null},
|
|
2490
2682
|
): DetachedNode<MixedTypeAnnotationType> {
|
|
2491
|
-
return detachedProps<MixedTypeAnnotationType>(props.parent, {
|
|
2683
|
+
return detachedProps<MixedTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
2492
2684
|
type: 'MixedTypeAnnotation',
|
|
2493
2685
|
});
|
|
2494
2686
|
}
|
|
2495
2687
|
|
|
2496
2688
|
export function NewExpression(props: {
|
|
2497
|
-
|
|
2689
|
+
...NewExpressionProps,
|
|
2498
2690
|
+parent?: ESNode,
|
|
2499
2691
|
}): DetachedNode<NewExpressionType> {
|
|
2500
|
-
const node = detachedProps<NewExpressionType>(props.parent, {
|
|
2692
|
+
const node = detachedProps<NewExpressionType>((props.parent: $FlowFixMe), {
|
|
2501
2693
|
type: 'NewExpression',
|
|
2502
2694
|
callee: asDetachedNodeForCodeGen(props.callee),
|
|
2503
2695
|
typeArguments: asDetachedNodeForCodeGen(props.typeArguments),
|
|
2504
2696
|
arguments: props.arguments.map(n => asDetachedNodeForCodeGen(n)),
|
|
2505
2697
|
});
|
|
2506
|
-
setParentPointersInDirectChildren(node);
|
|
2698
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2507
2699
|
return node;
|
|
2508
2700
|
}
|
|
2509
2701
|
|
|
2510
2702
|
export function NullableTypeAnnotation(props: {
|
|
2511
|
-
|
|
2703
|
+
...NullableTypeAnnotationProps,
|
|
2512
2704
|
+parent?: ESNode,
|
|
2513
2705
|
}): DetachedNode<NullableTypeAnnotationType> {
|
|
2514
|
-
const node = detachedProps<NullableTypeAnnotationType>(
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2706
|
+
const node = detachedProps<NullableTypeAnnotationType>(
|
|
2707
|
+
(props.parent: $FlowFixMe),
|
|
2708
|
+
{
|
|
2709
|
+
type: 'NullableTypeAnnotation',
|
|
2710
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
2711
|
+
},
|
|
2712
|
+
);
|
|
2713
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2519
2714
|
return node;
|
|
2520
2715
|
}
|
|
2521
2716
|
|
|
@@ -2524,21 +2719,27 @@ export function NullLiteralTypeAnnotation(
|
|
|
2524
2719
|
+parent?: ESNode,
|
|
2525
2720
|
} = {...null},
|
|
2526
2721
|
): DetachedNode<NullLiteralTypeAnnotationType> {
|
|
2527
|
-
return detachedProps<NullLiteralTypeAnnotationType>(
|
|
2528
|
-
|
|
2529
|
-
|
|
2722
|
+
return detachedProps<NullLiteralTypeAnnotationType>(
|
|
2723
|
+
(props.parent: $FlowFixMe),
|
|
2724
|
+
{
|
|
2725
|
+
type: 'NullLiteralTypeAnnotation',
|
|
2726
|
+
},
|
|
2727
|
+
);
|
|
2530
2728
|
}
|
|
2531
2729
|
|
|
2532
2730
|
export function NumberLiteralTypeAnnotation(props: {
|
|
2533
|
-
|
|
2731
|
+
...NumberLiteralTypeAnnotationProps,
|
|
2534
2732
|
+parent?: ESNode,
|
|
2535
2733
|
}): DetachedNode<NumberLiteralTypeAnnotationType> {
|
|
2536
|
-
const node = detachedProps<NumberLiteralTypeAnnotationType>(
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2734
|
+
const node = detachedProps<NumberLiteralTypeAnnotationType>(
|
|
2735
|
+
(props.parent: $FlowFixMe),
|
|
2736
|
+
{
|
|
2737
|
+
type: 'NumberLiteralTypeAnnotation',
|
|
2738
|
+
value: props.value,
|
|
2739
|
+
raw: props.raw,
|
|
2740
|
+
},
|
|
2741
|
+
);
|
|
2742
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2542
2743
|
return node;
|
|
2543
2744
|
}
|
|
2544
2745
|
|
|
@@ -2547,172 +2748,198 @@ export function NumberTypeAnnotation(
|
|
|
2547
2748
|
+parent?: ESNode,
|
|
2548
2749
|
} = {...null},
|
|
2549
2750
|
): DetachedNode<NumberTypeAnnotationType> {
|
|
2550
|
-
return detachedProps<NumberTypeAnnotationType>(props.parent, {
|
|
2751
|
+
return detachedProps<NumberTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
2551
2752
|
type: 'NumberTypeAnnotation',
|
|
2552
2753
|
});
|
|
2553
2754
|
}
|
|
2554
2755
|
|
|
2555
2756
|
export function ObjectExpression(props: {
|
|
2556
|
-
|
|
2757
|
+
...ObjectExpressionProps,
|
|
2557
2758
|
+parent?: ESNode,
|
|
2558
2759
|
}): DetachedNode<ObjectExpressionType> {
|
|
2559
|
-
const node = detachedProps<ObjectExpressionType>(props.parent, {
|
|
2760
|
+
const node = detachedProps<ObjectExpressionType>((props.parent: $FlowFixMe), {
|
|
2560
2761
|
type: 'ObjectExpression',
|
|
2561
2762
|
properties: props.properties.map(n => asDetachedNodeForCodeGen(n)),
|
|
2562
2763
|
});
|
|
2563
|
-
setParentPointersInDirectChildren(node);
|
|
2764
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2564
2765
|
return node;
|
|
2565
2766
|
}
|
|
2566
2767
|
|
|
2567
2768
|
export function ObjectPattern(props: {
|
|
2568
|
-
|
|
2769
|
+
...ObjectPatternProps,
|
|
2569
2770
|
+parent?: ESNode,
|
|
2570
2771
|
}): DetachedNode<ObjectPatternType> {
|
|
2571
|
-
const node = detachedProps<ObjectPatternType>(props.parent, {
|
|
2772
|
+
const node = detachedProps<ObjectPatternType>((props.parent: $FlowFixMe), {
|
|
2572
2773
|
type: 'ObjectPattern',
|
|
2573
2774
|
properties: props.properties.map(n => asDetachedNodeForCodeGen(n)),
|
|
2574
2775
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
2575
2776
|
});
|
|
2576
|
-
setParentPointersInDirectChildren(node);
|
|
2777
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2577
2778
|
return node;
|
|
2578
2779
|
}
|
|
2579
2780
|
|
|
2580
2781
|
export function ObjectTypeAnnotation(props: {
|
|
2581
|
-
|
|
2782
|
+
...ObjectTypeAnnotationProps,
|
|
2582
2783
|
+parent?: ESNode,
|
|
2583
2784
|
}): DetachedNode<ObjectTypeAnnotationType> {
|
|
2584
|
-
const node = detachedProps<ObjectTypeAnnotationType>(
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2785
|
+
const node = detachedProps<ObjectTypeAnnotationType>(
|
|
2786
|
+
(props.parent: $FlowFixMe),
|
|
2787
|
+
{
|
|
2788
|
+
type: 'ObjectTypeAnnotation',
|
|
2789
|
+
properties: props.properties.map(n => asDetachedNodeForCodeGen(n)),
|
|
2790
|
+
indexers: props.indexers.map(n => asDetachedNodeForCodeGen(n)),
|
|
2791
|
+
callProperties: props.callProperties.map(n =>
|
|
2792
|
+
asDetachedNodeForCodeGen(n),
|
|
2793
|
+
),
|
|
2794
|
+
internalSlots: props.internalSlots.map(n => asDetachedNodeForCodeGen(n)),
|
|
2795
|
+
inexact: props.inexact,
|
|
2796
|
+
exact: props.exact,
|
|
2797
|
+
},
|
|
2798
|
+
);
|
|
2799
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2594
2800
|
return node;
|
|
2595
2801
|
}
|
|
2596
2802
|
|
|
2597
2803
|
export function ObjectTypeCallProperty(props: {
|
|
2598
|
-
|
|
2804
|
+
...ObjectTypeCallPropertyProps,
|
|
2599
2805
|
+parent?: ESNode,
|
|
2600
2806
|
}): DetachedNode<ObjectTypeCallPropertyType> {
|
|
2601
|
-
const node = detachedProps<ObjectTypeCallPropertyType>(
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2807
|
+
const node = detachedProps<ObjectTypeCallPropertyType>(
|
|
2808
|
+
(props.parent: $FlowFixMe),
|
|
2809
|
+
{
|
|
2810
|
+
type: 'ObjectTypeCallProperty',
|
|
2811
|
+
value: asDetachedNodeForCodeGen(props.value),
|
|
2812
|
+
static: props.static,
|
|
2813
|
+
},
|
|
2814
|
+
);
|
|
2815
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2607
2816
|
return node;
|
|
2608
2817
|
}
|
|
2609
2818
|
|
|
2610
2819
|
export function ObjectTypeIndexer(props: {
|
|
2611
|
-
|
|
2820
|
+
...ObjectTypeIndexerProps,
|
|
2612
2821
|
+parent?: ESNode,
|
|
2613
2822
|
}): DetachedNode<ObjectTypeIndexerType> {
|
|
2614
|
-
const node = detachedProps<ObjectTypeIndexerType>(
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2823
|
+
const node = detachedProps<ObjectTypeIndexerType>(
|
|
2824
|
+
(props.parent: $FlowFixMe),
|
|
2825
|
+
{
|
|
2826
|
+
type: 'ObjectTypeIndexer',
|
|
2827
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2828
|
+
key: asDetachedNodeForCodeGen(props.key),
|
|
2829
|
+
value: asDetachedNodeForCodeGen(props.value),
|
|
2830
|
+
static: props.static,
|
|
2831
|
+
variance: asDetachedNodeForCodeGen(props.variance),
|
|
2832
|
+
},
|
|
2833
|
+
);
|
|
2834
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2623
2835
|
return node;
|
|
2624
2836
|
}
|
|
2625
2837
|
|
|
2626
2838
|
export function ObjectTypeInternalSlot(props: {
|
|
2627
|
-
|
|
2839
|
+
...ObjectTypeInternalSlotProps,
|
|
2628
2840
|
+parent?: ESNode,
|
|
2629
2841
|
}): DetachedNode<ObjectTypeInternalSlotType> {
|
|
2630
|
-
const node = detachedProps<ObjectTypeInternalSlotType>(
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2842
|
+
const node = detachedProps<ObjectTypeInternalSlotType>(
|
|
2843
|
+
(props.parent: $FlowFixMe),
|
|
2844
|
+
{
|
|
2845
|
+
type: 'ObjectTypeInternalSlot',
|
|
2846
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2847
|
+
value: asDetachedNodeForCodeGen(props.value),
|
|
2848
|
+
optional: props.optional,
|
|
2849
|
+
static: props.static,
|
|
2850
|
+
method: props.method,
|
|
2851
|
+
},
|
|
2852
|
+
);
|
|
2853
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2639
2854
|
return node;
|
|
2640
2855
|
}
|
|
2641
2856
|
|
|
2642
2857
|
export function ObjectTypeMappedTypeProperty(props: {
|
|
2643
|
-
|
|
2858
|
+
...ObjectTypeMappedTypePropertyProps,
|
|
2644
2859
|
+parent?: ESNode,
|
|
2645
2860
|
}): DetachedNode<ObjectTypeMappedTypePropertyType> {
|
|
2646
|
-
const node = detachedProps<ObjectTypeMappedTypePropertyType>(
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2861
|
+
const node = detachedProps<ObjectTypeMappedTypePropertyType>(
|
|
2862
|
+
(props.parent: $FlowFixMe),
|
|
2863
|
+
{
|
|
2864
|
+
type: 'ObjectTypeMappedTypeProperty',
|
|
2865
|
+
keyTparam: asDetachedNodeForCodeGen(props.keyTparam),
|
|
2866
|
+
propType: asDetachedNodeForCodeGen(props.propType),
|
|
2867
|
+
sourceType: asDetachedNodeForCodeGen(props.sourceType),
|
|
2868
|
+
variance: asDetachedNodeForCodeGen(props.variance),
|
|
2869
|
+
optional: props.optional,
|
|
2870
|
+
},
|
|
2871
|
+
);
|
|
2872
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2655
2873
|
return node;
|
|
2656
2874
|
}
|
|
2657
2875
|
|
|
2658
2876
|
export function ObjectTypeSpreadProperty(props: {
|
|
2659
|
-
|
|
2877
|
+
...ObjectTypeSpreadPropertyProps,
|
|
2660
2878
|
+parent?: ESNode,
|
|
2661
2879
|
}): DetachedNode<ObjectTypeSpreadPropertyType> {
|
|
2662
|
-
const node = detachedProps<ObjectTypeSpreadPropertyType>(
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2880
|
+
const node = detachedProps<ObjectTypeSpreadPropertyType>(
|
|
2881
|
+
(props.parent: $FlowFixMe),
|
|
2882
|
+
{
|
|
2883
|
+
type: 'ObjectTypeSpreadProperty',
|
|
2884
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2885
|
+
},
|
|
2886
|
+
);
|
|
2887
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2667
2888
|
return node;
|
|
2668
2889
|
}
|
|
2669
2890
|
|
|
2670
2891
|
export function OpaqueType(props: {
|
|
2671
|
-
|
|
2892
|
+
...OpaqueTypeProps,
|
|
2672
2893
|
+parent?: ESNode,
|
|
2673
2894
|
}): DetachedNode<OpaqueTypeType> {
|
|
2674
|
-
const node = detachedProps<OpaqueTypeType>(props.parent, {
|
|
2895
|
+
const node = detachedProps<OpaqueTypeType>((props.parent: $FlowFixMe), {
|
|
2675
2896
|
type: 'OpaqueType',
|
|
2676
2897
|
id: asDetachedNodeForCodeGen(props.id),
|
|
2677
2898
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
2678
2899
|
impltype: asDetachedNodeForCodeGen(props.impltype),
|
|
2679
2900
|
supertype: asDetachedNodeForCodeGen(props.supertype),
|
|
2680
2901
|
});
|
|
2681
|
-
setParentPointersInDirectChildren(node);
|
|
2902
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2682
2903
|
return node;
|
|
2683
2904
|
}
|
|
2684
2905
|
|
|
2685
2906
|
export function OptionalIndexedAccessType(props: {
|
|
2686
|
-
|
|
2907
|
+
...OptionalIndexedAccessTypeProps,
|
|
2687
2908
|
+parent?: ESNode,
|
|
2688
2909
|
}): DetachedNode<OptionalIndexedAccessTypeType> {
|
|
2689
|
-
const node = detachedProps<OptionalIndexedAccessTypeType>(
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2910
|
+
const node = detachedProps<OptionalIndexedAccessTypeType>(
|
|
2911
|
+
(props.parent: $FlowFixMe),
|
|
2912
|
+
{
|
|
2913
|
+
type: 'OptionalIndexedAccessType',
|
|
2914
|
+
objectType: asDetachedNodeForCodeGen(props.objectType),
|
|
2915
|
+
indexType: asDetachedNodeForCodeGen(props.indexType),
|
|
2916
|
+
optional: props.optional,
|
|
2917
|
+
},
|
|
2918
|
+
);
|
|
2919
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2696
2920
|
return node;
|
|
2697
2921
|
}
|
|
2698
2922
|
|
|
2699
2923
|
export function PrivateIdentifier(props: {
|
|
2700
|
-
|
|
2924
|
+
...PrivateIdentifierProps,
|
|
2701
2925
|
+parent?: ESNode,
|
|
2702
2926
|
}): DetachedNode<PrivateIdentifierType> {
|
|
2703
|
-
const node = detachedProps<PrivateIdentifierType>(
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2927
|
+
const node = detachedProps<PrivateIdentifierType>(
|
|
2928
|
+
(props.parent: $FlowFixMe),
|
|
2929
|
+
{
|
|
2930
|
+
type: 'PrivateIdentifier',
|
|
2931
|
+
name: props.name,
|
|
2932
|
+
},
|
|
2933
|
+
);
|
|
2934
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2708
2935
|
return node;
|
|
2709
2936
|
}
|
|
2710
2937
|
|
|
2711
2938
|
export function Property(props: {
|
|
2712
|
-
|
|
2939
|
+
...PropertyProps,
|
|
2713
2940
|
+parent?: ESNode,
|
|
2714
2941
|
}): DetachedNode<PropertyType> {
|
|
2715
|
-
const node = detachedProps<PropertyType>(props.parent, {
|
|
2942
|
+
const node = detachedProps<PropertyType>((props.parent: $FlowFixMe), {
|
|
2716
2943
|
type: 'Property',
|
|
2717
2944
|
key: asDetachedNodeForCodeGen(props.key),
|
|
2718
2945
|
value: asDetachedNodeForCodeGen(props.value),
|
|
@@ -2721,113 +2948,128 @@ export function Property(props: {
|
|
|
2721
2948
|
method: props.method,
|
|
2722
2949
|
shorthand: props.shorthand,
|
|
2723
2950
|
});
|
|
2724
|
-
setParentPointersInDirectChildren(node);
|
|
2951
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2725
2952
|
return node;
|
|
2726
2953
|
}
|
|
2727
2954
|
|
|
2728
2955
|
export function PropertyDefinition(props: {
|
|
2729
|
-
|
|
2956
|
+
...PropertyDefinitionProps,
|
|
2730
2957
|
+parent?: ESNode,
|
|
2731
2958
|
}): DetachedNode<PropertyDefinitionType> {
|
|
2732
|
-
const node = detachedProps<PropertyDefinitionType>(
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2959
|
+
const node = detachedProps<PropertyDefinitionType>(
|
|
2960
|
+
(props.parent: $FlowFixMe),
|
|
2961
|
+
{
|
|
2962
|
+
type: 'PropertyDefinition',
|
|
2963
|
+
key: asDetachedNodeForCodeGen(props.key),
|
|
2964
|
+
value: asDetachedNodeForCodeGen(props.value),
|
|
2965
|
+
computed: props.computed,
|
|
2966
|
+
static: props.static,
|
|
2967
|
+
declare: props.declare,
|
|
2968
|
+
optional: props.optional,
|
|
2969
|
+
variance: asDetachedNodeForCodeGen(props.variance),
|
|
2970
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
2971
|
+
},
|
|
2972
|
+
);
|
|
2973
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2744
2974
|
return node;
|
|
2745
2975
|
}
|
|
2746
2976
|
|
|
2747
2977
|
export function QualifiedTypeIdentifier(props: {
|
|
2748
|
-
|
|
2978
|
+
...QualifiedTypeIdentifierProps,
|
|
2749
2979
|
+parent?: ESNode,
|
|
2750
2980
|
}): DetachedNode<QualifiedTypeIdentifierType> {
|
|
2751
|
-
const node = detachedProps<QualifiedTypeIdentifierType>(
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2981
|
+
const node = detachedProps<QualifiedTypeIdentifierType>(
|
|
2982
|
+
(props.parent: $FlowFixMe),
|
|
2983
|
+
{
|
|
2984
|
+
type: 'QualifiedTypeIdentifier',
|
|
2985
|
+
qualification: asDetachedNodeForCodeGen(props.qualification),
|
|
2986
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2987
|
+
},
|
|
2988
|
+
);
|
|
2989
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2757
2990
|
return node;
|
|
2758
2991
|
}
|
|
2759
2992
|
|
|
2760
2993
|
export function QualifiedTypeofIdentifier(props: {
|
|
2761
|
-
|
|
2994
|
+
...QualifiedTypeofIdentifierProps,
|
|
2762
2995
|
+parent?: ESNode,
|
|
2763
2996
|
}): DetachedNode<QualifiedTypeofIdentifierType> {
|
|
2764
|
-
const node = detachedProps<QualifiedTypeofIdentifierType>(
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2997
|
+
const node = detachedProps<QualifiedTypeofIdentifierType>(
|
|
2998
|
+
(props.parent: $FlowFixMe),
|
|
2999
|
+
{
|
|
3000
|
+
type: 'QualifiedTypeofIdentifier',
|
|
3001
|
+
qualification: asDetachedNodeForCodeGen(props.qualification),
|
|
3002
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
3003
|
+
},
|
|
3004
|
+
);
|
|
3005
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2770
3006
|
return node;
|
|
2771
3007
|
}
|
|
2772
3008
|
|
|
2773
3009
|
export function RestElement(props: {
|
|
2774
|
-
|
|
3010
|
+
...RestElementProps,
|
|
2775
3011
|
+parent?: ESNode,
|
|
2776
3012
|
}): DetachedNode<RestElementType> {
|
|
2777
|
-
const node = detachedProps<RestElementType>(props.parent, {
|
|
3013
|
+
const node = detachedProps<RestElementType>((props.parent: $FlowFixMe), {
|
|
2778
3014
|
type: 'RestElement',
|
|
2779
3015
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2780
3016
|
});
|
|
2781
|
-
setParentPointersInDirectChildren(node);
|
|
3017
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2782
3018
|
return node;
|
|
2783
3019
|
}
|
|
2784
3020
|
|
|
2785
3021
|
export function ReturnStatement(props: {
|
|
2786
|
-
|
|
3022
|
+
...ReturnStatementProps,
|
|
2787
3023
|
+parent?: ESNode,
|
|
2788
3024
|
}): DetachedNode<ReturnStatementType> {
|
|
2789
|
-
const node = detachedProps<ReturnStatementType>(props.parent, {
|
|
3025
|
+
const node = detachedProps<ReturnStatementType>((props.parent: $FlowFixMe), {
|
|
2790
3026
|
type: 'ReturnStatement',
|
|
2791
3027
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2792
3028
|
});
|
|
2793
|
-
setParentPointersInDirectChildren(node);
|
|
3029
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2794
3030
|
return node;
|
|
2795
3031
|
}
|
|
2796
3032
|
|
|
2797
3033
|
export function SequenceExpression(props: {
|
|
2798
|
-
|
|
3034
|
+
...SequenceExpressionProps,
|
|
2799
3035
|
+parent?: ESNode,
|
|
2800
3036
|
}): DetachedNode<SequenceExpressionType> {
|
|
2801
|
-
const node = detachedProps<SequenceExpressionType>(
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
3037
|
+
const node = detachedProps<SequenceExpressionType>(
|
|
3038
|
+
(props.parent: $FlowFixMe),
|
|
3039
|
+
{
|
|
3040
|
+
type: 'SequenceExpression',
|
|
3041
|
+
expressions: props.expressions.map(n => asDetachedNodeForCodeGen(n)),
|
|
3042
|
+
},
|
|
3043
|
+
);
|
|
3044
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2806
3045
|
return node;
|
|
2807
3046
|
}
|
|
2808
3047
|
|
|
2809
3048
|
export function SpreadElement(props: {
|
|
2810
|
-
|
|
3049
|
+
...SpreadElementProps,
|
|
2811
3050
|
+parent?: ESNode,
|
|
2812
3051
|
}): DetachedNode<SpreadElementType> {
|
|
2813
|
-
const node = detachedProps<SpreadElementType>(props.parent, {
|
|
3052
|
+
const node = detachedProps<SpreadElementType>((props.parent: $FlowFixMe), {
|
|
2814
3053
|
type: 'SpreadElement',
|
|
2815
3054
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2816
3055
|
});
|
|
2817
|
-
setParentPointersInDirectChildren(node);
|
|
3056
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2818
3057
|
return node;
|
|
2819
3058
|
}
|
|
2820
3059
|
|
|
2821
3060
|
export function StringLiteralTypeAnnotation(props: {
|
|
2822
|
-
|
|
3061
|
+
...StringLiteralTypeAnnotationProps,
|
|
2823
3062
|
+parent?: ESNode,
|
|
2824
3063
|
}): DetachedNode<StringLiteralTypeAnnotationType> {
|
|
2825
|
-
const node = detachedProps<StringLiteralTypeAnnotationType>(
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
3064
|
+
const node = detachedProps<StringLiteralTypeAnnotationType>(
|
|
3065
|
+
(props.parent: $FlowFixMe),
|
|
3066
|
+
{
|
|
3067
|
+
type: 'StringLiteralTypeAnnotation',
|
|
3068
|
+
value: props.value,
|
|
3069
|
+
raw: props.raw,
|
|
3070
|
+
},
|
|
3071
|
+
);
|
|
3072
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2831
3073
|
return node;
|
|
2832
3074
|
}
|
|
2833
3075
|
|
|
@@ -2836,7 +3078,7 @@ export function StringTypeAnnotation(
|
|
|
2836
3078
|
+parent?: ESNode,
|
|
2837
3079
|
} = {...null},
|
|
2838
3080
|
): DetachedNode<StringTypeAnnotationType> {
|
|
2839
|
-
return detachedProps<StringTypeAnnotationType>(props.parent, {
|
|
3081
|
+
return detachedProps<StringTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
2840
3082
|
type: 'StringTypeAnnotation',
|
|
2841
3083
|
});
|
|
2842
3084
|
}
|
|
@@ -2846,34 +3088,34 @@ export function Super(
|
|
|
2846
3088
|
+parent?: ESNode,
|
|
2847
3089
|
} = {...null},
|
|
2848
3090
|
): DetachedNode<SuperType> {
|
|
2849
|
-
return detachedProps<SuperType>(props.parent, {
|
|
3091
|
+
return detachedProps<SuperType>((props.parent: $FlowFixMe), {
|
|
2850
3092
|
type: 'Super',
|
|
2851
3093
|
});
|
|
2852
3094
|
}
|
|
2853
3095
|
|
|
2854
3096
|
export function SwitchCase(props: {
|
|
2855
|
-
|
|
3097
|
+
...SwitchCaseProps,
|
|
2856
3098
|
+parent?: ESNode,
|
|
2857
3099
|
}): DetachedNode<SwitchCaseType> {
|
|
2858
|
-
const node = detachedProps<SwitchCaseType>(props.parent, {
|
|
3100
|
+
const node = detachedProps<SwitchCaseType>((props.parent: $FlowFixMe), {
|
|
2859
3101
|
type: 'SwitchCase',
|
|
2860
3102
|
test: asDetachedNodeForCodeGen(props.test),
|
|
2861
3103
|
consequent: props.consequent.map(n => asDetachedNodeForCodeGen(n)),
|
|
2862
3104
|
});
|
|
2863
|
-
setParentPointersInDirectChildren(node);
|
|
3105
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2864
3106
|
return node;
|
|
2865
3107
|
}
|
|
2866
3108
|
|
|
2867
3109
|
export function SwitchStatement(props: {
|
|
2868
|
-
|
|
3110
|
+
...SwitchStatementProps,
|
|
2869
3111
|
+parent?: ESNode,
|
|
2870
3112
|
}): DetachedNode<SwitchStatementType> {
|
|
2871
|
-
const node = detachedProps<SwitchStatementType>(props.parent, {
|
|
3113
|
+
const node = detachedProps<SwitchStatementType>((props.parent: $FlowFixMe), {
|
|
2872
3114
|
type: 'SwitchStatement',
|
|
2873
3115
|
discriminant: asDetachedNodeForCodeGen(props.discriminant),
|
|
2874
3116
|
cases: props.cases.map(n => asDetachedNodeForCodeGen(n)),
|
|
2875
3117
|
});
|
|
2876
|
-
setParentPointersInDirectChildren(node);
|
|
3118
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2877
3119
|
return node;
|
|
2878
3120
|
}
|
|
2879
3121
|
|
|
@@ -2882,34 +3124,37 @@ export function SymbolTypeAnnotation(
|
|
|
2882
3124
|
+parent?: ESNode,
|
|
2883
3125
|
} = {...null},
|
|
2884
3126
|
): DetachedNode<SymbolTypeAnnotationType> {
|
|
2885
|
-
return detachedProps<SymbolTypeAnnotationType>(props.parent, {
|
|
3127
|
+
return detachedProps<SymbolTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
2886
3128
|
type: 'SymbolTypeAnnotation',
|
|
2887
3129
|
});
|
|
2888
3130
|
}
|
|
2889
3131
|
|
|
2890
3132
|
export function TaggedTemplateExpression(props: {
|
|
2891
|
-
|
|
3133
|
+
...TaggedTemplateExpressionProps,
|
|
2892
3134
|
+parent?: ESNode,
|
|
2893
3135
|
}): DetachedNode<TaggedTemplateExpressionType> {
|
|
2894
|
-
const node = detachedProps<TaggedTemplateExpressionType>(
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
3136
|
+
const node = detachedProps<TaggedTemplateExpressionType>(
|
|
3137
|
+
(props.parent: $FlowFixMe),
|
|
3138
|
+
{
|
|
3139
|
+
type: 'TaggedTemplateExpression',
|
|
3140
|
+
tag: asDetachedNodeForCodeGen(props.tag),
|
|
3141
|
+
quasi: asDetachedNodeForCodeGen(props.quasi),
|
|
3142
|
+
},
|
|
3143
|
+
);
|
|
3144
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2900
3145
|
return node;
|
|
2901
3146
|
}
|
|
2902
3147
|
|
|
2903
3148
|
export function TemplateLiteral(props: {
|
|
2904
|
-
|
|
3149
|
+
...TemplateLiteralProps,
|
|
2905
3150
|
+parent?: ESNode,
|
|
2906
3151
|
}): DetachedNode<TemplateLiteralType> {
|
|
2907
|
-
const node = detachedProps<TemplateLiteralType>(props.parent, {
|
|
3152
|
+
const node = detachedProps<TemplateLiteralType>((props.parent: $FlowFixMe), {
|
|
2908
3153
|
type: 'TemplateLiteral',
|
|
2909
3154
|
quasis: props.quasis.map(n => asDetachedNodeForCodeGen(n)),
|
|
2910
3155
|
expressions: props.expressions.map(n => asDetachedNodeForCodeGen(n)),
|
|
2911
3156
|
});
|
|
2912
|
-
setParentPointersInDirectChildren(node);
|
|
3157
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2913
3158
|
return node;
|
|
2914
3159
|
}
|
|
2915
3160
|
|
|
@@ -2918,7 +3163,7 @@ export function ThisExpression(
|
|
|
2918
3163
|
+parent?: ESNode,
|
|
2919
3164
|
} = {...null},
|
|
2920
3165
|
): DetachedNode<ThisExpressionType> {
|
|
2921
|
-
return detachedProps<ThisExpressionType>(props.parent, {
|
|
3166
|
+
return detachedProps<ThisExpressionType>((props.parent: $FlowFixMe), {
|
|
2922
3167
|
type: 'ThisExpression',
|
|
2923
3168
|
});
|
|
2924
3169
|
}
|
|
@@ -2928,147 +3173,163 @@ export function ThisTypeAnnotation(
|
|
|
2928
3173
|
+parent?: ESNode,
|
|
2929
3174
|
} = {...null},
|
|
2930
3175
|
): DetachedNode<ThisTypeAnnotationType> {
|
|
2931
|
-
return detachedProps<ThisTypeAnnotationType>(props.parent, {
|
|
3176
|
+
return detachedProps<ThisTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
2932
3177
|
type: 'ThisTypeAnnotation',
|
|
2933
3178
|
});
|
|
2934
3179
|
}
|
|
2935
3180
|
|
|
2936
3181
|
export function ThrowStatement(props: {
|
|
2937
|
-
|
|
3182
|
+
...ThrowStatementProps,
|
|
2938
3183
|
+parent?: ESNode,
|
|
2939
3184
|
}): DetachedNode<ThrowStatementType> {
|
|
2940
|
-
const node = detachedProps<ThrowStatementType>(props.parent, {
|
|
3185
|
+
const node = detachedProps<ThrowStatementType>((props.parent: $FlowFixMe), {
|
|
2941
3186
|
type: 'ThrowStatement',
|
|
2942
3187
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2943
3188
|
});
|
|
2944
|
-
setParentPointersInDirectChildren(node);
|
|
3189
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2945
3190
|
return node;
|
|
2946
3191
|
}
|
|
2947
3192
|
|
|
2948
3193
|
export function TryStatement(props: {
|
|
2949
|
-
|
|
3194
|
+
...TryStatementProps,
|
|
2950
3195
|
+parent?: ESNode,
|
|
2951
3196
|
}): DetachedNode<TryStatementType> {
|
|
2952
|
-
const node = detachedProps<TryStatementType>(props.parent, {
|
|
3197
|
+
const node = detachedProps<TryStatementType>((props.parent: $FlowFixMe), {
|
|
2953
3198
|
type: 'TryStatement',
|
|
2954
3199
|
block: asDetachedNodeForCodeGen(props.block),
|
|
2955
3200
|
handler: asDetachedNodeForCodeGen(props.handler),
|
|
2956
3201
|
finalizer: asDetachedNodeForCodeGen(props.finalizer),
|
|
2957
3202
|
});
|
|
2958
|
-
setParentPointersInDirectChildren(node);
|
|
3203
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2959
3204
|
return node;
|
|
2960
3205
|
}
|
|
2961
3206
|
|
|
2962
3207
|
export function TupleTypeAnnotation(props: {
|
|
2963
|
-
|
|
3208
|
+
...TupleTypeAnnotationProps,
|
|
2964
3209
|
+parent?: ESNode,
|
|
2965
3210
|
}): DetachedNode<TupleTypeAnnotationType> {
|
|
2966
|
-
const node = detachedProps<TupleTypeAnnotationType>(
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
3211
|
+
const node = detachedProps<TupleTypeAnnotationType>(
|
|
3212
|
+
(props.parent: $FlowFixMe),
|
|
3213
|
+
{
|
|
3214
|
+
type: 'TupleTypeAnnotation',
|
|
3215
|
+
types: props.types.map(n => asDetachedNodeForCodeGen(n)),
|
|
3216
|
+
inexact: props.inexact,
|
|
3217
|
+
},
|
|
3218
|
+
);
|
|
3219
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2971
3220
|
return node;
|
|
2972
3221
|
}
|
|
2973
3222
|
|
|
2974
3223
|
export function TupleTypeLabeledElement(props: {
|
|
2975
|
-
|
|
3224
|
+
...TupleTypeLabeledElementProps,
|
|
2976
3225
|
+parent?: ESNode,
|
|
2977
3226
|
}): DetachedNode<TupleTypeLabeledElementType> {
|
|
2978
|
-
const node = detachedProps<TupleTypeLabeledElementType>(
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
3227
|
+
const node = detachedProps<TupleTypeLabeledElementType>(
|
|
3228
|
+
(props.parent: $FlowFixMe),
|
|
3229
|
+
{
|
|
3230
|
+
type: 'TupleTypeLabeledElement',
|
|
3231
|
+
label: asDetachedNodeForCodeGen(props.label),
|
|
3232
|
+
elementType: asDetachedNodeForCodeGen(props.elementType),
|
|
3233
|
+
optional: props.optional,
|
|
3234
|
+
variance: asDetachedNodeForCodeGen(props.variance),
|
|
3235
|
+
},
|
|
3236
|
+
);
|
|
3237
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2986
3238
|
return node;
|
|
2987
3239
|
}
|
|
2988
3240
|
|
|
2989
3241
|
export function TupleTypeSpreadElement(props: {
|
|
2990
|
-
|
|
3242
|
+
...TupleTypeSpreadElementProps,
|
|
2991
3243
|
+parent?: ESNode,
|
|
2992
3244
|
}): DetachedNode<TupleTypeSpreadElementType> {
|
|
2993
|
-
const node = detachedProps<TupleTypeSpreadElementType>(
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
3245
|
+
const node = detachedProps<TupleTypeSpreadElementType>(
|
|
3246
|
+
(props.parent: $FlowFixMe),
|
|
3247
|
+
{
|
|
3248
|
+
type: 'TupleTypeSpreadElement',
|
|
3249
|
+
label: asDetachedNodeForCodeGen(props.label),
|
|
3250
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
3251
|
+
},
|
|
3252
|
+
);
|
|
3253
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2999
3254
|
return node;
|
|
3000
3255
|
}
|
|
3001
3256
|
|
|
3002
3257
|
export function TypeAlias(props: {
|
|
3003
|
-
|
|
3258
|
+
...TypeAliasProps,
|
|
3004
3259
|
+parent?: ESNode,
|
|
3005
3260
|
}): DetachedNode<TypeAliasType> {
|
|
3006
|
-
const node = detachedProps<TypeAliasType>(props.parent, {
|
|
3261
|
+
const node = detachedProps<TypeAliasType>((props.parent: $FlowFixMe), {
|
|
3007
3262
|
type: 'TypeAlias',
|
|
3008
3263
|
id: asDetachedNodeForCodeGen(props.id),
|
|
3009
3264
|
typeParameters: asDetachedNodeForCodeGen(props.typeParameters),
|
|
3010
3265
|
right: asDetachedNodeForCodeGen(props.right),
|
|
3011
3266
|
});
|
|
3012
|
-
setParentPointersInDirectChildren(node);
|
|
3267
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3013
3268
|
return node;
|
|
3014
3269
|
}
|
|
3015
3270
|
|
|
3016
3271
|
export function TypeAnnotation(props: {
|
|
3017
|
-
|
|
3272
|
+
...TypeAnnotationProps,
|
|
3018
3273
|
+parent?: ESNode,
|
|
3019
3274
|
}): DetachedNode<TypeAnnotationType> {
|
|
3020
|
-
const node = detachedProps<TypeAnnotationType>(props.parent, {
|
|
3275
|
+
const node = detachedProps<TypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
3021
3276
|
type: 'TypeAnnotation',
|
|
3022
3277
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
3023
3278
|
});
|
|
3024
|
-
setParentPointersInDirectChildren(node);
|
|
3279
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3025
3280
|
return node;
|
|
3026
3281
|
}
|
|
3027
3282
|
|
|
3028
3283
|
export function TypeCastExpression(props: {
|
|
3029
|
-
|
|
3284
|
+
...TypeCastExpressionProps,
|
|
3030
3285
|
+parent?: ESNode,
|
|
3031
3286
|
}): DetachedNode<TypeCastExpressionType> {
|
|
3032
|
-
const node = detachedProps<TypeCastExpressionType>(
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3287
|
+
const node = detachedProps<TypeCastExpressionType>(
|
|
3288
|
+
(props.parent: $FlowFixMe),
|
|
3289
|
+
{
|
|
3290
|
+
type: 'TypeCastExpression',
|
|
3291
|
+
expression: asDetachedNodeForCodeGen(props.expression),
|
|
3292
|
+
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
3293
|
+
},
|
|
3294
|
+
);
|
|
3295
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3038
3296
|
return node;
|
|
3039
3297
|
}
|
|
3040
3298
|
|
|
3041
3299
|
export function TypeofTypeAnnotation(props: {
|
|
3042
|
-
|
|
3300
|
+
...TypeofTypeAnnotationProps,
|
|
3043
3301
|
+parent?: ESNode,
|
|
3044
3302
|
}): DetachedNode<TypeofTypeAnnotationType> {
|
|
3045
|
-
const node = detachedProps<TypeofTypeAnnotationType>(
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3303
|
+
const node = detachedProps<TypeofTypeAnnotationType>(
|
|
3304
|
+
(props.parent: $FlowFixMe),
|
|
3305
|
+
{
|
|
3306
|
+
type: 'TypeofTypeAnnotation',
|
|
3307
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
3308
|
+
typeArguments: asDetachedNodeForCodeGen(props.typeArguments),
|
|
3309
|
+
},
|
|
3310
|
+
);
|
|
3311
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3051
3312
|
return node;
|
|
3052
3313
|
}
|
|
3053
3314
|
|
|
3054
3315
|
export function TypeOperator(props: {
|
|
3055
|
-
|
|
3316
|
+
...TypeOperatorProps,
|
|
3056
3317
|
+parent?: ESNode,
|
|
3057
3318
|
}): DetachedNode<TypeOperatorType> {
|
|
3058
|
-
const node = detachedProps<TypeOperatorType>(props.parent, {
|
|
3319
|
+
const node = detachedProps<TypeOperatorType>((props.parent: $FlowFixMe), {
|
|
3059
3320
|
type: 'TypeOperator',
|
|
3060
3321
|
operator: props.operator,
|
|
3061
3322
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
3062
3323
|
});
|
|
3063
|
-
setParentPointersInDirectChildren(node);
|
|
3324
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3064
3325
|
return node;
|
|
3065
3326
|
}
|
|
3066
3327
|
|
|
3067
3328
|
export function TypeParameter(props: {
|
|
3068
|
-
|
|
3329
|
+
...TypeParameterProps,
|
|
3069
3330
|
+parent?: ESNode,
|
|
3070
3331
|
}): DetachedNode<TypeParameterType> {
|
|
3071
|
-
const node = detachedProps<TypeParameterType>(props.parent, {
|
|
3332
|
+
const node = detachedProps<TypeParameterType>((props.parent: $FlowFixMe), {
|
|
3072
3333
|
type: 'TypeParameter',
|
|
3073
3334
|
name: props.name,
|
|
3074
3335
|
bound: asDetachedNodeForCodeGen(props.bound),
|
|
@@ -3076,123 +3337,138 @@ export function TypeParameter(props: {
|
|
|
3076
3337
|
default: asDetachedNodeForCodeGen(props.default),
|
|
3077
3338
|
usesExtendsBound: props.usesExtendsBound,
|
|
3078
3339
|
});
|
|
3079
|
-
setParentPointersInDirectChildren(node);
|
|
3340
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3080
3341
|
return node;
|
|
3081
3342
|
}
|
|
3082
3343
|
|
|
3083
3344
|
export function TypeParameterDeclaration(props: {
|
|
3084
|
-
|
|
3345
|
+
...TypeParameterDeclarationProps,
|
|
3085
3346
|
+parent?: ESNode,
|
|
3086
3347
|
}): DetachedNode<TypeParameterDeclarationType> {
|
|
3087
|
-
const node = detachedProps<TypeParameterDeclarationType>(
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3348
|
+
const node = detachedProps<TypeParameterDeclarationType>(
|
|
3349
|
+
(props.parent: $FlowFixMe),
|
|
3350
|
+
{
|
|
3351
|
+
type: 'TypeParameterDeclaration',
|
|
3352
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
3353
|
+
},
|
|
3354
|
+
);
|
|
3355
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3092
3356
|
return node;
|
|
3093
3357
|
}
|
|
3094
3358
|
|
|
3095
3359
|
export function TypeParameterInstantiation(props: {
|
|
3096
|
-
|
|
3360
|
+
...TypeParameterInstantiationProps,
|
|
3097
3361
|
+parent?: ESNode,
|
|
3098
3362
|
}): DetachedNode<TypeParameterInstantiationType> {
|
|
3099
|
-
const node = detachedProps<TypeParameterInstantiationType>(
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3363
|
+
const node = detachedProps<TypeParameterInstantiationType>(
|
|
3364
|
+
(props.parent: $FlowFixMe),
|
|
3365
|
+
{
|
|
3366
|
+
type: 'TypeParameterInstantiation',
|
|
3367
|
+
params: props.params.map(n => asDetachedNodeForCodeGen(n)),
|
|
3368
|
+
},
|
|
3369
|
+
);
|
|
3370
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3104
3371
|
return node;
|
|
3105
3372
|
}
|
|
3106
3373
|
|
|
3107
3374
|
export function TypePredicate(props: {
|
|
3108
|
-
|
|
3375
|
+
...TypePredicateProps,
|
|
3109
3376
|
+parent?: ESNode,
|
|
3110
3377
|
}): DetachedNode<TypePredicateType> {
|
|
3111
|
-
const node = detachedProps<TypePredicateType>(props.parent, {
|
|
3378
|
+
const node = detachedProps<TypePredicateType>((props.parent: $FlowFixMe), {
|
|
3112
3379
|
type: 'TypePredicate',
|
|
3113
3380
|
parameterName: asDetachedNodeForCodeGen(props.parameterName),
|
|
3114
3381
|
typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
|
|
3115
|
-
|
|
3382
|
+
kind: props.kind,
|
|
3116
3383
|
});
|
|
3117
|
-
setParentPointersInDirectChildren(node);
|
|
3384
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3118
3385
|
return node;
|
|
3119
3386
|
}
|
|
3120
3387
|
|
|
3121
3388
|
export function UnaryExpression(props: {
|
|
3122
|
-
|
|
3389
|
+
...UnaryExpressionProps,
|
|
3123
3390
|
+parent?: ESNode,
|
|
3124
3391
|
}): DetachedNode<UnaryExpressionType> {
|
|
3125
|
-
const node = detachedProps<UnaryExpressionType>(props.parent, {
|
|
3392
|
+
const node = detachedProps<UnaryExpressionType>((props.parent: $FlowFixMe), {
|
|
3126
3393
|
type: 'UnaryExpression',
|
|
3127
3394
|
operator: props.operator,
|
|
3128
3395
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
3129
3396
|
prefix: props.prefix,
|
|
3130
3397
|
});
|
|
3131
|
-
setParentPointersInDirectChildren(node);
|
|
3398
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3132
3399
|
return node;
|
|
3133
3400
|
}
|
|
3134
3401
|
|
|
3135
3402
|
export function UnionTypeAnnotation(props: {
|
|
3136
|
-
|
|
3403
|
+
...UnionTypeAnnotationProps,
|
|
3137
3404
|
+parent?: ESNode,
|
|
3138
3405
|
}): DetachedNode<UnionTypeAnnotationType> {
|
|
3139
|
-
const node = detachedProps<UnionTypeAnnotationType>(
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3406
|
+
const node = detachedProps<UnionTypeAnnotationType>(
|
|
3407
|
+
(props.parent: $FlowFixMe),
|
|
3408
|
+
{
|
|
3409
|
+
type: 'UnionTypeAnnotation',
|
|
3410
|
+
types: props.types.map(n => asDetachedNodeForCodeGen(n)),
|
|
3411
|
+
},
|
|
3412
|
+
);
|
|
3413
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3144
3414
|
return node;
|
|
3145
3415
|
}
|
|
3146
3416
|
|
|
3147
3417
|
export function UpdateExpression(props: {
|
|
3148
|
-
|
|
3418
|
+
...UpdateExpressionProps,
|
|
3149
3419
|
+parent?: ESNode,
|
|
3150
3420
|
}): DetachedNode<UpdateExpressionType> {
|
|
3151
|
-
const node = detachedProps<UpdateExpressionType>(props.parent, {
|
|
3421
|
+
const node = detachedProps<UpdateExpressionType>((props.parent: $FlowFixMe), {
|
|
3152
3422
|
type: 'UpdateExpression',
|
|
3153
3423
|
operator: props.operator,
|
|
3154
3424
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
3155
3425
|
prefix: props.prefix,
|
|
3156
3426
|
});
|
|
3157
|
-
setParentPointersInDirectChildren(node);
|
|
3427
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3158
3428
|
return node;
|
|
3159
3429
|
}
|
|
3160
3430
|
|
|
3161
3431
|
export function VariableDeclaration(props: {
|
|
3162
|
-
|
|
3432
|
+
...VariableDeclarationProps,
|
|
3163
3433
|
+parent?: ESNode,
|
|
3164
3434
|
}): DetachedNode<VariableDeclarationType> {
|
|
3165
|
-
const node = detachedProps<VariableDeclarationType>(
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3435
|
+
const node = detachedProps<VariableDeclarationType>(
|
|
3436
|
+
(props.parent: $FlowFixMe),
|
|
3437
|
+
{
|
|
3438
|
+
type: 'VariableDeclaration',
|
|
3439
|
+
kind: props.kind,
|
|
3440
|
+
declarations: props.declarations.map(n => asDetachedNodeForCodeGen(n)),
|
|
3441
|
+
},
|
|
3442
|
+
);
|
|
3443
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3171
3444
|
return node;
|
|
3172
3445
|
}
|
|
3173
3446
|
|
|
3174
3447
|
export function VariableDeclarator(props: {
|
|
3175
|
-
|
|
3448
|
+
...VariableDeclaratorProps,
|
|
3176
3449
|
+parent?: ESNode,
|
|
3177
3450
|
}): DetachedNode<VariableDeclaratorType> {
|
|
3178
|
-
const node = detachedProps<VariableDeclaratorType>(
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3451
|
+
const node = detachedProps<VariableDeclaratorType>(
|
|
3452
|
+
(props.parent: $FlowFixMe),
|
|
3453
|
+
{
|
|
3454
|
+
type: 'VariableDeclarator',
|
|
3455
|
+
init: asDetachedNodeForCodeGen(props.init),
|
|
3456
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
3457
|
+
},
|
|
3458
|
+
);
|
|
3459
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3184
3460
|
return node;
|
|
3185
3461
|
}
|
|
3186
3462
|
|
|
3187
3463
|
export function Variance(props: {
|
|
3188
|
-
|
|
3464
|
+
...VarianceProps,
|
|
3189
3465
|
+parent?: ESNode,
|
|
3190
3466
|
}): DetachedNode<VarianceType> {
|
|
3191
|
-
const node = detachedProps<VarianceType>(props.parent, {
|
|
3467
|
+
const node = detachedProps<VarianceType>((props.parent: $FlowFixMe), {
|
|
3192
3468
|
type: 'Variance',
|
|
3193
3469
|
kind: props.kind,
|
|
3194
3470
|
});
|
|
3195
|
-
setParentPointersInDirectChildren(node);
|
|
3471
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3196
3472
|
return node;
|
|
3197
3473
|
}
|
|
3198
3474
|
|
|
@@ -3201,47 +3477,47 @@ export function VoidTypeAnnotation(
|
|
|
3201
3477
|
+parent?: ESNode,
|
|
3202
3478
|
} = {...null},
|
|
3203
3479
|
): DetachedNode<VoidTypeAnnotationType> {
|
|
3204
|
-
return detachedProps<VoidTypeAnnotationType>(props.parent, {
|
|
3480
|
+
return detachedProps<VoidTypeAnnotationType>((props.parent: $FlowFixMe), {
|
|
3205
3481
|
type: 'VoidTypeAnnotation',
|
|
3206
3482
|
});
|
|
3207
3483
|
}
|
|
3208
3484
|
|
|
3209
3485
|
export function WhileStatement(props: {
|
|
3210
|
-
|
|
3486
|
+
...WhileStatementProps,
|
|
3211
3487
|
+parent?: ESNode,
|
|
3212
3488
|
}): DetachedNode<WhileStatementType> {
|
|
3213
|
-
const node = detachedProps<WhileStatementType>(props.parent, {
|
|
3489
|
+
const node = detachedProps<WhileStatementType>((props.parent: $FlowFixMe), {
|
|
3214
3490
|
type: 'WhileStatement',
|
|
3215
3491
|
body: asDetachedNodeForCodeGen(props.body),
|
|
3216
3492
|
test: asDetachedNodeForCodeGen(props.test),
|
|
3217
3493
|
});
|
|
3218
|
-
setParentPointersInDirectChildren(node);
|
|
3494
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3219
3495
|
return node;
|
|
3220
3496
|
}
|
|
3221
3497
|
|
|
3222
3498
|
export function WithStatement(props: {
|
|
3223
|
-
|
|
3499
|
+
...WithStatementProps,
|
|
3224
3500
|
+parent?: ESNode,
|
|
3225
3501
|
}): DetachedNode<WithStatementType> {
|
|
3226
|
-
const node = detachedProps<WithStatementType>(props.parent, {
|
|
3502
|
+
const node = detachedProps<WithStatementType>((props.parent: $FlowFixMe), {
|
|
3227
3503
|
type: 'WithStatement',
|
|
3228
3504
|
object: asDetachedNodeForCodeGen(props.object),
|
|
3229
3505
|
body: asDetachedNodeForCodeGen(props.body),
|
|
3230
3506
|
});
|
|
3231
|
-
setParentPointersInDirectChildren(node);
|
|
3507
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3232
3508
|
return node;
|
|
3233
3509
|
}
|
|
3234
3510
|
|
|
3235
3511
|
export function YieldExpression(props: {
|
|
3236
|
-
|
|
3512
|
+
...YieldExpressionProps,
|
|
3237
3513
|
+parent?: ESNode,
|
|
3238
3514
|
}): DetachedNode<YieldExpressionType> {
|
|
3239
|
-
const node = detachedProps<YieldExpressionType>(props.parent, {
|
|
3515
|
+
const node = detachedProps<YieldExpressionType>((props.parent: $FlowFixMe), {
|
|
3240
3516
|
type: 'YieldExpression',
|
|
3241
3517
|
argument: asDetachedNodeForCodeGen(props.argument),
|
|
3242
3518
|
delegate: props.delegate,
|
|
3243
3519
|
});
|
|
3244
|
-
setParentPointersInDirectChildren(node);
|
|
3520
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3245
3521
|
return node;
|
|
3246
3522
|
}
|
|
3247
3523
|
|