// @declaration: true function f() { type Foo = T | { x: Foo }; var x: Foo; return x; }