destructuringFromUnionSpread.ts(5,9): error TS2339: Property 'a' does not exist on type '{ a: string; } | { b: number; }'.


==== destructuringFromUnionSpread.ts (1 errors) ====
    interface A { a: string }
    interface B { b: number }
    
    declare const x: A | B;
    const { a } = { ...x } // error
            ~
!!! error TS2339: Property 'a' does not exist on type '{ a: string; } | { b: number; }'.
    