Closed
Description
TypeScript Version: 4.0.0-dev
Code
type Foo1 = { x: string } & { [x: number]: Foo1 }; // Circularity error
type Foo2 = { x: string } & { [K in number]: Foo2 }; // No error
Expected behavior:
No errors.
Actual behavior:
Error: Type alias 'Foo1' circularly references itself.
Playground Link: