This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,7 @@ let raiseErrorMultipleReactComponent ~loc =
41
41
raiseError ~loc
42
42
" Only one component definition is allowed for each module. Move to a \
43
43
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 =
27
27
| Optional str | Labelled str -> str
28
28
| Nolabel -> " "
29
29
30
- let optionalAttr = ({txt = " ns.optional" ; loc = Location. none}, PStr [] )
31
- let optionalAttrs = [optionalAttr]
30
+ let optionalAttrs = [React_jsx_common. optionalAttr]
32
31
33
32
let constantString ~loc str =
34
33
Ast_helper.Exp. constant ~loc (Pconst_string (str, None ))
@@ -740,6 +739,7 @@ let transformStructureItem ~config item =
740
739
config.hasReactComponent < - true ;
741
740
check_string_int_attribute_iter.structure_item
742
741
check_string_int_attribute_iter item;
742
+ let pval_type = React_jsx_common. extractUncurried pval_type in
743
743
let coreTypeOfAttr = React_jsx_common. coreTypeOfAttrs pval_attributes in
744
744
let typVarsOfCoreType =
745
745
coreTypeOfAttr
@@ -810,6 +810,7 @@ let transformStructureItem ~config item =
810
810
React_jsx_common. raiseErrorMultipleReactComponent ~loc: pstr_loc
811
811
else (
812
812
config.hasReactComponent < - true ;
813
+ let binding = React_jsx_common. removeArity binding in
813
814
let coreTypeOfAttr =
814
815
React_jsx_common. coreTypeOfAttrs binding.pvb_attributes
815
816
in
You can’t perform that action at this time.
0 commit comments