Learn TypeScript.
From your first type to Streak, a typed habit tracker with safe parsing, tests and a real CLI. Every chapter is short, hands-on, and ends with a way to check it worked.
- 01Why TypeScriptJavaScript with a friend who reads your code before it runs, and what we build together.10 minutes
- 02Set up and run itInstall, run the tests, try the CLI, and see the type checker in your editor.10 minutes
- 03Everyday typesStrings, numbers, arrays and literal types, and why you rarely need to write them.15 minutes
- 04Objects, interfaces and readonlyDescribe the shape of your data once, and keep it from changing behind your back.15 minutes
- 05Unions and narrowingModel "this or that" exactly, and let the checker follow your if statements.20 minutes
- 06Functions and genericsTyped inputs and outputs, and helpers that keep the types of whatever passes through.15 minutes
- 07Trust nothing from outsideData from files, APIs and users arrives as unknown. Type guards turn it into data you can trust.20 minutes
- 08Errors as valuesMake failure part of the signature, so nobody can forget to handle it.15 minutes
- 09Test it with VitestTypes prove the shapes fit. Tests prove the behaviour is right. You want both.20 minutes
- 10Ship itBuild to JavaScript, run it with Node, and keep it honest in CI.15 minutes