Completed Challenges

Chainable Options

MEDIUM
3
34
@typehero
6 months ago

Chainable options are commonly used in Javascript. But when we switch to TypeScript, can you prope

Deep Readonly

MEDIUM
6
18
@typehero
6 months ago

Implement a generic DeepReadonly<T> which make every parameter of an object - and its sub-object

Get Return Type

MEDIUM
0
18
@typehero
6 months ago

Implement the built-in ReturnType<T> generic without using it.

For example

const fn = (v

Omit

MEDIUM
0
15
@typehero
6 months ago

Implement the built-in Omit<T, K> generic without using it.

Constructs a type by picking all pr

Readonly 2

MEDIUM
0
20
@typehero
6 months ago

Implement a generic MyReadonly2<T, K> which takes two type argument T and K.

K specify th

Get Optional

HARD
0
2
@typehero
6 months ago

Implement the advanced util type GetOptional<T>, which remains all the optional fields

For exam

Generic Function Arguments

BEGINNER
24
148
@dimitropoulos
2 years ago

Give generic function types to your functions

Generic Type Arguments

BEGINNER
10
71
@dimitropoulos
2 years ago

Generic types are like function arguments.

Tuple to Union

MEDIUM
0
10
@typehero
6 months ago

Implement a generic TupleToUnion<T> which covers the values of a tuple to its values union.

For

Get Required

HARD
0
1
@typehero
6 months ago

Implement the advanced util type GetRequired<T>, which remains all the required fields

For exam

Required Keys

HARD
0
1
@typehero
6 months ago

Implement the advanced util type RequiredKeys<T>, which picks all the required keys into a union

Simple Vue

HARD
0
9
@typehero
6 months ago

Implement a simpiled version of a Vue-like typing support.

By providing a function name `SimpleVu

Union to Intersection

HARD
0
6
@typehero
6 months ago

Implement the advanced util type UnionToIntersection<U>

For example

type I = UnionToInte

Optional Keys

HARD
0
1
@typehero
6 months ago

Implement the advanced util type OptionalKeys<T>, which picks all the optional keys into a union

Capitalize Words

HARD
0
1
@typehero
6 months ago

Implement CapitalizeWords<T> which converts the first letter of each word of a string to upp

Get Readonly Keys

EXTREME
1
2
@typehero
6 months ago

Implement a generic GetReadonlyKeys<T> that returns a union of the readonly keys of an Object.