You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type definition says percentage is a string, but it can also be NaN, so the type should be string | number.
On a related note, I find it weird that percent is a toFixed-stringified version of the number rather than just a number. This would make the type more consistently and expectedly just number. Also I find it a little unexpected that the range of it is 0 to 100 instead of 0 to 1, but that's more of a preference.
If you ever making a breaking change to this library, these changes would be welcome.
The text was updated successfully, but these errors were encountered:
The type definition says
percentage
is astring
, but it can also beNaN
, so the type should bestring | number
.On a related note, I find it weird that percent is a
toFixed
-stringified version of the number rather than just a number. This would make the type more consistently and expectedly justnumber
. Also I find it a little unexpected that the range of it is 0 to 100 instead of 0 to 1, but that's more of a preference.If you ever making a breaking change to this library, these changes would be welcome.
The text was updated successfully, but these errors were encountered: