We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987b5ca commit 2c0b97fCopy full SHA for 2c0b97f
jscomp/frontend/ast_exp_handle_external.ml
@@ -110,7 +110,9 @@ let handle_ffi ~loc ~payload =
110
with
111
| None -> err ()
112
| Some exp ->
113
- let wrap (e : Parsetree.expression) =
+ (* Wrap a type constraing base on arity.
114
+ E.g. for arity 2 constrain to type (_, _) => _ *)
115
+ let wrapTypeConstraint (e : Parsetree.expression) =
116
let loc = e.pexp_loc in
117
let any = Ast_helper.Typ.any ~loc:e.pexp_loc () in
118
let unit = Ast_literal.type_unit ~loc () in
@@ -129,7 +131,7 @@ let handle_ffi ~loc ~payload =
129
131
Ast_helper.Exp.constraint_ ~loc e type_
130
132
| _ -> err ()
133
in
- wrap
134
+ wrapTypeConstraint
135
{
136
exp with
137
pexp_desc =
0 commit comments