TS2456

Type alias 'MyValue' circularly references itself.

Broken Code ❌

type MyValue = number | string | Record<string, MyValue>;

Fixed Code ✔️

When defining a recursive type, you have to use the object syntax:

type MyValue = number | string | { [key: string]: MyValue };