Ganesh Shah
Back to blogs
TypeScript Across the Stack
LearnSep 20, 2025·10 min read

TypeScript Across the Stack

Shared types between React Native, Node, and data models — fewer surprises in production.

TypeScript earns its keep when mobile and API disagree about a field. That disagreement should fail at compile time, not in a user’s balance screen.

I keep domain types close to the source of truth and reuse them at the edges. Account, Transaction, and Budget shapes should not be reinvented three times.

Strict mode feels annoying until it catches a null that would have wiped a screen. Annoyance is cheaper than incidents.

On the portfolio site, typed blog and project modules make content refactors safe. Rename a field once; TypeScript shows every break.

Avoid `any` as a lifestyle. Escape hatches exist for borders with untyped libraries — not for core money logic.

Types are documentation that cannot drift as easily as a Notion page.

Use TypeScript to make future-you faster, not to impress lint dashboards.