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. CheckRepeatedTuple ⸱ Challenge Solution
  9. Chunk ⸱ Challenge Solution
  10. Deep Readonly ⸱ Challenge Solution
  11. Diff ⸱ Challenge Solution
  12. Drop Char ⸱ Challenge Solution
  13. EndsWith ⸱ Challenge Solution
  14. Flatten ⸱ Challenge Solution
  15. Flip Arguments ⸱ Challenge Solution
  16. Flip ⸱ Challenge Solution
  17. InOrder Traversal ⸱ Challenge Solution
  18. IsNever ⸱ Challenge Solution
  19. IsUnion ⸱ Challenge Solution
  20. Join ⸱ Challenge Solution
  21. KebabCase ⸱ Challenge Solution
  22. Last of Array ⸱ Challenge Solution
  23. LastIndexOf ⸱ Challenge Solution
  24. Length of String ⸱ Challenge Solution
  25. MapTypes ⸱ Challenge Solution
  26. Merge ⸱ Challenge Solution
  27. MinusOne ⸱ Challenge Solution
  28. Mutable ⸱ Challenge Solution
  29. AllCombinations ⸱ Challenge Solution
  30. Number Range ⸱ Challenge Solution
  31. ObjectEntries ⸱ Challenge Solution
  32. Omit ⸱ Challenge Solution
  33. OmitByType ⸱ Challenge Solution
  34. PartialByKeys ⸱ Challenge Solution
  35. Percentage Parser ⸱ Challenge Solution
  36. Permutation ⸱ Challenge Solution
  37. PickByType ⸱ Challenge Solution
  38. Pop ⸱ Challenge Solution
  39. Promise.all ⸱ Challenge Solution
  40. PublicType ⸱ Challenge Solution
  41. Readonly 2 ⸱ Challenge Solution
  42. Remove Index Signature ⸱ Challenge Solution
  43. Replace First ⸱ Challenge Solution
  44. Replace ⸱ Challenge Solution
  45. ReplaceAll ⸱ Challenge Solution
  46. ReplaceKeys ⸱ Challenge Solution
  47. RequiredByKeys ⸱ Challenge Solution
  48. Get Return Type ⸱ Challenge Solution
  49. Reverse ⸱ Challenge Solution
  50. Shift ⸱ Challenge Solution
  51. StartsWith ⸱ Challenge Solution
  52. String to Union ⸱ Challenge Solution
  53. Subsequence ⸱ Challenge Solution
  54. Trim Right ⸱ Challenge Solution
  55. Trim ⸱ Challenge Solution
  56. Trim Left ⸱ Challenge Solution
  57. Trunc ⸱ Challenge Solution
  58. Tuple to Nested Object ⸱ Challenge Solution
  59. Tuple to Union ⸱ Challenge Solution
  60. Type Lookup ⸱ Challenge Solution
  61. Unique ⸱ Challenge Solution
  62. Without ⸱ Challenge Solution
  63. Zip ⸱ Challenge Solution

Hard

  1. CamelCase ⸱ Challenge Solution

Extreme