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)

129 JSJ BaaS with Ryan Done

129 JSJ BaaS with Ryan Done

The panelists talk backends as a service with Ryan Done.Special Guest: Ryan Done. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/...

8 Okt 201454min

128 JSJ Famo.us with Steve Newcomb

128 JSJ Famo.us with Steve Newcomb

The panelists talk about the famo.us framework with Steve Newcomb.Special Guest: Steve Newcomb. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://...

1 Okt 201455min

127 JSJ Changes in npm-Land with Forrest Norvell, Rebecca Turner, Ben Coe, and Isaac Z. Schlueter

127 JSJ Changes in npm-Land with Forrest Norvell, Rebecca Turner, Ben Coe, and Isaac Z. Schlueter

The panelists discuss changes in the npm package manager with Forrest Norvell, Rebecca Turner, Ben Coe, and Isaac Z. Schlueter.Special Guests: Ben Coe, Forrest Norvell, Isaac Schleuter, and Rebecca Tu...

24 Sep 201456min

126 JSJ The Ionic Framework with Max Lynch and Tyler Renelle

126 JSJ The Ionic Framework with Max Lynch and Tyler Renelle

The panelists discuss the Ionic Framework with Max Lynch and Tyler Renelle.Special Guests: Max Lynch and Tyler Renelle. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPri...

17 Sep 201459min

125 JSJ WebGL with Sean Griffin

125 JSJ WebGL with Sean Griffin

The panelists discuss WebGL with Sean Griffin.Special Guest: Sean Griffin. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacy...

10 Sep 201443min

124 JSJ The Origin of Javascript with Brendan Eich

124 JSJ The Origin of Javascript with Brendan Eich

The panelists talk to Brendan Eich, the creator of JavaScript.Special Guest: Brendan Eich. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redci...

3 Sep 20141h 44min

123 JSJ Traceur with Erik Arvidsson

123 JSJ Traceur with Erik Arvidsson

The panelists chat with Erik Arvidsson about Traceur.Special Guest: Erik Arvidsson. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.co...

27 Aug 201431min

122 JSJ Socket.IO with Guillermo Rauch

122 JSJ Socket.IO with Guillermo Rauch

The panelists talk to Guillermo Rauch about Socket.io.Special Guest: Guillermo Rauch. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle....

20 Aug 201448min

Populært innen Business og økonomi

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