Typescript Exercises
FreeInteractive TypeScript exercises from basics to advanced type mapping
FreeFree tier
About Typescript Exercises
TypeScript Exercises is an open-source, interactive set of TypeScript exercises designed to help developers learn and master TypeScript features and principles. Hosted on GitHub and playable at typescript-exercises.github.io, the exercises progress from basic typing to advanced type mapping, covering union types, generics, type declarations, module augmentation, and more. The project emphasizes avoiding the any type and provides a hands-on way to practice TypeScript in a self-paced environment. It is free to use and open for contributions.
Key Features
Interactive exercises playable in the browser at typescript-exercises.github.io
Covers basic typing, union types, generics, type declarations, module augmentation, and advanced type mapping
Emphasizes avoiding the `any` type to encourage strong typing
Progressive difficulty with exercises building on each other
Open source with MIT license, accepting pull requests
Self-paced learning for TypeScript developers of all levels
Pros & Cons
Pros
- Free and open source with no registration required
- Interactive environment provides immediate feedback
- Covers a wide range of TypeScript features in one cohesive set
- Encourages best practices like avoiding `any`
- Community-driven with the ability to contribute improvements
Cons
- Limited to predefined exercises; does not replace full project experience
- Difficulty ramps quickly, which may be challenging for beginners
- No built-in hint or explanation system; learners may need external resources
- Exercises focus on type-level challenges, not runtime development skills
Best For
Learning TypeScript fundamentals and advanced featuresPreparing for TypeScript technical interviewsTeaching TypeScript concepts in workshops or coursesPracticing type system challenges and type-level programmingContributing to open source by improving or adding exercises
FAQ
What is TypeScript Exercises?
TypeScript Exercises is a set of interactive TypeScript exercises that let you practice many TypeScript features, from basic typing to advanced type mapping. It is available at typescript-exercises.github.io and is open source on GitHub.
What topics are covered in the exercises?
The exercises cover basic typing, refining types, union types, merged types, generics, type declarations, module augmentation, and advanced type mapping.
Is TypeScript Exercises free to use?
Yes, the project is open source under the MIT license and free to use. It can be run locally or played at the hosted site.
How do I start using the exercises?
You can start at the hosted interface: https://typescript-exercises.github.io/. Alternatively, clone the GitHub repository and run 'yarn start' to start the development server.
Can I contribute to the project?
Yes, contributions are welcome. You can send pull requests with improvements or new exercises. See the contributing section in the README.