How to fix Object is of type 'unknown' in TypeScript | DevErrors