Open MonaMayrhofer opened 8 months ago
I think you are right. It seems to be an oversight. I would fix it but I don't know what are the best practises to make these kinds of type changes in purescript[-web] ecosystem because if would break any other code depending on this declaration.
I have no experience with the procedures either, this is definitely a breaking change, so a major version change is the least that should happen... I dont know what the common practices to reduce churn in the ecosystem are tho.
From what i can tell e.g from a quick look at the canvas package within org there dont seem to be any other things to do?
I guess the folks over at the discord might have some insights?
Is there a reason that the
item
function does not returnMaybe DOMRect
?https://github.com/purescript-web/purescript-web-geometry/blob/54991647c5a8108c65f52e749c5ecc31ef69f6db/src/Web/Geometry/DOMRectList.purs#L8-L8
As far as I can tell, the javascript is just a regular indexing into a collection, which may or may not return null, which should definitely be represented in the type system.