Resolve TypeScript errors when assigning objects with extra properties or merging types using structural typing, type assertions, and intersection types.