
devtools.fm: Developer Tools, Open Source, Software Development Josh Goldberg - Learning TypeScript Book, typescript-eslint
Jul 22, 2022
AI Snips
Chapters
Transcript
Episode notes
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.
Types Offer Freedom Through Constraint
- Restricting yourself with a type system gives long-term freedom to change and maintain code.
- Josh calls this
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.
