Values & their types
Why a backend dev types their code
The welcome module showed you the shape of a NestJS server. Before we build one, you need the language it's written in: TypeScript β JavaScript with a type checker bolted on. The types never run; they're erased before Node executes the code. Their whole job is to catch mistakes while you write, not in production at 3am.
For a backend that matters more than anywhere. A booking with a price that's secretly a string, a walkerId that's undefined β those bugs corrupt a database or charge the wrong card. TypeScript turns a whole class of them into a red squiggle before the request ever runs.
Coming from Swift? You already think this way. Swift wouldn't let you pass a
Stringwhere anIntbelongs. TypeScript gives plain JavaScript that same guardrail.