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 | number | symbol' is not assignable to type 'never'.
22
22
Type 'string' is not assignable to type 'never'.
23
+
Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>' is not assignable to type 'T'.
23
24
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>' is not assignable to type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>'.
24
25
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
25
26
Type 'keyof T' is not assignable to type 'never'.
27
+
Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>' is not assignable to type 'T'.
26
28
tests/cases/conformance/types/conditional/conditionalTypes1.ts(114,5): error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
27
29
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
28
30
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
191
193
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'.
192
194
!!! error TS2322: Type 'string' is not assignable to type 'never'.
195
+
!!! error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>' is not assignable to type 'T'.
193
196
z = x;
194
197
z = y; // Error
195
198
~
196
199
!!! error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>' is not assignable to type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>'.
197
200
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
198
201
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
202
+
!!! error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>' is not assignable to type 'T'.
199
203
}
200
204
201
205
function f8<T>(x: keyof T, y: FunctionPropertyNames<T>, z: NonFunctionPropertyNames<T>) {
>Object.assign : { <T, U>(target: T, source: U): T & U; <T, U, V>(target: T, source1: U, source2: V): T & U & V; <T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; }
15
+
>Object : ObjectConstructor
16
+
>assign : { <T, U>(target: T, source: U): T & U; <T, U, V>(target: T, source1: U, source2: V): T & U & V; <T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; }
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(72,5): error TS2322: Type 'Partial<T>' is not assignable to type 'T'.
36
36
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(78,5): error TS2322: Type 'Partial<Thing>' is not assignable to type 'Partial<T>'.
37
37
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(88,5): error TS2322: Type 'Readonly<Thing>' is not assignable to type 'Readonly<T>'.
38
+
Type 'Readonly<Thing>' is not assignable to type 'T'.
38
39
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(127,5): error TS2322: Type 'Partial<U>' is not assignable to type 'Identity<U>'.
40
+
Type 'Partial<U>' is not assignable to type 'U'.
39
41
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(143,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
40
42
Type 'T[P]' is not assignable to type 'U[P]'.
41
43
Type 'T' is not assignable to type 'U'.
44
+
Type '{ [P in keyof T]: T[P]; }' is not assignable to type 'U'.
42
45
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(148,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
43
46
Type 'keyof U' is not assignable to type 'keyof T'.
44
47
Type 'string | number | symbol' is not assignable to type 'keyof T'.
45
48
Type 'string' is not assignable to type 'keyof T'.
49
+
Type '{ [P in keyof T]: T[P]; }' is not assignable to type 'U'.
46
50
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(153,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'.
47
51
Type 'keyof T' is not assignable to type 'K'.
48
52
Type 'string | number | symbol' is not assignable to type 'K'.
49
53
Type 'string' is not assignable to type 'K'.
54
+
Type '{ [P in K]: T[P]; }' is not assignable to type 'T'.
50
55
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(158,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
51
56
Type 'keyof U' is not assignable to type 'K'.
52
57
Type 'string | number | symbol' is not assignable to type 'K'.
53
58
Type 'string' is not assignable to type 'K'.
59
+
Type '{ [P in K]: T[P]; }' is not assignable to type 'U'.
54
60
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(163,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
55
61
Type 'keyof T' is not assignable to type 'K'.
56
62
Type 'string | number | symbol' is not assignable to type 'K'.
57
63
Type 'string' is not assignable to type 'K'.
64
+
Type '{ [P in K]: T[P]; }' is not assignable to type 'U'.
58
65
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'.
59
66
Type 'T[P]' is not assignable to type 'U[P]'.
60
67
Type 'T' is not assignable to type 'U'.
68
+
Type '{ [P in K]: T[P]; }' is not assignable to type 'U'.
0 commit comments