avoidwork / filesize.js

JavaScript library to generate a human readable String describing the file size
https://filesizejs.com
BSD 3-Clause "New" or "Revised" License
1.61k stars 97 forks source link

[Typescript] Typing file out of date #139

Closed willsteinmetz closed 2 years ago

willsteinmetz commented 3 years ago

It appears that the typing file is out of date. In the code in the repo, it references version 6.0.1.

When I try to import the library into a Typescript file, the transpiler gives me an error that filesize doesn't have a default export (which actually does match the typing file in the package).

So far I haven't figured out a work around and I think it may just be that the typing file needs to be updated.

avoidwork commented 3 years ago

yup, feel free to make a PR; otherwise this bug will sit forever.

avoidwork commented 3 years ago

afaik the typescript file has never been correct. the original authors of it only used 1 output type when 3 existed.