|
| 1 | +=== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts === |
| 2 | + |
| 3 | +type T1 = { a: number }; |
| 4 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 5 | +>a : Symbol(a, Decl(interfaceExtendsObjectIntersection.ts, 1, 11)) |
| 6 | + |
| 7 | +type T2 = T1 & { b: number }; |
| 8 | +>T2 : Symbol(T2, Decl(interfaceExtendsObjectIntersection.ts, 1, 24)) |
| 9 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 10 | +>b : Symbol(b, Decl(interfaceExtendsObjectIntersection.ts, 2, 16)) |
| 11 | + |
| 12 | +type T3 = () => void; |
| 13 | +>T3 : Symbol(T3, Decl(interfaceExtendsObjectIntersection.ts, 2, 29)) |
| 14 | + |
| 15 | +type T4 = new () => { a: number }; |
| 16 | +>T4 : Symbol(T4, Decl(interfaceExtendsObjectIntersection.ts, 3, 21)) |
| 17 | +>a : Symbol(a, Decl(interfaceExtendsObjectIntersection.ts, 4, 21)) |
| 18 | + |
| 19 | +type T5 = number[]; |
| 20 | +>T5 : Symbol(T5, Decl(interfaceExtendsObjectIntersection.ts, 4, 34)) |
| 21 | + |
| 22 | +type T6 = [string, number]; |
| 23 | +>T6 : Symbol(T6, Decl(interfaceExtendsObjectIntersection.ts, 5, 19)) |
| 24 | + |
| 25 | +type T7 = { [P in 'a' | 'b' | 'c']: string }; |
| 26 | +>T7 : Symbol(T7, Decl(interfaceExtendsObjectIntersection.ts, 6, 27)) |
| 27 | +>P : Symbol(P, Decl(interfaceExtendsObjectIntersection.ts, 7, 13)) |
| 28 | + |
| 29 | +interface I1 extends T1 { x: string } |
| 30 | +>I1 : Symbol(I1, Decl(interfaceExtendsObjectIntersection.ts, 7, 45)) |
| 31 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 32 | +>x : Symbol(I1.x, Decl(interfaceExtendsObjectIntersection.ts, 9, 25)) |
| 33 | + |
| 34 | +interface I2 extends T2 { x: string } |
| 35 | +>I2 : Symbol(I2, Decl(interfaceExtendsObjectIntersection.ts, 9, 37)) |
| 36 | +>T2 : Symbol(T2, Decl(interfaceExtendsObjectIntersection.ts, 1, 24)) |
| 37 | +>x : Symbol(I2.x, Decl(interfaceExtendsObjectIntersection.ts, 10, 25)) |
| 38 | + |
| 39 | +interface I3 extends T3 { x: string } |
| 40 | +>I3 : Symbol(I3, Decl(interfaceExtendsObjectIntersection.ts, 10, 37)) |
| 41 | +>T3 : Symbol(T3, Decl(interfaceExtendsObjectIntersection.ts, 2, 29)) |
| 42 | +>x : Symbol(I3.x, Decl(interfaceExtendsObjectIntersection.ts, 11, 25)) |
| 43 | + |
| 44 | +interface I4 extends T4 { x: string } |
| 45 | +>I4 : Symbol(I4, Decl(interfaceExtendsObjectIntersection.ts, 11, 37)) |
| 46 | +>T4 : Symbol(T4, Decl(interfaceExtendsObjectIntersection.ts, 3, 21)) |
| 47 | +>x : Symbol(I4.x, Decl(interfaceExtendsObjectIntersection.ts, 12, 25)) |
| 48 | + |
| 49 | +interface I5 extends T5 { x: string } |
| 50 | +>I5 : Symbol(I5, Decl(interfaceExtendsObjectIntersection.ts, 12, 37)) |
| 51 | +>T5 : Symbol(T5, Decl(interfaceExtendsObjectIntersection.ts, 4, 34)) |
| 52 | +>x : Symbol(I5.x, Decl(interfaceExtendsObjectIntersection.ts, 13, 25)) |
| 53 | + |
| 54 | +interface I6 extends T6 { x: string } |
| 55 | +>I6 : Symbol(I6, Decl(interfaceExtendsObjectIntersection.ts, 13, 37)) |
| 56 | +>T6 : Symbol(T6, Decl(interfaceExtendsObjectIntersection.ts, 5, 19)) |
| 57 | +>x : Symbol(I6.x, Decl(interfaceExtendsObjectIntersection.ts, 14, 25)) |
| 58 | + |
| 59 | +interface I7 extends T7 { x: string } |
| 60 | +>I7 : Symbol(I7, Decl(interfaceExtendsObjectIntersection.ts, 14, 37)) |
| 61 | +>T7 : Symbol(T7, Decl(interfaceExtendsObjectIntersection.ts, 6, 27)) |
| 62 | +>x : Symbol(I7.x, Decl(interfaceExtendsObjectIntersection.ts, 15, 25)) |
| 63 | + |
| 64 | +type Constructor<T> = new () => T; |
| 65 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 66 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 17, 17)) |
| 67 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 17, 17)) |
| 68 | + |
| 69 | +declare function Constructor<T>(): Constructor<T>; |
| 70 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 71 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 18, 29)) |
| 72 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 73 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 18, 29)) |
| 74 | + |
| 75 | +class C1 extends Constructor<I1>() { x: string } |
| 76 | +>C1 : Symbol(C1, Decl(interfaceExtendsObjectIntersection.ts, 18, 50)) |
| 77 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 78 | +>I1 : Symbol(I1, Decl(interfaceExtendsObjectIntersection.ts, 7, 45)) |
| 79 | +>x : Symbol(C1.x, Decl(interfaceExtendsObjectIntersection.ts, 20, 36)) |
| 80 | + |
| 81 | +class C2 extends Constructor<I2>() { x: string } |
| 82 | +>C2 : Symbol(C2, Decl(interfaceExtendsObjectIntersection.ts, 20, 48)) |
| 83 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 84 | +>I2 : Symbol(I2, Decl(interfaceExtendsObjectIntersection.ts, 9, 37)) |
| 85 | +>x : Symbol(C2.x, Decl(interfaceExtendsObjectIntersection.ts, 21, 36)) |
| 86 | + |
| 87 | +class C3 extends Constructor<I3>() { x: string } |
| 88 | +>C3 : Symbol(C3, Decl(interfaceExtendsObjectIntersection.ts, 21, 48)) |
| 89 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 90 | +>I3 : Symbol(I3, Decl(interfaceExtendsObjectIntersection.ts, 10, 37)) |
| 91 | +>x : Symbol(C3.x, Decl(interfaceExtendsObjectIntersection.ts, 22, 36)) |
| 92 | + |
| 93 | +class C4 extends Constructor<I4>() { x: string } |
| 94 | +>C4 : Symbol(C4, Decl(interfaceExtendsObjectIntersection.ts, 22, 48)) |
| 95 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 96 | +>I4 : Symbol(I4, Decl(interfaceExtendsObjectIntersection.ts, 11, 37)) |
| 97 | +>x : Symbol(C4.x, Decl(interfaceExtendsObjectIntersection.ts, 23, 36)) |
| 98 | + |
| 99 | +class C5 extends Constructor<I5>() { x: string } |
| 100 | +>C5 : Symbol(C5, Decl(interfaceExtendsObjectIntersection.ts, 23, 48)) |
| 101 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 102 | +>I5 : Symbol(I5, Decl(interfaceExtendsObjectIntersection.ts, 12, 37)) |
| 103 | +>x : Symbol(C5.x, Decl(interfaceExtendsObjectIntersection.ts, 24, 36)) |
| 104 | + |
| 105 | +class C6 extends Constructor<I6>() { x: string } |
| 106 | +>C6 : Symbol(C6, Decl(interfaceExtendsObjectIntersection.ts, 24, 48)) |
| 107 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 108 | +>I6 : Symbol(I6, Decl(interfaceExtendsObjectIntersection.ts, 13, 37)) |
| 109 | +>x : Symbol(C6.x, Decl(interfaceExtendsObjectIntersection.ts, 25, 36)) |
| 110 | + |
| 111 | +class C7 extends Constructor<I7>() { x: string } |
| 112 | +>C7 : Symbol(C7, Decl(interfaceExtendsObjectIntersection.ts, 25, 48)) |
| 113 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 114 | +>I7 : Symbol(I7, Decl(interfaceExtendsObjectIntersection.ts, 14, 37)) |
| 115 | +>x : Symbol(C7.x, Decl(interfaceExtendsObjectIntersection.ts, 26, 36)) |
| 116 | + |
| 117 | +declare function fx(x: string): string; |
| 118 | +>fx : Symbol(fx, Decl(interfaceExtendsObjectIntersection.ts, 26, 48)) |
| 119 | +>x : Symbol(x, Decl(interfaceExtendsObjectIntersection.ts, 28, 20)) |
| 120 | + |
| 121 | +declare class CX { a: number } |
| 122 | +>CX : Symbol(CX, Decl(interfaceExtendsObjectIntersection.ts, 28, 39)) |
| 123 | +>a : Symbol(CX.a, Decl(interfaceExtendsObjectIntersection.ts, 29, 18)) |
| 124 | + |
| 125 | +declare enum EX { A, B, C } |
| 126 | +>EX : Symbol(EX, Decl(interfaceExtendsObjectIntersection.ts, 29, 30)) |
| 127 | +>A : Symbol(EX.A, Decl(interfaceExtendsObjectIntersection.ts, 30, 17)) |
| 128 | +>B : Symbol(EX.B, Decl(interfaceExtendsObjectIntersection.ts, 30, 20)) |
| 129 | +>C : Symbol(EX.C, Decl(interfaceExtendsObjectIntersection.ts, 30, 23)) |
| 130 | + |
| 131 | +declare namespace NX { export const a = 1 } |
| 132 | +>NX : Symbol(NX, Decl(interfaceExtendsObjectIntersection.ts, 30, 27)) |
| 133 | +>a : Symbol(a, Decl(interfaceExtendsObjectIntersection.ts, 31, 35)) |
| 134 | + |
| 135 | +type T10 = typeof fx; |
| 136 | +>T10 : Symbol(T10, Decl(interfaceExtendsObjectIntersection.ts, 31, 43)) |
| 137 | +>fx : Symbol(fx, Decl(interfaceExtendsObjectIntersection.ts, 26, 48)) |
| 138 | + |
| 139 | +type T11 = typeof CX; |
| 140 | +>T11 : Symbol(T11, Decl(interfaceExtendsObjectIntersection.ts, 33, 21)) |
| 141 | +>CX : Symbol(CX, Decl(interfaceExtendsObjectIntersection.ts, 28, 39)) |
| 142 | + |
| 143 | +type T12 = typeof EX; |
| 144 | +>T12 : Symbol(T12, Decl(interfaceExtendsObjectIntersection.ts, 34, 21)) |
| 145 | +>EX : Symbol(EX, Decl(interfaceExtendsObjectIntersection.ts, 29, 30)) |
| 146 | + |
| 147 | +type T13 = typeof NX; |
| 148 | +>T13 : Symbol(T13, Decl(interfaceExtendsObjectIntersection.ts, 35, 21)) |
| 149 | +>NX : Symbol(NX, Decl(interfaceExtendsObjectIntersection.ts, 30, 27)) |
| 150 | + |
| 151 | +interface I10 extends T10 { x: string } |
| 152 | +>I10 : Symbol(I10, Decl(interfaceExtendsObjectIntersection.ts, 36, 21)) |
| 153 | +>T10 : Symbol(T10, Decl(interfaceExtendsObjectIntersection.ts, 31, 43)) |
| 154 | +>x : Symbol(I10.x, Decl(interfaceExtendsObjectIntersection.ts, 38, 27)) |
| 155 | + |
| 156 | +interface I11 extends T11 { x: string } |
| 157 | +>I11 : Symbol(I11, Decl(interfaceExtendsObjectIntersection.ts, 38, 39)) |
| 158 | +>T11 : Symbol(T11, Decl(interfaceExtendsObjectIntersection.ts, 33, 21)) |
| 159 | +>x : Symbol(I11.x, Decl(interfaceExtendsObjectIntersection.ts, 39, 27)) |
| 160 | + |
| 161 | +interface I12 extends T12 { x: string } |
| 162 | +>I12 : Symbol(I12, Decl(interfaceExtendsObjectIntersection.ts, 39, 39)) |
| 163 | +>T12 : Symbol(T12, Decl(interfaceExtendsObjectIntersection.ts, 34, 21)) |
| 164 | +>x : Symbol(I12.x, Decl(interfaceExtendsObjectIntersection.ts, 40, 27)) |
| 165 | + |
| 166 | +interface I13 extends T13 { x: string } |
| 167 | +>I13 : Symbol(I13, Decl(interfaceExtendsObjectIntersection.ts, 40, 39)) |
| 168 | +>T13 : Symbol(T13, Decl(interfaceExtendsObjectIntersection.ts, 35, 21)) |
| 169 | +>x : Symbol(I13.x, Decl(interfaceExtendsObjectIntersection.ts, 41, 27)) |
| 170 | + |
| 171 | +type Identifiable<T> = { _id: string } & T; |
| 172 | +>Identifiable : Symbol(Identifiable, Decl(interfaceExtendsObjectIntersection.ts, 41, 39)) |
| 173 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 43, 18)) |
| 174 | +>_id : Symbol(_id, Decl(interfaceExtendsObjectIntersection.ts, 43, 24)) |
| 175 | +>T : Symbol(T, Decl(interfaceExtendsObjectIntersection.ts, 43, 18)) |
| 176 | + |
| 177 | +interface I20 extends Partial<T1> { x: string } |
| 178 | +>I20 : Symbol(I20, Decl(interfaceExtendsObjectIntersection.ts, 43, 43)) |
| 179 | +>Partial : Symbol(Partial, Decl(lib.d.ts, --, --)) |
| 180 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 181 | +>x : Symbol(I20.x, Decl(interfaceExtendsObjectIntersection.ts, 45, 35)) |
| 182 | + |
| 183 | +interface I21 extends Readonly<T1> { x: string } |
| 184 | +>I21 : Symbol(I21, Decl(interfaceExtendsObjectIntersection.ts, 45, 47)) |
| 185 | +>Readonly : Symbol(Readonly, Decl(lib.d.ts, --, --)) |
| 186 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 187 | +>x : Symbol(I21.x, Decl(interfaceExtendsObjectIntersection.ts, 46, 36)) |
| 188 | + |
| 189 | +interface I22 extends Identifiable<T1> { x: string } |
| 190 | +>I22 : Symbol(I22, Decl(interfaceExtendsObjectIntersection.ts, 46, 48)) |
| 191 | +>Identifiable : Symbol(Identifiable, Decl(interfaceExtendsObjectIntersection.ts, 41, 39)) |
| 192 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 193 | +>x : Symbol(I22.x, Decl(interfaceExtendsObjectIntersection.ts, 47, 40)) |
| 194 | + |
| 195 | +interface I23 extends Identifiable<T1 & { b: number}> { x: string } |
| 196 | +>I23 : Symbol(I23, Decl(interfaceExtendsObjectIntersection.ts, 47, 52)) |
| 197 | +>Identifiable : Symbol(Identifiable, Decl(interfaceExtendsObjectIntersection.ts, 41, 39)) |
| 198 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 199 | +>b : Symbol(b, Decl(interfaceExtendsObjectIntersection.ts, 48, 41)) |
| 200 | +>x : Symbol(I23.x, Decl(interfaceExtendsObjectIntersection.ts, 48, 55)) |
| 201 | + |
| 202 | +class C20 extends Constructor<Partial<T1>>() { x: string } |
| 203 | +>C20 : Symbol(C20, Decl(interfaceExtendsObjectIntersection.ts, 48, 67)) |
| 204 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 205 | +>Partial : Symbol(Partial, Decl(lib.d.ts, --, --)) |
| 206 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 207 | +>x : Symbol(C20.x, Decl(interfaceExtendsObjectIntersection.ts, 50, 46)) |
| 208 | + |
| 209 | +class C21 extends Constructor<Readonly<T1>>() { x: string } |
| 210 | +>C21 : Symbol(C21, Decl(interfaceExtendsObjectIntersection.ts, 50, 58)) |
| 211 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 212 | +>Readonly : Symbol(Readonly, Decl(lib.d.ts, --, --)) |
| 213 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 214 | +>x : Symbol(C21.x, Decl(interfaceExtendsObjectIntersection.ts, 51, 47)) |
| 215 | + |
| 216 | +class C22 extends Constructor<Identifiable<T1>>() { x: string } |
| 217 | +>C22 : Symbol(C22, Decl(interfaceExtendsObjectIntersection.ts, 51, 59)) |
| 218 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 219 | +>Identifiable : Symbol(Identifiable, Decl(interfaceExtendsObjectIntersection.ts, 41, 39)) |
| 220 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 221 | +>x : Symbol(C22.x, Decl(interfaceExtendsObjectIntersection.ts, 52, 51)) |
| 222 | + |
| 223 | +class C23 extends Constructor<Identifiable<T1 & { b: number}>>() { x: string } |
| 224 | +>C23 : Symbol(C23, Decl(interfaceExtendsObjectIntersection.ts, 52, 63)) |
| 225 | +>Constructor : Symbol(Constructor, Decl(interfaceExtendsObjectIntersection.ts, 15, 37), Decl(interfaceExtendsObjectIntersection.ts, 17, 34)) |
| 226 | +>Identifiable : Symbol(Identifiable, Decl(interfaceExtendsObjectIntersection.ts, 41, 39)) |
| 227 | +>T1 : Symbol(T1, Decl(interfaceExtendsObjectIntersection.ts, 0, 0)) |
| 228 | +>b : Symbol(b, Decl(interfaceExtendsObjectIntersection.ts, 53, 49)) |
| 229 | +>x : Symbol(C23.x, Decl(interfaceExtendsObjectIntersection.ts, 53, 66)) |
| 230 | + |
0 commit comments