Skip to content

Commit d11a245

Browse files
mununkicristianoc
authored andcommitted
add return type annotation for Jsx.addKeyProp
1 parent bdab0b6 commit d11a245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jscomp/others/jsx.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ type 'props component = ('props, element) componentLike
3838
external component : ('props, element) componentLike -> 'props component
3939
= "%identity"
4040

41-
let addKeyProp (o : 't) (k : string) =
41+
let addKeyProp (p : 'props) (k : string) : 'props =
4242
(* Use Js_obj.assign, not Js.Obj.assign, otherwise the dependency will not be picked up correctly
4343
in the ninja file. *)
44-
Obj.magic (Js_obj.assign (Obj.magic o) [%obj { key = k }])
44+
Obj.magic (Js_obj.assign (Obj.magic p) [%obj { key = k }])
4545
[@@inline]

0 commit comments

Comments
 (0)