TypeScript/tests/baselines/reference/multiLineErrors.errors.txt
2014-09-11 16:11:08 -07:00

34 lines
965 B
Plaintext

==== tests/cases/compiler/multiLineErrors.ts (2 errors) ====
var t = 32;
function noReturn(): {
~
n: string;
~~~~~~~~~~~~~~
y: number;
~~~~~~~~~~~~~~
}
~
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
{
var x = 4;
var y = 10;
}
interface A1 {
x: { y: number; };
}
interface A2 {
x: { y: string; };
}
var t1: A1;
var t2: A2;
t1 = t2;
~~
!!! error TS2322: Type 'A2' is not assignable to type 'A1':
!!! error TS2322: Types of property 'x' are incompatible:
!!! error TS2322: Type '{ y: string; }' is not assignable to type '{ y: number; }':
!!! error TS2322: Types of property 'y' are incompatible:
!!! error TS2322: Type 'string' is not assignable to type 'number'.