plantain-00 / type-coverage

A CLI tool to check type coverage for typescript code
MIT License
1.26k stars 44 forks source link

Empty project causes result to have `NaN%` #137

Closed Logicer16 closed 6 months ago

Logicer16 commented 6 months ago

When running type-coverage in an empty project (i.e. typescript file has no contents which can have types), the result includes NaN%. This is not meaningful and NaN should instead be handled appropriately.

Version(if relevant): 2.28.1

Environment(if relevant): Windows 11

Expected:

No NaN%

Actual:

$ pnpx type-coverage

0 / 0 NaN%
type-coverage success.
plantain-00 commented 6 months ago

v2.28.2 should fix it.

Logicer16 commented 6 months ago

I know it wasn't a difficult fix but I'm still amazed at how fast you fixed this. Thank you so much!