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
Type 'string | Derived' is not assignable to type 'string | Base'.
3
3
Type 'Derived' is not assignable to type 'string | Base'.
4
4
Type 'Derived' is not assignable to type 'Base'.
5
-
Types of property 'n' are incompatible.
6
-
Type 'string | Derived' is not assignable to type 'string | Base'.
7
-
Type 'Derived' is not assignable to type 'string | Base'.
5
+
The types returned by 'fn()' are incompatible between these types.
6
+
Type 'string | number' is not assignable to type 'number'.
7
+
Type 'string' is not assignable to type 'number'.
8
8
tests/cases/compiler/baseClassImprovedMismatchErrors.ts(9,5): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'.
9
9
Type '() => string | number' is not assignable to type '() => number'.
10
10
Type 'string | number' is not assignable to type 'number'.
@@ -13,9 +13,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Pro
13
13
Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
14
14
Type 'DerivedInterface' is not assignable to type 'string | Base'.
15
15
Type 'DerivedInterface' is not assignable to type 'Base'.
16
-
Types of property 'n' are incompatible.
17
-
Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
18
-
Type 'DerivedInterface' is not assignable to type 'string | Base'.
16
+
The types returned by 'fn()' are incompatible between these types.
17
+
Type 'string | number' is not assignable to type 'number'.
18
+
Type 'string' is not assignable to type 'number'.
19
19
tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'.
20
20
Type '() => string | number' is not assignable to type '() => number'.
21
21
Type 'string | number' is not assignable to type 'number'.
@@ -36,9 +36,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro
36
36
!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'.
37
37
!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'.
38
38
!!! error TS2416: Type 'Derived' is not assignable to type 'Base'.
39
-
!!! error TS2416: Types of property 'n' are incompatible.
40
-
!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'.
41
-
!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'.
39
+
!!! error TS2416: The types returned by 'fn()' are incompatible between these types.
40
+
!!! error TS2416: Type 'string | number' is not assignable to type 'number'.
41
+
!!! error TS2416: Type 'string' is not assignable to type 'number'.
42
42
fn() {
43
43
~~
44
44
!!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'.
@@ -55,9 +55,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro
55
55
!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
56
56
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'.
57
57
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'Base'.
58
-
!!! error TS2416: Types of property 'n' are incompatible.
59
-
!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
60
-
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'.
58
+
!!! error TS2416: The types returned by 'fn()' are incompatible between these types.
59
+
!!! error TS2416: Type 'string | number' is not assignable to type 'number'.
60
+
!!! error TS2416: Type 'string' is not assignable to type 'number'.
61
61
fn() {
62
62
~~
63
63
!!! error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt
-2
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ tests/cases/compiler/classPropertyErrorOnNameOnly.ts(7,3): error TS2322: Type '(
3
3
Type 'undefined' is not assignable to type 'string'.
4
4
tests/cases/compiler/classPropertyErrorOnNameOnly.ts(24,7): error TS2322: Type '(val: Values) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'FuncType'.
5
5
Type 'string | undefined' is not assignable to type 'string'.
6
-
Type 'undefined' is not assignable to type 'string'.
Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
23
23
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(66,24): error TS2345: Argument of type '"size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
24
24
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(67,24): error TS2345: Argument of type '"name" | "size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
25
-
Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
26
25
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(73,5): error TS2536: Type 'keyof T | keyof U' cannot be used to index type 'T | U'.
27
26
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(74,5): error TS2536: Type 'keyof T | keyof U' cannot be used to index type 'T | U'.
28
27
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(82,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
Type 'string | number | symbol' is not assignable to type 'keyof U'.
35
34
Type 'string' is not assignable to type 'keyof U'.
36
35
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(83,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
37
-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
38
-
Type 'keyof T' is not assignable to type 'keyof U'.
39
36
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(86,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
40
-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
41
-
Type 'keyof T' is not assignable to type 'keyof U'.
42
37
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(87,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
43
-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
44
-
Type 'keyof T' is not assignable to type 'keyof U'.
45
38
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(103,9): error TS2322: Type 'Extract<keyof T, string>' is not assignable to type 'K'.
46
39
'Extract<keyof T, string>' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'.
47
40
Type 'string & keyof T' is not assignable to type 'K'.
0 commit comments