You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interface Base { v2: string; }
interface A extends Base { v1: number; }
interface B extends Base { v3: object; }
const x: A = { v1: 5, v2: "I'm a c", v3: { hans: 'franz' } } as A;
const y: B = x as B;
with TypeScript 2.4.2 leads to
error TS2352: Type 'A' cannot be converted to type 'B'.
Property 'v3' is missing in type 'A'.
Activity
RyanCavanaugh commentedon Jul 21, 2017
That is not a downcast.
Duplicate of #7531, #16995, etc