hermes-transform 0.15.1 → 0.17.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.
@@ -27,6 +27,7 @@ import type {
27
27
  ArrayPattern,
28
28
  ArrayTypeAnnotation,
29
29
  ArrowFunctionExpression,
30
+ AsExpression,
30
31
  AssignmentExpression,
31
32
  AssignmentPattern,
32
33
  AwaitExpression,
@@ -179,6 +180,7 @@ import type {
179
180
  TypeAnnotation,
180
181
  TypeCastExpression,
181
182
  TypeofTypeAnnotation,
183
+ TypeOperator,
182
184
  TypeParameter,
183
185
  TypeParameterDeclaration,
184
186
  TypeParameterInstantiation,
@@ -200,6 +202,7 @@ import type {
200
202
  ArrayPatternProps,
201
203
  ArrayTypeAnnotationProps,
202
204
  ArrowFunctionExpressionProps,
205
+ AsExpressionProps,
203
206
  AssignmentExpressionProps,
204
207
  AssignmentPatternProps,
205
208
  AwaitExpressionProps,
@@ -352,6 +355,7 @@ import type {
352
355
  TypeAnnotationProps,
353
356
  TypeCastExpressionProps,
354
357
  TypeofTypeAnnotationProps,
358
+ TypeOperatorProps,
355
359
  TypeParameterProps,
356
360
  TypeParameterDeclarationProps,
357
361
  TypeParameterInstantiationProps,
@@ -409,6 +413,14 @@ type ArrowFunctionExpressionCloneSignature = ((
409
413
  node: ?ArrowFunctionExpression,
410
414
  newProps: Partial<ArrowFunctionExpressionProps>,
411
415
  ) => DetachedNode<ArrowFunctionExpression> | null);
416
+ type AsExpressionCloneSignature = ((
417
+ node: AsExpression,
418
+ newProps: Partial<AsExpressionProps>,
419
+ ) => DetachedNode<AsExpression>) &
420
+ ((
421
+ node: ?AsExpression,
422
+ newProps: Partial<AsExpressionProps>,
423
+ ) => DetachedNode<AsExpression> | null);
412
424
  type AssignmentExpressionCloneSignature = ((
413
425
  node: AssignmentExpression,
414
426
  newProps: Partial<AssignmentExpressionProps>,
@@ -1622,6 +1634,14 @@ type TypeofTypeAnnotationCloneSignature = ((
1622
1634
  node: ?TypeofTypeAnnotation,
1623
1635
  newProps: Partial<TypeofTypeAnnotationProps>,
1624
1636
  ) => DetachedNode<TypeofTypeAnnotation> | null);
1637
+ type TypeOperatorCloneSignature = ((
1638
+ node: TypeOperator,
1639
+ newProps: Partial<TypeOperatorProps>,
1640
+ ) => DetachedNode<TypeOperator>) &
1641
+ ((
1642
+ node: ?TypeOperator,
1643
+ newProps: Partial<TypeOperatorProps>,
1644
+ ) => DetachedNode<TypeOperator> | null);
1625
1645
  type TypeParameterCloneSignature = ((
1626
1646
  node: TypeParameter,
1627
1647
  newProps: Partial<TypeParameterProps>,
@@ -1739,6 +1759,7 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
1739
1759
  ArrayPatternCloneSignature &
1740
1760
  ArrayTypeAnnotationCloneSignature &
1741
1761
  ArrowFunctionExpressionCloneSignature &
1762
+ AsExpressionCloneSignature &
1742
1763
  AssignmentExpressionCloneSignature &
1743
1764
  AssignmentPatternCloneSignature &
1744
1765
  AwaitExpressionCloneSignature &
@@ -1891,6 +1912,7 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
1891
1912
  TypeAnnotationCloneSignature &
1892
1913
  TypeCastExpressionCloneSignature &
1893
1914
  TypeofTypeAnnotationCloneSignature &
1915
+ TypeOperatorCloneSignature &
1894
1916
  TypeParameterCloneSignature &
1895
1917
  TypeParameterDeclarationCloneSignature &
1896
1918
  TypeParameterInstantiationCloneSignature &
@@ -27,6 +27,7 @@ import type {
27
27
  ArrayPattern,
28
28
  ArrayTypeAnnotation,
29
29
  ArrowFunctionExpression,
30
+ AsExpression,
30
31
  AssignmentExpression,
31
32
  AssignmentPattern,
32
33
  AwaitExpression,
@@ -179,6 +180,7 @@ import type {
179
180
  TypeAnnotation,
180
181
  TypeCastExpression,
181
182
  TypeofTypeAnnotation,
183
+ TypeOperator,
182
184
  TypeParameter,
183
185
  TypeParameterDeclaration,
184
186
  TypeParameterInstantiation,
@@ -200,6 +202,7 @@ import type {
200
202
  ArrayPatternProps,
201
203
  ArrayTypeAnnotationProps,
202
204
  ArrowFunctionExpressionProps,
205
+ AsExpressionProps,
203
206
  AssignmentExpressionProps,
204
207
  AssignmentPatternProps,
205
208
  AwaitExpressionProps,
@@ -352,6 +355,7 @@ import type {
352
355
  TypeAnnotationProps,
353
356
  TypeCastExpressionProps,
354
357
  TypeofTypeAnnotationProps,
358
+ TypeOperatorProps,
355
359
  TypeParameterProps,
356
360
  TypeParameterDeclarationProps,
357
361
  TypeParameterInstantiationProps,
@@ -388,6 +392,10 @@ type ArrowFunctionExpressionModifySignature = (
388
392
  node: ?ArrowFunctionExpression,
389
393
  newProps: Partial<ArrowFunctionExpressionProps>,
390
394
  ) => void;
395
+ type AsExpressionModifySignature = (
396
+ node: ?AsExpression,
397
+ newProps: Partial<AsExpressionProps>,
398
+ ) => void;
391
399
  type AssignmentExpressionModifySignature = (
392
400
  node: ?AssignmentExpression,
393
401
  newProps: Partial<AssignmentExpressionProps>,
@@ -996,6 +1004,10 @@ type TypeofTypeAnnotationModifySignature = (
996
1004
  node: ?TypeofTypeAnnotation,
997
1005
  newProps: Partial<TypeofTypeAnnotationProps>,
998
1006
  ) => void;
1007
+ type TypeOperatorModifySignature = (
1008
+ node: ?TypeOperator,
1009
+ newProps: Partial<TypeOperatorProps>,
1010
+ ) => void;
999
1011
  type TypeParameterModifySignature = (
1000
1012
  node: ?TypeParameter,
1001
1013
  newProps: Partial<TypeParameterProps>,
@@ -1057,6 +1069,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
1057
1069
  ArrayPatternModifySignature &
1058
1070
  ArrayTypeAnnotationModifySignature &
1059
1071
  ArrowFunctionExpressionModifySignature &
1072
+ AsExpressionModifySignature &
1060
1073
  AssignmentExpressionModifySignature &
1061
1074
  AssignmentPatternModifySignature &
1062
1075
  AwaitExpressionModifySignature &
@@ -1209,6 +1222,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
1209
1222
  TypeAnnotationModifySignature &
1210
1223
  TypeCastExpressionModifySignature &
1211
1224
  TypeofTypeAnnotationModifySignature &
1225
+ TypeOperatorModifySignature &
1212
1226
  TypeParameterModifySignature &
1213
1227
  TypeParameterDeclarationModifySignature &
1214
1228
  TypeParameterInstantiationModifySignature &
@@ -27,6 +27,7 @@ import type {
27
27
  ArrayPattern,
28
28
  ArrayTypeAnnotation,
29
29
  ArrowFunctionExpression,
30
+ AsExpression,
30
31
  AssignmentExpression,
31
32
  AssignmentPattern,
32
33
  AwaitExpression,
@@ -174,6 +175,7 @@ import type {
174
175
  TypeAnnotation,
175
176
  TypeCastExpression,
176
177
  TypeofTypeAnnotation,
178
+ TypeOperator,
177
179
  TypeParameter,
178
180
  TypeParameterDeclaration,
179
181
  TypeParameterInstantiation,
@@ -217,6 +219,11 @@ type ArrowFunctionExpressionReplaceSignature = (
217
219
  nodeToReplaceWith: DetachedNode<ArrowFunctionExpression>,
218
220
  options?: $ReadOnly<{keepComments?: boolean}>,
219
221
  ) => void;
222
+ type AsExpressionReplaceSignature = (
223
+ target: AsExpression,
224
+ nodeToReplaceWith: DetachedNode<AsExpression>,
225
+ options?: $ReadOnly<{keepComments?: boolean}>,
226
+ ) => void;
220
227
  type AssignmentExpressionReplaceSignature = (
221
228
  target: AssignmentExpression,
222
229
  nodeToReplaceWith: DetachedNode<AssignmentExpression>,
@@ -952,6 +959,11 @@ type TypeofTypeAnnotationReplaceSignature = (
952
959
  nodeToReplaceWith: DetachedNode<TypeofTypeAnnotation>,
953
960
  options?: $ReadOnly<{keepComments?: boolean}>,
954
961
  ) => void;
962
+ type TypeOperatorReplaceSignature = (
963
+ target: TypeOperator,
964
+ nodeToReplaceWith: DetachedNode<TypeOperator>,
965
+ options?: $ReadOnly<{keepComments?: boolean}>,
966
+ ) => void;
955
967
  type TypeParameterReplaceSignature = (
956
968
  target: TypeParameter,
957
969
  nodeToReplaceWith: DetachedNode<TypeParameter>,
@@ -1032,6 +1044,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
1032
1044
  ArrayPatternReplaceSignature &
1033
1045
  ArrayTypeAnnotationReplaceSignature &
1034
1046
  ArrowFunctionExpressionReplaceSignature &
1047
+ AsExpressionReplaceSignature &
1035
1048
  AssignmentExpressionReplaceSignature &
1036
1049
  AssignmentPatternReplaceSignature &
1037
1050
  AwaitExpressionReplaceSignature &
@@ -1179,6 +1192,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
1179
1192
  TypeAnnotationReplaceSignature &
1180
1193
  TypeCastExpressionReplaceSignature &
1181
1194
  TypeofTypeAnnotationReplaceSignature &
1195
+ TypeOperatorReplaceSignature &
1182
1196
  TypeParameterReplaceSignature &
1183
1197
  TypeParameterDeclarationReplaceSignature &
1184
1198
  TypeParameterInstantiationReplaceSignature &
@@ -29,6 +29,7 @@ var _exportNames = {
29
29
  ArrayExpression: true,
30
30
  ArrayPattern: true,
31
31
  ArrayTypeAnnotation: true,
32
+ AsExpression: true,
32
33
  AssignmentExpression: true,
33
34
  AssignmentPattern: true,
34
35
  AwaitExpression: true,
@@ -167,6 +168,7 @@ var _exportNames = {
167
168
  TypeAnnotation: true,
168
169
  TypeCastExpression: true,
169
170
  TypeofTypeAnnotation: true,
171
+ TypeOperator: true,
170
172
  TypeParameter: true,
171
173
  TypeParameterDeclaration: true,
172
174
  TypeParameterInstantiation: true,
@@ -186,6 +188,7 @@ exports.AnyTypeAnnotation = AnyTypeAnnotation;
186
188
  exports.ArrayExpression = ArrayExpression;
187
189
  exports.ArrayPattern = ArrayPattern;
188
190
  exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
191
+ exports.AsExpression = AsExpression;
189
192
  exports.AssignmentExpression = AssignmentExpression;
190
193
  exports.AssignmentPattern = AssignmentPattern;
191
194
  exports.AwaitExpression = AwaitExpression;
@@ -323,6 +326,7 @@ exports.TupleTypeSpreadElement = TupleTypeSpreadElement;
323
326
  exports.TypeAlias = TypeAlias;
324
327
  exports.TypeAnnotation = TypeAnnotation;
325
328
  exports.TypeCastExpression = TypeCastExpression;
329
+ exports.TypeOperator = TypeOperator;
326
330
  exports.TypeParameter = TypeParameter;
327
331
  exports.TypeParameterDeclaration = TypeParameterDeclaration;
328
332
  exports.TypeParameterInstantiation = TypeParameterInstantiation;
@@ -386,6 +390,16 @@ function ArrayTypeAnnotation(props) {
386
390
  return node;
387
391
  }
388
392
 
393
+ function AsExpression(props) {
394
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
395
+ type: 'AsExpression',
396
+ expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression),
397
+ typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
398
+ });
399
+ (0, _detachedNode.setParentPointersInDirectChildren)(node);
400
+ return node;
401
+ }
402
+
389
403
  function AssignmentExpression(props) {
390
404
  const node = (0, _detachedNode.detachedProps)(props.parent, {
391
405
  type: 'AssignmentExpression',
@@ -1781,6 +1795,16 @@ function TypeofTypeAnnotation(props) {
1781
1795
  return node;
1782
1796
  }
1783
1797
 
1798
+ function TypeOperator(props) {
1799
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1800
+ type: 'TypeOperator',
1801
+ operator: props.operator,
1802
+ typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
1803
+ });
1804
+ (0, _detachedNode.setParentPointersInDirectChildren)(node);
1805
+ return node;
1806
+ }
1807
+
1784
1808
  function TypeParameter(props) {
1785
1809
  const node = (0, _detachedNode.detachedProps)(props.parent, {
1786
1810
  type: 'TypeParameter',
@@ -27,6 +27,7 @@ import type {
27
27
  ArrayExpression as ArrayExpressionType,
28
28
  ArrayPattern as ArrayPatternType,
29
29
  ArrayTypeAnnotation as ArrayTypeAnnotationType,
30
+ AsExpression as AsExpressionType,
30
31
  AssignmentExpression as AssignmentExpressionType,
31
32
  AssignmentPattern as AssignmentPatternType,
32
33
  AwaitExpression as AwaitExpressionType,
@@ -165,6 +166,7 @@ import type {
165
166
  TypeAnnotation as TypeAnnotationType,
166
167
  TypeCastExpression as TypeCastExpressionType,
167
168
  TypeofTypeAnnotation as TypeofTypeAnnotationType,
169
+ TypeOperator as TypeOperatorType,
168
170
  TypeParameter as TypeParameterType,
169
171
  TypeParameterDeclaration as TypeParameterDeclarationType,
170
172
  TypeParameterInstantiation as TypeParameterInstantiationType,
@@ -208,6 +210,11 @@ export type ArrayTypeAnnotationProps = {
208
210
  +elementType: MaybeDetachedNode<ArrayTypeAnnotationType['elementType']>,
209
211
  };
210
212
 
213
+ export type AsExpressionProps = {
214
+ +expression: MaybeDetachedNode<AsExpressionType['expression']>,
215
+ +typeAnnotation: MaybeDetachedNode<AsExpressionType['typeAnnotation']>,
216
+ };
217
+
211
218
  export type AssignmentExpressionProps = {
212
219
  +operator: AssignmentExpressionType['operator'],
213
220
  +left: MaybeDetachedNode<AssignmentExpressionType['left']>,
@@ -1019,6 +1026,11 @@ export type TypeofTypeAnnotationProps = {
1019
1026
  +argument: MaybeDetachedNode<TypeofTypeAnnotationType['argument']>,
1020
1027
  };
1021
1028
 
1029
+ export type TypeOperatorProps = {
1030
+ +operator: TypeOperatorType['operator'],
1031
+ +typeAnnotation: MaybeDetachedNode<TypeOperatorType['typeAnnotation']>,
1032
+ };
1033
+
1022
1034
  export type TypeParameterProps = {
1023
1035
  +name: TypeParameterType['name'],
1024
1036
  +bound?: ?MaybeDetachedNode<TypeParameterType['bound']>,
@@ -1144,6 +1156,19 @@ export function ArrayTypeAnnotation(props: {
1144
1156
  return node;
1145
1157
  }
1146
1158
 
1159
+ export function AsExpression(props: {
1160
+ ...$ReadOnly<AsExpressionProps>,
1161
+ +parent?: ESNode,
1162
+ }): DetachedNode<AsExpressionType> {
1163
+ const node = detachedProps<AsExpressionType>(props.parent, {
1164
+ type: 'AsExpression',
1165
+ expression: asDetachedNodeForCodeGen(props.expression),
1166
+ typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
1167
+ });
1168
+ setParentPointersInDirectChildren(node);
1169
+ return node;
1170
+ }
1171
+
1147
1172
  export function AssignmentExpression(props: {
1148
1173
  ...$ReadOnly<AssignmentExpressionProps>,
1149
1174
  +parent?: ESNode,
@@ -2951,6 +2976,19 @@ export function TypeofTypeAnnotation(props: {
2951
2976
  return node;
2952
2977
  }
2953
2978
 
2979
+ export function TypeOperator(props: {
2980
+ ...$ReadOnly<TypeOperatorProps>,
2981
+ +parent?: ESNode,
2982
+ }): DetachedNode<TypeOperatorType> {
2983
+ const node = detachedProps<TypeOperatorType>(props.parent, {
2984
+ type: 'TypeOperator',
2985
+ operator: props.operator,
2986
+ typeAnnotation: asDetachedNodeForCodeGen(props.typeAnnotation),
2987
+ });
2988
+ setParentPointersInDirectChildren(node);
2989
+ return node;
2990
+ }
2991
+
2954
2992
  export function TypeParameter(props: {
2955
2993
  ...$ReadOnly<TypeParameterProps>,
2956
2994
  +parent?: ESNode,
@@ -34,6 +34,7 @@ function ExportNamedDeclarationWithSpecifiers(props) {
34
34
  type: 'ExportNamedDeclaration',
35
35
  declaration: null,
36
36
  specifiers: props.specifiers.map(n => (0, _detachedNode.asDetachedNode)(n)),
37
+ // $FlowFixMe[incompatible-call]
37
38
  source: (0, _detachedNode.asDetachedNode)(props.source),
38
39
  exportKind: props.exportKind
39
40
  });
@@ -66,6 +66,7 @@ export function ExportNamedDeclarationWithSpecifiers(props: {
66
66
  type: 'ExportNamedDeclaration',
67
67
  declaration: null,
68
68
  specifiers: props.specifiers.map(n => asDetachedNode(n)),
69
+ // $FlowFixMe[incompatible-call]
69
70
  source: asDetachedNode(props.source),
70
71
  exportKind: props.exportKind,
71
72
  },
@@ -48,6 +48,7 @@ function ObjectTypePropertySignature(props) {
48
48
  proto: (_props$proto2 = props.proto) != null ? _props$proto2 : false,
49
49
  static: (_props$static2 = props.static) != null ? _props$static2 : false,
50
50
  value: (0, _detachedNode.asDetachedNode)(props.value),
51
+ // $FlowFixMe[incompatible-call]
51
52
  variance: (0, _detachedNode.asDetachedNode)(props.variance)
52
53
  });
53
54
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
@@ -72,6 +72,7 @@ export function ObjectTypePropertySignature(props: {
72
72
  proto: props.proto ?? false,
73
73
  static: props.static ?? false,
74
74
  value: asDetachedNode(props.value),
75
+ // $FlowFixMe[incompatible-call]
75
76
  variance: asDetachedNode(props.variance),
76
77
  });
77
78
  setParentPointersInDirectChildren(node);
@@ -30,8 +30,11 @@ function ArrowFunctionExpression(props) {
30
30
  expression: props.body.type !== 'BlockStatement',
31
31
  params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n)),
32
32
  body: (0, _detachedNode.asDetachedNode)(props.body),
33
+ // $FlowFixMe[incompatible-call]
33
34
  typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
35
+ // $FlowFixMe[incompatible-call]
34
36
  returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
37
+ // $FlowFixMe[incompatible-call]
35
38
  predicate: (0, _detachedNode.asDetachedNode)(props.predicate),
36
39
  async: props.async
37
40
  });
@@ -44,9 +47,13 @@ function ClassDeclaration(props) {
44
47
 
45
48
  const node = (0, _detachedNode.detachedProps)(props.parent, {
46
49
  type: 'ClassDeclaration',
50
+ // $FlowFixMe[incompatible-call]
47
51
  id: (0, _detachedNode.asDetachedNode)(props.id),
52
+ // $FlowFixMe[incompatible-call]
48
53
  typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
54
+ // $FlowFixMe[incompatible-call]
49
55
  superClass: (0, _detachedNode.asDetachedNode)(props.superClass),
56
+ // $FlowFixMe[incompatible-call]
50
57
  superTypeParameters: (0, _detachedNode.asDetachedNode)(props.superTypeParameters),
51
58
  decorators: ((_props$decorators = props.decorators) != null ? _props$decorators : []).map(n => (0, _detachedNode.asDetachedNode)(n)),
52
59
  implements: ((_props$implements = props.implements) != null ? _props$implements : []).map(n => (0, _detachedNode.asDetachedNode)(n)),
@@ -77,6 +84,7 @@ function Identifier(props) {
77
84
  type: 'Identifier',
78
85
  name: props.name,
79
86
  optional: (_props$optional = props.optional) != null ? _props$optional : false,
87
+ // $FlowFixMe[incompatible-call]
80
88
  typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
81
89
  });
82
90
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
@@ -113,6 +121,7 @@ function DeclareFunction(props) {
113
121
  typeAnnotation: (0, _detachedNode.asDetachedNode)(props.functionType)
114
122
  })
115
123
  }),
124
+ // $FlowFixMe[incompatible-call]
116
125
  predicate: (0, _detachedNode.asDetachedNode)(props.predicate)
117
126
  });
118
127
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
@@ -63,8 +63,11 @@ export function ArrowFunctionExpression(props: {
63
63
  expression: props.body.type !== 'BlockStatement',
64
64
  params: props.params.map(n => asDetachedNode(n)),
65
65
  body: asDetachedNode(props.body),
66
+ // $FlowFixMe[incompatible-call]
66
67
  typeParameters: asDetachedNode(props.typeParameters),
68
+ // $FlowFixMe[incompatible-call]
67
69
  returnType: asDetachedNode(props.returnType),
70
+ // $FlowFixMe[incompatible-call]
68
71
  predicate: asDetachedNode(props.predicate),
69
72
  async: props.async,
70
73
  });
@@ -95,9 +98,13 @@ export function ClassDeclaration(props: {
95
98
  }): DetachedNode<ClassDeclarationType> {
96
99
  const node = detachedProps<ClassDeclarationType>(props.parent, {
97
100
  type: 'ClassDeclaration',
101
+ // $FlowFixMe[incompatible-call]
98
102
  id: asDetachedNode(props.id),
103
+ // $FlowFixMe[incompatible-call]
99
104
  typeParameters: asDetachedNode(props.typeParameters),
105
+ // $FlowFixMe[incompatible-call]
100
106
  superClass: asDetachedNode(props.superClass),
107
+ // $FlowFixMe[incompatible-call]
101
108
  superTypeParameters: asDetachedNode(props.superTypeParameters),
102
109
  decorators: (props.decorators ?? []).map(n => asDetachedNode(n)),
103
110
  implements: (props.implements ?? []).map(n => asDetachedNode(n)),
@@ -142,6 +149,7 @@ export function Identifier(props: {
142
149
  type: 'Identifier',
143
150
  name: props.name,
144
151
  optional: props.optional ?? false,
152
+ // $FlowFixMe[incompatible-call]
145
153
  typeAnnotation: asDetachedNode(props.typeAnnotation),
146
154
  });
147
155
  setParentPointersInDirectChildren(node);
@@ -199,6 +207,7 @@ export function DeclareFunction(props: {
199
207
  typeAnnotation: asDetachedNode(props.functionType),
200
208
  }),
201
209
  }),
210
+ // $FlowFixMe[incompatible-call]
202
211
  predicate: asDetachedNode(props.predicate),
203
212
  });
204
213
  setParentPointersInDirectChildren(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-transform",
3
- "version": "0.15.1",
3
+ "version": "0.17.0",
4
4
  "description": "Tools built on top of Hermes-ESTree to enable codebase transformation",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -12,13 +12,13 @@
12
12
  "@babel/code-frame": "^7.16.0",
13
13
  "esquery": "^1.4.0",
14
14
  "flow-enums-runtime": "^0.0.6",
15
- "hermes-eslint": "0.15.1",
16
- "hermes-estree": "0.15.1",
17
- "hermes-parser": "0.15.1"
15
+ "hermes-eslint": "0.17.0",
16
+ "hermes-estree": "0.17.0",
17
+ "hermes-parser": "0.17.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "prettier": "^3.0.0 || ^2.7.1",
21
- "prettier-plugin-hermes-parser": "0.15.1"
21
+ "prettier-plugin-hermes-parser": "0.17.0"
22
22
  },
23
23
  "files": [
24
24
  "dist",