Add regression test
This commit is contained in:
parent
503fc0642e
commit
21c397dd5a
12
tests/cases/compiler/typeAliasFunctionTypeSharedSymbol.ts
Normal file
12
tests/cases/compiler/typeAliasFunctionTypeSharedSymbol.ts
Normal file
|
@ -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;
|
Loading…
Reference in a new issue