You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/baselines/reference/functionOverloads40.errors.txt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,6 @@ tests/cases/compiler/functionOverloads40.ts(4,9): error TS2763: No overload matc
16
16
!!! error TS2763: Type 'string' is not assignable to type 'number'.
17
17
!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error.
18
18
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
19
+
!!! related TS6500 tests/cases/compiler/functionOverloads40.ts:1:19: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
20
+
!!! related TS6500 tests/cases/compiler/functionOverloads40.ts:2:19: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }'
Copy file name to clipboardExpand all lines: tests/baselines/reference/overloadResolutionTest1.errors.txt
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload
29
29
!!! error TS2763: Type 'string' is not assignable to type 'number'.
30
30
!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error.
31
31
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
32
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:1:19: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
33
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:2:19: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }'
32
34
var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string
33
35
34
36
@@ -46,6 +48,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload
46
48
!!! error TS2763: Type 'string' is not assignable to type 'number'.
47
49
!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error.
48
50
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
51
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:12:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
52
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:13:20: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }'
49
53
50
54
51
55
function foo4(bar:{a:number;}):number;
@@ -57,4 +61,6 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload
57
61
!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error.
58
62
!!! error TS2763: Type 'true' is not assignable to type 'number'.
59
63
!!! error TS2763: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error.
60
-
!!! error TS2763: Type 'true' is not assignable to type 'string'.
64
+
!!! error TS2763: Type 'true' is not assignable to type 'string'.
65
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:21:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }'
66
+
!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:22:20: The expected type comes from property 'a' which is declared here on type '{ a: string; }'
Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
105
105
!!! error TS2763: Property 'yy' does not exist on type 'IntrinsicAttributes'.
106
106
!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
107
107
!!! error TS2763: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
108
+
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:3:43: 'yy1' is declared here.
108
109
const c2 = <OneThing {...obj} yy1 />; // type incompatible;
109
110
~~~~~~~~~~~~~~~~~~~~~~~~~
110
111
!!! error TS2763: No overload matches this call.
@@ -113,6 +114,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
113
114
!!! error TS2763: Property 'yy1' does not exist on type 'IntrinsicAttributes'.
114
115
!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
115
116
!!! error TS2763: Type 'true' is not assignable to type 'string'.
117
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:43: The expected type comes from property 'yy1' which is declared here on type 'IntrinsicAttributes & { yy: number; yy1: string; }'
116
118
const c3 = <OneThing {...obj} {...{extra: "extra attr"}} />; // This is OK becuase all attribute are spread
117
119
const c4 = <OneThing {...obj} y1={10000} />; // extra property;
118
120
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -146,6 +148,8 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
146
148
!!! error TS2763: Type 'true' is not assignable to type 'string'.
147
149
!!! error TS2763: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
148
150
!!! error TS2763: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'.
151
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:21:38: The expected type comes from property 'extra-data' which is declared here on type 'IntrinsicAttributes & { "extra-data": string; }'
152
+
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:22:38: 'yy' is declared here.
@@ -154,6 +158,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
154
158
!!! error TS2763: Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'.
155
159
!!! error TS2763: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
156
160
!!! error TS2763: Type 'string' is not assignable to type 'number'.
161
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:22:50: The expected type comes from property 'direction' which is declared here on type 'IntrinsicAttributes & { yy: string; direction?: number; }'
157
162
158
163
declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
159
164
declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element;
@@ -169,6 +174,9 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
169
174
!!! error TS2763: Type 'true' is not assignable to type 'string'.
170
175
!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
171
176
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
177
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:28:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'
178
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
179
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:64: The expected type comes from property 'y3' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
@@ -180,6 +188,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
180
188
!!! error TS2763: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'.
181
189
!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
182
190
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
191
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
@@ -190,6 +199,8 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
190
199
!!! error TS2763: Type 'string' is not assignable to type 'Element'.
191
200
!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
192
201
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
202
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
203
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
@@ -200,4 +211,6 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t
200
211
!!! error TS2763: 'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'.
201
212
!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
202
213
!!! error TS2763: Type 'string' is not assignable to type 'boolean'.
214
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
215
+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
0 commit comments