Add regression test

This commit is contained in:
Anders Hejlsberg 2018-08-22 07:16:31 -07:00
parent 84d1e9f22f
commit 74c57caa90

View file

@ -85,3 +85,11 @@ declare function mapArray<T extends any[]>(arr: T): Mapped<T>;
function acceptMappedArray<T extends any[]>(arr: T) {
acceptArray(mapArray(arr));
}
// Repro from #26163
type Unconstrained<T> = ElementType<Mapped<T>>;
type T1 = Unconstrained<[string, number, boolean]>; // string | number | boolean
type Constrained<T extends any[]> = ElementType<Mapped<T>>;
type T2 = Constrained<[string, number, boolean]>; // string | number | boolean