How to fix Implementation signature is not compatible with overload signature in TypeScript | DevErrors