Skip to content

Commit 7722631

Browse files
committed
Update baselines
1 parent ddf03ba commit 7722631

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

tests/baselines/reference/objectRest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let computed2 = 'a';
3737
var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o;
3838
({ [computed]: stillNotGreat, [computed2]: soSo, ...o } = o);
3939

40-
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
40+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'];
4141

4242

4343
//// [objectRest.js]
@@ -80,6 +80,6 @@ var _g = computed, stillNotGreat = o[_g], _h = computed2, soSo = o[_h], o = __re
8080
(_j = computed, stillNotGreat = o[_j], _k = computed2, soSo = o[_k], o = __rest(o, [typeof _j === "symbol" ? _j : _j + "", typeof _k === "symbol" ? _k : _k + ""]));
8181
var noContextualType = (_a) => {
8282
var { aNumber = 12 } = _a, notEmptyObject = __rest(_a, ["aNumber"]);
83-
return aNumber + notEmptyObject.anythingGoes;
83+
return aNumber + notEmptyObject['anythingGoes'];
8484
};
8585
var _d, _f, _j, _k;

tests/baselines/reference/objectRest.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o;
169169
>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51))
170170
>o : Symbol(o, Decl(objectRest.ts, 0, 3), Decl(objectRest.ts, 35, 51))
171171

172-
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
172+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'];
173173
>noContextualType : Symbol(noContextualType, Decl(objectRest.ts, 38, 3))
174174
>aNumber : Symbol(aNumber, Decl(objectRest.ts, 38, 25))
175175
>notEmptyObject : Symbol(notEmptyObject, Decl(objectRest.ts, 38, 39))

tests/baselines/reference/objectRest.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,15 @@ var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o;
195195
>o : { a: number; b: string; }
196196
>o : { a: number; b: string; }
197197

198-
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
198+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'];
199199
>noContextualType : ({aNumber, ...notEmptyObject}: { [x: string]: any; aNumber?: number; }) => any
200-
>({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({aNumber, ...notEmptyObject}: { [x: string]: any; aNumber?: number; }) => any
200+
>({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'] : ({aNumber, ...notEmptyObject}: { [x: string]: any; aNumber?: number; }) => any
201201
>aNumber : number
202202
>12 : 12
203-
>notEmptyObject : any
204-
>aNumber + notEmptyObject.anythingGoes : any
203+
>notEmptyObject : { [x: string]: any; }
204+
>aNumber + notEmptyObject['anythingGoes'] : any
205205
>aNumber : number
206-
>notEmptyObject.anythingGoes : any
207-
>notEmptyObject : any
208-
>anythingGoes : any
206+
>notEmptyObject['anythingGoes'] : any
207+
>notEmptyObject : { [x: string]: any; }
208+
>'anythingGoes' : "anythingGoes"
209209

tests/baselines/reference/objectRestNegative.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tests/cases/conformance/types/rest/objectRestNegative.ts(11,30): error TS7008: M
77
tests/cases/conformance/types/rest/objectRestNegative.ts(11,33): error TS7008: Member 'y' implicitly has an 'any' type.
88
tests/cases/conformance/types/rest/objectRestNegative.ts(12,17): error TS2700: Rest types may only be created from object types.
99
tests/cases/conformance/types/rest/objectRestNegative.ts(17,9): error TS2701: The target of an object rest assignment must be a variable or a property access.
10-
tests/cases/conformance/types/rest/objectRestNegative.ts(19,44): error TS7031: Binding element 'implicitlyAny' implicitly has an 'any' type.
10+
tests/cases/conformance/types/rest/objectRestNegative.ts(19,90): error TS2339: Property 'anythingGoes' does not exist on type '{ [x: string]: any; }'.
1111

1212

1313
==== tests/cases/conformance/types/rest/objectRestNegative.ts (8 errors) ====
@@ -45,7 +45,7 @@ tests/cases/conformance/types/rest/objectRestNegative.ts(19,44): error TS7031: B
4545
~~~~~~~~~~~~~~~
4646
!!! error TS2701: The target of an object rest assignment must be a variable or a property access.
4747

48-
var noContextualType = ({ aNumber = 12, ...implicitlyAny }) => aNumber + implicitlyAny.anythingGoes;
49-
~~~~~~~~~~~~~
50-
!!! error TS7031: Binding element 'implicitlyAny' implicitly has an 'any' type.
48+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
49+
~~~~~~~~~~~~
50+
!!! error TS2339: Property 'anythingGoes' does not exist on type '{ [x: string]: any; }'.
5151

tests/baselines/reference/objectRestNegative.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function generic<T extends { x, y }>(t: T) {
1717
let rest: { b: string }
1818
({a, ...rest.b + rest.b} = o);
1919

20-
var noContextualType = ({ aNumber = 12, ...implicitlyAny }) => aNumber + implicitlyAny.anythingGoes;
20+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
2121

2222

2323
//// [objectRestNegative.js]
@@ -45,6 +45,6 @@ function generic(t) {
4545
var rest;
4646
(a = o.a, o, rest.b + rest.b = __rest(o, ["a"]));
4747
var noContextualType = function (_a) {
48-
var _b = _a.aNumber, aNumber = _b === void 0 ? 12 : _b, implicitlyAny = __rest(_a, ["aNumber"]);
49-
return aNumber + implicitlyAny.anythingGoes;
48+
var _b = _a.aNumber, aNumber = _b === void 0 ? 12 : _b, notEmptyObject = __rest(_a, ["aNumber"]);
49+
return aNumber + notEmptyObject.anythingGoes;
5050
};

tests/cases/conformance/types/rest/objectRest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ let computed2 = 'a';
3737
var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o;
3838
({ [computed]: stillNotGreat, [computed2]: soSo, ...o } = o);
3939

40-
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;
40+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject['anythingGoes'];

tests/cases/conformance/types/rest/objectRestNegative.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ function generic<T extends { x, y }>(t: T) {
1717
let rest: { b: string }
1818
({a, ...rest.b + rest.b} = o);
1919

20-
var noContextualType = ({ aNumber = 12, ...implicitlyAny }) => aNumber + implicitlyAny.anythingGoes;
20+
var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes;

0 commit comments

Comments
 (0)