File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -8823,7 +8823,13 @@ namespace ts {
8823
8823
let targetStack: Type[];
8824
8824
let maybeCount = 0;
8825
8825
let depth = 0;
8826
- let expandingFlags = 0;
8826
+ const enum ExpandingFlags {
8827
+ None = 0,
8828
+ Source = 1,
8829
+ Target = 1 << 1,
8830
+ Both = Source | Target,
8831
+ }
8832
+ let expandingFlags = ExpandingFlags.None;
8827
8833
let overflow = false;
8828
8834
let isIntersectionConstituent = false;
8829
8835
@@ -9240,9 +9246,9 @@ namespace ts {
9240
9246
targetStack[depth] = target;
9241
9247
depth++;
9242
9248
const saveExpandingFlags = expandingFlags;
9243
- if (!(expandingFlags & 1 ) && isDeeplyNestedType(source, sourceStack, depth)) expandingFlags |= 1 ;
9244
- if (!(expandingFlags & 2 ) && isDeeplyNestedType(target, targetStack, depth)) expandingFlags |= 2 ;
9245
- const result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : Ternary.Maybe;
9249
+ if (!(expandingFlags & ExpandingFlags.Source ) && isDeeplyNestedType(source, sourceStack, depth)) expandingFlags |= ExpandingFlags.Source ;
9250
+ if (!(expandingFlags & ExpandingFlags.Target ) && isDeeplyNestedType(target, targetStack, depth)) expandingFlags |= ExpandingFlags.Target ;
9251
+ const result = expandingFlags !== ExpandingFlags.Both ? structuredTypeRelatedTo(source, target, reportErrors) : Ternary.Maybe;
9246
9252
expandingFlags = saveExpandingFlags;
9247
9253
depth--;
9248
9254
if (result) {
You can’t perform that action at this time.
0 commit comments