How to fix Type 'X' is not a constructor or has a signature in TypeScript | DevErrors