What is the differences between the 2 types that one type throws a TS error and the second type doesn't?
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
