How to fix Object literal may only specify known properties in TypeScript | DevErrors