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

Fix type inference for output: 'array' when precision is configured #151

Closed laughinghan closed 2 years ago

laughinghan commented 2 years ago

Return type incorrectly typed as [number, string], which is normally true for output: 'array', but it's actually [string, string] if precision is configured