How to fix Cannot use 'readonly' modifier in mapped type without keyof in TypeScript | DevErrors