When I ported my frontend to TypeScript I swapped out the whole observ* suite for my own typed observables.  Sure, some of the components are too specific to replace trivially, but then those most likely aren&#x27;t the ones you&#x27;re interested in replacing.<p>Decomposing your code into modules is step one.  Making the interface between your modules generic enough to easily replace is the next problem, but if your code is a monolithic blob in the first place that&#x27;s not going to be possible.<p>My main issue with modularity in JavaScript is the lack of strict typing, because you won&#x27;t know if your interface fits correctly until runtime - which is why I&#x27;ve been looking into TypeScript and Elm recently.