How to fix 'get' and 'set' accessor must have the same type in TypeScript | DevErrors