Skip to content

Commit

Permalink
feat: add TypeScript definition file
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 12, 2019
1 parent 7dc4157 commit 7808c3d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare function realpath(filepath: string): string;
declare namespace realpath {
var sync: typeof realpathSync;
}
declare function realpathSync(filepath: string): string;
export = realpath;
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"name": "realpath-native",
"version": "0.0.0-development",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"description": "Use the system's native `realpath`",
"repository": "SimenB/realpath-native",
Expand Down Expand Up @@ -31,7 +33,7 @@
"eslint-config-simenb-node": "^0.4.11",
"husky": "^0.14.3",
"lint-staged": "^6.0.0",
"prettier": "^1.9.2"
"prettier": "^1.16.4"
},
"commitlint": {
"extends": [
Expand All @@ -48,7 +50,7 @@
"eslint --fix",
"git add"
],
"*.{md,json}": [
"*.{md,json,ts}": [
"prettier --write",
"git add"
]
Expand Down
7 changes: 4 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3358,9 +3358,10 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.9.2:
version "1.10.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93"
prettier@^1.16.4:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==

pretty-format@^21.2.1:
version "21.2.1"
Expand Down

0 comments on commit 7808c3d

Please sign in to comment.