devtools.fm: Developer Tools, Open Source, Software Development

Josh Goldberg - Learning TypeScript Book, typescript-eslint

Jul 22, 2022
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ANECDOTE

Viral JS Project Led To TypeScript Conversion

  • Josh converted a large, messy JavaScript project to TypeScript and learned the value of static analysis the hard way.
  • That conversion revealed many bugs and convinced him TypeScript is a key tool for maintainable code.
INSIGHT

Types Offer Freedom Through Constraint

  • Restricting yourself with a type system gives long-term freedom to change and maintain code.
  • Josh calls this
ADVICE

Prefer ts-expect-error Over ts-ignore

  • Use // @ts-expect-error instead of // @ts-ignore to avoid leaving stale ignores in code.
  • @ts-expect-error suppresses the error now and fails if the error is later resolved, forcing cleanup.
Get the Snipd Podcast app to discover more snips from this episode
Get the app