Deprecate?
Closed this issue · 3 comments
mohsen1 commented
Now that optional chaining is almost everywhere, I think this should print out a deprecation warning.
yungsters commented
I agree with you in spirit. But I think the intention is better served using a lint warning to suggest that people use ?.
or ??
instead of idx
. It's also important that developers switching between the two recognize the functional differences between them. (In places where the former may return undefined, idx
may return null
.)
mohsen1 commented
A codemod can work even better.
yungsters commented
A codemod is not possible because the behavior of ?.
is not identical to idx
. Closing for now.