Skip to content

Commit b3e5f34

Browse files
authored
Add type checking of TypeScript declarations (#111)
`npm test` now runs unit tests and type checking of the TypeScript declarations. This should help avoid issues like #110.
1 parent c01dbf6 commit b3e5f34

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
},
2222
"homepage": "https://github.com/simonplend/express-json-validator-middleware#readme",
2323
"scripts": {
24-
"test": "tap",
24+
"test": "npm run test:unit && npm run test:types",
25+
"test:unit": "tap",
26+
"test:types": "tsc --noEmit --strict src/index.d.ts",
2527
"lint": "eslint \"src/*.js\" --fix",
2628
"prepush": "npm run lint && npm run test",
2729
"prepublish": "npm run lint && npm run test"
@@ -37,7 +39,8 @@
3739
"mocha": "^7.1.1",
3840
"prettier": "^1.19.1",
3941
"simple-get": "^4.0.0",
40-
"tap": "^15.1.5"
42+
"tap": "^15.1.5",
43+
"typescript": "^4.6.4"
4144
},
4245
"dependencies": {
4346
"@types/express": "^4.17.3",

0 commit comments

Comments
 (0)