Skip to content

Commit 74c57ca

Browse files
committed
Add regression test
1 parent 84d1e9f commit 74c57ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/cases/conformance/types/mapped/mappedTypesArraysTuples.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,11 @@ declare function mapArray<T extends any[]>(arr: T): Mapped<T>;
8585
function acceptMappedArray<T extends any[]>(arr: T) {
8686
acceptArray(mapArray(arr));
8787
}
88+
89+
// Repro from #26163
90+
91+
type Unconstrained<T> = ElementType<Mapped<T>>;
92+
type T1 = Unconstrained<[string, number, boolean]>; // string | number | boolean
93+
94+
type Constrained<T extends any[]> = ElementType<Mapped<T>>;
95+
type T2 = Constrained<[string, number, boolean]>; // string | number | boolean

0 commit comments

Comments
 (0)