- 01Getting Started
- 02Your First Output (console.log)
- 03Variables and Type Annotations (number/string/boolean)
- 04Array Types
- 05Function Types (Parameters and Return Values)
- 06Optional Parameters and Default Parameters
- 07Interfaces (interface)
- 08Optional Properties (?)
- 09Type Aliases (type)
- 10Union Types
- 11Literal Types
- 12enum (Enumerated Types)
- 13Classes and Types
- 14Inheritance (extends) and Implementing an Interface (implements)
- 15Generics (<T>)
- 16Tuple Types
- 17The any and unknown Types
- 18Type Assertions (as)
- 19The readonly Modifier
- 20[Applied] Build a Mini Inventory Management System
[Applied] Build a Mini Inventory Management System
This lesson combines the interface, union types, enum, and classes you've learned so far to build a simple inventory management system โ the capstone of this TypeScript introduction.
In a real business system, a common combination is defining a data shape like "product" as an interface, expressing a fixed set of options like "stock status" as an enum or literal type, and bundling them together into a class to operate on.
The example defines a product's shape with interface Item, manages stock status with enum Status, and bundles adding items and generating a report together in class Inventory.
The type annotations, interfaces, enums, and class inheritance covered across these lessons are foundational ideas in real business-system design too. Building the habit of writing even small programs while staying conscious of types is the shortcut to using TypeScript professionally.
๐งช This site can't compile or run TypeScript directly, so it checks on the spot whether what you typed matches the reference code (scoring happens entirely in your browser โ nothing is sent anywhere).
