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 ce2dea9 commit 4c933aeCopy full SHA for 4c933ae
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts
@@ -5,8 +5,8 @@
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; }
+let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
+let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
10
11
function foo<T, U>(x: T) {
12
let a: object = x; // Error
0 commit comments