Socket
Socket
Sign inDemoInstall

type-coverage

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-coverage - npm Package Compare versions

Comparing version 1.3.0-alpha.0 to 1.3.0-alpha.1

6

dist/core.d.ts
export declare function lint(project: string, detail: boolean, debug: boolean): Promise<{
correctCount: number;
totalCount: number;
anys: {
file: string;
line: number;
character: number;
text: string;
}[];
}>;

5

dist/core.js

@@ -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}%`);

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc