13 lines
484 B
Plaintext
13 lines
484 B
Plaintext
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())(); |