Syntax - Tasty Web Development Treats
Converting JS to TypeScript

Converting JS to TypeScript

Syntax - Tasty Web Development Treats

1:12:30

About this episode

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

More from Syntax - Tasty Web Development Treats

Scott and Wes get into closing the gap between your taste and your skills, with tips on design inspiration, snappier animations and easing. They also share an entry-level setup for recording video les…

1h 6m

Scott and CJ dig into Exact, Expo’s new Rust-based runtime that takes one codebase to web, iOS, macOS and Linux with no React Native involved, plus Bombadil’s property-based testing for web UIs. They…

1h 11m

Scott and Wes sit down with Michael Arnaldi to dig into Effect v4 and why guardrails matter now that AI agents are writing so much of our code. They discuss going zero dependencies, a 5x smaller bundl…

50m

Scott and Wes sit down with GitHub’s Kyle Daigle to ask what the hell is going on with GitHub: the downtime, the agent traffic spike, and the infrastructure overhaul decoupling storage from compute. P…

31m

Wes, Scott, and CJ are back with two weeks of news: Reddit is forcing everyone to log in, r/opensource bans anything AI, and CSS-Tricks is independent again. Plus Anomaly's Hex dictation app, Mitchell…

1h 35m