Skip to content

Commit 21c397d

Browse files
committed
Add regression test
1 parent 503fc06 commit 21c397d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Repro from comment in #21496
2+
3+
function Mixin<TBase extends {new (...args: any[]): {}}>(Base: TBase) {
4+
return class extends Base {
5+
};
6+
}
7+
8+
type Mixin = ReturnTypeOf<typeof Mixin>
9+
10+
type ReturnTypeOf<V> = V extends (...args: any[])=>infer R ? R : never;
11+
12+
type Crashes = number & Mixin;

0 commit comments

Comments
 (0)