Skip to content

Commit f914cb0

Browse files
committed
1 parent 5f183ad commit f914cb0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24457,16 +24457,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2445724457
}
2445824458
return Ternary.False;
2445924459
}
24460-
if (isObjectLiteralType(target)) {
24460+
if (getObjectFlags(target) & ObjectFlags.FreshLiteral) {
2446124461
for (const sourceProp of excludeProperties(getPropertiesOfType(source), excludedProperties)) {
2446224462
if (!getPropertyOfObjectType(target, sourceProp.escapedName)) {
24463-
const sourceType = getTypeOfSymbol(sourceProp);
24464-
if (!(sourceType.flags & TypeFlags.Undefined)) {
24465-
if (reportErrors) {
24466-
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target));
24467-
}
24468-
return Ternary.False;
24463+
if (reportErrors) {
24464+
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target));
2446924465
}
24466+
return Ternary.False;
2447024467
}
2447124468
}
2447224469
}

0 commit comments

Comments
 (0)