mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
check return tag in getTypePredicateOfSignature (#25130)
This commit is contained in:
1 parent
7a73c89c57
commit
a7af92eb63
4 files changed
+171
-3
No files matched your search
@@ -7546,9 +7546,9 @@ namespace ts {
|
||||
signature.resolvedTypePredicate = getUnionTypePredicate(signature.unionSignatures) || noTypePredicate;
|
||||
}
|
||||
else {
|
||||
const declaration = signature.declaration;
|
||||
signature.resolvedTypePredicate = declaration && declaration.type && declaration.type.kind === SyntaxKind.TypePredicate ?
|
||||
createTypePredicateFromTypePredicateNode(declaration.type as TypePredicateNode) :
|
||||
const type = signature.declaration && getEffectiveReturnTypeNode(signature.declaration);
|
||||
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ?
|
||||
createTypePredicateFromTypePredicateNode(type) :
|
||||
noTypePredicate;
|
||||
}
|
||||
Debug.assert(!!signature.resolvedTypePredicate);
|
||||
|
||||
Reference in new issue
Block a user