TypeScript/tests/baselines/reference/constructorAsType.errors.txt

11 lines
499 B
Plaintext
Raw Normal View History

2014-11-05 21:26:03 +01:00
tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/constructorAsType.ts (1 errors) ====
var Person:new () => {name: string;} = function () {return {name:"joe"};};
~~~~~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
2014-07-13 01:04:16 +02:00
var Person2:{new() : {name:string;};};
Person = Person2;