Skip to content

Commit

Permalink
test(ts): Added a TS compilation check
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Aug 6, 2024
1 parent 03a4f4c commit 9a7ed49
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
"cordova-windows"
],
"scripts": {
"test": "npm run lint",
"lint": "eslint ."
"test": "npm run lint && npm run test:types",
"lint": "eslint .",
"test:types": "tsc --project ./types/tests/tsconfig.json"
},
"author": "Apache Software Foundation",
"license": "Apache-2.0",
Expand All @@ -48,6 +49,7 @@
}
},
"devDependencies": {
"@cordova/eslint-config": "^5.0.0"
"@cordova/eslint-config": "^5.0.0",
"typescript": "^5.1.6"
}
}
4 changes: 4 additions & 0 deletions types/tests/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

// Intentionally empty file, but
// further tests can be added to ensure type usages
// can work as expected
11 changes: 11 additions & 0 deletions types/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"noEmit": true
},
"files": [
"../index.d.ts"
],
"include": [
"./*.ts"
]
}

0 comments on commit 9a7ed49

Please sign in to comment.