meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Converting JS to TypeScript

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, News, Technology

4.91.2K Ratings

🗓️ 8 February 2023

⏱️ 73 minutes

🧾️ Download transcript

Summary

In this episode of Syntax, Wes and Scott talk about their respective processes for converting JavaScript to TypeScript in their projects, why you might want to, and tooling for moving to TypeScript. Sentry - Sponsor If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up. Show Notes 00:10 Welcome 00:36 Sponsor: Sentry 02:23 Electrical updates 08:16 Moving to TypeScript 09:34 What are you doing with GraphQL? GraphQL Codegen 11:35 Why move to TypeScript? 12:00 Refactoring is easier 14:58 Better DX 18:42 Adding a tsconfig.json file 22:43 Figure out your tooling 23:50 Type Checker 25:13 MongoDB to TypScript Generator 26:44 Eslint-Typescript 28:03 Deprank Deprank 29:18 Refactor and rename to .ts 32:40 Typing your code 43:04 Utilities and unions 46:11 Where do you put your types? 49:29 Typing Dependencies Definitely Typed Raycast Search npm 54:26 Global types 01:08 Now what? 03:58 SIIIIICK ××× PIIIICKS ××× ××× SIIIIICK ××× PIIIICKS ××× Scott: Elegrp USB C Walloutlet Wes: Barrina Shop Lights Shameless Plugs Scott: LevelUp Tutorials Wes: Wes Bos Tutorials Tweet us your tasty treats Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

You're listening to syntax, the podcast with the tastiest web development treats out there.

0:06.0

Strap yourself in and get ready. Here is Scott Tillinski and West Boss.

0:10.9

Welcome to syntax, the podcast with the tastiest TypeScript treats out there. Today we've got a

0:16.3

good one for you. We are going to talk about how to take a code base that is in JavaScript and

0:21.2

convert it to TypeScript. What is the process? How do you tackle something like that? It probably

0:26.1

seems so overwhelming at points that you think is that even doable? Because it's certainly

0:30.1

easier starting from scratch, but that's not the case in many applications. So we're going to get

0:35.2

on into that. We're sponsored today by Century. Century is the amazing error and exception

0:42.5

tracking service that you basically install in your application, whether it's a node back in,

0:48.7

whether JavaScript front end, whether it's Python, literally it works with everything,

0:53.2

and they will track all of your errors, exceptions. One kind of cool thing that they are in

0:58.3

beta right now is session replay. Have you turned this on yet, Scott? I haven't done it yet.

1:04.4

I haven't turned it on, but I've been seeing that little message pop up in my dashboard.

1:08.9

And I have everything else turned on. The performance stuff, the profiling, but not replays,

1:15.3

yes, just yet. So it seems pretty cool to be able to, like I was having an issue where like our

1:22.0

course player, like one in like, I don't know, a hundred requests, not even a hundred,

1:29.9

but like basically every five seconds, we submit some data to the server to hand to log the progress

1:37.2

of how you're viewing the video. And there was like a weird issue where I'm not sure where it's

1:41.0

coming from just yet, but I think Cloudflare is probably blocking a request. It happens too quickly

1:47.6

after another one, but I needed some insight into to that. So basically I set up some error

1:54.5

handling where I would explicitly catch it and then send that over to Century by default.

1:59.6

Century will just catch everything, but in my case, I wanted a little bit more information.

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.