#typescript #javascript #webdevelopment
In this video, I explain why you might consider migrating a JavaScript application to TypeScript. What are the benefits? What's broken with JavaScript? Is it even worth my time?
To follow this video, I highly recommend first watching this one as a prerequisite:
https://www.youtube.com/watch?v=onSGAEanl_Y
Or... You can study the final codebase prior to watching:
https://github.com/zachgoll/tic-tac-toe-subscriber-refactor/tree/main/vanilla-refactor
Posts I mentioned:
- JS Modules - https://www.zachgollwitzer.com/posts/scripts-commonjs-umd-amd-es6-modules
Chapters:
0:00 Introduction
4:17 Getting TypeScript set up
11:17 Brief intro to writing TypeScript
15:53 Benefits of using TypeScript
21:02 Why TypeScript is a "devDependency"
23:28 tsconfig.json overview
36:52 Converting `store.js` file to TypeScript
46:05 Creating our `types.ts` file for project
1:14:36 Converting `view.js` file to TypeScript
1:19:18 Using a basic TypeScript "utility" type
1:45:07 Converting `app.js` file to TypeScript
1:47:22 Compiling our converted project
1:49:27 What's the point? How do we benefit from this refactor?
5 Comments