$ npm install @kentcdodds/typecheck-modulesTypecheck one or more TypeScript files while resolving the TypeScript version from the target module(s), not from this CLI.
npm install -D @kentcdodds/typecheck-modules
npx @kentcdodds/typecheck-modules <file|dir|glob ...>
typecheck-modules <file|dir|glob ...>
node ./cli.js <file|dir|glob ...>
Examples:
typecheck-modules ./playground
typecheck-modules ./playground/index.ts
typecheck-modules "./playground/**/*.{ts,tsx}"
typecheck-modules --ignore "**/*.test.ts" ./playground
typescript from the nearest node_modules above each module
(using the closest package.json when available).tsconfig.json is found, it uses those compiler options.tsconfig.json is found, it falls back to TypeScript defaults and
warns once per directory group (similar to tsc file.ts behavior)..ts and .tsx.By default, these are ignored during directory and glob expansion:
node_modules, .git, dist, build, out, .cache, coverage,
test-output, test-results, test-reportsProvide --ignore to replace the defaults entirely:
typecheck-modules --ignore "**/*.test.ts" ./playground
typecheck-modules --ignore "**/fixtures/**" "./playground/**/*.ts"
MIT