Closed
Description
TypeScript Version: 2.2.0
Got this example from the 2.2 announcement
Code
export type Constructable = new (...args: any[]) => object;
export function Timestamped<BC extends Constructable>(Base: BC) {
return class extends Base {
timestamp = new Date();
};
}
Expected behavior:
Extend my class with a timestamp.
Actual behavior:
Not compiling with error: "Base constructor return type 'object' is not a class or interface type."