* Introduce flattened error reporting for properties, call signatures, and construct signatures * Update message, specialize output for argument-less signatures * Skip leading signature incompatability flattening * Add return type specialized message
38 lines
1.1 KiB
Plaintext
38 lines
1.1 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.
|
|
tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not assignable to type 'A1'.
|
|
The types of 'x.y' are incompatible between these types.
|
|
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.
|
|
{
|
|
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: The types of 'x.y' are incompatible between these types.
|
|
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
|
|