mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Actually have a chance to reuse optional property signatures in the node builder (#57995)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user