TypeScript Challenges

Test your TypeScript skills with our curated collection of coding challenges

#3256

Hello World

Start your TypeScript journey with the classic "Hello World" coding challenge. Learn by doing, get instant feedback, and master TypeScript basics step-by-step on TypeScriptPro.

Warm-up
#4

Pick

Learn to implement TypeScript's built-in Pick utility type from scratch. Master type manipulation and generic constraints with this easy-level TypeScript challenge on TypeScriptPro.

Easy
#7

Readonly

Learn to implement TypeScript's built-in Readonly utility type from scratch. Master readonly properties and mapped types with this easy-level TypeScript challenge on TypeScriptPro.

Easy
#11

Tuple to Object

Transform TypeScript tuples into object types with this easy-level challenge. Learn about const assertions, mapped types, and literal types on TypeScriptPro.

Easy
#14

First of Array

Extract the first element type from TypeScript arrays and tuples. Master indexed access types and conditional types in this easy-level challenge on TypeScriptPro.

Easy
#18

Length of Tuple

Get the length of TypeScript tuples at the type level. Learn about tuple types and the length property in this easy-level challenge on TypeScriptPro.

Easy
#43

Exclude

Implement TypeScript's built-in Exclude utility type from scratch. Master conditional types and type distribution in this easy-level challenge on TypeScriptPro.

Easy
#189

Awaited

Unwrap Promise types recursively with TypeScript. Learn conditional types, infer keyword, and recursive types in this easy-level challenge on TypeScriptPro.

Easy
#268

If

Implement conditional logic at the type level with TypeScript. Master conditional types and type constraints in this easy-level challenge on TypeScriptPro.

Easy
#533

Concat

Implement array concatenation at the type level with TypeScript. Learn about tuple types and the spread operator in this easy-level challenge on TypeScriptPro.

Easy
#898

Includes

Check if an array includes a value at the type level. Learn about recursive types and type equality in this easy-level TypeScript challenge on TypeScriptPro.

Easy
#3057

Push

Add elements to the end of tuples with TypeScript's type system. Master the spread operator and tuple manipulation in this easy-level challenge on TypeScriptPro.

Easy
#3060

Unshift

Add elements to the beginning of tuples with TypeScript. Learn tuple manipulation and spread operators in this easy-level challenge on TypeScriptPro.

Easy
#3312

Parameters

Extract function parameter types with TypeScript. Master the infer keyword and function type manipulation in this easy-level challenge on TypeScriptPro.

Easy
#2

Get Return Type

Implement the built-in `ReturnType<T>` generic without using it. Learn conditional types with `infer` in this medium-level challenge on TypeScriptPro.

Medium
#10

Tuple to Union

Implement a generic `TupleToUnion<T>` which covers the values of a tuple to its values union. Learn conditional types with `infer`, union type manipulation, tuple manipulation in this medium-level challenge on TypeScriptPro.

Medium
#12

Chainable Options

Chainable options are commonly used in Javascript. But when we switch to TypeScript, can you properly type it? Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#15

Last of Array

> TypeScript 4.0 is recommended in this challenge Learn array type operations in this medium-level challenge on TypeScriptPro.

Medium
#16

Pop

> TypeScript 4.0 is recommended in this challenge Learn array type operations in this medium-level challenge on TypeScriptPro.

Medium
#20

Promise.all

Type the function `PromiseAll` that accepts an array of PromiseLike objects, the returning value should be `Promise<T>` where `T` is the resolved result array. Learn array type operations, Promise type handling in this medium-level challenge on TypeScriptPro.

Medium
#62

Type Lookup

Sometimes, you may want to look up a type in a union by its attributes. Learn union type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#106

Trim Left

Implement `TrimLeft<T>` which takes an exact string type and returns a new string with the whitespace beginning removed. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#108

Trim

Implement `Trim<T>` which takes an exact string type and returns a new string with the whitespace from both ends removed. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#110

Capitalize

Implement `Capitalize<T>` which converts the first letter of a string to uppercase and leave the rest as-is. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#116

Replace

Implement `Replace<S, From, To>` which replace the string `From` with `To` once in the given string `S` Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#119

ReplaceAll

Implement `ReplaceAll<S, From, To>` which replace the all the substring `From` with `To` in the given string `S` Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#191

Append Argument

For given function type `Fn`, and any type `A` (any in this context means we don't restrict the type, and I don't have in mind any type 😉) create a generic type which will take `Fn` as the first argument, `A` as the second, and will produce function type `G` which will be the same as `Fn` but with appended argument `A` as a last one. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#298

Length of String

Compute the length of a string literal, which behaves like `String#length`. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#527

Append to object

Implement a type that adds a new field to the interface. The type takes the three arguments. The output should be an object with the new field. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#529

Absolute

Implement the `Absolute` type. A type that take string, number or bigint. The output should be a positive number string Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#531

String to Union

Implement the String to Union type. Type take string argument. The output should be a union of input letters Learn union type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#599

Merge

Merge two types into a new type. Keys of the second type overrides keys of the first type. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#612

KebabCase

Replace the `camelCase` or `PascalCase` string with `kebab-case`. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#645

Diff

Get an `Object` that is the difference between `O` & `O1` Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#1042

IsNever

Implement a type IsNever, which takes input type `T`. Learn union type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#2070

Drop Char

Drop a specified char from a string. Master advanced TypeScript type manipulation in this medium-level challenge on TypeScriptPro.

Medium
#3192

Reverse

Implement the type version of ```Array.reverse``` Learn tuple manipulation in this medium-level challenge on TypeScriptPro.

Medium
More challenges coming soon! Check back regularly for new TypeScript problems to solve.
Join early, learn faster.

Be the first to access the course, unlock exclusive launch bonuses, and get special early-bird pricing before anyone else.

No spam, unsubscribe at any time. We respect your privacy.

Limited Availability

Only 27 Spots left

Early Access

Get 1 month early access

>75% Off

Pre-Launch discount