Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a5b68c0

Browse filesBrowse files
committed
Update tests and baselines
1 parent 7797b1d commit a5b68c0
Copy full SHA for a5b68c0

5 files changed

+21-22Lines changed: 21 additions & 22 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt
+12-12Lines changed: 12 additions & 12 deletions
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'.
Collapse file

‎tests/baselines/reference/tsxSpreadAttributesResolution1.js‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxSpreadAttributesResolution1.js
+3-2Lines changed: 3 additions & 2 deletions
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";
Collapse file

‎tests/baselines/reference/tsxSpreadAttributesResolution1.symbols‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
+1-2Lines changed: 1 addition & 2 deletions
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} />;
Collapse file

‎tests/baselines/reference/tsxSpreadAttributesResolution1.types‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxSpreadAttributesResolution1.types
+3-4Lines changed: 3 additions & 4 deletions
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
Collapse file

‎tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx‎

Copy file name to clipboardExpand all lines: tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.