The worst experience I had refactoring JS was the need to change functions that were used elsewhere from plain to async. I really hoped to have had a strong IDE that could assure me the affected code was as intended and did not have the flow completely break because a promise was returned where none was expected before. I distinctively thought "I wish this was Java". Some of the affected code was already in Typescript and that did help a bit, but I was still not too confident because I still didn't trust the IDE completely (Typescript support was comparatively new).I have even come to question if we should make all our javascript apis async from the start to avoid this scenario though it seems a rather extreme guideline. We didn't really do that, but I still dread this type of refactoring.
No comments yet.