Can you explain the difference between two types, where one throws a TS error and the other does not?
type ScopeItem =
| string
| {
all: string;
team: string;
};
type ScopesTree = Record<string, ScopeItem | Record<string, ScopesTree>>; // error: Type alias 'ScopesTree' circular references itself
type ScopesTree2 = Record<string, ScopeItem | { [key: string]: ScopesTree2 }>; // no error