TypeScript/tests/baselines/reference/targetTypeVoidFunc.errors.txt
Nathan Shively-Sanders c87c1e9b3f Improve error message
And accept baselines
2015-11-25 10:51:31 -08:00

15 lines
635 B
Plaintext

tests/cases/compiler/targetTypeVoidFunc.ts(2,12): error TS2322: Type '() => void' is not assignable to type 'new () => number'.
Type '() => void' provides no match for the signature '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'.
!!! error TS2322: Type '() => void' provides no match for the signature 'new (): number'
};
var x = f1();
var y = new x();
var z = new (f1())();