The case for and against. What TypeScript does well, and when it costs too much.
For. What works in its favour.
- Completely free and open source.
- Error detection in editor (excellent DX).
- Safer refactoring thanks to types.
- Large adoption and mature ecosystem.
- You want to catch errors in the editor, not at runtime.
- You collaborate in teams and need code documentation via types.
Against. What to plan for.
- Initial learning curve.
- Compilation step before execution.
- Overhead for very small projects.
- You have a single script of a few lines.
- You prefer maximum JavaScript flexibility without types.
