While learning ReasonML and bs-webapi, I had a hard time understanding how to use a function in the bs-webapi library. Since there is no documentation, I thought I could look at the code, but here I found something confusing.
Webapi.Dom.EventTarget.addEventListener( "click", someClickHandler, Webapi.Dom.Element.asEventTarget(element) )
This takes three parameters, but looking at the library function
[@bs.send.pipe : T.t] external addEventListener : (string, Dom.event => unit) => unit = "";
I can only see two parameters.