Comparing version 0.24.0 to 0.24.1
@@ -24,14 +24,15 @@ "use strict"; | ||
node.expression; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const maybeAlias = checker.getSymbolAtLocation(expression); | ||
const symbol = maybeAlias.flags & typescript_1.SymbolFlags.Alias ? | ||
checker.getAliasedSymbol(maybeAlias) : | ||
maybeAlias; | ||
const identifier = symbol.getName(); | ||
// Check if the call type is a valid assertion | ||
if (assertionFnNames.has(identifier)) { | ||
const assertion = identifier; | ||
const nodes = (_a = assertions.get(assertion)) !== null && _a !== void 0 ? _a : new Set(); | ||
nodes.add(node); | ||
assertions.set(assertion, nodes); | ||
if (maybeAlias) { | ||
const symbol = maybeAlias.flags & typescript_1.SymbolFlags.Alias ? | ||
checker.getAliasedSymbol(maybeAlias) : | ||
maybeAlias; | ||
const identifier = symbol.getName(); | ||
// Check if the call type is a valid assertion | ||
if (assertionFnNames.has(identifier)) { | ||
const assertion = identifier; | ||
const nodes = (_a = assertions.get(assertion)) !== null && _a !== void 0 ? _a : new Set(); | ||
nodes.add(node); | ||
assertions.set(assertion, nodes); | ||
} | ||
} | ||
@@ -38,0 +39,0 @@ } |
{ | ||
"name": "tsd", | ||
"version": "0.24.0", | ||
"version": "0.24.1", | ||
"description": "Check TypeScript type definitions", | ||
@@ -24,4 +24,4 @@ "license": "MIT", | ||
"clean": "del-cli dist", | ||
"lint": "eslint 'source/**/*'", | ||
"lint:fix": "eslint --fix 'source/**/*'" | ||
"lint": "eslint \"source/**/*\"", | ||
"lint:fix": "eslint --fix \"source/**/*\"" | ||
}, | ||
@@ -28,0 +28,0 @@ "files": [ |
@@ -246,3 +246,3 @@ # tsd ![CI](https://github.com/SamVerschueren/tsd/workflows/CI/badge.svg) | ||
Asserts that the type of `expression` is identical to type `T`. | ||
#### --typings | ||
@@ -249,0 +249,0 @@ Alias: `-t` |
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
1558
81613