2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(104,20): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(118,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(132,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(146,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(160,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(174,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(188,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(202,21): error TS1109: Expression expected.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(83,5): error TS2386: Overload signatures must all be optional or required.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(97,5): error TS2322: Type 'Object' is not assignable to type 'i1'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Object'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(98,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'i1'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Base'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type '() => void' is not assignable to type 'i1'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type '() => void'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(104,5): error TS2322: Type 'boolean' is not assignable to type 'i1'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Boolean'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(104,21): error TS2304: Cannot find name 'i1'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(105,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(110,5): error TS2322: Type '{}' is not assignable to type 'i2'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(111,5): error TS2322: Type 'Object' is not assignable to type 'i2'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(112,17): error TS2350: Only a void function can be called with the 'new' keyword.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(113,5): error TS2322: Type 'Base' is not assignable to type 'i2'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(118,5): error TS2322: Type 'boolean' is not assignable to type 'i2'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(118,22): error TS2304: Cannot find name 'i2'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(119,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(124,5): error TS2322: Type '{}' is not assignable to type 'i3'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(125,5): error TS2322: Type 'Object' is not assignable to type 'i3'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(127,5): error TS2322: Type 'Base' is not assignable to type 'i3'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type '() => void' is not assignable to type 'i3'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(132,5): error TS2322: Type 'boolean' is not assignable to type 'i3'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(132,22): error TS2304: Cannot find name 'i3'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(133,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(139,5): error TS2322: Type 'Object' is not assignable to type 'i4'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Object'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(140,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Base' is not assignable to type 'i4'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Base'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type '() => void' is not assignable to type 'i4'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type '() => void'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not assignable to type 'i4'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Boolean'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(146,22): error TS2304: Cannot find name 'i4'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(147,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{}' is not assignable to type 'i5'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type '{}'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Object'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(154,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Base' is not assignable to type 'i5'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Base'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type '() => void' is not assignable to type 'i5'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type '() => void'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(160,5): error TS2322: Type 'boolean' is not assignable to type 'i5'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'p' is missing in type 'Boolean'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(160,22): error TS2304: Cannot find name 'i5'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(161,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(166,5): error TS2322: Type '{}' is not assignable to type 'i6'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(167,5): error TS2322: Type 'Object' is not assignable to type 'i6'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(168,17): error TS2350: Only a void function can be called with the 'new' keyword.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(169,5): error TS2322: Type 'Base' is not assignable to type 'i6'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type '() => void' is not assignable to type 'i6'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Type 'void' is not assignable to type 'number'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(174,5): error TS2322: Type 'boolean' is not assignable to type 'i6'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(174,22): error TS2304: Cannot find name 'i6'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(175,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(180,5): error TS2322: Type '{}' is not assignable to type 'i7'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(181,5): error TS2322: Type 'Object' is not assignable to type 'i7'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(183,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(185,5): error TS2322: Type '() => void' is not assignable to type 'i7'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(188,5): error TS2322: Type 'boolean' is not assignable to type 'i7'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(188,22): error TS2304: Cannot find name 'i7'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(189,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(195,5): error TS2322: Type 'Object' is not assignable to type 'i8'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Object'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(196,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Base' is not assignable to type 'i8'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Base'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type '() => void' is not assignable to type 'i8'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type '() => void'.
|
2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/intTypeCheck.ts(202,5): error TS2322: Type 'boolean' is not assignable to type 'i8'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type 'Boolean'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(202,22): error TS2304: Cannot find name 'i8'.
|
|
|
|
tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
|
|
|
|
|
|
|
|
2014-11-19 03:44:53 +01:00
|
|
|
==== tests/cases/compiler/intTypeCheck.ts (67 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
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 {
|
|
|
|
//Index Signatures
|
|
|
|
[p];
|
|
|
|
[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[]);
|
|
|
|
|
|
|
|
//Index Signatures
|
|
|
|
[p];
|
|
|
|
[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;
|
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2386: Overload signatures must all be optional or required.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i1'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Object'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj3: i1 = new obj0;
|
|
|
|
~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj4: i1 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i1'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Base'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj5: i1 = null;
|
|
|
|
var obj6: i1 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i1'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type '() => void'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj7: i1 = function foo() { };
|
|
|
|
var obj8: i1 = <i1> anyVar;
|
|
|
|
var obj9: i1 = new <i1> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i1'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Boolean'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i1'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj10: i1 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Call signatures
|
|
|
|
//
|
|
|
|
var obj11: i2;
|
|
|
|
var obj12: i2 = {};
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '{}' is not assignable to type 'i2'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj13: i2 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i2'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj14: i2 = new obj11;
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj15: i2 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i2'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj16: i2 = null;
|
|
|
|
var obj17: i2 = function ():any { return 0; };
|
|
|
|
//var obj18: i2 = function foo() { };
|
|
|
|
var obj19: i2 = <i2> anyVar;
|
|
|
|
var obj20: i2 = new <i2> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i2'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i2'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj21: i2 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Construct Signatures
|
|
|
|
//
|
|
|
|
var obj22: i3;
|
|
|
|
var obj23: i3 = {};
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '{}' is not assignable to type 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj24: i3 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj25: i3 = new obj22;
|
|
|
|
var obj26: i3 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj27: i3 = null;
|
|
|
|
var obj28: i3 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj29: i3 = function foo() { };
|
|
|
|
var obj30: i3 = <i3> anyVar;
|
|
|
|
var obj31: i3 = new <i3> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i3'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj32: i3 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Index Signatures
|
|
|
|
//
|
|
|
|
var obj33: i4;
|
|
|
|
var obj34: i4 = {};
|
|
|
|
var obj35: i4 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i4'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Object'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj36: i4 = new obj33;
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj37: i4 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i4'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Base'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj38: i4 = null;
|
|
|
|
var obj39: i4 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i4'.
|
|
|
|
!!! error TS2322: Index signature is missing in type '() => void'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj40: i4 = function foo() { };
|
|
|
|
var obj41: i4 = <i4> anyVar;
|
|
|
|
var obj42: i4 = new <i4> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i4'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Boolean'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i4'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj43: i4 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Interface Derived I1
|
|
|
|
//
|
|
|
|
var obj44: i5;
|
|
|
|
var obj45: i5 = {};
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '{}' is not assignable to type 'i5'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type '{}'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj46: i5 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i5'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Object'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj47: i5 = new obj44;
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj48: i5 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i5'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Base'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj49: i5 = null;
|
|
|
|
var obj50: i5 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i5'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type '() => void'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj51: i5 = function foo() { };
|
|
|
|
var obj52: i5 = <i5> anyVar;
|
|
|
|
var obj53: i5 = new <i5> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i5'.
|
|
|
|
!!! error TS2322: Property 'p' is missing in type 'Boolean'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i5'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj54: i5 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Interface Derived I2
|
|
|
|
//
|
|
|
|
var obj55: i6;
|
|
|
|
var obj56: i6 = {};
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '{}' is not assignable to type 'i6'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj57: i6 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i6'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj58: i6 = new obj55;
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj59: i6 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i6'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj60: i6 = null;
|
|
|
|
var obj61: i6 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i6'.
|
|
|
|
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj62: i6 = function foo() { };
|
|
|
|
var obj63: i6 = <i6> anyVar;
|
|
|
|
var obj64: i6 = new <i6> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i6'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i6'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj65: i6 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Interface Derived I3
|
|
|
|
//
|
|
|
|
var obj66: i7;
|
|
|
|
var obj67: i7 = {};
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '{}' is not assignable to type 'i7'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj68: i7 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i7'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj69: i7 = new obj66;
|
|
|
|
var obj70: i7 = <i7>new Base;
|
|
|
|
~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj71: i7 = null;
|
|
|
|
var obj72: i7 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i7'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj73: i7 = function foo() { };
|
|
|
|
var obj74: i7 = <i7> anyVar;
|
|
|
|
var obj75: i7 = new <i7> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i7'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i7'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj76: i7 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
//
|
|
|
|
// Interface Derived I4
|
|
|
|
//
|
|
|
|
var obj77: i8;
|
|
|
|
var obj78: i8 = {};
|
|
|
|
var obj79: i8 = new Object();
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Object' is not assignable to type 'i8'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Object'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj80: i8 = new obj77;
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj81: i8 = new Base;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'Base' is not assignable to type 'i8'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Base'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj82: i8 = null;
|
|
|
|
var obj83: i8 = function () { };
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'i8'.
|
|
|
|
!!! error TS2322: Index signature is missing in type '() => void'.
|
2014-07-13 01:04:16 +02:00
|
|
|
//var obj84: i8 = function foo() { };
|
|
|
|
var obj85: i8 = <i8> anyVar;
|
|
|
|
var obj86: i8 = new <i8> anyVar;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1109: Expression expected.
|
2014-07-19 02:30:06 +02:00
|
|
|
~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'i8'.
|
|
|
|
!!! error TS2322: Index signature is missing in type 'Boolean'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'i8'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj87: i8 = new {};
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|