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.
Related to https://github.com/color-js/color.js/issues/409
The typing for
Coords
seems to be out of date:https://github.com/color-js/color.js/blob/551021a05579c8556ae454e46356adaccf9a8d4f/types/src/color.d.ts#L27
Since
NaN
has been replaced withnull
, there is no longer a guarantee that the values coming back will benumber
. Was getting a runtime error with the latest git when my color sliders tried to calltoString()
on the color values, but one of them ended up beingnull
. I was confused at first because TypeScript didn't complain about the typing.