How to fix Property 'X' is unreachable because index signature covers all properties in TypeScript | DevErrors