-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
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): numberAnd, add "typings": "index.d.ts", in your package.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 with
declare module 'parse-duration' {
export = parse
/**
* convert `str` to ms
*/
function parse (str: string): number
}ryan-cahill, eronisko, jurijzahn8019, 0sean, rikkegammelmark and 1 more
Metadata
Metadata
Assignees
Labels
No labels