11 lines
No EOL
499 B
Text
11 lines
No EOL
499 B
Text
tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type '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; }'.
|
|
|
|
var Person2:{new() : {name:string;};};
|
|
|
|
Person = Person2; |