Actually have a chance to reuse optional property signatures in the node builder (#57995)

This commit is contained in:
Wesley Wigham
2024-03-29 16:47:22 -07:00
committed by GitHub
parent 278b4f9522
commit b0042a7c89
71 changed files with 335 additions and 335 deletions
+1 -1
View File
@@ -8551,7 +8551,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (typeFromTypeNode === type) {
return true;
}
if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
return getTypeWithFacts(type, TypeFacts.NEUndefined) === typeFromTypeNode;
}
return false;