How to fix Object literal may only specify known properties, and 'name' does not exist in type 'T'. ts(2353) in TypeScript | DevErrors