Color.js typing for Coords is number even though functions may return null
Closed this issue · 0 comments
KeyboardDanni commented
Related to #409
The typing for Coords
seems to be out of date:
Line 27 in 551021a
Since NaN
has been replaced with null
, there is no longer a guarantee that the values coming back will be number
. Was getting a runtime error with the latest git when my color sliders tried to call toString()
on the color values, but one of them ended up being null
. I was confused at first because TypeScript didn't complain about the typing.