Convert to optional chaining

preview_player
Показать описание
#javascript #typescript #refactoring
Replace various guard expressions with the optional chaining operator (?.).

The optional chaining operator .? returns the value of an object property when the object is available and undefined otherwise. It is similar to the standard . chaining operator, with an added check if the object is defined (i.e., not nullish).

Рекомендации по теме