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.21.2 to 2.22.0

26

dist/core.js

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

ignoreEmptyType: lintOptions.ignoreEmptyType,
reportSemanticError: lintOptions.reportSemanticError,
};

@@ -121,2 +122,25 @@ sourceFile.forEachChild(node => {

anys.push(...context.typeCheckResult.anys.map((a) => ({ file, ...a })));
if (lintOptions.reportSemanticError) {
const diagnostics = program.getSemanticDiagnostics(sourceFile);
for (const diagnostic of diagnostics) {
if (diagnostic.start !== undefined) {
totalCount++;
let text;
if (typeof diagnostic.messageText === 'string') {
text = diagnostic.messageText;
}
else {
text = diagnostic.messageText.messageText;
}
const { line, character } = ts.getLineAndCharacterOfPosition(sourceFile, diagnostic.start);
anys.push({
line,
character,
text,
kind: 6 /* FileAnyInfoKind.semanticError */,
file,
});
}
}
}
if (lintOptions.fileCounts) {

@@ -166,2 +190,3 @@ fileCounts.set(file, {

ignoreEmptyType: false,
reportSemanticError: false,
};

@@ -229,2 +254,3 @@ /**

ignoreEmptyType: lintOptions.ignoreEmptyType,
reportSemanticError: lintOptions.reportSemanticError,
};

@@ -231,0 +257,0 @@ sourceFile.forEachChild(node => {

4

dist/interfaces.d.ts

@@ -27,3 +27,4 @@ import * as ts from 'typescript';

unsafeTypeAssertion = 4,
unsafeNonNull = 5
unsafeNonNull = 5,
semanticError = 6
}

@@ -72,2 +73,3 @@ /**

ignoreEmptyType: boolean;
reportSemanticError: boolean;
}

@@ -74,0 +76,0 @@ export interface FileContext extends CommonOptions {

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

@@ -5,0 +5,0 @@ "main": "dist/index.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