-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
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]
NN---, frading, frank-weindel, Mifrill, zkulbeda and 1 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this