jkroso / parse-duration

convert a human readable duration to ms
MIT License
243 stars 37 forks source link

Fix the type definitions for CJS #48

Closed remcohaszing closed 1 year ago

remcohaszing commented 1 year ago

Suggestion 1 from #23 was the correct approach. However, solution 2 was applied in #24. As a result, parse now has an index key of type number, except for the default property, which is a circular self reference.

As a result, the types look a bit funky, but they are now technically correct.