TypeScript/tests/cases/compiler/typeAliasFunctionTypeSharedSymbol.ts
2018-02-03 14:45:16 -08:00

13 lines
304 B
TypeScript

// 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;