You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
First Argument in Function.prototype.call should be optional聽#44530
I didn't know that. This is indeed much better as you don't loose IntelliSense that way. Thanks. But this is a Bug anyway (also not very important tbh) :-)
It's not explicitly mentioned, but #27028 seems to me more like it's a design decision, not a bug. Calling .call() without a thisArg rarely makes sense, and in these few cases you can just pass undefined along.
Activity
MartinJohns commentedon Jun 10, 2021
Am I missing something weird here? You can do that with the
?.()operator as well.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#optional_chaining_with_function_calls
jonath92 commentedon Jun 10, 2021
I didn't know that. This is indeed much better as you don't loose IntelliSense that way. Thanks. But this is a Bug anyway (also not very important tbh) :-)
MartinJohns commentedon Jun 10, 2021
It's not explicitly mentioned, but #27028 seems to me more like it's a design decision, not a bug. Calling
.call()without athisArgrarely makes sense, and in these few cases you can just passundefinedalong.