diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 09354d957a3..840a6351a2f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10792,7 +10792,7 @@ namespace ts { } function getUnmatchedProperty(source: Type, target: Type, requireOptionalProperties: boolean) { - const properties = getPropertiesOfObjectType(target); + const properties = target.flags & TypeFlags.Intersection ? getPropertiesOfUnionOrIntersectionType(target) : getPropertiesOfObjectType(target); for (const targetProp of properties) { if (requireOptionalProperties || !(targetProp.flags & SymbolFlags.Optional)) { const sourceProp = getPropertyOfType(source, targetProp.escapedName);