How to fix Interface 'X' is not compatible with declaration file in TypeScript | DevErrors