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
I agree that optional chaining would be a logical extension of this proposal. The next time it gets presented to the committee plenary, I might raise it as a possible extension. Since the Committee tends in my experience to be conservative and incremental with regards to syntax, it might deferred to a future proposal.
I'm thinking this, to align it fully with object methods.
receiver?~>fn()
:receiver == null ? undefined : fn.call(receiver)
receiver~>fn?.()
:typeof fn !== "function" ? undefined : fn.call(receiver)
receiver?~>fn?.()
:receiver == null || typeof fn !== "function" ? undefined : fn.call(receiver)
The text was updated successfully, but these errors were encountered: