TypeScript Tutorial · TypeScript in Practice · Lesson 25 of 25
TypeScript Next Steps
Use TypeScript with React and Node.js, and practise for interviews.
Where to use TypeScript next
- React: type props with interfaces and let hooks infer the rest — React course.
- Node.js APIs: type request bodies and validate them with Zod; see the Node.js cookbook.
- Next.js: full-stack TypeScript — Next.js cookbook.
Interview practice
- TypeScript interview questions
- Group By, Result type, Pick & Omit
- Output puzzles: enums, type assertions, readonly
Keep your types honest
- Turn on
strictandnoUncheckedIndexedAccess. - Avoid
any; useunknownand narrow. - Validate data at the edges of your program (API responses, forms, environment variables).
const learned = ["types", "interfaces", "unions", "narrowing", "generics", "utility types", "discriminated unions"] as const;
type Topic = (typeof learned)[number];
const next: Topic = "generics";
learned.forEach((t, i) => console.log(`${i + 1}. ${t} ✓`));
console.log(`Revisit "${next}" while building a real project!`);
Output
1. types ✓ 2. interfaces ✓ 3. unions ✓ 4. narrowing ✓ 5. generics ✓ 6. utility types ✓ 7. discriminated unions ✓ Revisit "generics" while building a real project!