Challenge set
TypeScript Fundamentals
Build practical TypeScript foundations through six Challenges covering function types, object models, optional fields, narrowing, unions, and generics.
Work through the collection
Challenges in This Set
- 01
TypeScript
Type a Price Calculator
Add TypeScript parameter and return annotations to a price calculator so strict compilation succeeds while preserving the calculated total.
50XPBeginner - 02
TypeScript
Model a Product Object
Define a TypeScript product object type with required primitive fields so the provided formatter and sample catalog compile safely.
50XPBeginner - 03
TypeScript
Handle Optional Profile Fields
Handle optional TypeScript profile fields with nullish fallbacks so complete and partial profiles produce clear readable summaries.
50XPBeginner - 04
TypeScript
Narrow a Search Result
Use TypeScript union narrowing with typeof to format text and numeric search results safely without weakening the declared types.
100XPIntermediate - 05
TypeScript
Model Deployment Events with TypeScript
Model deployment events with a TypeScript discriminated union so status checks narrow every variant to its required fields safely.
100XPIntermediate - 06
TypeScript
Build a Generic Result Wrapper
Build a generic TypeScript Result type and helper functions that preserve each success value's type while representing failures safely.
200XPAdvanced

