Skip to content

Commit 10c40ed

Browse files
committed
gentype: support Jsx.element in addition to React.element
The type Jsx.element can show user-side in ppx V4 (at least), and affects gentype too. It special-cases `React.element`, and needs to then special-case `Jsx.element` too. Fixes #6807
1 parent fc8e962 commit 10c40ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jscomp/gentype/TranslateTypeExprFromTypes.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
216216
{dependencies = []; type_ = EmitType.type_react_event_mouse_t}
217217
| ( ( ["React"; "element"]
218218
| ["ReactV3"; "React"; "element"]
219-
| ["ReasonReact"; "reactElement"] ),
219+
| ["ReasonReact"; "reactElement"]
220+
| [("Pervasives" | "PervasivesU"); "Jsx"; "element"] ),
220221
[] ) ->
221222
{dependencies = []; type_ = EmitType.type_react_element}
222223
| (["FB"; "option"] | ["option"]), [param_translation] ->

0 commit comments

Comments
 (0)