TypeScript/tests/baselines/reference/conditionalTypeVarianceBigArrayConstraintsPerformance.types
Wesley Wigham 612c92d603
Track source and target relationship stack depth seperately, only increase on change in value (#41821)
* Track source and target relationship stack depth seperately, only increase on change in value

* Add baselines for test from #43485

* Bail on unwrapping conditional constraints on the source side when the source conditional is already known to be spooling out of control

* More usage of isDeeplyNestedType to block _specifically_ conditional recursion on only one side

* Negative cases of getNarrowedType that match the exact type should be filtered out, even when generic

* Add test and fix for #44404

* Swap to manually specifying left and right recursion

* Rename Left -> Source, Right -> Target

Co-authored-by: Andrew Branch <andrew@wheream.io>
2021-09-30 16:58:40 -07:00

25 lines
501 B
Plaintext

=== tests/cases/compiler/conditionalTypeVarianceBigArrayConstraintsPerformance.ts ===
/// <reference path="react16.d.ts" />
type Stuff<T> =
>Stuff : Stuff<T>
T extends keyof JSX.IntrinsicElements
>JSX : any
? JSX.IntrinsicElements[T]
>JSX : any
: any;
function F<T, U>(p1: Stuff<T>, p2: Stuff<U>) {
>F : <T, U>(p1: Stuff<T>, p2: Stuff<U>) => void
>p1 : Stuff<T>
>p2 : Stuff<U>
p1 = p2; // Error
>p1 = p2 : Stuff<U>
>p1 : Stuff<T>
>p2 : Stuff<U>
}