Skip to content

Commit d338e40

Browse files
committed
Add regression test
1 parent 4165980 commit d338e40

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @strict: true
2+
// @declaration: true
3+
4+
// Repro from #41931
5+
6+
type Enum = Record<string, string | number>;
7+
8+
type TypeMap<E extends Enum> = { [key in E[keyof E]]: number | boolean | string | number[] };
9+
10+
class BufferPool<E extends Enum, M extends TypeMap<E>> {
11+
setArray2<K extends E[keyof E]>(_: K, array: Extract<M[K], ArrayLike<any>>) {
12+
array.length; // Requires exploration of >5 levels of constraints
13+
}
14+
}

0 commit comments

Comments
 (0)