3 ms·
That won’t work in this case. TypeScript won’t yell at you if you pass a function that doesn't use all its arguments. If a second number argument is ever added
by jakelazaroff 5y ago
That won’t work in this case. TypeScript won’t yell at you if you pass a function that doesn't use all its arguments. If a second number argument is ever added to `at`, your code using it this way will break and TypeScript will not warn you.
This blog post explains why what you’re proposing is dangerous: https://jakearchibald.com/2021/function-callback-risks/#typescript-doesnt-solve-this https://jakearchibald.com/2021/function-callback-risks/#type...
- antris 5y agoI guess I'm then somehow doing subconscious mental gymnastics to prevent this, because me and several of my colleagues have coded like this for years and it hasn't been a problem even once.