TypeScript/tests/baselines/reference/constructorAsType.errors.txt
2017-02-17 14:21:35 -08:00

13 lines
715 B
Plaintext

tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'.
==== tests/cases/compiler/constructorAsType.ts (1 errors) ====
var Person:new () => {name: string;} = function () {return {name:"joe"};};
~~~~~~
!!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
!!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'.
var Person2:{new() : {name:string;};};
Person = Person2;