How to fix Cannot use 'arguments' in this context in TypeScript | DevErrors