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)

137 JSJ &yet with Henrik Joreteg and Phil Roberts

137 JSJ &yet with Henrik Joreteg and Phil Roberts

The panelists talk to Henrik Joreteg and Philip Roberts of &yet.Special Guests: Henrik Joreteg and Philip Roberts. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy ...

10 Des 20141h 1min

136 JSJ TrackingJS with Eduardo Lundgren

136 JSJ TrackingJS with Eduardo Lundgren

The panelists discuss TrackingJS with Eduardo Lundgren.Special Guest: Eduardo Lundgren. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircl...

3 Des 201447min

135 JSJ Smallest Federated Wiki with Ward Cunningham

135 JSJ Smallest Federated Wiki with Ward Cunningham

The Panelists talk to the creator of the Smallest Federated Wiki, Ward Cunningham.Special Guest: Ward Cunningham. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy &...

26 Nov 201454min

134 JSJ Quilljs with Jason Chen

134 JSJ Quilljs with Jason Chen

The panelists discuss Quilljs with its' creator, Jason Chen.Special Guest: Jason Chen. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle...

19 Nov 201439min

133 JSJ Remote Work with Mike Hostetler

133 JSJ Remote Work with Mike Hostetler

The panelists discuss remote work with Mike Hostetler.Special Guest: Mike Hostetler. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.c...

12 Nov 201453min

132 JSJ MV Frameworks with Craig McKeachie

132 JSJ MV Frameworks with Craig McKeachie

The panelists talk about MV Frameworks with Craig McKeachie.Special Guest: Craig McKeachie. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redc...

5 Nov 201458min

131 JSJ Conferences & Meetups with Dave Nugent

131 JSJ Conferences & Meetups with Dave Nugent

The panelists talk to Dave Nugent about organizing conferences and Meetups.Special Guest: Dave Nugent. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: h...

29 Okt 201424min

130 JSJ Browser Tools and Extensions

130 JSJ Browser Tools and Extensions

The panelists talk about browser tools and extensions. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter o...

22 Okt 20141h 7min

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