=== tests/cases/compiler/declarationEmitInferedTypeAlias9.ts ===

type Foo<T> = T | { x: Foo<T> };
>Foo : T | { x: T | any; }
>T : T
>T : T
>x : T | { x: T | any; }
>Foo : T | { x: T | any; }
>T : T

var x: Foo<number[]>;
>x : number[] | { x: number[] | any; }
>Foo : T | { x: T | any; }

export function returnSomeGlobalValue() {
>returnSomeGlobalValue : () => number[] | { x: number[] | any; }

    return x;
>x : number[] | { x: number[] | any; }
}
