Closed lauchness closed 2 years ago
I think I found a solution.
I can include my specific *.d.ts files in my tsc-files
call, which then appends those files the files
property in the temporary tsconfig.json.
e.g. in package.json
"scripts": {
// ...other scripts
"type-check": "tsc-files --noEmit --pretty $(git diff --staged --name-only) *.d.ts",
},
or in .lintstagedrc.js
module.exports = {
"**/*.(ts|tsx)": [
"tsc-files --noEmit --pretty scss.d.ts",
],
};
Hello, thanks for maintaining this project!
I am trying to run tsc-files as part of a pre-commit hook.
In my
tsconfig.json
I have specified some values in theinclude
property for custom module declarations, which are then overwritten in the tsc-files code: https://github.com/gustavopch/tsc-files/blob/master/lib/index.js#L39We obviously don't want to bring in the entire
include
array, as that would defeat the purpose of only bringing the lint-staged files.I need a means of including my specific declarations files.