How to fix Argument of type 'never' is not assignable to parameter of type 'any' in TypeScript | DevErrors