2014-09-12 22:35:07 +02:00
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.
2014-11-05 21:26:03 +01:00
tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not assignable to type 'A1'.
2014-10-28 08:28:59 +01:00
Types of property 'x' are incompatible.
Type '{ y: string; }' is not assignable to type '{ y: number; }'.
Types of property 'y' are incompatible.
2014-09-12 22:35:07 +02:00
Type 'string' is not assignable to type 'number'.
2014-07-19 00:19:23 +02:00
==== tests/cases/compiler/multiLineErrors.ts (2 errors) ====
2014-07-13 01:04:16 +02:00
var t = 32;
function noReturn(): {
2014-07-19 00:19:23 +02:00
~
2014-07-13 01:04:16 +02:00
n: string;
2014-07-19 00:19:23 +02:00
~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
y: number;
2014-07-19 00:19:23 +02:00
~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
}
2014-07-19 00:19:23 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
2014-07-13 01:04:16 +02:00
{
var x = 4;
var y = 10;
}
interface A1 {
x: { y: number; };
}
interface A2 {
x: { y: string; };
}
var t1: A1;
var t2: A2;
t1 = t2;
~~
2014-11-05 21:26:03 +01:00
!!! 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'.
2014-07-13 01:04:16 +02:00