type
hero BETA
Explore
Tracks
Advent of TS
New
Explore
Tracks
Advent of TS
New
Theme
Login
Support Us
Login

    Easy

    Readonly

    EASY
    2
    42
    @typehero
    6 months ago

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

    Constructs a type with all proper

    Tuple to Object

    EASY
    4
    40
    @typehero
    6 months ago

    Given an array, transform it into an object type and the key/value must be in the provided array.

    First of Array

    EASY
    4
    37
    @typehero
    6 months ago

    Implement a generic First<T> that takes an Array T and returns its first element's type.

    For

    Length of Tuple

    EASY
    0
    28
    @typehero
    6 months ago

    For given a tuple, you need create a generic Length, pick the length of the tuple

    For example:

    Exclude

    EASY
    4
    34
    @typehero
    6 months ago

    Implement the built-in Exclude<T, U>

    Exclude from T those types that are assignable to U

    Awaited

    EASY
    16
    56
    @typehero
    6 months ago

    If we have a type which is a wrapped type like Promise, how can we get the type which is inside th

    If

    EASY
    0
    12
    @typehero
    6 months ago

    Implement the util type If<C, T, F> which accepts condition C, a truthy value T, and a falsy

    Concat

    EASY
    0
    17
    @typehero
    6 months ago

    Implement the JavaScript Array.concat function in the type system. A type takes the two argument

    Includes

    EASY
    13
    30
    @typehero
    6 months ago

    Implement the JavaScript Array.includes function in the type system. A type takes the two argume

    Push

    EASY
    1
    16
    @typehero
    6 months ago

    Implement the generic version of Array.push

    For example:

    type Result = Push<

    Unshift

    EASY
    0
    7
    @typehero
    6 months ago

    Implement the type version of Array.unshift

    For example:

    type Result = Unshi

    Parameters

    EASY
    0
    15
    @typehero
    6 months ago

    Implement the built-in Parameters generic without using it.

    For example:

    const foo = (a

    The `Pick` builtin

    EASY
    1
    15
    @dimitropoulos
    2 years ago

    TypeScript ships with a Pick type. Learn how to make it yourself!