How to fix Method 'x' in type 'X' cannot be assigned to the same method in base type 'Y' in TypeScript | DevErrors