How to fix Property 'x' in type 'X' is not assignable to the same property in base type 'Y' in TypeScript | DevErrors