Provide flattened.error.reporting(...).for(...).nested.incompatible.types #33361
Closed
Description
let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } };
let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } };
x = y;
Existing Behavior
Type '{ a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }; }'.
Types of property 'a' are incompatible.
Type '{ b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }' is not assignable to type '{ b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }'.
Types of property 'b' are incompatible.
Type '{ c: { d: { e: { f(): { g: number; }; }; }; }; }' is not assignable to type '{ c: { d: { e: { f(): { g: string; }; }; }; }; }'.
Types of property 'c' are incompatible.
Type '{ d: { e: { f(): { g: number; }; }; }; }' is not assignable to type '{ d: { e: { f(): { g: string; }; }; }; }'.
Types of property 'd' are incompatible.
Type '{ e: { f(): { g: number; }; }; }' is not assignable to type '{ e: { f(): { g: string; }; }; }'.
Types of property 'e' are incompatible.
Type '{ f(): { g: number; }; }' is not assignable to type '{ f(): { g: string; }; }'.
Types of property 'f' are incompatible.
Type '() => { g: number; }' is not assignable to type '() => { g: string; }'.
Type '{ g: number; }' is not assignable to type '{ g: string; }'.
Types of property 'g' are incompatible.
Type 'number' is not assignable to type 'string'.
Proposed
Type '{ a: { b: { c: { d: { e: { f(): { g: number; }; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f(): { g: string; }; }; }; }; }; }; }'.
'a.b.c.d.e.f(...).g' is incompatible between these types because 'number' is not assignable to type 'string'
Activity