92 lines
1.8 KiB
Plaintext
92 lines
1.8 KiB
Plaintext
|
=== tests/cases/compiler/declFileTypeAnnotationUnionType.ts ===
|
||
|
|
||
|
class c {
|
||
|
>c : c
|
||
|
|
||
|
private p: string;
|
||
|
>p : string
|
||
|
}
|
||
|
module m {
|
||
|
>m : typeof m
|
||
|
|
||
|
export class c {
|
||
|
>c : c
|
||
|
|
||
|
private q: string;
|
||
|
>q : string
|
||
|
}
|
||
|
export class g<T> {
|
||
|
>g : g<T>
|
||
|
>T : T
|
||
|
|
||
|
private r: string;
|
||
|
>r : string
|
||
|
}
|
||
|
}
|
||
|
class g<T> {
|
||
|
>g : g<T>
|
||
|
>T : T
|
||
|
|
||
|
private s: string;
|
||
|
>s : string
|
||
|
}
|
||
|
|
||
|
// Just the name
|
||
|
var k: c | m.c = new c() || new m.c();
|
||
|
>k : c | m.c
|
||
|
>c : c
|
||
|
>m : unknown
|
||
|
>c : m.c
|
||
|
>new c() || new m.c() : c | m.c
|
||
|
>new c() : c
|
||
|
>c : typeof c
|
||
|
>new m.c() : m.c
|
||
|
>m.c : typeof m.c
|
||
|
>m : typeof m
|
||
|
>c : typeof m.c
|
||
|
|
||
|
var l = new c() || new m.c();
|
||
|
>l : c | m.c
|
||
|
>new c() || new m.c() : c | m.c
|
||
|
>new c() : c
|
||
|
>c : typeof c
|
||
|
>new m.c() : m.c
|
||
|
>m.c : typeof m.c
|
||
|
>m : typeof m
|
||
|
>c : typeof m.c
|
||
|
|
||
|
var x: g<string> | m.g<number> | (() => c) = new g<string>() || new m.g<number>() || (() => new c());
|
||
|
>x : g<string> | m.g<number> | (() => c)
|
||
|
>g : g<T>
|
||
|
>m : unknown
|
||
|
>g : m.g<T>
|
||
|
>c : c
|
||
|
>new g<string>() || new m.g<number>() || (() => new c()) : g<string> | m.g<number> | (() => c)
|
||
|
>new g<string>() || new m.g<number>() : g<string> | m.g<number>
|
||
|
>new g<string>() : g<string>
|
||
|
>g : typeof g
|
||
|
>new m.g<number>() : m.g<number>
|
||
|
>m.g : typeof m.g
|
||
|
>m : typeof m
|
||
|
>g : typeof m.g
|
||
|
>(() => new c()) : () => c
|
||
|
>() => new c() : () => c
|
||
|
>new c() : c
|
||
|
>c : typeof c
|
||
|
|
||
|
var y = new g<string>() || new m.g<number>() || (() => new c());
|
||
|
>y : g<string> | m.g<number> | (() => c)
|
||
|
>new g<string>() || new m.g<number>() || (() => new c()) : g<string> | m.g<number> | (() => c)
|
||
|
>new g<string>() || new m.g<number>() : g<string> | m.g<number>
|
||
|
>new g<string>() : g<string>
|
||
|
>g : typeof g
|
||
|
>new m.g<number>() : m.g<number>
|
||
|
>m.g : typeof m.g
|
||
|
>m : typeof m
|
||
|
>g : typeof m.g
|
||
|
>(() => new c()) : () => c
|
||
|
>() => new c() : () => c
|
||
|
>new c() : c
|
||
|
>c : typeof c
|
||
|
|