When calling
jq().click({e -> })
I get:
None of the following functions can be called with the arguments supplied:
internal final fun click() : js.jquery.JQuery defined in js.jquery.JQuery
internal final fun click(handler : js.dom.core.Element.(js.jquery.MouseClickEvent) -> Unit) : js.jquery.JQuery defined in js.jquery.JQuery
Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => …} notation
But the only way I can define the required lambda is to use this long-hand:
val f: Element.(MouseClickEvent) -> Unit = {e -> }
jq().click(f)
Is there something shorter (or at least doesn’t require a separate statement)?