2014-11-05 21:26:03 +01:00
|
|
|
tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2322: Type '() => void' is not assignable to type 'new () => number'.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ====
|
|
|
|
function f1(): { new (): number; } {
|
|
|
|
return function () { return; }
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'new () => number'.
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
var x = f1();
|
|
|
|
var y = new x();
|
|
|
|
var z = new (f1())();
|