This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,7 @@ let raiseErrorMultipleReactComponent ~loc =
4141 raiseError ~loc
4242 " Only one component definition is allowed for each module. Move to a \
4343 submodule or other file if necessary."
44+
45+ let optionalAttr = ({txt = " ns.optional" ; loc = Location. none}, PStr [] )
46+ let extractUncurried typ = typ
47+ let removeArity binding = binding
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ let getLabel str =
2727 | Optional str | Labelled str -> str
2828 | Nolabel -> " "
2929
30- let optionalAttr = ({txt = " ns.optional" ; loc = Location. none}, PStr [] )
31- let optionalAttrs = [optionalAttr]
30+ let optionalAttrs = [React_jsx_common. optionalAttr]
3231
3332let constantString ~loc str =
3433 Ast_helper.Exp. constant ~loc (Pconst_string (str, None ))
@@ -740,6 +739,7 @@ let transformStructureItem ~config item =
740739 config.hasReactComponent < - true ;
741740 check_string_int_attribute_iter.structure_item
742741 check_string_int_attribute_iter item;
742+ let pval_type = React_jsx_common. extractUncurried pval_type in
743743 let coreTypeOfAttr = React_jsx_common. coreTypeOfAttrs pval_attributes in
744744 let typVarsOfCoreType =
745745 coreTypeOfAttr
@@ -810,6 +810,7 @@ let transformStructureItem ~config item =
810810 React_jsx_common. raiseErrorMultipleReactComponent ~loc: pstr_loc
811811 else (
812812 config.hasReactComponent < - true ;
813+ let binding = React_jsx_common. removeArity binding in
813814 let coreTypeOfAttr =
814815 React_jsx_common. coreTypeOfAttrs binding.pvb_attributes
815816 in
You can’t perform that action at this time.
0 commit comments