Unfortunately, in practice you can't get infinite recursion, it appears there is some sort of a hidden safeguard against it.
I actually tried to kill the playground page by deliberately applying type helper to a self referencing interface and trying to get hints, which was supposed to give me infinite amount of them and hang everything, but it just doesn't work that way. I wonder what are the checks under the hood that guard against it.
UPT: oh, yeah, there's a safeguard in tsif (instantiationDepth === 50 || instantiationCount >= 5000000) :D
Unfortunately, in practice you can't get infinite recursion, it appears there is some sort of a hidden safeguard against it.
I actually tried to kill the playground page by deliberately applying type helper to a self referencing interface and trying to get hints, which was supposed to give me infinite amount of them and hang everything, but it just doesn't work that way. I wonder what are the checks under the hood that guard against it.
UPT: oh, yeah, there's a safeguard in ts
if (instantiationDepth === 50 || instantiationCount >= 5000000)
:DOkay. Well I wrote the comment cuz vscode complained about the error and it was way slower than usual with type checking..
Anyways, nice post and answer : )