10 lines
351 B
Plaintext
10 lines
351 B
Plaintext
==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ====
|
|
function f1(): { new (): number; } {
|
|
return function () { return; }
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2323: Type '() => void' is not assignable to type 'new () => number'.
|
|
};
|
|
|
|
var x = f1();
|
|
var y = new x();
|
|
var z = new (f1())(); |