We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-function-d-ts.html, this is as simple as
// ./index.d.ts export = parse /** * convert `str` to ms */ function parse (str: string): number
And, add "typings": "index.d.ts", in your package.json. Then, upload to NPM.
"typings": "index.d.ts"
package.json
Might create a Pull Request later. Hope this package will be actively maintained.
Anyways, for anyone reading this, you can also create declaration.d.ts with
declaration.d.ts
declare module 'parse-duration' { export = parse /** * convert `str` to ms */ function parse (str: string): number }
The text was updated successfully, but these errors were encountered:
Any news on this? It would be great to be able to use this with typescript.
Sorry, something went wrong.
Fixed
No branches or pull requests
According to https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-function-d-ts.html, this is as simple as
And, add
"typings": "index.d.ts"
, in yourpackage.json
. Then, upload to NPM.Might create a Pull Request later. Hope this package will be actively maintained.
Anyways, for anyone reading this, you can also create
declaration.d.ts
withThe text was updated successfully, but these errors were encountered: