EvanHahn / HumanizeDuration.js

361000 becomes "6 minutes, 1 second"
https://evanhahn.github.io/HumanizeDuration.js/
The Unlicense
1.65k stars 175 forks source link

Added TS definition draft #113

Closed dnasir closed 7 years ago

dnasir commented 7 years ago

This is just a draft I made using dts-gen and some manual work. I needed it for my project because I prefer to enable the noImplicitAny option in my projects. I hope you'll publish it as @types/humanize-duration so I can add it as a project dependency instead of manually including it in my project.

dnasir commented 7 years ago

I'm not sure but I suspect you need to submit this to the DefinitelyTyped repo. There's a contribution guide on how to do this here: http://definitelytyped.org/guides/contributing.html

I can try to help out with this, but it really depends on how much spare time I have :P

I'm not too familiar with testing the type declarations, but I'm currently reading up on it.

Here's a simple test example for the moment-timezone library declaration file: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/79f2e4fa0e657342e5361f4a0fab1044fa2168c8/moment-timezone/moment-timezone-tests.ts

EvanHahn commented 7 years ago

I'm more than comfortable letting you own the semi-official Humanize Duration Typescript declaration. Is that something you would be able to take on at some point?

dnasir commented 7 years ago

@EvanHahn Sure. I'll try to add the necessary tests as soon as I can, along with all the stuff required by the DefinitelyTyped repo.

EvanHahn commented 7 years ago

Given that this will go to DefinitelyTyped, I'm going to close this.

RigoOnRails commented 5 years ago

Added TypeScript type definitions to DefinitelyTyped under @types/humanize-duration.