Skip to content

Commit

Permalink
chore: add TypeScript config to generate definition
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurdenner committed Oct 23, 2020
1 parent aad406e commit c5b4858
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"changelog": "conventional-changelog -p @commitlint/config-conventional -s -i CHANGELOG.md && prettier CHANGELOG.md --write",
"doc": "jsdoc2md src/index.js > API.md && prettier API.md --write",
"doc": "tsc && jsdoc2md src/index.js > API.md && prettier API.md --write",
"dupe-check": "yarn jsinspect ./src",
"lint": "eslint . --cache --ext js,jsx,ts,tsx --ignore-path .gitignore",
"prettier": "prettier . --write --ignore-path .gitignore",
Expand Down Expand Up @@ -75,6 +75,7 @@
"jest": "^26.5.3",
"jsdoc-to-markdown": "^6.0.1",
"jsinspect": "^0.12.7",
"prettier": "2.1.2"
"prettier": "2.1.2",
"typescript": "^4.0.3"
}
}
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"include": ["src/index.js"],
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"allowJs": true
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5581,6 +5581,11 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==

typical@^2.4.2, typical@^2.6.0, typical@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d"
Expand Down

0 comments on commit c5b4858

Please sign in to comment.