|
1 | 1 | === tests/cases/conformance/types/rest/objectRest.ts ===
|
2 | 2 | var o = { a: 1, b: 'no' }
|
3 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 3 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
4 | 4 | >a : Symbol(a, Decl(objectRest.ts, 0, 9))
|
5 | 5 | >b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
6 | 6 |
|
7 | 7 | var { ...clone } = o;
|
8 | 8 | >clone : Symbol(clone, Decl(objectRest.ts, 1, 5))
|
9 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 9 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
10 | 10 |
|
11 | 11 | var { a, ...justB } = o;
|
12 | 12 | >a : Symbol(a, Decl(objectRest.ts, 2, 5), Decl(objectRest.ts, 3, 5))
|
13 | 13 | >justB : Symbol(justB, Decl(objectRest.ts, 2, 8))
|
14 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 14 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
15 | 15 |
|
16 | 16 | var { a, b: renamed, ...empty } = o;
|
17 | 17 | >a : Symbol(a, Decl(objectRest.ts, 2, 5), Decl(objectRest.ts, 3, 5))
|
18 | 18 | >b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
19 | 19 | >renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
20 | 20 | >empty : Symbol(empty, Decl(objectRest.ts, 3, 20))
|
21 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 21 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
22 | 22 |
|
23 | 23 | var { ['b']: renamed, ...justA } = o;
|
24 | 24 | >'b' : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
25 | 25 | >renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
26 | 26 | >justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
27 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 27 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
28 | 28 |
|
29 | 29 | var { 'b': renamed, ...justA } = o;
|
30 | 30 | >renamed : Symbol(renamed, Decl(objectRest.ts, 3, 8), Decl(objectRest.ts, 4, 5), Decl(objectRest.ts, 5, 5), Decl(objectRest.ts, 9, 5))
|
31 | 31 | >justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
32 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 32 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
33 | 33 |
|
34 | 34 | var { b: { '0': n, '1': oooo }, ...justA } = o;
|
35 | 35 | >b : Symbol(b, Decl(objectRest.ts, 0, 15))
|
36 | 36 | >n : Symbol(n, Decl(objectRest.ts, 6, 10))
|
37 | 37 | >oooo : Symbol(oooo, Decl(objectRest.ts, 6, 18))
|
38 | 38 | >justA : Symbol(justA, Decl(objectRest.ts, 4, 21), Decl(objectRest.ts, 5, 19), Decl(objectRest.ts, 6, 31))
|
39 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 39 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
40 | 40 |
|
41 | 41 | let o2 = { c: 'terrible idea?', d: 'yes' };
|
42 | 42 | >o2 : Symbol(o2, Decl(objectRest.ts, 8, 3))
|
@@ -138,41 +138,63 @@ class Removable {
|
138 | 138 | remainder: string;
|
139 | 139 | >remainder : Symbol(Removable.remainder, Decl(objectRest.ts, 27, 20))
|
140 | 140 | }
|
| 141 | +interface I { |
| 142 | +>I : Symbol(I, Decl(objectRest.ts, 29, 1)) |
| 143 | + |
| 144 | + m(): void; |
| 145 | +>m : Symbol(I.m, Decl(objectRest.ts, 30, 13)) |
| 146 | + |
| 147 | + removed: string; |
| 148 | +>removed : Symbol(I.removed, Decl(objectRest.ts, 31, 14)) |
| 149 | + |
| 150 | + remainder: string; |
| 151 | +>remainder : Symbol(I.remainder, Decl(objectRest.ts, 32, 20)) |
| 152 | +} |
141 | 153 | var removable = new Removable();
|
142 |
| ->removable : Symbol(removable, Decl(objectRest.ts, 30, 3)) |
| 154 | +>removable : Symbol(removable, Decl(objectRest.ts, 35, 3)) |
143 | 155 | >Removable : Symbol(Removable, Decl(objectRest.ts, 18, 35))
|
144 | 156 |
|
145 | 157 | var { removed, ...removableRest } = removable;
|
146 |
| ->removed : Symbol(removed, Decl(objectRest.ts, 31, 5)) |
147 |
| ->removableRest : Symbol(removableRest, Decl(objectRest.ts, 31, 14)) |
148 |
| ->removable : Symbol(removable, Decl(objectRest.ts, 30, 3)) |
| 158 | +>removed : Symbol(removed, Decl(objectRest.ts, 36, 5), Decl(objectRest.ts, 38, 5)) |
| 159 | +>removableRest : Symbol(removableRest, Decl(objectRest.ts, 36, 14)) |
| 160 | +>removable : Symbol(removable, Decl(objectRest.ts, 35, 3)) |
| 161 | + |
| 162 | +var i: I = removable; |
| 163 | +>i : Symbol(i, Decl(objectRest.ts, 37, 3)) |
| 164 | +>I : Symbol(I, Decl(objectRest.ts, 29, 1)) |
| 165 | +>removable : Symbol(removable, Decl(objectRest.ts, 35, 3)) |
| 166 | + |
| 167 | +var { removed, ...removableRest2 } = i; |
| 168 | +>removed : Symbol(removed, Decl(objectRest.ts, 36, 5), Decl(objectRest.ts, 38, 5)) |
| 169 | +>removableRest2 : Symbol(removableRest2, Decl(objectRest.ts, 38, 14)) |
| 170 | +>i : Symbol(i, Decl(objectRest.ts, 37, 3)) |
149 | 171 |
|
150 | 172 | let computed = 'b';
|
151 |
| ->computed : Symbol(computed, Decl(objectRest.ts, 33, 3)) |
| 173 | +>computed : Symbol(computed, Decl(objectRest.ts, 40, 3)) |
152 | 174 |
|
153 | 175 | let computed2 = 'a';
|
154 |
| ->computed2 : Symbol(computed2, Decl(objectRest.ts, 34, 3)) |
| 176 | +>computed2 : Symbol(computed2, Decl(objectRest.ts, 41, 3)) |
155 | 177 |
|
156 | 178 | var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o;
|
157 |
| ->computed : Symbol(computed, Decl(objectRest.ts, 33, 3)) |
158 |
| ->stillNotGreat : Symbol(stillNotGreat, Decl(objectRest.ts, 35, 5)) |
159 |
| ->computed2 : Symbol(computed2, Decl(objectRest.ts, 34, 3)) |
160 |
| ->soSo : Symbol(soSo, Decl(objectRest.ts, 35, 32)) |
161 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
162 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 179 | +>computed : Symbol(computed, Decl(objectRest.ts, 40, 3)) |
| 180 | +>stillNotGreat : Symbol(stillNotGreat, Decl(objectRest.ts, 42, 5)) |
| 181 | +>computed2 : Symbol(computed2, Decl(objectRest.ts, 41, 3)) |
| 182 | +>soSo : Symbol(soSo, Decl(objectRest.ts, 42, 32)) |
| 183 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
| 184 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
163 | 185 |
|
164 | 186 | ({ [computed]: stillNotGreat, [computed2]: soSo, ...o } = o);
|
165 |
| ->computed : Symbol(computed, Decl(objectRest.ts, 33, 3)) |
166 |
| ->stillNotGreat : Symbol(stillNotGreat, Decl(objectRest.ts, 35, 5)) |
167 |
| ->computed2 : Symbol(computed2, Decl(objectRest.ts, 34, 3)) |
168 |
| ->soSo : Symbol(soSo, Decl(objectRest.ts, 35, 32)) |
169 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
170 |
| ->o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51)) |
| 187 | +>computed : Symbol(computed, Decl(objectRest.ts, 40, 3)) |
| 188 | +>stillNotGreat : Symbol(stillNotGreat, Decl(objectRest.ts, 42, 5)) |
| 189 | +>computed2 : Symbol(computed2, Decl(objectRest.ts, 41, 3)) |
| 190 | +>soSo : Symbol(soSo, Decl(objectRest.ts, 42, 32)) |
| 191 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
| 192 | +>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 42, 51)) |
171 | 193 |
|
172 | 194 | var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'];
|
173 |
| ->noContextualType : Symbol(noContextualType, Decl(objectRest.ts, 38, 3)) |
174 |
| ->aNumber : Symbol(aNumber, Decl(objectRest.ts, 38, 25)) |
175 |
| ->notEmptyObject : Symbol(notEmptyObject, Decl(objectRest.ts, 38, 39)) |
176 |
| ->aNumber : Symbol(aNumber, Decl(objectRest.ts, 38, 25)) |
177 |
| ->notEmptyObject : Symbol(notEmptyObject, Decl(objectRest.ts, 38, 39)) |
| 195 | +>noContextualType : Symbol(noContextualType, Decl(objectRest.ts, 45, 3)) |
| 196 | +>aNumber : Symbol(aNumber, Decl(objectRest.ts, 45, 25)) |
| 197 | +>notEmptyObject : Symbol(notEmptyObject, Decl(objectRest.ts, 45, 39)) |
| 198 | +>aNumber : Symbol(aNumber, Decl(objectRest.ts, 45, 25)) |
| 199 | +>notEmptyObject : Symbol(notEmptyObject, Decl(objectRest.ts, 45, 39)) |
178 | 200 |
|
0 commit comments