private resolveFiles(): string[] const includes = this.options.include.flatMap(pattern => glob.sync(pattern)); const excludes = new Set(this.options.exclude.flatMap(pattern => glob.sync(pattern))); return includes.filter(f => !excludes.has(f));
if (!report.summary.passed) process.exit(1); ts screener
return this.buildReport(reports);
private checkStrictOptions(sourceFile: ts.SourceFile): string[] const errors: string[] = []; if (this.options.noImplicitAny) // Check compiler flags via parsing tsconfig.json if needed // Simplified: we already flagged implicitAnyLines private resolveFiles(): string[] const includes = this
ts.forEachChild(node, visit); ;
);
program .name('ts-screener') .description('Analyze TypeScript type coverage and any usage') .option('-i, --include <patterns>', 'glob patterns to include', ' /*.ts,tsx') .option('-e, --exclude <patterns>', 'glob patterns to exclude', 'node_modules/ ') .option('--target-coverage <number>', 'minimum type coverage %', '80') .option('--json', 'output as JSON') .option('--no-implicit-any', 'fail on implicit any') .action(async (options) => const screener = new TypeScriptScreener( include: options.include.split(','), exclude: options.exclude.split(','), targetTypeCoverage: parseFloat(options.targetCoverage), noImplicitAny: options.noImplicitAny, ); return includes.filter(f =>