mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
check return tag in getTypePredicateOfSignature (#25130)
This commit is contained in:
committed by
GitHub
parent
7a73c89c57
commit
a7af92eb63
@@ -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