Numeral-js
Numeral-js copied to clipboard
Add type declarations to package?
Hi,
at the moment, the type declarations available for numeral seem outdated (see https://www.npmjs.com/package/@types/numeral or directly here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/types-2.0/numeral/index.d.ts). The recommended way instead of keeping separate declarations in the @types/DefinitelyTyped repo is to include them in your NPM package, anyway:
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
Do you see any chance for this?
Thank you!
I do not use type script so if someone would like to create a pull request with this i will add it.
Thanks for the quick reply.
Creating an initial type declaration and adding numeral to the exclusion list of definitely typed wouldn't be that hard. The problem however is that it would require monitoring this repo and apply updates continuously, whenever you change your API surface. Even worse, you wouldn't want to keep an outdated version of the declarations in your package, as this would make it really hard for people to integrate proper ones from somewhere else. So, it's not done with a single pull request, and that's some comittment I'm probably not able to keep up. Do you have any regular contributors with a TypeScript background that could take on the task?
Adding typing would definitely help TS devs.
There are typings already available: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/numeral/index.d.ts
"@types/numeral": "^2.0.4",