@@ -8,6 +8,13 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(24,5): error TS23
8
8
Type 'keyof B' is not assignable to type 'keyof A'.
9
9
Type 'string | number | symbol' is not assignable to type 'keyof A'.
10
10
Type 'string' is not assignable to type 'keyof A'.
11
+ Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
12
+ Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
13
+ Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
14
+ Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
15
+ Type 'keyof B' is not assignable to type '"valueOf"'.
16
+ Type 'string | number | symbol' is not assignable to type '"valueOf"'.
17
+ Type 'string' is not assignable to type '"valueOf"'.
11
18
tests/cases/conformance/types/conditional/conditionalTypes2.ts(25,5): error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
12
19
Types of property 'foo' are incompatible.
13
20
Type 'A extends string ? keyof A : A' is not assignable to type 'B extends string ? keyof B : B'.
@@ -61,6 +68,13 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2
61
68
!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'.
62
69
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'.
63
70
!!! error TS2322: Type 'string' is not assignable to type 'keyof A'.
71
+ !!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
72
+ !!! error TS2322: Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
73
+ !!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
74
+ !!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
75
+ !!! error TS2322: Type 'keyof B' is not assignable to type '"valueOf"'.
76
+ !!! error TS2322: Type 'string | number | symbol' is not assignable to type '"valueOf"'.
77
+ !!! error TS2322: Type 'string' is not assignable to type '"valueOf"'.
64
78
b = a; // Error
65
79
~
66
80
!!! error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
0 commit comments