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)

145 JSJ Meteor.js with Matt DeBergalis

145 JSJ Meteor.js with Matt DeBergalis

The panelists talk to Matt DeBergalis about Meteor.js.Special Guest: Matt DeBergalis. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle....

4 Feb 20151h 6min

144 JSJ Marionette.js 2.0 with Sam Saccone

144 JSJ Marionette.js 2.0 with Sam Saccone

The panelists talk to Sam Saccone about Marionette.js 2.0.Special Guest: Sam Saccone. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle....

28 Jan 201538min

143 JSJ Teaching Programming and Computer Science with Pamela Fox

143 JSJ Teaching Programming and Computer Science with Pamela Fox

Pamela Fox and the rest of the gang talk about teaching programming and Computer Science.Special Guest: Pamela Fox. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy...

21 Jan 20151h 17min

142 JSJ Share.js with Joseph Gentle

142 JSJ Share.js with Joseph Gentle

The panel discusses Share.js with Joseph GentleSpecial Guest: Joseph Gentle. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/priva...

14 Jan 201530min

141 JSJ Firefox OS with Jason Weathersby

141 JSJ Firefox OS with Jason Weathersby

The panelists talk about Firefox OS with Jason Weathersby.Special Guest: Jason Weathersby. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redci...

7 Jan 20153min

140 JSJ Using Art to Get and Keep People Interested in Programming with Jenn Schiffer

140 JSJ Using Art to Get and Keep People Interested in Programming with Jenn Schiffer

The panelists talk to Jenn Schiffer about using art to get and keep people interested in programming.Special Guest: Jenn Schiffer. Support this podcast at — https://redcircle.com/javascript-jabber/d...

31 Des 201452min

139 JSJ The Mozilla Developer Network with Les Orchard and David Walsh

139 JSJ The Mozilla Developer Network with Les Orchard and David Walsh

The panelists talk about the Mozilla Developer Network with Les Orchard and David Walsh.Special Guests: David Walsh and Les Orchard. Support this podcast at — https://redcircle.com/javascript-jabber...

24 Des 201454min

138 JSJ {Track:js} with Todd Gardner

138 JSJ {Track:js} with Todd Gardner

The panelists talk {Track:js} with Todd Gardner.Special Guest: Todd Gardner. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/priva...

17 Des 20141h 2min

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