Technologies

TypeScript for Web Applications

TypeScript's value in a real application isn't the type annotations themselves — it's the errors it catches before deployment and the confidence it gives when refactoring. Used well, it becomes a form of documentation the compiler actually enforces instead of one that quietly goes out of date.

I use it on every project by default, with strictness settings tuned to whether the codebase is new or an incremental migration.

Where Types Earn Their Cost

  • arrow_rightAPI boundaries — request and response shapes shared between frontend and backend
  • arrow_rightForm validation, so invalid data is caught before it reaches business logic
  • arrow_rightAnything touched by multiple developers, where types act as a contract between them
  • arrow_rightRefactors — the compiler flags every place a change breaks, instead of relying on manual testing to catch it

Where Not to Overdo It

Types are a tool, not a goal — overly clever generic types that take longer to read than the runtime bug they'd prevent aren't worth it. For most application code, straightforward interfaces and type aliases cover what's needed without turning the type system into its own maintenance burden.

Common Mistakes

  • arrow_rightUsing 'any' as a shortcut to silence errors instead of modeling the actual shape of the data
  • arrow_rightNot enabling strict null checks, which catches a large share of real runtime bugs
  • arrow_rightDuplicating types between frontend and backend instead of sharing a single source of truth

Frequently Asked Questions

Is TypeScript worth it for a small project?add

For a genuinely small, short-lived project, the setup overhead might not pay for itself. For anything expected to be maintained or extended over time — which is most real projects — it pays off quickly once the codebase grows past a size where you can hold the whole thing in your head.

Does TypeScript slow down development?add

Initially, slightly, especially with strict mode. Past that initial adjustment, it tends to speed things up — autocomplete and inline errors catch mistakes immediately instead of during manual testing or in production.

What's the difference between 'any' and 'unknown'?add

'any' opts a value out of type checking entirely. 'unknown' still requires narrowing (checking the type) before you can use the value, which is safer — it forces you to handle the actual shape of the data rather than assuming it.

NEED THIS FOR YOUR PROJECT?

I'm currently available for freelance and contract work. Check availability and engagement options, or reach out directly to discuss scope.