tests/cases/compiler/intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Object' is not assignable to type 'i1'. Property 'p' is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(100,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type 'Base' is not assignable to type 'i1'. Property 'p' is missing in type 'Base'. tests/cases/compiler/intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(106,21): error TS2304: Cannot find name 'i1'. tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(120,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(120,22): error TS2304: Cannot find name 'i2'. tests/cases/compiler/intTypeCheck.ts(121,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(134,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(134,22): error TS2304: Cannot find name 'i3'. tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Object' is not assignable to type 'i4'. Index signature is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type 'Base' is not assignable to type 'i4'. Index signature is missing in type 'Base'. tests/cases/compiler/intTypeCheck.ts(145,5): error TS2322: Type '() => void' is not assignable to type 'i4'. Index signature is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(148,22): error TS2304: Cannot find name 'i4'. tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(154,5): error TS2322: Type '{}' is not assignable to type 'i5'. Property 'p' is missing in type '{}'. tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Object' is not assignable to type 'i5'. Property 'p' is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(156,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type 'Base' is not assignable to type 'i5'. Property 'p' is missing in type 'Base'. tests/cases/compiler/intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(162,22): error TS2304: Cannot find name 'i5'. tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. Type 'void' is not assignable to type 'number'. tests/cases/compiler/intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(176,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(176,22): error TS2304: Cannot find name 'i6'. tests/cases/compiler/intTypeCheck.ts(177,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(185,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. tests/cases/compiler/intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(190,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(190,22): error TS2304: Cannot find name 'i7'. tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Object' is not assignable to type 'i8'. Index signature is missing in type 'Object'. tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type 'Base' is not assignable to type 'i8'. Index signature is missing in type 'Base'. tests/cases/compiler/intTypeCheck.ts(201,5): error TS2322: Type '() => void' is not assignable to type 'i8'. Index signature is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(204,22): error TS2304: Cannot find name 'i8'. tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. ==== tests/cases/compiler/intTypeCheck.ts (69 errors) ==== interface i1 { //Property Signatures p; p1?; p2?: string; p3(); p4? (); p5? (): void; p6(pa1): void; p7? (pa1, pa2): void; } interface i2 { //Call Signatures (); (): number; (p); (p1: string); (p2?: string); (...p3: any[]); (p4: string, p5?: string); (p6: string, ...p7: any[]); } interface i3 { //Construct Signatures new (); new (): number; new (p: string); new (p2?: string); new (...p3: any[]); new (p4: string, p5?: string); new (p6: string, ...p7: any[]); } interface i4 { // Used to be indexer, now it is a computed property [p]; ~ !!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; } interface i5 extends i1 { } interface i6 extends i2 { } interface i7 extends i3 { } interface i8 extends i4 { } interface i9 { } class Base { foo() { } } interface i11 { //Call Signatures (); (): number; (p); (p1: string); (p2?: string); (...p3: any[]); (p4: string, p5?: string); (p6: string, ...p7: any[]); //(p8?: string, ...p9: any[]); //(p10:string, p8?: string, ...p9: any[]); //Construct Signatures new (); new (): number; new (p: string); new (p2?: string); new (...p3: any[]); new (p4: string, p5?: string); new (p6: string, ...p7: any[]); // Used to be indexer, now it is a computed property [p]; ~ !!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; //Property Signatures p; p1?; p2?: string; p3(); p4? (); p5? (): void; p6(pa1): void; p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ !!! error TS2386: Overload signatures must all be optional or required. } var anyVar: any; // // Property signatures // var obj0: i1; var obj1: i1 = { p: null, p3: function ():any { return 0; }, p6: function (pa1):any { return 0; }, p7: function (pa1, pa2):any { return 0; } }; var obj2: i1 = new Object(); ~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i1'. !!! error TS2322: Property 'p' is missing in type 'Object'. var obj3: i1 = new obj0; ~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj4: i1 = new Base; ~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i1'. !!! error TS2322: Property 'p' is missing in type 'Base'. var obj5: i1 = null; var obj6: i1 = function () { }; ~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i1'. !!! error TS2322: Property 'p' is missing in type '() => void'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; ~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i1'. !!! error TS2322: Property 'p' is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i1'. var obj10: i1 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Call signatures // var obj11: i2; var obj12: i2 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i2'. var obj13: i2 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i2'. var obj14: i2 = new obj11; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i2'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i2'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i2'. var obj21: i2 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Construct Signatures // var obj22: i3; var obj23: i3 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i3'. var obj24: i3 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i3'. var obj25: i3 = new obj22; var obj26: i3 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i3'. var obj27: i3 = null; var obj28: i3 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i3'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i3'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i3'. var obj32: i3 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Index Signatures // var obj33: i4; var obj34: i4 = {}; var obj35: i4 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i4'. !!! error TS2322: Index signature is missing in type 'Object'. var obj36: i4 = new obj33; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj37: i4 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i4'. !!! error TS2322: Index signature is missing in type 'Base'. var obj38: i4 = null; var obj39: i4 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i4'. !!! error TS2322: Index signature is missing in type '() => void'. //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i4'. !!! error TS2322: Index signature is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i4'. var obj43: i4 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I1 // var obj44: i5; var obj45: i5 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i5'. !!! error TS2322: Property 'p' is missing in type '{}'. var obj46: i5 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i5'. !!! error TS2322: Property 'p' is missing in type 'Object'. var obj47: i5 = new obj44; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj48: i5 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i5'. !!! error TS2322: Property 'p' is missing in type 'Base'. var obj49: i5 = null; var obj50: i5 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i5'. !!! error TS2322: Property 'p' is missing in type '() => void'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i5'. !!! error TS2322: Property 'p' is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i5'. var obj54: i5 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I2 // var obj55: i6; var obj56: i6 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i6'. var obj57: i6 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i6'. var obj58: i6 = new obj55; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i6'. var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i6'. !!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i6'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i6'. var obj65: i6 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I3 // var obj66: i7; var obj67: i7 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i7'. var obj68: i7 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i7'. var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ !!! error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i7'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i7'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i7'. var obj76: i7 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I4 // var obj77: i8; var obj78: i8 = {}; var obj79: i8 = new Object(); ~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'i8'. !!! error TS2322: Index signature is missing in type 'Object'. var obj80: i8 = new obj77; ~~~~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj81: i8 = new Base; ~~~~~ !!! error TS2322: Type 'Base' is not assignable to type 'i8'. !!! error TS2322: Index signature is missing in type 'Base'. var obj82: i8 = null; var obj83: i8 = function () { }; ~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'i8'. !!! error TS2322: Index signature is missing in type '() => void'. //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i8'. !!! error TS2322: Index signature is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ !!! error TS2304: Cannot find name 'i8'. var obj87: i8 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.