re: 5 easy wins to refactor even the ugliest code VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I don't understand what's wrong with the switch statement? Instead of assigning the variable you could have return for each case and this will also...
 

Was going to comment with the same. You can even ditch line 2 let backgroundImage: BackgroundImage; now this variable isn't used.

 

Yep, forgot that one.. lint usually reminds me in this case :)

code of conduct - report abuse