Ch 1 · Why TypeScript Is Worth Your Time · TypeScript
Topic 1 of 6 in TypeScript — Types That Protect Paid Work — 4 lessons.
The Bug the Client Finds First
Here is a bug that has cost freelancers real money. A client sends you their product data. You write a function that adds up an order. It works on your machine, on your test data. Two weeks after handover the client calls: totals are wrong on some orders, and they have already invoiced their customers.
TypeScript Is a Checker, Not a Runtime
This trips up almost everyone once. Browsers do not run TypeScript. Node does not run TypeScript. There is no TypeScript engine anywhere in production. What exists is a compiler, tsc, which does exactly two things:
Pin the Version: 5.9.3, Never latest
TypeScript has been rewritten. Version 7 is a new compiler built in Go — much faster, and different enough that a lot of advice written for version 5 no longer lines up with what it does or what it prints. If you install TypeScript today without saying which version you want, you get 7.