What is Type Challenges? Type Challenges is a project developed and maintained by Anthony Fu. The primary goal of the project is to collect and provide interesting challenges for TypeScript. But, there is a nuance in these challenges. You can’t use the runtime to solve them. The only place where you need to write the “code” is in type system. So that, Type Challenges are the challenges that must be solved only by using TypeScript type system.

These challenges become hard sometimes, especially if you are a beginner in types and TypeScript. So that, this website provides a place where you can find solutions for those challenges with an explanation on how they’ve been solved. Once you read the explanation, you can find a compiled list of useful references to dive more in depth. In case you solved the challenge in some other way (not like on this website) you can leave it in the comments.

If you have any questions, issues, etc, please open an issue in the repository.

Now, I’m suggesting to you to start from “Warm Up” and go forwards “Extreme” level, challenge by challenge. First, open the “Challenge” link and try to solve it yourself. In case you couldn’t manage, come back here and open the “Solution”.

With no further ado, take your time and enjoy the challenges!

Warm Up

  1. Hello, World ⸱ Challenge Solution

Easy

  1. Awaited ⸱ Challenge Solution
  2. Concat ⸱ Challenge Solution
  3. Exclude ⸱ Challenge Solution
  4. First of Array ⸱ Challenge Solution
  5. If ⸱ Challenge Solution
  6. Includes ⸱ Challenge Solution
  7. Parameters ⸱ Challenge Solution
  8. Pick ⸱ Challenge Solution
  9. Push ⸱ Challenge Solution
  10. Readonly ⸱ Challenge Solution
  11. Length of Tuple ⸱ Challenge Solution
  12. Tuple to Object ⸱ Challenge Solution
  13. Unshift ⸱ Challenge Solution

Medium

  1. Absolute ⸱ Challenge Solution
  2. AnyOf ⸱ Challenge Solution
  3. Append Argument ⸱ Challenge Solution
  4. Append to Object ⸱ Challenge Solution
  5. BEM Style String ⸱ Challenge Solution
  6. Capitalize ⸱ Challenge Solution
  7. Chainable Options ⸱ Challenge Solution
  8. Chunk ⸱ Challenge Solution
  9. Deep Readonly ⸱ Challenge Solution
  10. Diff ⸱ Challenge Solution
  11. Drop Char ⸱ Challenge Solution
  12. EndsWith ⸱ Challenge Solution
  13. Flatten ⸱ Challenge Solution
  14. Flip Arguments ⸱ Challenge Solution
  15. Flip ⸱ Challenge Solution
  16. InOrder Traversal ⸱ Challenge Solution
  17. IsNever ⸱ Challenge Solution
  18. IsUnion ⸱ Challenge Solution
  19. KebabCase ⸱ Challenge Solution
  20. Last of Array ⸱ Challenge Solution
  21. Length of String ⸱ Challenge Solution
  22. Merge ⸱ Challenge Solution
  23. MinusOne ⸱ Challenge Solution
  24. Mutable ⸱ Challenge Solution
  25. ObjectEntries ⸱ Challenge Solution
  26. Omit ⸱ Challenge Solution
  27. PartialByKeys ⸱ Challenge Solution
  28. Percentage Parser ⸱ Challenge Solution
  29. Permutation ⸱ Challenge Solution
  30. PickByType ⸱ Challenge Solution
  31. Pop ⸱ Challenge Solution
  32. Promise.all ⸱ Challenge Solution
  33. Readonly 2 ⸱ Challenge Solution
  34. Remove Index Signature ⸱ Challenge Solution
  35. Replace ⸱ Challenge Solution
  36. ReplaceAll ⸱ Challenge Solution
  37. ReplaceKeys ⸱ Challenge Solution
  38. RequiredByKeys ⸱ Challenge Solution
  39. Get Return Type ⸱ Challenge Solution
  40. Reverse ⸱ Challenge Solution
  41. Shift ⸱ Challenge Solution
  42. StartsWith ⸱ Challenge Solution
  43. String to Union ⸱ Challenge Solution
  44. Trim ⸱ Challenge Solution
  45. Trim Left ⸱ Challenge Solution
  46. Tuple to Nested Object ⸱ Challenge Solution
  47. Tuple to Union ⸱ Challenge Solution
  48. Type Lookup ⸱ Challenge Solution
  49. Unique ⸱ Challenge Solution
  50. Without ⸱ Challenge Solution
  51. Zip ⸱ Challenge Solution

Hard

  1. CamelCase ⸱ Challenge Solution

Extreme