10000 Accepting new baselines · johnangularjs/TypeScript@055363c · GitHub
[go: up one dir, main page]

Skip to content

Commit 055363c

Browse files
committed
Accepting new baselines
1 parent 27380f4 commit 055363c

7 files changed

+138
-38
lines changed

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ var [c2] = [];
9898
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
9999
>c3 : any
100100
>c4 : any
101-
>[[[]], [[[[]]]]] : [[undefined[]], [[[undefined[]]]]]
102-
>[[]] : [undefined[]]
103-
>[] : undefined[]
104-
>[[[[]]]] : [[[undefined[]]]]
105-
>[[[]]] : [[undefined[]]]
106-
>[[]] : [undefined[]]
107-
>[] : undefined[]
101+
>[[[]], [[[[]]]]] : [[[undefined]], [[[[undefined]]]]]
102+
>[[]] : [[undefined]]
103+
>[] : [undefined]
104+
>[[[[]]]] : [[[[undefined]]]]
105+
>[[[]]] : [[[undefined]]]
106+
>[[]] : [[undefined]]
107+
>[] : [undefined]
108108

109109
var [[c5], c6]: [[string|number], boolean] = [[1], true];
110110
>c5 : string | number

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ var [c2] = [];
9999
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
100100
>c3 : any
101101
>c4 : any
102-
>[[[]], [[[[]]]]] : [[undefined[]], [[[undefined[]]]]]
103-
>[[]] : [undefined[]]
104-
>[] : undefined[]
105-
>[[[[]]]] : [[[undefined[]]]]
106-
>[[[]]] : [[undefined[]]]
107-
>[[]] : [undefined[]]
108-
>[] : undefined[]
102+
>[[[]], [[[[]]]]] : [[[undefined]], [[[[undefined]]]]]
103+
>[[]] : [[undefined]]
104+
>[] : [undefined]
105+
>[[[[]]]] : [[[[undefined]]]]
106+
>[[[]]] : [[[undefined]]]
107+
>[[]] : [[undefined]]
108+
>[] : [undefined]
109109

110110
var [[c5], c6]: [[string|number], boolean] = [[1], true];
111111
>c5 : string | number

tests/baselines/reference/destructuringVariableDeclaration1ES5.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
151151
>f4 : number
152152
>f5 : number
153153
> : undefined
154-
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
155-
>f : [number, number, { f3: number; f5: number; }]
156-
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
154+
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined]; }
155+
>f : [number, number, { f3: number; f5: number; }, undefined]
156+
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined]
157157
>1 : number
158158
>2 : number
159159
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }

tests/baselines/reference/destructuringVariableDeclaration1ES6.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
151151
>f4 : number
152152
>f5 : number
153153
> : undefined
154-
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
155-
>f : [number, number, { f3: number; f5: number; }]
156-
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
154+
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined]; }
155+
>f : [number, number, { f3: number; f5: number; }, undefined]
156+
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined]
157157
>1 : number
158158
>2 : number
159159
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }

tests/baselines/reference/destructuringWithLiteralInitializers.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ f6({ x: 1 });
3434
f6({ y: 1 });
3535
f6({ x: 1, y: 1 });
3636

37+
// (arg?: { a: { x?: number, y?: number } }) => void
38+
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
39+
f7();
40+
f7({ a: {} });
41+
f7({ a: { x: 1 } });
42+
f7({ a: { y: 1 } });
43+
f7({ a: { x: 1, y: 1 } });
44+
3745
// (arg: [any, any]) => void
3846
function g1([x, y]) { }
3947
g1([1, 1]);
@@ -95,6 +103,15 @@ f6({});
95103
f6({ x: 1 });
96104
f6({ y: 1 });
97105
f6({ x: 1, y: 1 });
106+
// (arg?: { a: { x?: number, y?: number } }) => void
107+
function f7(_a) {
108+
var _b = (_a === void 0 ? { a: {} } : _a).a, _c = _b.x, x = _c === void 0 ? 0 : _c, _d = _b.y, y = _d === void 0 ? 0 : _d;
109+
}
110+
f7();
111+
f7({ a: {} });
112+
f7({ a: { x: 1 } });
113+
f7({ a: { y: 1 } });
114+
f7({ a: { x: 1, y: 1 } });
98115
// (arg: [any, any]) => void
99116
function g1(_a) {
100117
var x = _a[0], y = _a[1];

tests/baselines/reference/destructuringWithLiteralInitializers.symbols

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,45 +107,76 @@ f6({ x: 1, y: 1 });
107107
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 33, 4))
108108
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 33, 10))
109109

110+
// (arg?: { a: { x?: number, y?: number } }) => void
111+
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
112+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
113+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 36, 39))
114+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 36, 18))
115+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 36, 25))
116+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 36, 39))
117+
118+
f7();
119+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
120+
121+
f7({ a: {} });
122+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
123+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 38, 4))
124+
125+
f7({ a: { x: 1 } });
126+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
127+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 39, 4))
128+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 39, 9))
129+
130+
f7({ a: { y: 1 } });
131+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
132+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 40, 4))
133+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 40, 9))
134+
135+
f7({ a: { x: 1, y: 1 } });
136+
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
137+
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 41, 4))
138+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 41, 9))
139+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 41, 15))
140+
110141
// (arg: [any, any]) => void
111142
function g1([x, y]) { }
112-
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
113-
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 36, 13))
114-
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 36, 15))
143+
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 41, 26))
144+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 44, 13))
145+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 44, 15))
115146

116147
g1([1, 1]);
117-
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
148+
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 41, 26))
118149

119150
// (arg: [number, number]) => void
120151
function g2([x = 0, y = 0]) { }
121-
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 37, 11))
122-
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 40, 13))
123-
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 40, 19))
152+
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 45, 11))
153+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 48, 13))
154+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 48, 19))
124155

125156
g2([1, 1]);
126-
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 37, 11))
157+
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 45, 11))
127158

128159
// (arg?: [any, any]) => void
129160
function g3([x, y] = []) { }
130-
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
131-
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 44, 13))
132-
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 44, 15))
161+
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
162+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 52, 13))
163+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 52, 15))
133164

134165
g3();
135-
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
166+
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
136167

137168
g3([1, 1]);
138-
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
169+
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
139170

140171
// (arg?: [number, number]) => void
141172
function g4([x, y] = [0, 0]) { }
142-
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
143-
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 49, 13))
144-
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 49, 15))
173+
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))
174+
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 57, 13))
175+
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 57, 15))
145176

146177
g4();
147-
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
178+
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))
148179

149180
g4([1, 1]);
150-
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
181+
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))
151182

tests/baselines/reference/destructuringWithLiteralInitializers.types

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,58 @@ f6({ x: 1, y: 1 });
168168
>y : number
169169
>1 : number
170170

171+
// (arg?: { a: { x?: number, y?: number } }) => void
172+
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
173+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
174+
>a : any
175+
>x : number
176+
>0 : number
177+
>y : number
178+
>0 : number
179+
>{ a: {} } : { a: { x?: number; y?: number; }; }
180+
>a : { x?: number; y?: number; }
181+
>{} : { x?: number; y?: number; }
182+
183+
f7();
184+
>f7() : void
185+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
186+
187+
f7({ a: {} });
188+
>f7({ a: {} }) : void
189+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
190+
>{ a: {} } : { a: {}; }
191+
>a : {}
192+
>{} : {}
193+
194+
f7({ a: { x: 1 } });
195+
>f7({ a: { x: 1 } }) : void
196+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
197+
>{ a: { x: 1 } } : { a: { x: number; }; }
198+
>a : { x: number; }
199+
>{ x: 1 } : { x: number; }
200+
>x : number
201+
>1 : number
202+
203+
f7({ a: { y: 1 } });
204+
>f7({ a: { y: 1 } }) : void
205+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
206+
>{ a: { y: 1 } } : { a: { y: number; }; }
207+
>a : { y: number; }
208+
>{ y: 1 } : { y: number; }
209+
>y : number
210+
>1 : number
211+
212+
f7({ a: { x: 1, y: 1 } });
213+
>f7({ a: { x: 1, y: 1 } }) : void
214+
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
215+
>{ a: { x: 1, y: 1 } } : { a: { x: number; y: number; }; }
216+
>a : { x: number; y: number; }
217+
>{ x: 1, y: 1 } : { x: number; y: number; }
218+
>x : number
219+
>1 : number
220+
>y : number
221+
>1 : number
222+
171223
// (arg: [any, any]) => void
172224
function g1([x, y]) { }
173225
>g1 : ([x, y]: [any, any]) => void

0 commit comments

Comments
 (0)
0