File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10862,15 +10862,13 @@ namespace ts {
1086210862
1086310863 function findMatchingTypeReferenceOrTypeAliasReference(source: Type, unionTarget: UnionOrIntersectionType) {
1086410864 if (source.flags & TypeFlags.Object && (source as ObjectType).objectFlags & (ObjectFlags.Reference | ObjectFlags.Anonymous) && unionTarget.flags & TypeFlags.Union) {
10865- return find(unionTarget.types, t => {
10866- if (t .flags & TypeFlags.Object) {
10867- if ((source as ObjectType).objectFlags & (t as ObjectType).objectFlags & ObjectFlags.Reference) {
10868- return (source as TypeReference).target === (t as TypeReference).target;
10865+ return find(unionTarget.types, target => {
10866+ if (target .flags & TypeFlags.Object) {
10867+ if ((source as ObjectType).objectFlags & (target as ObjectType).objectFlags & ObjectFlags.Reference) {
10868+ return (source as TypeReference).target === (target as TypeReference).target;
1086910869 }
10870- if ((source as ObjectType).objectFlags & (t as ObjectType).objectFlags & ObjectFlags.Anonymous) {
10871- // TODO (drosen): Not sure why the following isn't sufficient.
10872- // return !!(source as AnonymousType).aliasSymbol && (source as AnonymousType).aliasSymbol === (target as AnonymousType).aliasSymbol;
10873- return false;
10870+ if ((source as ObjectType).objectFlags & (target as ObjectType).objectFlags & ObjectFlags.Anonymous) {
10871+ return !!(source as AnonymousType).aliasSymbol && (source as AnonymousType).aliasSymbol === (target as AnonymousType).aliasSymbol;
1087410872 }
1087510873 }
1087610874 return false;
You can’t perform that action at this time.
0 commit comments