TypeScript/tests/baselines/reference/declFileTypeAnnotationParenType.types
2015-04-15 16:44:20 -07:00

44 lines
847 B
Plaintext

=== tests/cases/compiler/declFileTypeAnnotationParenType.ts ===
class c {
>c : c
private p: string;
>p : string
}
var x: (() => c)[] = [() => new c()];
>x : (() => c)[]
>c : c
>[() => new c()] : (() => c)[]
>() => new c() : () => c
>new c() : c
>c : typeof c
var y = [() => new c()];
>y : (() => c)[]
>[() => new c()] : (() => c)[]
>() => new c() : () => c
>new c() : c
>c : typeof c
var k: (() => c) | string = (() => new c()) || "";
>k : string | (() => c)
>c : c
>(() => new c()) || "" : string | (() => c)
>(() => new c()) : () => c
>() => new c() : () => c
>new c() : c
>c : typeof c
>"" : string
var l = (() => new c()) || "";
>l : string | (() => c)
>(() => new c()) || "" : string | (() => c)
>(() => new c()) : () => c
>() => new c() : () => c
>new c() : c
>c : typeof c
>"" : string