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

32 lines
1.5 KiB
Plaintext

tests/cases/compiler/parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
tests/cases/compiler/parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
Index signature is missing in type '(s: string) => void'.
tests/cases/compiler/parseTypes.ts(12,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'.
Type '(s: string) => void' provides no match for the signature 'new (): number'
==== tests/cases/compiler/parseTypes.ts (4 errors) ====
var x = <() => number>null;
var y = <{(): number; }>null;
var z = <{new(): number; }>null
var w = <{[x:number]: number; }>null
function f() { return 3 };
function g(s: string) { true };
y=f;
y=g;
~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
x=g;
~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
w=g;
~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
!!! error TS2322: Index signature is missing in type '(s: string) => void'.
z=g;
~
!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'.
!!! error TS2322: Type '(s: string) => void' provides no match for the signature 'new (): number'