Socket
Socket
Sign inDemoInstall

type-coverage-core

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-coverage-core - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

3

dist/core.d.ts
import ts from 'typescript';
import { AnyInfo, LintOptions } from './interfaces';
import { AnyInfo, LintOptions, FileTypeCheckResult } from './interfaces';
/**

@@ -11,2 +11,3 @@ * @public

program: ts.Program;
fileCounts: Map<string, Pick<FileTypeCheckResult, "correctCount" | "totalCount">>;
}>;

@@ -57,2 +57,3 @@ "use strict";

const anys = [];
const fileCounts = new Map();
for (const { sourceFile, file, hash, cache } of sourceFileInfos) {

@@ -63,2 +64,8 @@ if (cache) {

anys.push(...cache.anys.map((a) => ({ file, ...a })));
if (lintOptions.fileCounts) {
fileCounts.set(file, {
correctCount: cache.correctCount,
totalCount: cache.totalCount,
});
}
continue;

@@ -88,2 +95,8 @@ }

anys.push(...context.typeCheckResult.anys.map((a) => ({ file, ...a })));
if (lintOptions.fileCounts) {
fileCounts.set(file, {
correctCount: context.typeCheckResult.correctCount,
totalCount: context.typeCheckResult.totalCount
});
}
if (lintOptions.enableCache) {

@@ -108,3 +121,3 @@ const resultCache = typeCheckResult.cache[file];

}
return { correctCount, totalCount, anys, program };
return { correctCount, totalCount, anys, program, fileCounts };
}

@@ -119,3 +132,4 @@ exports.lint = lint;

ignoreCatch: false,
ignoreFiles: undefined
ignoreFiles: undefined,
fileCounts: false,
};

@@ -26,2 +26,3 @@ import ts from 'typescript';

ignoreFiles?: string | string[];
fileCounts: boolean;
}

@@ -28,0 +29,0 @@ export interface FileContext {

{
"name": "type-coverage-core",
"version": "2.2.0",
"version": "2.3.0",
"description": "A library to check type coverage for typescript code",

@@ -22,3 +22,3 @@ "main": "dist/index.js",

},
"gitHead": "bb02e64c1f349cbf94e1c8b1a5f20e89dd720c2b"
"gitHead": "b7466ef897408557d91bbe2138f45efe7053c029"
}
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