1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
=== tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts ===
interface Stuff {
a?: () => Promise<number[]>;
>a : () => Promise<number[]>
b: () => Promise<string>;
>b : () => Promise<string>
c: () => Promise<string>;
>c : () => Promise<string>
d: () => Promise<string>;
>d : () => Promise<string>
e: () => Promise<string>;
>e : () => Promise<string>
f: () => Promise<string>;
>f : () => Promise<string>
g: () => Promise<string>;
>g : () => Promise<string>
h: () => Promise<string>;
>h : () => Promise<string>
i: () => Promise<string>;
>i : () => Promise<string>
j: () => Promise<string>;
>j : () => Promise<string>
k: () => Promise<number>;
>k : () => Promise<number>
}
function foo(): Stuff | Date {
>foo : () => Stuff | Date
return {
>{ a() { return [123] }, b: () => "hello", c: () => "hello", d: () => "hello", e: () => "hello", f: () => "hello", g: () => "hello", h: () => "hello", i: () => "hello", j: () => "hello", k: () => 123 } : { a(): number[]; b: () => string; c: () => string; d: () => string; e: () => string; f: () => string; g: () => string; h: () => string; i: () => string; j: () => string; k: () => number; }
a() { return [123] },
>a : () => number[]
>[123] : number[]
>123 : 123
b: () => "hello",
>b : () => string
>() => "hello" : () => string
>"hello" : "hello"
c: () => "hello",
>c : () => string
>() => "hello" : () => string
>"hello" : "hello"
d: () => "hello",
>d : () => string
>() => "hello" : () => string
>"hello" : "hello"
e: () => "hello",
>e : () => string
>() => "hello" : () => string
>"hello" : "hello"
f: () => "hello",
>f : () => string
>() => "hello" : () => string
>"hello" : "hello"
g: () => "hello",
>g : () => string
>() => "hello" : () => string
>"hello" : "hello"
h: () => "hello",
>h : () => string
>() => "hello" : () => string
>"hello" : "hello"
i: () => "hello",
>i : () => string
>() => "hello" : () => string
>"hello" : "hello"
j: () => "hello",
>j : () => string
>() => "hello" : () => string
>"hello" : "hello"
k: () => 123
>k : () => number
>() => 123 : () => number
>123 : 123
}
}
|