tests/cases/compiler/callOnInstance.ts(1,18): error TS2300: Duplicate identifier 'D'. tests/cases/compiler/callOnInstance.ts(3,15): error TS2300: Duplicate identifier 'D'. tests/cases/compiler/callOnInstance.ts(7,19): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/callOnInstance.ts(7,19): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. ==== tests/cases/compiler/callOnInstance.ts (5 errors) ==== declare function D(): string; // error ~ !!! error TS2300: Duplicate identifier 'D'. declare class D { constructor (value: number); } // error ~ !!! error TS2300: Duplicate identifier 'D'. var s1: string = D(); // OK var s2: string = (new D(1))(); ~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. declare class C { constructor(value: number); } (new C(1))(); // Error for calling an instance ~~~~~~~~~~~~ !!! error TS2349: Cannot invoke an expression whose type lacks a call signature.