TypeScript Basics
15 projects
Hands-on projects for typescript basics.
- 1
Type-Safe API Client
Build a generic API client that returns typed responses, catching shape mismatches at compile time.
Medium ~25 min - 2
Generic Utility Library
Build a small library of generic utility functions: identity, pick, groupBy, and unique.
Easy ~15 min - 3
Type Guard Toolkit
Build a collection of reusable type guards for runtime type checking with compile-time narrowing.
Medium ~20 min - 4
Decorator Logger System
Use TypeScript decorators to automatically log method calls, arguments, and return values.
Medium ~25 min - 5
Typed Event Emitter
Build an event emitter where event names and their payload types are checked at compile time.
Medium ~20 min - 6
Generic State Manager
Build a minimal state container with typed state, subscriptions, and immutable updates.
Medium ~20 min - 7
Runtime Data Validator
Build a schema-based validator that checks unknown data at runtime and returns a typed result.
Medium ~25 min - 8
Type-Safe Config Manager
Build a configuration manager using Partial, Required, and Readonly utility types.
Easy ~15 min - 9
Type-Safe Builder Pattern
Build a fluent builder that uses conditional types to track which fields have been set.
Medium ~25 min - 10
Typed Form Handler
Build a form handler that maps form field definitions to typed values, errors, and validation rules.
Medium ~25 min - 11
Conditional Types Deep Dive
Master conditional types — Exclude, Extract, NonNullable, and custom distributive conditionals. Practice the most powerful TypeScript type-level feature.
Medium ~40 min - 12
Mapped Types Toolkit
Build Partial, Required, Readonly, Pick, Omit, and Record from scratch using mapped types. Practice transforming object shapes at the type level.
Medium ~35 min - 13
Type Guards and Narrowing
Build type guards, discriminated unions, and the 'in' operator narrowing. Practice runtime type checking that the compiler understands.
Medium ~35 min - 14
Declaration Files and Module Augmentation
Write .d.ts declaration files for untyped JS modules and augment existing module types. Practice the bridge between JS and TS.
Medium ~40 min - 15
Type-Safe Router
Build a type-safe router using template literal types. An open-ended project to make route paths and params fully typed at compile time.
Medium ~50 min