Explore
Explore the challenges. Embrace the opportunity to grow, learn, and showcase your programming abilities. We hope you find the perfect challenge!
Great for Beginners
Default Generic Arguments
Default generic arguments allow you to optionally pass a generic argument.
Generic Function Arguments
Give generic function types to your functions
Generic Type Arguments
Generic types are like function arguments.
Generic Type Constraints
Generic type constraints allow us to restrict the possible types a generic type will accept.
Hello World
Hello, World!
In Type Challenges, we use the type system itself to do the assertion.
For this ch
Index Signatures
Index signatures allow us to handle types where the properties are a non-specific literal value.
Great for Learners
Awaited
If we have a type which is a wrapped type like Promise, how can we get the type which is inside th
Concat
Implement the JavaScript Array.concat
function in the type system. A type takes the two argument
Exclude
Implement the built-in Exclude<T, U>
Exclude from
T
those types that are assignable toU
First of Array
Implement a generic First<T>
that takes an Array T
and returns its first element's type.
For
If
Implement the util type If<C, T, F>
which accepts condition C
, a truthy value T
, and a falsy
Includes
Implement the JavaScript Array.includes
function in the type system. A type takes the two argume
Great for Enthusiasts
Absolute
Implement the Absolute
type. A type that take string, number or bigint. The output should be a p
All
Returns true if all elements of the list are equal to the second parameter passed in, false if the
AllCombinations
Implement type AllCombinations<S>
that return all combinations of strings which use characte
AnyOf
Implement Python liked any
function in the type system. A type takes the Array and returns `true
Appear only once
Find the elements in the target array that appear only once. For example:input: `[1,2,2,3,3,4,5,6,
Append Argument
For given function type Fn
, and any type A
(any in this context means we don't restrict the ty