Hasty Treat - TypeScript Utility Types

Hasty Treat - TypeScript Utility Types

In this Hasty Treat, Scott and Wes talk about TypeScript utility types — what they are, why you might use them, why they exist, and more! Linode - Sponsor Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Show Notes 03:35 - Levels of using TypeScript Typing your code Typing your code, but getting a little bit more dynamic using utility types Creating your own utility types! TypeScript is a language in itself Check out type challenges if you want your mind blown: https://github.com/type-challenges/type-challenges/ https://www.typescriptlang.org/docs/handbook/utility-types.html 07:29 - Partial 08:23 - ReadOnly 09:00 - Required 09:33 - Record A record is an object type that is a bit more restrictive Say you want to store podcast details - name, URL, showCount, etc., but only for Syntax and Shoptalk. 10:47 - Omit I find this one handy when I want to create a “Create Item” type, where it has all the item fields except the ID field 11:34 - Pick Given a type, pick these properties 12:39 - Return Types Gives you the type that is returned from a function. Handy if you need to dynamically generate the type based on a passed function. 13:30 - Case These case types are useful for when you are doing template literal types Uppercase Lowercase Capitalize Uncapitalize 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

Avsnitt(963)

891: Light and Dark Mode

891: Light and Dark Mode

Light mode? Dark mode? Scott and Wes break down the best ways to implement theme switching in CSS, from prefers-color-scheme to manual overrides. Plus, tips on handling shadows, icons, and the dreaded flash of dark mode! Show Notes 00:00 Welcome to Syntax! 01:05 Brought to you by Sentry.io. 02:06 Light and dark mode, things to consider. 02:31 Light and dark mode from scratch. drop-in.css. 04:41 Calculations vs assigned color. 05:32 color-mix and relative color. 08:15 Foreground and background variables. –tint-or-shade: color-mix(in oklab, var(–fg), transparent 95%); –tint-or-shade-harder: color-mix(in oklab, var(–fg), transparent 90%); 09:13 Setting color scheme. 12:38 light-dark function in CSS. 15:48 Manually setting dark mode. 18:43 The challenges with shared caching. 19:33 Tailwind CSS implementation. Tailwind dark-mode. 19:52 Shoehorning in dark mode. 22:25 Other things to consider. 22:28 Color contrast. Lea Verou contrast-color. 24:39 Logos. 25:22 Icons and images. 26:20 Accessibility. Polypane. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

7 Apr 27min

890: Accepting Money on the Internet in 2025

890: Accepting Money on the Internet in 2025

Wes and Scott talk about the ins and outs of accepting payments online—from choosing processors like Stripe and PayPal to handling fraud, taxes, custom checkouts, and more. Show Notes 00:00 Welcome to Syntax! 02:34 Payment processors Stripe PayPal Square Authorize.net 09:29 Checkouts 18:22 The checkout flow 23:10 Methods of accepting money 25:30 Brought to you by Sentry.io 28:34 Merchant of Record Lemon Squeezy Gumroad Paddle Beacons 32:51 Handling fraud, disputes, and refunds 41:25 Sick Picks + Shameless Plugs Sick Picks Scott: Parcel Wes: Parcels App Shameless Plugs Syntax YouTube Channel Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

2 Apr 46min

889: Planning A Build

889: Planning A Build

Scott and Wes talk about the planning process for a major redesign of the Syntax.fm website. They share their thoughts on organizing tasks, choosing tech, handling styling, and the debates that come with deciding what to keep and what to change. Show Notes 00:00 Welcome to Syntax! 01:36 Brought to you by Sentry.io. 02:48 Why we need version 3.0 of Syntax.fm. Level Up Tutorials, Travis Neilson. 04:41 Project planning and organization. 05:53 The codebase. 09:50 The CSS changes. Episode 770: Design Systems With Brad Frost. 12:27 Tooling. 15:54 Development process. 16:38 Mobile and responsiveness. 18:37 Saving VS Code extension into the repo. 19:56 Using a dev container. 20:53 AI agent rules. 21:35 Code styles. 23:42 Canadian podcast. 24:33 Content storage. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

31 Mars 29min

888: You Need a Monorepo × Client Only React × TanStack + More

888: You Need a Monorepo × Client Only React × TanStack + More

26 Mars 52min

887: Vibe Coding Is a Problem

887: Vibe Coding Is a Problem

Is Vibe Coding the future of software development or just a fun way to experiment? Scott and Wes talk about coding with AI, the risks of ignoring the details, and the cool (and sometimes cursed) projects they’ve Vibe Coded. Show Notes 00:00 Welcome to Syntax! 00:31 “Personal Software”. 01:30 What exactly is Vibe Coding. 02:46 The challenges of coding with AI. Levelsio Airplane Game. 04:49 Brought to you by Sentry.io. 05:39 Vibe coding quality concerns. 07:25 Vibe Coding as a learning tool. 10:11 Things we’ve Vibe Coded. Scott’s Piano UI on X. Episode 876: MIDI & Music In the Browser. Wes’ Roomba on X. Wes’ Roomba on YouTube. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

24 Mars 16min

886: AWS and IAC for Dummies with SST

886: AWS and IAC for Dummies with SST

Wes and Scott talk about Infrastructure as Code and how SST makes deploying to AWS easier than ever. They dive into SST’s features, developer experience, and how it simplifies managing services like databases, email, and more. Plus, insights on Cloudflare integration, auto-scaling, and real-world use cases. Show Notes 00:00 Welcome to Syntax! Supper Club × Next.js on AWS + Serverless with Dax Raad 02:37 Brought to you by Sentry.io 04:52 Intro to SST config SST AWS 05:40 Overview of Scott’s SST config file 12:33 Exploring SST’s endless capabilities SST’s docs Cloudflare 15:42 The SST developer experience Infrastructure for TS Devs: Kubernetes, WASM and Containers with David Flanagan Supper Club × Flightcontrol with Brandon Bayer 19:05 SST console and GUI overview 22:13 Resource management and pricing 24:52 Secrets management 27:38 Tunneling and security https://sst.dev/docs/live 30:52 Simplifying DNS 35:18 Sick Picks + Shameless Plugs Sick Picks Scott: Aquaphor Healing Ointment Wes: Magnetic Picture Hanger Frame Shameless Plugs Syntax YouTube Channel Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

19 Mars 39min

885: CSS Fonts Fallbacks, Variable and Trimming

885: CSS Fonts Fallbacks, Variable and Trimming

Scott and Wes dig into the wild world of CSS fonts—covering fallbacks, variable fonts, and new tricks like text-box-trim. They also break down font-display, font kits, and how to avoid layout shifts when loading custom type. Show Notes 00:00 Welcome to Syntax! 01:06 Brought to you by Sentry.io. Damnit Sans. 02:53 @font-face. 03:27 Font Display. 07:40 Avoiding layout shift. Fallbacks. 10:45 Variable fonts. Fontaine. font-kit Wakamai Fondue. Syntax Ep. 782. Font Variation Settings. 16:23 Variable font sizing. 17:46 v-fonts. 19:10 text-box-trim & text-box-edge. text-box-trim examples. 21:28 Browser support. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

17 Mars 23min

884: Typescript Just Got 10x Faster

884: Typescript Just Got 10x Faster

Wes and Scott talk with Anders Hejlsberg and Daniel Rosenwasser about TypeScript’s leap to native code. They discuss the challenges, trade-offs, and the decision to port TypeScript to Go, unlocking faster compilation, better concurrency, and new possibilities for AI-assisted development. Show Notes 00:00 Welcome to Syntax! 00:38 TypeScript compiler goes native 05:24 Challenges in rebuilding TypeScript 08:49 How long has this been in development? 10:32 What does porting TypeScript to native entail? 16:36 Why choose Go? 26:48 The porting process 35:02 Brought to you by Sentry.io 35:27 Type checking and parallel compilation 42:36 Fixing TypeScript’s performance bottlenecks 49:09 Large TypeScript codebases 54:11 What’s the timeline for the new compiler? 58:39 Optimization and AI 01:00:32 New features? 01:04:15 Sick Picks + Shameless Plugs Sick Picks Daniel: pprof-it Anders: USB Hand Warmers Shameless Plugs TypeScript Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

11 Mars 1h 8min

Populärt inom Politik & nyheter

aftonbladet-krim
svenska-fall
motiv
p3-krim
fordomspodden
rss-krimstad
flashback-forever
rss-viva-fotboll
blenda-2
aftonbladet-daily
rss-sanning-konsekvens
grans
spar
rss-vad-fan-hande
dagens-eko
olyckan-inifran
svd-nyhetsartiklar
rss-frandfors-horna
rss-expressen-dok
rss-krimreportrarna