facebook/idx

Deprecate?

Closed this issue · 3 comments

Now that optional chaining is almost everywhere, I think this should print out a deprecation warning.

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.)

A codemod can work even better.

A codemod is not possible because the behavior of ?. is not identical to idx. Closing for now.