Migrating a Legacy JavaScript Codebase to TypeScript - JSJ 680

Migrating a Legacy JavaScript Codebase to TypeScript - JSJ 680

In this episode, Dan and I (Steve) dove deep into what turned out to be a surprisingly complex, yet incredibly insightful topic: gradually migrating a massive legacy JavaScript project over to TypeScript. We're talking about nearly 1,000 JS files, 70,000+ lines of code, and years of developer history—all transitioning carefully to a typed, modern future.

Dan walked us through how he started by setting up the project for success before converting even one file—getting CI/CD ready, setting up tsconfig.json, sorting out test dependencies, dealing with mock leaks, and even grappling with quirks between VS Code and WebStorm debugging.

We talked tools (like TS-ESLint, concurrently, and ts-node), why strict typing actually uncovered real bugs (and made the code better!), and why it’s crucial not to touch any .js files until your TypeScript setup is rock solid.

Key Takeaways:
  • Gradual migration is 100% possible—and often better—than ripping the bandaid off.
  • TypeScript can and will catch bugs hiding in your JavaScript. Be prepared!
  • Use VS Code extensions or TS-Node to support your devs’ tooling preferences.
  • Don't underestimate the setup phase—it’s the foundation of long-term success.
  • Start small: Dan's team converted just one file at first to test the whole pipeline.
If you’re sitting on a legacy JS project and dreaming of TypeScript, this episode is your blueprint—and your warning sign.

Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Episoder(737)

033 JSJ enyo.js

033 JSJ enyo.js

PanelBen Combee (twitter github blog) Gray Norton (twitter) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) Charles Max Wood (twitter git...

26 Okt 201257min

032 JSJ Angular.js

032 JSJ Angular.js

PanelMisko Hevery (twitter github blog) Igor Minar (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) AJ O’Neal (twitt...

19 Okt 201250min

031 JSJ history.js

031 JSJ history.js

PanelBenjamin Lupton (twitter github blog) Jamison Dance (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Intro to CoffeeScript) Joe Eames (twitter github blog) Discussion 01:00...

15 Okt 201250min

030 JSJ Learning & Teaching JavaScript with Noel Rappin

030 JSJ Learning & Teaching JavaScript with Noel Rappin

PanelNoel Rappin (twitter github blog) Jamison Dance (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Intro to CoffeeScript) AJ O’Neal (twitter github blog) Discussion 00:52 - W...

4 Okt 201251min

029 JSJ Bower.js with Alex MacCaw and Jacob Thornton

029 JSJ Bower.js with Alex MacCaw and Jacob Thornton

PanelAlex MacCaw (twitter github blog) Jacob Thornton (Fat) (twitter github blog) AJ O’Neal (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Charles Max Wood (...

2 Okt 201247min

028 JSJ Greenfield vs Brownfield Projects

028 JSJ Greenfield vs Brownfield Projects

PanelJoe Eames (twitter github blog) AJ O'Neal (twitter github blog) Jamison Dance (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails Summer Camp) DiscussionGreenfield - Bra...

21 Sep 201214min

027 JSJ The JavaScript Community

027 JSJ The JavaScript Community

The panelists discuss the JavaScript community at large. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter...

5 Sep 201249min

026 JSJ Code Organization and Reuse

026 JSJ Code Organization and Reuse

The panelists talk about code organization and reuse. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter of...

28 Aug 201256min

Populært innen Business og økonomi

stopp-verden
dine-penger-pengeradet
lydartikler-fra-aftenposten
e24-podden
rss-penger-polser-og-politikk
rss-borsmorgen-okonominyhetene
pengepodden-2
finansredaksjonen
utbytte
pengesnakk
livet-pa-veien-med-jan-erik-larssen
tid-er-penger-en-podcast-med-peter-warren
stormkast-med-valebrokk-stordalen
rss-sunn-okonomi
morgenkaffen-med-finansavisen
okonomiamatorene
lederpodden
rss-markedspuls-2
flypodden
rss-trygg-av-natur