mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add regression test
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Repro from comment in #21496
|
||||
|
||||
function Mixin<TBase extends {new (...args: any[]): {}}>(Base: TBase) {
|
||||
return class extends Base {
|
||||
};
|
||||
}
|
||||
|
||||
type Mixin = ReturnTypeOf<typeof Mixin>
|
||||
|
||||
type ReturnTypeOf<V> = V extends (...args: any[])=>infer R ? R : never;
|
||||
|
||||
type Crashes = number & Mixin;
|
||||
Reference in New Issue
Block a user