TypeScript/tests/baselines/reference/multiLineErrors.errors.txt
2014-11-05 12:26:03 -08:00

42 lines
1.4 KiB
Plaintext

tests/cases/compiler/multiLineErrors.ts(3,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not assignable to type 'A1'.
Types of property 'x' are incompatible.
Type '{ y: string; }' is not assignable to type '{ y: number; }'.
Types of property 'y' are incompatible.
Type 'string' is not assignable to type 'number'.
==== 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'.