Skip to content

Commit a5b68c0

Browse files
committed
Update tests and baselines
1 parent 7797b1d commit a5b68c0

5 files changed

+21
-22
lines changed

tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS
44
Property 'doStuff' is missing in type '{ value: string; }'.
55
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,17): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
66
Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
7-
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,4): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
8-
Property 'value' is missing in type '{ toString: (s: any) => any; }'.
9-
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'.
10-
Property 'value' is missing in type '{ toString: (s: string) => string; }'.
11-
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
12-
Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'.
7+
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,6): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
8+
Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
9+
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,6): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'.
10+
Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
11+
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,17): error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
12+
Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
1313

1414

1515
==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts (6 errors) ====
@@ -33,14 +33,14 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T
3333
!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
3434
!!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
3535
f2({ toString: (s) => s })
36-
~~~~~~~~~~~~~~~~~~~~~~
36+
~~~~~~~~~~~~~~~~~~
3737
!!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
38-
!!! error TS2345: Property 'value' is missing in type '{ toString: (s: any) => any; }'.
38+
!!! error TS2345: Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
3939
f2({ toString: (s: string) => s })
40-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~
4141
!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'.
42-
!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'.
42+
!!! error TS2345: Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
4343
f2({ value: '', toString: (s) => s.uhhh })
44-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
~~~~~~~~~~~~~~~~~~~~~~~
4545
!!! error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
46-
!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'.
46+
!!! error TS2345: Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.

tests/baselines/reference/tsxSpreadAttributesResolution1.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ class Poisoned extends React.Component<{}, {}> {
77
}
88
}
99

10-
const obj: Object = {};
10+
const obj = {};
1111

1212
// OK
1313
let p = <Poisoned {...obj} />;
14-
let y = <Poisoned />;
14+
let y = <Poisoned />;
15+
1516

1617
//// [file.jsx]
1718
"use strict";

tests/baselines/reference/tsxSpreadAttributesResolution1.symbols

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ class Poisoned extends React.Component<{}, {}> {
1717
}
1818
}
1919

20-
const obj: Object = {};
20+
const obj = {};
2121
>obj : Symbol(obj, Decl(file.tsx, 8, 5))
22-
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
2322

2423
// OK
2524
let p = <Poisoned {...obj} />;

tests/baselines/reference/tsxSpreadAttributesResolution1.types

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ class Poisoned extends React.Component<{}, {}> {
1818
}
1919
}
2020

21-
const obj: Object = {};
22-
>obj : Object
23-
>Object : Object
21+
const obj = {};
22+
>obj : {}
2423
>{} : {}
2524

2625
// OK
2726
let p = <Poisoned {...obj} />;
2827
>p : JSX.Element
2928
><Poisoned {...obj} /> : JSX.Element
3029
>Poisoned : typeof Poisoned
31-
>obj : Object
30+
>obj : {}
3231

3332
let y = <Poisoned />;
3433
>y : JSX.Element

tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class Poisoned extends React.Component<{}, {}> {
1111
}
1212
}
1313

14-
const obj: Object = {};
14+
const obj = {};
1515

1616
// OK
1717
let p = <Poisoned {...obj} />;
18-
let y = <Poisoned />;
18+
let y = <Poisoned />;

0 commit comments

Comments
 (0)