13 lines
No EOL
469 B
Text
13 lines
No EOL
469 B
Text
tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2322: Type '() => void' is not assignable to type 'new () => number'.
|
|
|
|
|
|
==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ====
|
|
function f1(): { new (): number; } {
|
|
return function () { return; }
|
|
~~~~~~~~
|
|
!!! error TS2322: Type '() => void' is not assignable to type 'new () => number'.
|
|
};
|
|
|
|
var x = f1();
|
|
var y = new x();
|
|
var z = new (f1())(); |