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
tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>' is not assignable to type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>'.
19
19
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
20
20
Type 'keyof T' is not assignable to type 'never'.
21
-
Type 'string | number | symbol' is not assignable to type 'never'.
22
-
Type 'string' is not assignable to type 'never'.
21
+
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'never'.
22
+
Type 'keyof T' is not assignable to type 'never'.
23
+
Type 'string | number | symbol' is not assignable to type 'never'.
24
+
Type 'string' is not assignable to type 'never'.
23
25
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
26
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
25
27
Type 'keyof T' is not assignable to type 'never'.
28
+
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'never'.
29
+
Type 'keyof T' is not assignable to type 'never'.
26
30
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
31
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
28
32
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
33
+
Type 'string' is not assignable to type 'keyof T'.
34
+
Type 'keyof T' is not assignable to type 'never'.
35
+
Type 'string | number | symbol' is not assignable to type 'never'.
36
+
Type 'string' is not assignable to type 'never'.
29
37
tests/cases/conformance/types/conditional/conditionalTypes1.ts(115,5): error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
30
38
Type 'keyof T' is not assignable to type 'never'.
31
-
Type 'string | number | symbol' is not assignable to type 'never'.
32
-
Type 'string' is not assignable to type 'never'.
39
+
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'never'.
40
+
Type 'keyof T' is not assignable to type 'never'.
33
41
tests/cases/conformance/types/conditional/conditionalTypes1.ts(116,5): error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
34
42
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
35
43
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
44
+
Type 'string' is not assignable to type 'never'.
45
+
Type 'keyof T' is not assignable to type 'never'.
36
46
tests/cases/conformance/types/conditional/conditionalTypes1.ts(117,5): error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
37
47
Type 'keyof T' is not assignable to type 'never'.
48
+
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'never'.
49
+
Type 'keyof T' is not assignable to type 'never'.
38
50
tests/cases/conformance/types/conditional/conditionalTypes1.ts(134,10): error TS2540: Cannot assign to 'id' because it is a constant or a read-only property.
39
51
tests/cases/conformance/types/conditional/conditionalTypes1.ts(135,5): error TS2542: Index signature in type 'DeepReadonlyArray<Part>' only permits reading.
40
52
tests/cases/conformance/types/conditional/conditionalTypes1.ts(136,22): error TS2540: Cannot assign to 'id' because it is a constant or a read-only property.
!!! error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>' is not assignable to type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>'.
189
201
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
190
202
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
191
-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'.
192
-
!!! error TS2322: Type 'string' is not assignable to type 'never'.
203
+
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'never'.
204
+
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
205
+
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'.
206
+
!!! error TS2322: Type 'string' is not assignable to type 'never'.
193
207
z = x;
194
208
z = y; // Error
195
209
~
196
210
!!! 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
211
!!! 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
212
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
213
+
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'never'.
214
+
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
199
215
}
200
216
201
217
function f8<T>(x: keyof T, y: FunctionPropertyNames<T>, z: NonFunctionPropertyNames<T>) {
tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2345: Argument of type 'Extract2<T, Foo, Bar>' is not assignable to parameter of type '{ foo: string; bat: string; }'.
25
25
Type 'T extends Bar ? T : never' is not assignable to type '{ foo: string; bat: string; }'.
26
26
Type 'Bar & Foo & T' is not assignable to type '{ foo: string; bat: string; }'.
27
+
tests/cases/conformance/types/conditional/conditionalTypes2.ts(163,11): error TS2322: Type '{ a: number; b: number; }' is not assignable to type '[T] extends [[infer U]] ? U : { b: number; }'.
28
+
tests/cases/conformance/types/conditional/conditionalTypes2.ts(165,11): error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'Distributive<T>'.
29
+
tests/cases/conformance/types/conditional/conditionalTypes2.ts(167,11): error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'Distributive<T & string>'.
0 commit comments