News for hackers. Stuff that matters.
Re:Don't use functions as callbacks unless they're designed ... by chadlavi on Saturday February 06, 2021 @08:57AM (#26046497)
I was about to say, just use typescript and it'll throw you an error that the function expected one argument but received three.
Re:Don't use functions as callbacks unless they're designed ... by pfdzm on Saturday February 06, 2021 @09:05AM (#26046548)
This won’t prevent all errors - the author explicitly addresses this towards the end.
Re:Don't use functions as callbacks unless they're designed ... by chadlavi on Saturday February 06, 2021 @09:20AM (#26046643)
Yes. I meant specifically just the "too many args" issue