I got myself into a situation where using recursive conditional types causes TS to throw Type instantiation is excessively deep and possibly infinite.(2589):
type A<Q, S> = Q extends { a: any } ? A<Q["a"], S> : never;
interface B<T> {
f<Q>(q: Q): A<Q, T>;
}
type C = B<{}> extends B<infer X> ? X : never;
type X = C extends any ? true : false;
// ^ raises the error here
In my view, C is clearly {} and thus X should be true.