We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de8c65 commit 59355cbCopy full SHA for 59355cb
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts
@@ -0,0 +1,14 @@
1
+// @strict: true
2
+
3
+// Repros from #23800
4
5
+type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
6
+type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
7
8
+type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
9
+type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
10
11
+function foo<T, U>(x: T) {
12
+ let a: object = x; // Error
13
+ let b: U | object = x; // Error
14
+}
0 commit comments