Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onProgress percentage type wrong #68

Open
vincerubinetti opened this issue Aug 1, 2024 · 1 comment
Open

onProgress percentage type wrong #68

vincerubinetti opened this issue Aug 1, 2024 · 1 comment

Comments

@vincerubinetti
Copy link

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.

@ibrod83
Copy link
Owner

ibrod83 commented Aug 4, 2024

You're right, that was some stupid misunderstanding on my part. As you said, this is breaking change, so perhaps in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants