If you hit the limits of TS’s inference capabilities it doesn’t necessarily react — as you would hope for — with a graceful degradation (what would be a compiler error “Type instantiation is excessively deep and possibly infinite.(2589)” in this case) but its behavior gets possibly chaotic. I describe here some specific experiences that I have made. Be warned in case you try to construct complex types.
In the example I present here (Playground), I have construed a (generic) convenience type
type RangeOfNumbers<From, To> = ... that takes a lower and an upper limit and evaluates to
From | From + 1 | ... | To - 1 | To, e.g.