Guide · Open source
How to use type-challenges: solve TypeScript type puzzles
Updated · written with AI from the project's own documentation and checked against our catalogue data
type-challenges is an open-source collection of TypeScript type-level exercises. Each challenge asks you to write a type that makes a test pass, and the challenges are grouped by difficulty from warm-up up to medium and beyond. This guide explains how the challenges are organised, how to work through one, and when the project is the right tool for you.
Quick start
- 1Open the site. Go to https://tsch.js.org/, the project homepage listed in the README.
- 2Choose a difficulty. Start with the warm-up group, then move to easy and medium challenges.
- 3Read the challenge. Open the challenge and read what the type must do and which tests it must pass.
- 4Write your type. Write your solution, keeping in mind that challenges work in TypeScript strict mode.
- 5Check the result. Use the test feedback to confirm your type is correct, then refine it.
- 6Ask for help if stuck. Use the community space to ask questions and compare approaches.
What is type-challenges and who is it for?
The README describes the project as a collection of TypeScript type challenges, aimed at helping you understand how the type system works, write your own utilities, or just have fun. It also includes an online judge and a community space where you can ask questions.
It suits developers who want to get better at TypeScript generics and conditional types, students learning the type system, and teams preparing to write their own shared utility types. It is not a good fit for complete beginners, because the challenges assume working knowledge of the language.
Start solving challenges on the website
The install method listed for this project is a web app, and the README lists no prerequisites and no install commands. You do not need to add anything to a project to try the challenges.
The README links to the project homepage at https://tsch.js.org/ and to a TypeScript Playground plugin badge for the challenges. Use the homepage or the Playground link to open a challenge and start writing your type.
- Open the homepage at https://tsch.js.org/
- Pick a challenge from the warm-up, easy or medium group
- Write your type and check whether the test passes
Understand how the challenges are organised
Challenges are grouped by difficulty. The README lists warm-up, easy and medium groups, and each challenge has a number and a name, such as Hello World, Pick, Readonly, Exclude and Awaited.
Each challenge lives in its own folder under questions/ with a README.md describing the task. The README notes that challenges work in TypeScript's strict mode, so write your solution with strict checking in mind.
- Warm-up: starter exercises such as Hello World
- Easy: built-in-style utilities such as Pick, Readonly, Exclude and Awaited
- Medium: more involved exercises such as Deep Readonly, Trim, Capitalize and Permutation
questions/00004-easy-pick/README.mdWork through a challenge step by step
Read the challenge description in its README, then write a type that makes the test assertions pass. The point of a challenge is to rebuild the logic yourself, so try the problem before looking for an answer.
When a challenge is hard, the README encourages you to ask in the community space, which the project describes as a place to get answers to questions people have faced in real projects.
- Read the challenge README in its questions/ folder
- Write your type in the strict mode setting the README describes
- Check the test result and refine your type
- Ask in the community space if you get stuck
Use type-challenges alongside existing libraries
The README points to existing type utility libraries for ready-made types in production code, naming type-fest. It also mentions older packages that are no longer actively maintained: utility-types, ts-toolbelt and SimplyTyped.
Use type-challenges to learn how these types are built. Use a maintained library such as type-fest when you need working utilities in a real project.
- type-fest: named by the README for production use
- utility-types, ts-toolbelt, SimplyTyped: named by the README as not actively maintained
What people use it for
- Practising TypeScript generics with small, focused puzzles
- Learning how built-in style utilities such as Pick, Exclude and Awaited work
- Preparing to write shared utility types for a team codebase
- Studying how conditional types, tuples and string types behave
Frequently asked questions
Is type-challenges free?
The project is released under the MIT licence, as listed in the project details. The README does not mention any paid tier, so the collection is open source.
Do I need to install anything to use type-challenges?
The listed install method is a web app and the README lists no prerequisites or install commands. You can open the project homepage at https://tsch.js.org/ and start solving challenges.
Who is type-challenges for?
It is for developers who want to improve their TypeScript generics and conditional types, students learning the type system, and teams preparing their own utility types. Complete beginners may find it hard because the challenges assume working knowledge of TypeScript.
What are the alternatives to type-challenges?
For ready-made utility types, the README points to type-fest. Other type utility projects it mentions are utility-types, ts-toolbelt and SimplyTyped, which the README describes as no longer actively maintained.
Does type-challenges help with production code?
The README says the project is meant for learning, writing your own utilities and fun. For ready-made types in production code, it recommends existing libraries such as type-fest.
Where do I ask questions if I get stuck?
The README describes a community space where you can ask questions and get answers, and it links a Discord server for discussion.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Choose type-challenges if you want hands-on, puzzle-style practice with TypeScript generics and conditional types and you already know the basics of the language. Pick a maintained library such as type-fest if you only need ready-made utility types for production code, or start with a beginner TypeScript resource if the language itself is still new to you.
Install options & downloads