I'm wondering how to create a and set a fill style using bs-webapi and Canvas2d interface in ReasonML.
I think the definition I might need is this:
let fillStyle = (ctx: t) =>
ctx |> fillStyle |> reifyStyle;
But I'm having trouble understanding it.
I have previously used this project as a source of examples, but I think the bs-webapi has changed since that project was authored. At least the following line modeled after the example:
Canvas2d.fillStyle(ctx, "rgba(0,255,255,255)");
gives me this error:
Error: This function has type
Webapi.Canvas.Canvas2d.t => (Webapi.Canvas.Canvas2d.style('a), 'a)
It is applied to too many arguments; maybe you forgot a `;'.