mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Only obtain regular type of fresh object literal type if necessary
This commit is contained in:
parent
7f6608b2b9
commit
758cdf3378
@ -4640,7 +4640,9 @@ namespace ts {
|
||||
// and intersection types are further deconstructed on the target side, we don't want to
|
||||
// make the check again (as it might fail for a partial target type). Therefore we obtain
|
||||
// the regular source type and proceed with that.
|
||||
source = getRegularTypeOfObjectLiteral(source);
|
||||
if (target.flags & TypeFlags.UnionOrIntersection) {
|
||||
source = getRegularTypeOfObjectLiteral(source);
|
||||
}
|
||||
}
|
||||
|
||||
let saveErrorInfo = errorInfo;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user