Your first challenge in 3 steps
Type Challenges uses TypeScript’s type system for assertions. Let’s start with the simplest challenge to understand how it works.Open the Hello World challenge
The “Hello World” challenge is the perfect starting point. You can solve it in:
- TypeScript Playground (no setup required)
- VS Code Extension
- Local setup with your preferred IDE
Understand the challenge
Here’s what you’ll see:And the test cases that must pass:The tests check two things:
HelloWorldis not theanytypeHelloWorldequals thestringtype
Try a real challenge: Pick
Now let’s try something more practical. ThePick challenge asks you to implement TypeScript’s built-in Pick<T, K> utility type.
The challenge
Implement a type that picks a set of propertiesK from type T.
Example usage
Expected behavior
Hint
Hint
Think about:
- How to iterate over keys in a type
- How to constrain
Kto only be keys that exist inT - How to build a new object type with selected properties
Solution
Solution
K extends keyof T- Constrains K to only be keys that exist in T[P in K]- Mapped type that iterates over each key in KT[P]- Gets the type of property P from T
Understanding difficulty levels
Warm-up
1 challenge - Introduction to how Type Challenges workPerfect for your first attempt
Easy
13 challenges - Basic type operationsExamples: Pick, Readonly, First of Array, Tuple Length
Medium
Advanced type manipulationsExamples: DeepReadonly, TrimLeft, Capitalize, Promise.all types
Hard & Extreme
Complex challengesExamples: CamelCase, Currying, Union to Intersection
Next steps
Choose your environment
- Browser: TypeScript Playground - instant access
- VS Code: Install the extension
- Local: Set up locally for full IDE support
Start with easy challenges
Work through the 13 easy challenges to build a strong foundation:
- Pick
- Readonly
- Tuple to Object
- First of Array
- Length of Tuple
- Exclude
- Awaited
- If
- Concat
- Includes
- Push
- Unshift
- Parameters
Learn from the community
- Check out solution discussions for different approaches
- Join the Discord community
- Share your own solutions
Pro tip: Don’t just copy solutions. Try to solve each challenge yourself first, then compare your solution with others to learn different approaches.