Skip to content

Commit

Permalink
Add type definitions for TypeScript users (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkoops authored Mar 23, 2022
1 parent b85aec2 commit 2cd46bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/url-join.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Join all arguments together and normalize the resulting url.
* This works similar to `path.join` but you shouldn't use `path.join` for urls since it works
* differently depending on the operating system and also doesn't work for some cases.
*/
declare function urlJoin(...parts: string[]): string;
declare function urlJoin(parts: string[]): string;

export = urlJoin;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "4.0.1",
"description": "Join urls and normalize as in path.join.",
"main": "lib/url-join.js",
"types": "lib/url-join.d.ts",
"scripts": {
"test": "mocha --require should"
},
Expand Down

0 comments on commit 2cd46bc

Please sign in to comment.