type-coverage
Advanced tools
Comparing version 1.3.0-alpha.0 to 1.3.0-alpha.1
export declare function lint(project: string, detail: boolean, debug: boolean): Promise<{ | ||
correctCount: number; | ||
totalCount: number; | ||
anys: { | ||
file: string; | ||
line: number; | ||
character: number; | ||
text: string; | ||
}[]; | ||
}>; |
@@ -20,2 +20,3 @@ "use strict"; | ||
let totalCount = 0; | ||
let anys = []; | ||
function collectData(node, file, sourceFile) { | ||
@@ -31,3 +32,3 @@ const type = checker.getTypeAtLocation(node); | ||
else if (detail) { | ||
console.log(`${file}:${line + 1}:${character + 1}: ${node.getText(sourceFile)}`); | ||
anys.push({ file, line, character, text: node.getText(sourceFile) }); | ||
} | ||
@@ -864,4 +865,4 @@ } | ||
} | ||
return { correctCount, totalCount }; | ||
return { correctCount, totalCount, anys }; | ||
} | ||
exports.lint = lint; |
@@ -20,3 +20,6 @@ "use strict"; | ||
suppressError = argv.suppressError; | ||
const { correctCount, totalCount } = await core_1.lint(argv.p || argv.project || '.', argv.detail, argv.debug); | ||
const { correctCount, totalCount, anys } = await core_1.lint(argv.p || argv.project || '.', argv.detail, argv.debug); | ||
for (const { file, line, character, text } of anys) { | ||
console.log(`${file}:${line + 1}:${character + 1}: ${text}`); | ||
} | ||
const percent = Math.round(100 * correctCount / totalCount); | ||
@@ -23,0 +26,0 @@ console.log(`${correctCount} / ${totalCount} ${percent}%`); |
{ | ||
"name": "type-coverage", | ||
"version": "1.3.0-alpha.0", | ||
"version": "1.3.0-alpha.1", | ||
"description": "A CLI tool to check type coverage for typescript code", | ||
@@ -5,0 +5,0 @@ "main": "dist/core.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
59714
1026
0