TypeScript Fundamentals — Getting a Bit Deeper

TypeScript Fundamentals — Getting a Bit Deeper

In this episode of Syntax, Scott and Wes continue their discussion of TypeScript Fundamentals with a deeper diver into more advanced use cases. Deque - Sponsor Deque’s axe DevTools makes accessibility testing easy and doesn’t require special expertise. Find and fix issues while you code. Get started with a free trial of axe DevTools Pro at deque.com/syntax. No credit card needed. 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. Mux - Sponsor Mux Video is an API-first platform that makes it easy for any developer to build beautiful video. Powered by data and designed by video experts, your video will work perfectly on every device, every time. Mux Video handles storage, encoding, and delivery so you can focus on building your product. Live streaming is just as easy and Mux will scale with you as you grow, whether you’re serving a few dozen streams or a few million. Visit mux.com/syntax. Show Notes Deep end stuff 03:30 - any vs unknown 06:20 - never https://twitter.com/Igorbdsq/status/1351681019196436482 09:14 - .d.ts Definition files Usually for existing libraries that don’t have types Can be generated or hand-written Also really handy for pure JS projects, you still get good autocomplete because of these 13:25 - Type generation Can be generated from GraphQL, or Schemas, or from JSON Output 17:20 - TypeScript generics (variables) Kind of like functions, they return something different based on what you pass it makeFood makeFood This function makes food and shares lots of the same functionality between making a pizza and sandwich If the only thing that differs is the type returned, we can use generics You often see this as a single char T It can be anything Promise is a generic querySelector uses generics 21:48 - Promises / Async + Await Functions now return a Promise type, but with a generic Promise Promise Promise, Request, Request stringified added headers 29:48 - Type assertion (type casting) Type assertion is when you want to tell TypeScript “Hey I know better than you”. Two ways: as keyword (most popular) someValue as HTMLParagraphElement Tagged before someValue 34:14 - TypeScript without TypeScript (JSDoc / TSDoc) Really nice! You can also add comments / descriptions https://github.com/developit/redaxios/blob/master/src/index.js 40:08 - Interfaces vs Types Interfaces have better perf https://twitter.com/wesbos/status/1362418379919937545 https://blog.logrocket.com/types-vs-interfaces-in-typescript/ What do you default to? How we write TypeScript 44:27 - Interface or Types Scott - Types Wes - Interfaces 44:50 - any vs unknown Scott - any Wes - unknown / any 46:52 - Any (No Implicit or Implicit Allowed) Scott - No implicit any Wes - No implicit any 48:31 - Return types (Implicit or Explicit) Scott - Explicit always Wes - Not always 50:49 - Compile (TSC, Strip TS) Scott - Strip Wes - Both 52:38 - Type Assertion (as or ) Scott - as Wes - as 53:09 - Arrays (Dog[] or Array) Scott - Dog[] Wes - Dog[] 54:02 - Assert or Generic (if both work) querySelector(’.thing’) as HTMLVideoElement; or querySelector(’.thing’); Scott - querySelector(’.thing’); Wes - querySelector(’.thing’); Links Syntax 324: TypeScript Fundamentals Syntax 327: Hasty Treat - TypeScript Compilers and Build Tools Axios VS Code Syntax 310: Serverless, Deno and TypeScript with Brian Leroux Cloudinary Notion ××× SIIIIICK ××× PIIIICKS ××× Scott: Powerowl 16 Battery Recharger Wes: Fairywill Pro P11 Shameless Plugs Scott: Level 2 Node Authentication - Sign up for the year and save 25%! Wes: Beginner Javascript - Use the coupon code ‘Syntax’ for $10 off! 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

Jaksot(967)

863: 2024: A Year in Review

863: 2024: A Year in Review

Scott and Wes look back at 2024 and share highlights from a big year for Syntax and the web dev world. They review their 2024 predictions to see what they got right (and wrong), and break down the major moments in web development from CSS improvements to AI editors and beyond. Show Notes 00:00 Welcome to Syntax! 01:30 Changes to the Syntax podcast. 05:56 What happened this year? 06:07 React. 06:36 Solid Start. 07:04 Tanstack Start. 07:43 Remix 09:42 AI Editors. 11:53 Vite 6. 14:02 Bluesky. 19:52 CSS. 22:17 What did we do? 22:21 React Miami. React Miami Episode. 22:26 JSNation Amsterdam. 23:55 JSNation US + React Summit. 24:57 Terminal Feud. 26:28 Laravel + Terminal basketball game. 27:02 Syntax San Francisco meetup. 27:23 GitHub Universe. 28:07 FITC. 28:38 153 Syntax Episodes + Video. 29:32 Our 2024 Predictions Reviewed. 29:46 Types in JS will have real movement. 31:29 Temporal API will ship in 1 browser. 32:50 Perf tooling gets easy for everyone to understand. 33:29 CSS continues to get better where you need less JS. 34:25 Svelte v5 is very fast. 34:38 The year of the server in frameworks. 35:28 Astro is going to have a good year. 36:13 React server components. 37:03 Remix moves away from page-based loaders, to component loaders. 37:18 Hono will become more ubiquitous. 38:28 We will see a route matching Proposal move ahead. 39:23 Bun releases full node compat. 40:42 We will see a new Linter + formatter entirely replace. 42:16 New TypeScript typechecker. Ezno. 43:40 Lightning CSS pops - or does it? 45:10 You’ll hear more about Rspack and Turbopack. 45:51 Vite isn’t going to release anything big in 2024. 46:24 Relative color will land in all major browsers. 48:14 CSS contrast-color will land in chrome. 48:48 Scroll animation landing in 2 browsers. 50:03 The year of CSS discovery. 51:09 Safari will Ship 3 missing PWA Support. 52:11 Firefox usage will continue to slip. 56:53 Paid Arc features. 57:14 More XR web experiences as Apple releases in Vision Pro. 59:55 AI Tooling. 01:00:57 Small Models that run in the browser. 01:01:38 Apps get Sherlocked by OpenAI. 01:02:04 On prem corporate AI. 01:04:49 Sick Picks + Shameless Plugs. Sick Picks Scott: TCGPocket App. Wes: Huge Bag of Croc Charms Shameless Plugs Scott: Syntax 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

23 Joulu 20241h 8min

862: Svelte 5 Is Here!

862: Svelte 5 Is Here!

Is Svelte becoming React? Scott and Wes explore the exciting updates in Svelte 5, including Runes, Snippets, odd font choices, and performance benchmarks, while discussing custom event updates, migration tips, and potential performance gains. Show Notes 00:00 Welcome to Syntax! Scott’s Svelte5 Overview. 01:27 Brought to you by Sentry.io. 02:06 What’s new in Svelte 5? 02:13 Runes. 04:47 $state 07:00 $state.snapshot 11:47 $derived 12:46 $derived.by 15:41 $effect 17:24 $effect.pre 18:05 $effect use cases. 22:20 $props 24:57 Binding state. 27:15 $inspect vsode-wrap-svelte. 28:46 $inspect(…).with 30:42 Snippets. 34:22 Events now onclick instead of on:click. 36:09 Custom events now just props instead of createEventDispatcher. 36:31 Serif Font on website. 40:01 Performance. Benchmarks Doc. Benjamin McCann Tweet. 46:41 Is Svelte becoming React? 49:21 Migration. 51:41 What’s next and wish list for Svelte. 57:12 Sick Picks & Shameless Plugs. Sick Picks Scott: Dragon Quest 3. Wes: Dresscode.dev. Shameless Plugs Scott: Syntax 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

18 Joulu 20241h

861: Local Data: Sqlite, LocalStorage, Session, Cookies and IndexDB

861: Local Data: Sqlite, LocalStorage, Session, Cookies and IndexDB

Scott and Wes dive into the world of local data storage, breaking down the pros and cons of Sqlite, LocalStorage, SessionStorage, Cookies, and IndexedDB. They cover real-world use cases like user settings, offline data, and auth tokens, while sharing their favorite tools and strategies for keeping your data fast and secure. Show Notes 00:00 Welcome to Syntax! 00:30 Brought to you by Sentry.io. 01:43 Why store data locally. 01:55 User preferences and settings. 02:50 Not logged in state (shopping carts, etc). 03:30 Data for faster loading. 03:51 Privacy concerns. 04:25 Large files or drafts. 05:50 Auth tokens. 07:08 Where to store data. 07:11 Cookies. 07:48 Local storage. 09:15 Session storage. 10:35 IndexedDB. 12:15 BYOJS Storage. 13:41 SQlite via WASM. 14:12 Penalties of SQLite in browser via WASM. 15:29 PGLite. 16:23 Dealing with migrations. 16:55 The advantages of the approach. 18:42 Dexie. 19:59 Patch messages. 21:25 A few options. TinyBase Docs. Local First Web. 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

16 Joulu 202424min

860: Module Federation Microfrontends with ByteDance’s Zack Jackson

860: Module Federation Microfrontends with ByteDance’s Zack Jackson

Wes and Scott talk with Zack Jackson about Module Federation, and the innovative ways it streamlines collaboration across large teams and complex applications. Zack also dives into simplifying microfrontends, optimizing builds with Rspack, and his work at ByteDance. Show Notes 00:00 Welcome to Syntax! 00:48 Zach background and role at ByteDance 03:10 ByteDance’s web and native apps How ByteDance Became the World’s Most Valuable Startup Lynx ByteDance GitHub Coze Lark MarsCode 06:48 What is Module Federation? Zephyr Cloud 15:49 Evolution from V1 to V2 of Module Federation 24:47 When to consider Module Federation 29:46 How would you publish a utils package in Module Federation? 32:59 How would you do a major upgrade? 36:36 Brought to you by Sentry.io 37:01 Who owns the update process? 39:40 Handling multiple frameworks 42:10 ModernJS and Meta frameworks ModernJS Rspress 47:20 Does ByteDance have its own JavaScript runtime? NAPI 50:02 Why Zack built Rspack Rspack Rsbuild 58:15 The future of Rspack and custom bundlers Unpack 01:04:24 Module Federation’s major features 01:07:29 Sick Picks & Shameless Plugs Shameless Plugs Zack: Zephyr Cloud Midscene.js 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

13 Joulu 20241h 10min

859: Streaming Video in 2025

859: Streaming Video in 2025

Scott and Wes break down the tech behind video streaming for the web, from transcoding and variants to CDN and access control. They also share insights on tools like Mux, Cloudflare Stream, and ffmpeg, plus tips for managing bandwidth, hosting, and costs. Show Notes 00:00 Welcome to Syntax! 00:50 Brought to you by Sentry.io. 01:15 The history of video streaming. 02:10 How video streaming works: The Tech. 03:54 How video streaming works: Transcoding. 06:37 How video streaming works: Variants. ffmpeg. Wes’ R2-video-streaming. Wes’ Transcoding. YT-DL. YT-DLP. 13:13 Dynamic ad insertion. 14:29 Bandwidth and hosting. Mux. 18:03 Cloudflare. 19:13 The costs. Wes Bos Tweet Cloudflare TOS. Steve Tenuto tweet. 25:39 Media players. Media Chrome. 29:42 CDN. 32:04 Access control. 33:35 Solutions. Mux. Cloudflare Stream. Bunny.net Stream AWS Media Convert. Cloudinary. Bitmovin. 41:55 Some other features. 45:47 Sick Picks & Shameless Plugs. Sick Picks Scott: Anker MagGo. Wes: PolyCapture. Shameless Plugs Scott: Syntax 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

11 Joulu 202451min

858: How to Go Deeper With Your Learning

858: How to Go Deeper With Your Learning

Want to level up your web dev game? Scott and Wes share their top tips for going deeper with your learning—covering everything from reading the docs and source code to finding mentorship and engaging with the community. Show Notes 00:00 Welcome to Syntax! 02:48 Brought to you by Sentry.io. 03:54 How do you go deeper? 04:23 Pick a project and build it. 06:36 Read the docs. Svelte Docs. 09:07 Read the source. 11:19 Consume content: blogs, conference talks, etc. Dot Conferences on YouTube. GitNation JavaScript Conferences. 16:24 Discord and Reddit. 19:31 Get mentorship and ask questions. 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

9 Joulu 202424min

857: How to Look and Sound Good at $10, $100 and $1000 With Producer Randy

857: How to Look and Sound Good at $10, $100 and $1000 With Producer Randy

Wes and Scott talk with Syntax Producer Randy Rektor. From mastering mic technique to lighting hacks and choosing the right camera, they discuss the best ways to upgrade your audio and video setup on any budget. Show Notes 00:00 Welcome to Syntax! 03:01 Brought to you by Sentry.io 04:14 Understanding signal-to-noise ratio 06:48 Using de-noise iZotope Voice De-noise 09:12 The importance of mic technique 10:28 Dealing with electrical noise 11:15 The proximity effect 13:01 Sound treatment vs sound proofing Sound Wavelength Calculator Syntax 516: Wes’ New Soundproof Office Studiobricks Randy’s Studiobricks video GIK Acoustics 23:33 Do egg crates work for sound treatment? 25:22 USB mics vs XLR mics Shure MV6 Syntax 845: Are Companies Hiring? State of the Dev Job Market With Taylor Desseyn 27:06 Video composition 30:18 How to improve your lighting 35:37 Choosing the right camera 36:58 The importance of codecs and bitrates 38:14 What to look for in a webcam 38:50 Randy’s packages for $50, $150 and $500-$1000 budgets 40:02 The $50 package/selecting your mic Feelworld PM1 Fifine K688 heyday Stone White Desktop Mic 43:53 The $150 package Neewer lights 45:32 The $500-$1000 package Shure MV6 Insta360 Link 2 Insta360 Link 2c Elgato Cam Link 4k Sonay a6000 51:07 Mic stand recommendations VIVO 56:50 Sick picks & Shameless Plugs Sick Picks Randy: etymologynerd on TikTok Shameless Plugs Randy: Randy’s 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

6 Joulu 202458min

856: Loading UIs, Rust Webpack, New Cookie Types, Conference Talks + More

856: Loading UIs, Rust Webpack, New Cookie Types, Conference Talks + More

Scott and Wes dive into your questions on Hono and SvelteKit, partitioned cookies, redirect codes, and using Rspack instead of Vite. Plus, they share insights on quoting projects, interview best practices, and whether you should slow down those speedy loading spinners. Show Notes 00:00 Welcome to Syntax! 00:50 Brought to you by Sentry.io. 02:23 Apple developer accounts and certificates. 06:58 Hono, SvelteKit, and using them together. 11:14 Rspack & Rsbuild over Vite? Rspack, Rsbuild. Rolldown, Rollup. oxc. Turborepo. 21:01 Quoting projects without seeing under the hood. 25:26 HTTP cookies, partitioned cookies, and chips. Partitioned Cookies. 30:29 Redirect codes; 301, 302, 303, 307 418 I’m a teapot. 36:22 Gaining inspiration for talks and posts. 40:02 My loading state is too fast! Should I use setTimeout? setTimeout Docs. 42:29 Interviews and landing the job. 49:50 Sick Picks & Shameless Plugs. Sick Picks Scott: Stainless Steel Cookware. Wes: Dim Lightbulbs, steelpan.guy on TikTok. Shameless Plugs Scott: Potluck Submissions. Wes: Syntax 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

4 Joulu 202456min

Suosittua kategoriassa Politiikka ja uutiset

aikalisa
rss-ootsa-kuullut-tasta
ootsa-kuullut-tasta-2
tervo-halme
rss-kuka-mina-olen
et-sa-noin-voi-sanoo-esittaa
otetaan-yhdet
politiikan-puskaradio
rss-podme-livebox
rss-vaalirankkurit-podcast
aihe
rikosmyytit
radio-antro
rss-tasta-on-kyse-ivan-puopolo-verkkouutiset
linda-maria
rss-skn-parhaat