Fork me on GitHub
#reagent
<
2017-10-26
>
plexus11:10:43

I'm trying to correctly specify a type for a React synthetic event, so *warn-on-infer* doesn't complain, but I can't find anything that works

plexus11:10:05

103      :on-key-down (fn [^js/KeyboardEvent event]
  104                     [(.-key event) (.-target event)])}])
                                         ^--- Cannot resolve property target for inferred type js/KeyboardEvent in expression (. event -target)

plexus11:10:08

I've tried ^js/Event and various other things... either they don't know about key (which is a keyboardevent specific key) or they don't know about -target