Skip to content

Commit 4c933ae

Browse files
committed
Check that test cases produce expected types
1 parent ce2dea9 commit 4c933ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
66
type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
77

8-
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
9-
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
8+
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
9+
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
1010

1111
function foo<T, U>(x: T) {
1212
let a: object = x; // Error

0 commit comments

Comments
 (0)