JavaScript Jabber

TypeScript, Security, and Type Juggling with Ariel Shulman & Liran Tal - JSJ 679

12 snips
May 29, 2025
Ariel Shulman, a TypeScript expert and full stack developer, and Liran Tal, a security advocate from Snyk, dive into the nuances of TypeScript and its security implications. They discuss how TypeScript is widely adopted, yet often misinterpreted as a security tool. Key insights include the concept of type juggling and the vulnerabilities it can introduce. They also explore Zod for runtime type checking, highlighting its pros and pitfalls. Join them as they unpack the balance between type safety and real-world application complexities.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

TypeScript Isn't a Security Tool

  • TypeScript is widely adopted but not a security tool as it only provides build-time checking.
  • Developers often have misplaced trust in TypeScript for security, which can lead to vulnerabilities.
INSIGHT

Types Disappear at Runtime

  • TypeScript type checking happens only during build time and does not affect runtime.
  • Types disappear when code runs, so runtime errors due to unexpected types can still occur.
ADVICE

Be Cautious with 'any' and Casts

  • Avoid using the "any" type where possible as it breaks TypeScript's reliability.
  • Use localized casts like "as unknown as string" cautiously when necessary but keep them minimal.
Get the Snipd Podcast app to discover more snips from this episode
Get the app