Open
Description
TypeScript Version: 3.4.0-dev.20190202
Search Terms: class, extend, constructor, any[]
Code
type ClassConstructor = new(...args: any[]) => {}
function mixin<C extends ClassConstructor>(Class: C) {
return class extends Class {}
}
Expected behavior:
I should be able to replace ...args: any[]
with ...args: unknown[]
, or any other signature.
Actual behavior:
Error: Type 'C' is not a constructor function type. [2507]