@@ -16818,13 +16818,6 @@ namespace ts {
16818
16818
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
16819
16819
// and issue an error. Otherwise, actually compare the structure of the two types.
16820
16820
function recursiveTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16821
- tracing.begin(tracing.Phase.Check, "recursiveTypeRelatedTo", { sourceId: source.id, targetId: target.id });
16822
- const result = recursiveTypeRelatedToWorker(source, target, reportErrors, intersectionState);
16823
- tracing.end();
16824
- return result;
16825
- }
16826
-
16827
- function recursiveTypeRelatedToWorker(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16828
16821
if (overflow) {
16829
16822
return Ternary.False;
16830
16823
}
@@ -16909,6 +16902,13 @@ namespace ts {
16909
16902
}
16910
16903
16911
16904
function structuredTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16905
+ tracing.begin(tracing.Phase.Check, "structuredTypeRelatedTo", { sourceId: source.id, targetId: target.id });
16906
+ const result = structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState);
16907
+ tracing.end();
16908
+ return result;
16909
+ }
16910
+
16911
+ function structuredTypeRelatedToWorker(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16912
16912
if (intersectionState & IntersectionState.PropertyCheck) {
16913
16913
return propertiesRelatedTo(source, target, reportErrors, /*excludedProperties*/ undefined, IntersectionState.None);
16914
16914
}
0 commit comments