mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-31 08:07:10 -05:00
Don't try to add an implicit undefined for mapped properties outside of strictNullChecks (#60393)
This commit is contained in:
committed by
GitHub
parent
0dda037f9f
commit
12e205b1e9
@@ -6267,7 +6267,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return true;
|
||||
}
|
||||
if (requiresAddingUndefined && annotationType) {
|
||||
annotationType = getOptionalType(annotationType, !isParameter(node));
|
||||
annotationType = addOptionality(annotationType, !isParameter(node));
|
||||
}
|
||||
return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user