type-coverage-core
Advanced tools
Comparing version 2.8.1 to 2.8.2
@@ -67,7 +67,11 @@ "use strict"; | ||
if (context.strict) { | ||
// exclude `foo as const` and `<const>foo` | ||
if ((typescript_1.default.isAsExpression(node) || typescript_1.default.isTypeAssertion(node)) | ||
&& typescript_1.default.isTypeReferenceNode(node.type) | ||
&& node.type.getText() === 'const') { | ||
return; | ||
if ((typescript_1.default.isAsExpression(node) || typescript_1.default.isTypeAssertion(node))) { | ||
// exclude `foo as const` and `<const>foo` | ||
if (typescript_1.default.isTypeReferenceNode(node.type) && node.type.getText() === 'const') { | ||
return; | ||
} | ||
// exclude `foo as unknown` and `<unknown>foo` | ||
if (node.type.kind === typescript_1.default.SyntaxKind.UnknownKeyword) { | ||
return; | ||
} | ||
} | ||
@@ -74,0 +78,0 @@ const success = collectAny(node, context); |
{ | ||
"name": "type-coverage-core", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"description": "A library to check type coverage for typescript code", | ||
@@ -22,3 +22,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "2ac44acd45a6da1fb887348c2cf18aa857f9e663" | ||
"gitHead": "b18eae530375734b542ee5b2c0d49d244c8a6720" | ||
} |
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
63572
1330