hermes-estree 0.32.1 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/HermesESTreeSelectorTypes.js.flow +262 -27
- package/dist/generated/predicates.js +120 -0
- package/dist/generated/predicates.js.flow +72 -0
- package/dist/predicates.js +2 -4
- package/dist/predicates.js.flow +5 -4
- package/dist/src/generated/predicates.js +120 -0
- package/dist/src/predicates.js +2 -4
- package/dist/types.js.flow +103 -11
- package/package.json +1 -1
- package/dist/HermesAST.js.flow +0 -57
- package/dist/HermesASTAdapter.js +0 -192
- package/dist/HermesASTAdapter.js.flow +0 -189
- package/dist/HermesParser.js +0 -108
- package/dist/HermesParser.js.flow +0 -161
- package/dist/HermesParserDecodeUTF8String.js +0 -68
- package/dist/HermesParserDecodeUTF8String.js.flow +0 -65
- package/dist/HermesParserDeserializer.js +0 -242
- package/dist/HermesParserDeserializer.js.flow +0 -260
- package/dist/HermesParserNodeDeserializers.js +0 -2477
- package/dist/HermesParserNodeDeserializers.js.flow +0 -16
- package/dist/HermesParserWASM.js +0 -6
- package/dist/HermesParserWASM.js.flow +0 -87
- package/dist/HermesToESTreeAdapter.js +0 -439
- package/dist/HermesToESTreeAdapter.js.flow +0 -421
- package/dist/ParserOptions.js +0 -18
- package/dist/ParserOptions.js.flow +0 -41
- package/dist/babel/TransformESTreeToBabel.js +0 -1123
- package/dist/babel/TransformESTreeToBabel.js.flow +0 -1277
- package/dist/estree/StripFlowTypes.js +0 -175
- package/dist/estree/StripFlowTypes.js.flow +0 -158
- package/dist/estree/StripFlowTypesForBabel.js +0 -215
- package/dist/estree/StripFlowTypesForBabel.js.flow +0 -216
- package/dist/estree/TransformComponentSyntax.js +0 -788
- package/dist/estree/TransformComponentSyntax.js.flow +0 -864
- package/dist/estree/TransformEnumSyntax.js +0 -106
- package/dist/estree/TransformEnumSyntax.js.flow +0 -125
- package/dist/estree/TransformMatchSyntax.js +0 -1006
- package/dist/estree/TransformMatchSyntax.js.flow +0 -912
- package/dist/generated/ESTreeVisitorKeys.js +0 -220
- package/dist/generated/ESTreeVisitorKeys.js.flow +0 -15
- package/dist/generated/ParserVisitorKeys.js +0 -794
- package/dist/generated/ParserVisitorKeys.js.flow +0 -17
- package/dist/getModuleDocblock.js +0 -112
- package/dist/getModuleDocblock.js.flow +0 -118
- package/dist/src/HermesASTAdapter.js +0 -192
- package/dist/src/HermesParser.js +0 -108
- package/dist/src/HermesParserDecodeUTF8String.js +0 -68
- package/dist/src/HermesParserDeserializer.js +0 -242
- package/dist/src/HermesParserNodeDeserializers.js +0 -2477
- package/dist/src/HermesToESTreeAdapter.js +0 -439
- package/dist/src/ParserOptions.js +0 -18
- package/dist/src/babel/TransformESTreeToBabel.js +0 -1123
- package/dist/src/estree/StripFlowTypes.js +0 -175
- package/dist/src/estree/StripFlowTypesForBabel.js +0 -215
- package/dist/src/estree/TransformComponentSyntax.js +0 -788
- package/dist/src/estree/TransformEnumSyntax.js +0 -106
- package/dist/src/estree/TransformMatchSyntax.js +0 -1006
- package/dist/src/generated/ESTreeVisitorKeys.js +0 -220
- package/dist/src/generated/ParserVisitorKeys.js +0 -794
- package/dist/src/getModuleDocblock.js +0 -112
- package/dist/src/transform/SimpleTransform.js +0 -136
- package/dist/src/transform/astArrayMutationHelpers.js +0 -62
- package/dist/src/transform/astNodeMutationHelpers.js +0 -200
- package/dist/src/traverse/SimpleTraverser.js +0 -137
- package/dist/src/traverse/getVisitorKeys.js +0 -37
- package/dist/src/utils/Builders.js +0 -191
- package/dist/src/utils/GenID.js +0 -41
- package/dist/src/utils/createSyntaxError.js +0 -25
- package/dist/src/utils/mutateESTreeASTForPrettier.js +0 -127
- package/dist/transform/SimpleTransform.js +0 -136
- package/dist/transform/SimpleTransform.js.flow +0 -169
- package/dist/transform/astArrayMutationHelpers.js +0 -62
- package/dist/transform/astArrayMutationHelpers.js.flow +0 -71
- package/dist/transform/astNodeMutationHelpers.js +0 -200
- package/dist/transform/astNodeMutationHelpers.js.flow +0 -246
- package/dist/traverse/SimpleTraverser.js +0 -137
- package/dist/traverse/SimpleTraverser.js.flow +0 -133
- package/dist/traverse/getVisitorKeys.js +0 -37
- package/dist/traverse/getVisitorKeys.js.flow +0 -36
- package/dist/utils/Builders.js +0 -191
- package/dist/utils/Builders.js.flow +0 -218
- package/dist/utils/GenID.js +0 -41
- package/dist/utils/GenID.js.flow +0 -38
- package/dist/utils/createSyntaxError.js +0 -25
- package/dist/utils/createSyntaxError.js.flow +0 -24
- package/dist/utils/mutateESTreeASTForPrettier.js +0 -127
- package/dist/utils/mutateESTreeASTForPrettier.js.flow +0 -130
|
@@ -147,6 +147,8 @@ import type {
|
|
|
147
147
|
MatchExpression,
|
|
148
148
|
MatchExpressionCase,
|
|
149
149
|
MatchIdentifierPattern,
|
|
150
|
+
MatchInstanceObjectPattern,
|
|
151
|
+
MatchInstancePattern,
|
|
150
152
|
MatchLiteralPattern,
|
|
151
153
|
MatchMemberPattern,
|
|
152
154
|
MatchObjectPattern,
|
|
@@ -161,6 +163,7 @@ import type {
|
|
|
161
163
|
MetaProperty,
|
|
162
164
|
MethodDefinition,
|
|
163
165
|
MixedTypeAnnotation,
|
|
166
|
+
NeverTypeAnnotation,
|
|
164
167
|
NewExpression,
|
|
165
168
|
NullableTypeAnnotation,
|
|
166
169
|
NullLiteralTypeAnnotation,
|
|
@@ -183,6 +186,13 @@ import type {
|
|
|
183
186
|
PropertyDefinition,
|
|
184
187
|
QualifiedTypeIdentifier,
|
|
185
188
|
QualifiedTypeofIdentifier,
|
|
189
|
+
RecordDeclaration,
|
|
190
|
+
RecordDeclarationBody,
|
|
191
|
+
RecordDeclarationImplements,
|
|
192
|
+
RecordDeclarationProperty,
|
|
193
|
+
RecordDeclarationStaticProperty,
|
|
194
|
+
RecordExpression,
|
|
195
|
+
RecordExpressionProperties,
|
|
186
196
|
RestElement,
|
|
187
197
|
ReturnStatement,
|
|
188
198
|
SequenceExpression,
|
|
@@ -214,7 +224,9 @@ import type {
|
|
|
214
224
|
TypeParameterInstantiation,
|
|
215
225
|
TypePredicate,
|
|
216
226
|
UnaryExpression,
|
|
227
|
+
UndefinedTypeAnnotation,
|
|
217
228
|
UnionTypeAnnotation,
|
|
229
|
+
UnknownTypeAnnotation,
|
|
218
230
|
UpdateExpression,
|
|
219
231
|
VariableDeclaration,
|
|
220
232
|
VariableDeclarator,
|
|
@@ -421,6 +433,8 @@ exports.isMatchBindingPattern = isMatchBindingPattern;
|
|
|
421
433
|
exports.isMatchExpression = isMatchExpression;
|
|
422
434
|
exports.isMatchExpressionCase = isMatchExpressionCase;
|
|
423
435
|
exports.isMatchIdentifierPattern = isMatchIdentifierPattern;
|
|
436
|
+
exports.isMatchInstanceObjectPattern = isMatchInstanceObjectPattern;
|
|
437
|
+
exports.isMatchInstancePattern = isMatchInstancePattern;
|
|
424
438
|
exports.isMatchLiteralPattern = isMatchLiteralPattern;
|
|
425
439
|
exports.isMatchMemberPattern = isMatchMemberPattern;
|
|
426
440
|
exports.isMatchObjectPattern = isMatchObjectPattern;
|
|
@@ -439,6 +453,7 @@ exports.isMinusToken = isMinusToken;
|
|
|
439
453
|
exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
|
|
440
454
|
exports.isModuleKeyword = isModuleKeyword;
|
|
441
455
|
exports.isMultiplyEqualToken = isMultiplyEqualToken;
|
|
456
|
+
exports.isNeverTypeAnnotation = isNeverTypeAnnotation;
|
|
442
457
|
exports.isNewExpression = isNewExpression;
|
|
443
458
|
exports.isNewToken = isNewToken;
|
|
444
459
|
exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
|
|
@@ -473,6 +488,13 @@ exports.isPropertyDefinition = isPropertyDefinition;
|
|
|
473
488
|
exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
|
|
474
489
|
exports.isQualifiedTypeofIdentifier = isQualifiedTypeofIdentifier;
|
|
475
490
|
exports.isQuestionMarkToken = isQuestionMarkToken;
|
|
491
|
+
exports.isRecordDeclaration = isRecordDeclaration;
|
|
492
|
+
exports.isRecordDeclarationBody = isRecordDeclarationBody;
|
|
493
|
+
exports.isRecordDeclarationImplements = isRecordDeclarationImplements;
|
|
494
|
+
exports.isRecordDeclarationProperty = isRecordDeclarationProperty;
|
|
495
|
+
exports.isRecordDeclarationStaticProperty = isRecordDeclarationStaticProperty;
|
|
496
|
+
exports.isRecordExpression = isRecordExpression;
|
|
497
|
+
exports.isRecordExpressionProperties = isRecordExpressionProperties;
|
|
476
498
|
exports.isRemainderEqualToken = isRemainderEqualToken;
|
|
477
499
|
exports.isRestElement = isRestElement;
|
|
478
500
|
exports.isReturnStatement = isReturnStatement;
|
|
@@ -519,8 +541,10 @@ exports.isTypePredicate = isTypePredicate;
|
|
|
519
541
|
exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
|
|
520
542
|
exports.isUnaryExpression = isUnaryExpression;
|
|
521
543
|
exports.isUnaryNegationToken = isUnaryNegationToken;
|
|
544
|
+
exports.isUndefinedTypeAnnotation = isUndefinedTypeAnnotation;
|
|
522
545
|
exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
|
|
523
546
|
exports.isUnionTypeToken = isUnionTypeToken;
|
|
547
|
+
exports.isUnknownTypeAnnotation = isUnknownTypeAnnotation;
|
|
524
548
|
exports.isUpdateExpression = isUpdateExpression;
|
|
525
549
|
exports.isVarToken = isVarToken;
|
|
526
550
|
exports.isVariableDeclaration = isVariableDeclaration;
|
|
@@ -1463,6 +1487,22 @@ function isMatchIdentifierPattern(node
|
|
|
1463
1487
|
return node.type === 'MatchIdentifierPattern';
|
|
1464
1488
|
}
|
|
1465
1489
|
|
|
1490
|
+
function isMatchInstanceObjectPattern(node
|
|
1491
|
+
/*: ESNode | Token */
|
|
1492
|
+
)
|
|
1493
|
+
/*: implies node is MatchInstanceObjectPattern */
|
|
1494
|
+
{
|
|
1495
|
+
return node.type === 'MatchInstanceObjectPattern';
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
function isMatchInstancePattern(node
|
|
1499
|
+
/*: ESNode | Token */
|
|
1500
|
+
)
|
|
1501
|
+
/*: implies node is MatchInstancePattern */
|
|
1502
|
+
{
|
|
1503
|
+
return node.type === 'MatchInstancePattern';
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1466
1506
|
function isMatchLiteralPattern(node
|
|
1467
1507
|
/*: ESNode | Token */
|
|
1468
1508
|
)
|
|
@@ -1575,6 +1615,14 @@ function isMixedTypeAnnotation(node
|
|
|
1575
1615
|
return node.type === 'MixedTypeAnnotation';
|
|
1576
1616
|
}
|
|
1577
1617
|
|
|
1618
|
+
function isNeverTypeAnnotation(node
|
|
1619
|
+
/*: ESNode | Token */
|
|
1620
|
+
)
|
|
1621
|
+
/*: implies node is NeverTypeAnnotation */
|
|
1622
|
+
{
|
|
1623
|
+
return node.type === 'NeverTypeAnnotation';
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1578
1626
|
function isNewExpression(node
|
|
1579
1627
|
/*: ESNode | Token */
|
|
1580
1628
|
)
|
|
@@ -1751,6 +1799,62 @@ function isQualifiedTypeofIdentifier(node
|
|
|
1751
1799
|
return node.type === 'QualifiedTypeofIdentifier';
|
|
1752
1800
|
}
|
|
1753
1801
|
|
|
1802
|
+
function isRecordDeclaration(node
|
|
1803
|
+
/*: ESNode | Token */
|
|
1804
|
+
)
|
|
1805
|
+
/*: implies node is RecordDeclaration */
|
|
1806
|
+
{
|
|
1807
|
+
return node.type === 'RecordDeclaration';
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
function isRecordDeclarationBody(node
|
|
1811
|
+
/*: ESNode | Token */
|
|
1812
|
+
)
|
|
1813
|
+
/*: implies node is RecordDeclarationBody */
|
|
1814
|
+
{
|
|
1815
|
+
return node.type === 'RecordDeclarationBody';
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
function isRecordDeclarationImplements(node
|
|
1819
|
+
/*: ESNode | Token */
|
|
1820
|
+
)
|
|
1821
|
+
/*: implies node is RecordDeclarationImplements */
|
|
1822
|
+
{
|
|
1823
|
+
return node.type === 'RecordDeclarationImplements';
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
function isRecordDeclarationProperty(node
|
|
1827
|
+
/*: ESNode | Token */
|
|
1828
|
+
)
|
|
1829
|
+
/*: implies node is RecordDeclarationProperty */
|
|
1830
|
+
{
|
|
1831
|
+
return node.type === 'RecordDeclarationProperty';
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
function isRecordDeclarationStaticProperty(node
|
|
1835
|
+
/*: ESNode | Token */
|
|
1836
|
+
)
|
|
1837
|
+
/*: implies node is RecordDeclarationStaticProperty */
|
|
1838
|
+
{
|
|
1839
|
+
return node.type === 'RecordDeclarationStaticProperty';
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
function isRecordExpression(node
|
|
1843
|
+
/*: ESNode | Token */
|
|
1844
|
+
)
|
|
1845
|
+
/*: implies node is RecordExpression */
|
|
1846
|
+
{
|
|
1847
|
+
return node.type === 'RecordExpression';
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
function isRecordExpressionProperties(node
|
|
1851
|
+
/*: ESNode | Token */
|
|
1852
|
+
)
|
|
1853
|
+
/*: implies node is RecordExpressionProperties */
|
|
1854
|
+
{
|
|
1855
|
+
return node.type === 'RecordExpressionProperties';
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1754
1858
|
function isRestElement(node
|
|
1755
1859
|
/*: ESNode | Token */
|
|
1756
1860
|
)
|
|
@@ -1999,6 +2103,14 @@ function isUnaryExpression(node
|
|
|
1999
2103
|
return node.type === 'UnaryExpression';
|
|
2000
2104
|
}
|
|
2001
2105
|
|
|
2106
|
+
function isUndefinedTypeAnnotation(node
|
|
2107
|
+
/*: ESNode | Token */
|
|
2108
|
+
)
|
|
2109
|
+
/*: implies node is UndefinedTypeAnnotation */
|
|
2110
|
+
{
|
|
2111
|
+
return node.type === 'UndefinedTypeAnnotation';
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2002
2114
|
function isUnionTypeAnnotation(node
|
|
2003
2115
|
/*: ESNode | Token */
|
|
2004
2116
|
)
|
|
@@ -2007,6 +2119,14 @@ function isUnionTypeAnnotation(node
|
|
|
2007
2119
|
return node.type === 'UnionTypeAnnotation';
|
|
2008
2120
|
}
|
|
2009
2121
|
|
|
2122
|
+
function isUnknownTypeAnnotation(node
|
|
2123
|
+
/*: ESNode | Token */
|
|
2124
|
+
)
|
|
2125
|
+
/*: implies node is UnknownTypeAnnotation */
|
|
2126
|
+
{
|
|
2127
|
+
return node.type === 'UnknownTypeAnnotation';
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2010
2130
|
function isUpdateExpression(node
|
|
2011
2131
|
/*: ESNode | Token */
|
|
2012
2132
|
)
|
|
@@ -148,6 +148,8 @@ import type {
|
|
|
148
148
|
MatchExpression,
|
|
149
149
|
MatchExpressionCase,
|
|
150
150
|
MatchIdentifierPattern,
|
|
151
|
+
MatchInstanceObjectPattern,
|
|
152
|
+
MatchInstancePattern,
|
|
151
153
|
MatchLiteralPattern,
|
|
152
154
|
MatchMemberPattern,
|
|
153
155
|
MatchObjectPattern,
|
|
@@ -162,6 +164,7 @@ import type {
|
|
|
162
164
|
MetaProperty,
|
|
163
165
|
MethodDefinition,
|
|
164
166
|
MixedTypeAnnotation,
|
|
167
|
+
NeverTypeAnnotation,
|
|
165
168
|
NewExpression,
|
|
166
169
|
NullableTypeAnnotation,
|
|
167
170
|
NullLiteralTypeAnnotation,
|
|
@@ -184,6 +187,13 @@ import type {
|
|
|
184
187
|
PropertyDefinition,
|
|
185
188
|
QualifiedTypeIdentifier,
|
|
186
189
|
QualifiedTypeofIdentifier,
|
|
190
|
+
RecordDeclaration,
|
|
191
|
+
RecordDeclarationBody,
|
|
192
|
+
RecordDeclarationImplements,
|
|
193
|
+
RecordDeclarationProperty,
|
|
194
|
+
RecordDeclarationStaticProperty,
|
|
195
|
+
RecordExpression,
|
|
196
|
+
RecordExpressionProperties,
|
|
187
197
|
RestElement,
|
|
188
198
|
ReturnStatement,
|
|
189
199
|
SequenceExpression,
|
|
@@ -215,7 +225,9 @@ import type {
|
|
|
215
225
|
TypeParameterInstantiation,
|
|
216
226
|
TypePredicate,
|
|
217
227
|
UnaryExpression,
|
|
228
|
+
UndefinedTypeAnnotation,
|
|
218
229
|
UnionTypeAnnotation,
|
|
230
|
+
UnknownTypeAnnotation,
|
|
219
231
|
UpdateExpression,
|
|
220
232
|
VariableDeclaration,
|
|
221
233
|
VariableDeclarator,
|
|
@@ -812,6 +824,16 @@ export function isMatchIdentifierPattern(node /*: ESNode | Token */) /*: implies
|
|
|
812
824
|
}
|
|
813
825
|
|
|
814
826
|
|
|
827
|
+
export function isMatchInstanceObjectPattern(node /*: ESNode | Token */) /*: implies node is MatchInstanceObjectPattern */ {
|
|
828
|
+
return node.type === 'MatchInstanceObjectPattern';
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
export function isMatchInstancePattern(node /*: ESNode | Token */) /*: implies node is MatchInstancePattern */ {
|
|
833
|
+
return node.type === 'MatchInstancePattern';
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
|
|
815
837
|
export function isMatchLiteralPattern(node /*: ESNode | Token */) /*: implies node is MatchLiteralPattern */ {
|
|
816
838
|
return node.type === 'MatchLiteralPattern';
|
|
817
839
|
}
|
|
@@ -882,6 +904,11 @@ export function isMixedTypeAnnotation(node /*: ESNode | Token */) /*: implies no
|
|
|
882
904
|
}
|
|
883
905
|
|
|
884
906
|
|
|
907
|
+
export function isNeverTypeAnnotation(node /*: ESNode | Token */) /*: implies node is NeverTypeAnnotation */ {
|
|
908
|
+
return node.type === 'NeverTypeAnnotation';
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
|
|
885
912
|
export function isNewExpression(node /*: ESNode | Token */) /*: implies node is NewExpression */ {
|
|
886
913
|
return node.type === 'NewExpression';
|
|
887
914
|
}
|
|
@@ -992,6 +1019,41 @@ export function isQualifiedTypeofIdentifier(node /*: ESNode | Token */) /*: impl
|
|
|
992
1019
|
}
|
|
993
1020
|
|
|
994
1021
|
|
|
1022
|
+
export function isRecordDeclaration(node /*: ESNode | Token */) /*: implies node is RecordDeclaration */ {
|
|
1023
|
+
return node.type === 'RecordDeclaration';
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
export function isRecordDeclarationBody(node /*: ESNode | Token */) /*: implies node is RecordDeclarationBody */ {
|
|
1028
|
+
return node.type === 'RecordDeclarationBody';
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
export function isRecordDeclarationImplements(node /*: ESNode | Token */) /*: implies node is RecordDeclarationImplements */ {
|
|
1033
|
+
return node.type === 'RecordDeclarationImplements';
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
export function isRecordDeclarationProperty(node /*: ESNode | Token */) /*: implies node is RecordDeclarationProperty */ {
|
|
1038
|
+
return node.type === 'RecordDeclarationProperty';
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
export function isRecordDeclarationStaticProperty(node /*: ESNode | Token */) /*: implies node is RecordDeclarationStaticProperty */ {
|
|
1043
|
+
return node.type === 'RecordDeclarationStaticProperty';
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
export function isRecordExpression(node /*: ESNode | Token */) /*: implies node is RecordExpression */ {
|
|
1048
|
+
return node.type === 'RecordExpression';
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
export function isRecordExpressionProperties(node /*: ESNode | Token */) /*: implies node is RecordExpressionProperties */ {
|
|
1053
|
+
return node.type === 'RecordExpressionProperties';
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
|
|
995
1057
|
export function isRestElement(node /*: ESNode | Token */) /*: implies node is RestElement */ {
|
|
996
1058
|
return node.type === 'RestElement';
|
|
997
1059
|
}
|
|
@@ -1147,11 +1209,21 @@ export function isUnaryExpression(node /*: ESNode | Token */) /*: implies node i
|
|
|
1147
1209
|
}
|
|
1148
1210
|
|
|
1149
1211
|
|
|
1212
|
+
export function isUndefinedTypeAnnotation(node /*: ESNode | Token */) /*: implies node is UndefinedTypeAnnotation */ {
|
|
1213
|
+
return node.type === 'UndefinedTypeAnnotation';
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
|
|
1150
1217
|
export function isUnionTypeAnnotation(node /*: ESNode | Token */) /*: implies node is UnionTypeAnnotation */ {
|
|
1151
1218
|
return node.type === 'UnionTypeAnnotation';
|
|
1152
1219
|
}
|
|
1153
1220
|
|
|
1154
1221
|
|
|
1222
|
+
export function isUnknownTypeAnnotation(node /*: ESNode | Token */) /*: implies node is UnknownTypeAnnotation */ {
|
|
1223
|
+
return node.type === 'UnknownTypeAnnotation';
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
|
|
1155
1227
|
export function isUpdateExpression(node /*: ESNode | Token */) /*: implies node is UpdateExpression */ {
|
|
1156
1228
|
return node.type === 'UpdateExpression';
|
|
1157
1229
|
}
|
package/dist/predicates.js
CHANGED
|
@@ -237,9 +237,7 @@ function isExpression(node
|
|
|
237
237
|
)
|
|
238
238
|
/*: implies node is Expression */
|
|
239
239
|
{
|
|
240
|
-
return node.type === 'ThisExpression' || node.type === 'ArrayExpression' || node.type === 'ObjectExpression' ||
|
|
241
|
-
// $FlowFixMe[invalid-compare]
|
|
242
|
-
node.type === 'ObjectExpression' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression' || node.type === 'YieldExpression' || node.type === 'Literal' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'BinaryExpression' || node.type === 'AssignmentExpression' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'ConditionalExpression' || node.type === 'CallExpression' || node.type === 'NewExpression' || node.type === 'SequenceExpression' || node.type === 'TemplateLiteral' || node.type === 'TaggedTemplateExpression' || node.type === 'ClassExpression' || node.type === 'MetaProperty' || node.type === 'Identifier' || node.type === 'AwaitExpression' || node.type === 'ImportExpression' || node.type === 'ChainExpression' || node.type === 'TypeCastExpression' || node.type === 'AsExpression' || node.type === 'AsConstExpression' || node.type === 'JSXFragment' || node.type === 'JSXElement';
|
|
240
|
+
return node.type === 'ThisExpression' || node.type === 'ArrayExpression' || node.type === 'ObjectExpression' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression' || node.type === 'YieldExpression' || node.type === 'Literal' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'BinaryExpression' || node.type === 'AssignmentExpression' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'ConditionalExpression' || node.type === 'CallExpression' || node.type === 'NewExpression' || node.type === 'SequenceExpression' || node.type === 'TemplateLiteral' || node.type === 'TaggedTemplateExpression' || node.type === 'ClassExpression' || node.type === 'MetaProperty' || node.type === 'Identifier' || node.type === 'AwaitExpression' || node.type === 'ImportExpression' || node.type === 'ChainExpression' || node.type === 'TypeCastExpression' || node.type === 'AsExpression' || node.type === 'AsConstExpression' || node.type === 'JSXFragment' || node.type === 'JSXElement' || node.type === 'MatchExpression' || node.type === 'RecordExpression';
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
function isStatement(node
|
|
@@ -247,5 +245,5 @@ function isStatement(node
|
|
|
247
245
|
)
|
|
248
246
|
/*: implies node is Statement */
|
|
249
247
|
{
|
|
250
|
-
return node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'ClassDeclaration' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DeclareClass' || node.type === 'DeclareVariable' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareTypeAlias' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'EnumDeclaration' || node.type === 'ExpressionStatement' || node.type === 'ForInStatement' || node.type === 'ForOfStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'IfStatement' || node.type === 'InterfaceDeclaration' || node.type === 'LabeledStatement' || node.type === 'OpaqueType' || node.type === 'ReturnStatement' || node.type === 'SwitchStatement' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'TypeAlias' || node.type === 'VariableDeclaration' || node.type === 'WhileStatement' || node.type === 'WithStatement';
|
|
248
|
+
return node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'ClassDeclaration' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DeclareClass' || node.type === 'DeclareVariable' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareTypeAlias' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'EnumDeclaration' || node.type === 'ExpressionStatement' || node.type === 'ForInStatement' || node.type === 'ForOfStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'IfStatement' || node.type === 'InterfaceDeclaration' || node.type === 'LabeledStatement' || node.type === 'MatchStatement' || node.type === 'OpaqueType' || node.type === 'RecordDeclaration' || node.type === 'ReturnStatement' || node.type === 'SwitchStatement' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'TypeAlias' || node.type === 'VariableDeclaration' || node.type === 'WhileStatement' || node.type === 'WithStatement';
|
|
251
249
|
}
|
package/dist/predicates.js.flow
CHANGED
|
@@ -134,9 +134,6 @@ export function isExpression(node /*: ESNode */) /*: implies node is Expression
|
|
|
134
134
|
node.type === 'ThisExpression' ||
|
|
135
135
|
node.type === 'ArrayExpression' ||
|
|
136
136
|
node.type === 'ObjectExpression' ||
|
|
137
|
-
// $FlowFixMe[incompatible-type]
|
|
138
|
-
// $FlowFixMe[invalid-compare]
|
|
139
|
-
node.type === 'ObjectExpression' ||
|
|
140
137
|
node.type === 'FunctionExpression' ||
|
|
141
138
|
node.type === 'ArrowFunctionExpression' ||
|
|
142
139
|
node.type === 'YieldExpression' ||
|
|
@@ -163,7 +160,9 @@ export function isExpression(node /*: ESNode */) /*: implies node is Expression
|
|
|
163
160
|
node.type === 'AsExpression' ||
|
|
164
161
|
node.type === 'AsConstExpression' ||
|
|
165
162
|
node.type === 'JSXFragment' ||
|
|
166
|
-
node.type === 'JSXElement'
|
|
163
|
+
node.type === 'JSXElement' ||
|
|
164
|
+
node.type === 'MatchExpression' ||
|
|
165
|
+
node.type === 'RecordExpression'
|
|
167
166
|
);
|
|
168
167
|
}
|
|
169
168
|
|
|
@@ -192,7 +191,9 @@ export function isStatement(node /*: ESNode */) /*: implies node is Statement */
|
|
|
192
191
|
node.type === 'IfStatement' ||
|
|
193
192
|
node.type === 'InterfaceDeclaration' ||
|
|
194
193
|
node.type === 'LabeledStatement' ||
|
|
194
|
+
node.type === 'MatchStatement' ||
|
|
195
195
|
node.type === 'OpaqueType' ||
|
|
196
|
+
node.type === 'RecordDeclaration' ||
|
|
196
197
|
node.type === 'ReturnStatement' ||
|
|
197
198
|
node.type === 'SwitchStatement' ||
|
|
198
199
|
node.type === 'ThrowStatement' ||
|
|
@@ -147,6 +147,8 @@ import type {
|
|
|
147
147
|
MatchExpression,
|
|
148
148
|
MatchExpressionCase,
|
|
149
149
|
MatchIdentifierPattern,
|
|
150
|
+
MatchInstanceObjectPattern,
|
|
151
|
+
MatchInstancePattern,
|
|
150
152
|
MatchLiteralPattern,
|
|
151
153
|
MatchMemberPattern,
|
|
152
154
|
MatchObjectPattern,
|
|
@@ -161,6 +163,7 @@ import type {
|
|
|
161
163
|
MetaProperty,
|
|
162
164
|
MethodDefinition,
|
|
163
165
|
MixedTypeAnnotation,
|
|
166
|
+
NeverTypeAnnotation,
|
|
164
167
|
NewExpression,
|
|
165
168
|
NullableTypeAnnotation,
|
|
166
169
|
NullLiteralTypeAnnotation,
|
|
@@ -183,6 +186,13 @@ import type {
|
|
|
183
186
|
PropertyDefinition,
|
|
184
187
|
QualifiedTypeIdentifier,
|
|
185
188
|
QualifiedTypeofIdentifier,
|
|
189
|
+
RecordDeclaration,
|
|
190
|
+
RecordDeclarationBody,
|
|
191
|
+
RecordDeclarationImplements,
|
|
192
|
+
RecordDeclarationProperty,
|
|
193
|
+
RecordDeclarationStaticProperty,
|
|
194
|
+
RecordExpression,
|
|
195
|
+
RecordExpressionProperties,
|
|
186
196
|
RestElement,
|
|
187
197
|
ReturnStatement,
|
|
188
198
|
SequenceExpression,
|
|
@@ -214,7 +224,9 @@ import type {
|
|
|
214
224
|
TypeParameterInstantiation,
|
|
215
225
|
TypePredicate,
|
|
216
226
|
UnaryExpression,
|
|
227
|
+
UndefinedTypeAnnotation,
|
|
217
228
|
UnionTypeAnnotation,
|
|
229
|
+
UnknownTypeAnnotation,
|
|
218
230
|
UpdateExpression,
|
|
219
231
|
VariableDeclaration,
|
|
220
232
|
VariableDeclarator,
|
|
@@ -421,6 +433,8 @@ exports.isMatchBindingPattern = isMatchBindingPattern;
|
|
|
421
433
|
exports.isMatchExpression = isMatchExpression;
|
|
422
434
|
exports.isMatchExpressionCase = isMatchExpressionCase;
|
|
423
435
|
exports.isMatchIdentifierPattern = isMatchIdentifierPattern;
|
|
436
|
+
exports.isMatchInstanceObjectPattern = isMatchInstanceObjectPattern;
|
|
437
|
+
exports.isMatchInstancePattern = isMatchInstancePattern;
|
|
424
438
|
exports.isMatchLiteralPattern = isMatchLiteralPattern;
|
|
425
439
|
exports.isMatchMemberPattern = isMatchMemberPattern;
|
|
426
440
|
exports.isMatchObjectPattern = isMatchObjectPattern;
|
|
@@ -439,6 +453,7 @@ exports.isMinusToken = isMinusToken;
|
|
|
439
453
|
exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
|
|
440
454
|
exports.isModuleKeyword = isModuleKeyword;
|
|
441
455
|
exports.isMultiplyEqualToken = isMultiplyEqualToken;
|
|
456
|
+
exports.isNeverTypeAnnotation = isNeverTypeAnnotation;
|
|
442
457
|
exports.isNewExpression = isNewExpression;
|
|
443
458
|
exports.isNewToken = isNewToken;
|
|
444
459
|
exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
|
|
@@ -473,6 +488,13 @@ exports.isPropertyDefinition = isPropertyDefinition;
|
|
|
473
488
|
exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
|
|
474
489
|
exports.isQualifiedTypeofIdentifier = isQualifiedTypeofIdentifier;
|
|
475
490
|
exports.isQuestionMarkToken = isQuestionMarkToken;
|
|
491
|
+
exports.isRecordDeclaration = isRecordDeclaration;
|
|
492
|
+
exports.isRecordDeclarationBody = isRecordDeclarationBody;
|
|
493
|
+
exports.isRecordDeclarationImplements = isRecordDeclarationImplements;
|
|
494
|
+
exports.isRecordDeclarationProperty = isRecordDeclarationProperty;
|
|
495
|
+
exports.isRecordDeclarationStaticProperty = isRecordDeclarationStaticProperty;
|
|
496
|
+
exports.isRecordExpression = isRecordExpression;
|
|
497
|
+
exports.isRecordExpressionProperties = isRecordExpressionProperties;
|
|
476
498
|
exports.isRemainderEqualToken = isRemainderEqualToken;
|
|
477
499
|
exports.isRestElement = isRestElement;
|
|
478
500
|
exports.isReturnStatement = isReturnStatement;
|
|
@@ -519,8 +541,10 @@ exports.isTypePredicate = isTypePredicate;
|
|
|
519
541
|
exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
|
|
520
542
|
exports.isUnaryExpression = isUnaryExpression;
|
|
521
543
|
exports.isUnaryNegationToken = isUnaryNegationToken;
|
|
544
|
+
exports.isUndefinedTypeAnnotation = isUndefinedTypeAnnotation;
|
|
522
545
|
exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
|
|
523
546
|
exports.isUnionTypeToken = isUnionTypeToken;
|
|
547
|
+
exports.isUnknownTypeAnnotation = isUnknownTypeAnnotation;
|
|
524
548
|
exports.isUpdateExpression = isUpdateExpression;
|
|
525
549
|
exports.isVarToken = isVarToken;
|
|
526
550
|
exports.isVariableDeclaration = isVariableDeclaration;
|
|
@@ -1463,6 +1487,22 @@ function isMatchIdentifierPattern(node
|
|
|
1463
1487
|
return node.type === 'MatchIdentifierPattern';
|
|
1464
1488
|
}
|
|
1465
1489
|
|
|
1490
|
+
function isMatchInstanceObjectPattern(node
|
|
1491
|
+
/*: ESNode | Token */
|
|
1492
|
+
)
|
|
1493
|
+
/*: implies node is MatchInstanceObjectPattern */
|
|
1494
|
+
{
|
|
1495
|
+
return node.type === 'MatchInstanceObjectPattern';
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
function isMatchInstancePattern(node
|
|
1499
|
+
/*: ESNode | Token */
|
|
1500
|
+
)
|
|
1501
|
+
/*: implies node is MatchInstancePattern */
|
|
1502
|
+
{
|
|
1503
|
+
return node.type === 'MatchInstancePattern';
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1466
1506
|
function isMatchLiteralPattern(node
|
|
1467
1507
|
/*: ESNode | Token */
|
|
1468
1508
|
)
|
|
@@ -1575,6 +1615,14 @@ function isMixedTypeAnnotation(node
|
|
|
1575
1615
|
return node.type === 'MixedTypeAnnotation';
|
|
1576
1616
|
}
|
|
1577
1617
|
|
|
1618
|
+
function isNeverTypeAnnotation(node
|
|
1619
|
+
/*: ESNode | Token */
|
|
1620
|
+
)
|
|
1621
|
+
/*: implies node is NeverTypeAnnotation */
|
|
1622
|
+
{
|
|
1623
|
+
return node.type === 'NeverTypeAnnotation';
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1578
1626
|
function isNewExpression(node
|
|
1579
1627
|
/*: ESNode | Token */
|
|
1580
1628
|
)
|
|
@@ -1751,6 +1799,62 @@ function isQualifiedTypeofIdentifier(node
|
|
|
1751
1799
|
return node.type === 'QualifiedTypeofIdentifier';
|
|
1752
1800
|
}
|
|
1753
1801
|
|
|
1802
|
+
function isRecordDeclaration(node
|
|
1803
|
+
/*: ESNode | Token */
|
|
1804
|
+
)
|
|
1805
|
+
/*: implies node is RecordDeclaration */
|
|
1806
|
+
{
|
|
1807
|
+
return node.type === 'RecordDeclaration';
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
function isRecordDeclarationBody(node
|
|
1811
|
+
/*: ESNode | Token */
|
|
1812
|
+
)
|
|
1813
|
+
/*: implies node is RecordDeclarationBody */
|
|
1814
|
+
{
|
|
1815
|
+
return node.type === 'RecordDeclarationBody';
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
function isRecordDeclarationImplements(node
|
|
1819
|
+
/*: ESNode | Token */
|
|
1820
|
+
)
|
|
1821
|
+
/*: implies node is RecordDeclarationImplements */
|
|
1822
|
+
{
|
|
1823
|
+
return node.type === 'RecordDeclarationImplements';
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
function isRecordDeclarationProperty(node
|
|
1827
|
+
/*: ESNode | Token */
|
|
1828
|
+
)
|
|
1829
|
+
/*: implies node is RecordDeclarationProperty */
|
|
1830
|
+
{
|
|
1831
|
+
return node.type === 'RecordDeclarationProperty';
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
function isRecordDeclarationStaticProperty(node
|
|
1835
|
+
/*: ESNode | Token */
|
|
1836
|
+
)
|
|
1837
|
+
/*: implies node is RecordDeclarationStaticProperty */
|
|
1838
|
+
{
|
|
1839
|
+
return node.type === 'RecordDeclarationStaticProperty';
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
function isRecordExpression(node
|
|
1843
|
+
/*: ESNode | Token */
|
|
1844
|
+
)
|
|
1845
|
+
/*: implies node is RecordExpression */
|
|
1846
|
+
{
|
|
1847
|
+
return node.type === 'RecordExpression';
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
function isRecordExpressionProperties(node
|
|
1851
|
+
/*: ESNode | Token */
|
|
1852
|
+
)
|
|
1853
|
+
/*: implies node is RecordExpressionProperties */
|
|
1854
|
+
{
|
|
1855
|
+
return node.type === 'RecordExpressionProperties';
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1754
1858
|
function isRestElement(node
|
|
1755
1859
|
/*: ESNode | Token */
|
|
1756
1860
|
)
|
|
@@ -1999,6 +2103,14 @@ function isUnaryExpression(node
|
|
|
1999
2103
|
return node.type === 'UnaryExpression';
|
|
2000
2104
|
}
|
|
2001
2105
|
|
|
2106
|
+
function isUndefinedTypeAnnotation(node
|
|
2107
|
+
/*: ESNode | Token */
|
|
2108
|
+
)
|
|
2109
|
+
/*: implies node is UndefinedTypeAnnotation */
|
|
2110
|
+
{
|
|
2111
|
+
return node.type === 'UndefinedTypeAnnotation';
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2002
2114
|
function isUnionTypeAnnotation(node
|
|
2003
2115
|
/*: ESNode | Token */
|
|
2004
2116
|
)
|
|
@@ -2007,6 +2119,14 @@ function isUnionTypeAnnotation(node
|
|
|
2007
2119
|
return node.type === 'UnionTypeAnnotation';
|
|
2008
2120
|
}
|
|
2009
2121
|
|
|
2122
|
+
function isUnknownTypeAnnotation(node
|
|
2123
|
+
/*: ESNode | Token */
|
|
2124
|
+
)
|
|
2125
|
+
/*: implies node is UnknownTypeAnnotation */
|
|
2126
|
+
{
|
|
2127
|
+
return node.type === 'UnknownTypeAnnotation';
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2010
2130
|
function isUpdateExpression(node
|
|
2011
2131
|
/*: ESNode | Token */
|
|
2012
2132
|
)
|
package/dist/src/predicates.js
CHANGED
|
@@ -237,9 +237,7 @@ function isExpression(node
|
|
|
237
237
|
)
|
|
238
238
|
/*: implies node is Expression */
|
|
239
239
|
{
|
|
240
|
-
return node.type === 'ThisExpression' || node.type === 'ArrayExpression' || node.type === 'ObjectExpression' ||
|
|
241
|
-
// $FlowFixMe[invalid-compare]
|
|
242
|
-
node.type === 'ObjectExpression' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression' || node.type === 'YieldExpression' || node.type === 'Literal' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'BinaryExpression' || node.type === 'AssignmentExpression' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'ConditionalExpression' || node.type === 'CallExpression' || node.type === 'NewExpression' || node.type === 'SequenceExpression' || node.type === 'TemplateLiteral' || node.type === 'TaggedTemplateExpression' || node.type === 'ClassExpression' || node.type === 'MetaProperty' || node.type === 'Identifier' || node.type === 'AwaitExpression' || node.type === 'ImportExpression' || node.type === 'ChainExpression' || node.type === 'TypeCastExpression' || node.type === 'AsExpression' || node.type === 'AsConstExpression' || node.type === 'JSXFragment' || node.type === 'JSXElement';
|
|
240
|
+
return node.type === 'ThisExpression' || node.type === 'ArrayExpression' || node.type === 'ObjectExpression' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression' || node.type === 'YieldExpression' || node.type === 'Literal' || node.type === 'UnaryExpression' || node.type === 'UpdateExpression' || node.type === 'BinaryExpression' || node.type === 'AssignmentExpression' || node.type === 'LogicalExpression' || node.type === 'MemberExpression' || node.type === 'ConditionalExpression' || node.type === 'CallExpression' || node.type === 'NewExpression' || node.type === 'SequenceExpression' || node.type === 'TemplateLiteral' || node.type === 'TaggedTemplateExpression' || node.type === 'ClassExpression' || node.type === 'MetaProperty' || node.type === 'Identifier' || node.type === 'AwaitExpression' || node.type === 'ImportExpression' || node.type === 'ChainExpression' || node.type === 'TypeCastExpression' || node.type === 'AsExpression' || node.type === 'AsConstExpression' || node.type === 'JSXFragment' || node.type === 'JSXElement' || node.type === 'MatchExpression' || node.type === 'RecordExpression';
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
function isStatement(node
|
|
@@ -247,5 +245,5 @@ function isStatement(node
|
|
|
247
245
|
)
|
|
248
246
|
/*: implies node is Statement */
|
|
249
247
|
{
|
|
250
|
-
return node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'ClassDeclaration' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DeclareClass' || node.type === 'DeclareVariable' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareTypeAlias' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'EnumDeclaration' || node.type === 'ExpressionStatement' || node.type === 'ForInStatement' || node.type === 'ForOfStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'IfStatement' || node.type === 'InterfaceDeclaration' || node.type === 'LabeledStatement' || node.type === 'OpaqueType' || node.type === 'ReturnStatement' || node.type === 'SwitchStatement' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'TypeAlias' || node.type === 'VariableDeclaration' || node.type === 'WhileStatement' || node.type === 'WithStatement';
|
|
248
|
+
return node.type === 'BlockStatement' || node.type === 'BreakStatement' || node.type === 'ClassDeclaration' || node.type === 'ContinueStatement' || node.type === 'DebuggerStatement' || node.type === 'DeclareClass' || node.type === 'DeclareVariable' || node.type === 'DeclareFunction' || node.type === 'DeclareInterface' || node.type === 'DeclareModule' || node.type === 'DeclareOpaqueType' || node.type === 'DeclareTypeAlias' || node.type === 'DoWhileStatement' || node.type === 'EmptyStatement' || node.type === 'EnumDeclaration' || node.type === 'ExpressionStatement' || node.type === 'ForInStatement' || node.type === 'ForOfStatement' || node.type === 'ForStatement' || node.type === 'FunctionDeclaration' || node.type === 'IfStatement' || node.type === 'InterfaceDeclaration' || node.type === 'LabeledStatement' || node.type === 'MatchStatement' || node.type === 'OpaqueType' || node.type === 'RecordDeclaration' || node.type === 'ReturnStatement' || node.type === 'SwitchStatement' || node.type === 'ThrowStatement' || node.type === 'TryStatement' || node.type === 'TypeAlias' || node.type === 'VariableDeclaration' || node.type === 'WhileStatement' || node.type === 'WithStatement';
|
|
251
249
|
}
|