This directory contains practical TypeScript examples demonstrating various patterns and features.
Each example file is self-contained and demonstrates specific TypeScript concepts. They're based on real-world patterns used in the Plebeian Market application and follow best practices for:
These examples are TypeScript files that can be:
ts-node for testing# Run an example
npx ts-node examples/type-system-basics.ts
type-system-basics.ts to understand fundamentalsadvanced-types.ts for complex type patternsreact-patterns.ts for component typingapi-patterns.ts for type-safe API handlingvalidation.ts for runtime safetyEach example builds on previous concepts, so following this order is recommended for learners.