-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
TypeScript Version: 2.1.1
Code
declare module 'base';
import * as Base from 'base';
class Derived extends Base { // error TS2507: Type 'any' is not a constructor function type.
}
Expected behavior:
An easy concise way of declaring a module so that the base import can be extended
Actual behavior:
error TS2507: Type 'any' is not a constructor function type.
In order to get around the error, I have to do something like this:
declare module 'base' {
interface Constructor {
new (...args: any[]): this;
}
const _: Constructor;
export = _;
}
monolithed and geekflyer
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed