Hello! When I was writing a dom-manipulating code in ReScript, I occasionally wrote the following code and got a type error (using
open Webapi.Dom open Document open Element open Belt.Option let elt = document->getElementById("foo")->map(setInnerHTML)("<p>Hello</p>")
Apparently the reason is that the preceding expression is of type
option<element => string>.