Beginner

Hello World

BEGINNER
20
88
@typehero

Hello, World!

In Type Challenges, we use the type system itself to do the assertion.

For this ch

Generic Function Arguments

BEGINNER
23
136
@dimitropoulos

Give generic function types to your functions

Generic Type Arguments

BEGINNER
7
63
@dimitropoulos

Generic types are like function arguments.

Generic Type Constraints

BEGINNER
4
53
@dimitropoulos

Generic type constraints allow us to restrict the possible types a generic type will accept.

Index Signatures

BEGINNER
6
59
@dimitropoulos

Index signatures allow us to handle types where the properties are a non-specific literal value.

Indexed Types

BEGINNER
11
41
@dimitropoulos

Some types can be indexed to lookup a particular value.

The `keyof` operator

BEGINNER
5
31
@dimitropoulos

keyof allows us to extract a union of another type's keys.

Literal Types

BEGINNER
20
42
@dimitropoulos

TypeScript can be more specific than string or number. It can remember literal values.

Mapped Object Types

BEGINNER
9
46
@dimitropoulos

Mapping objects is a foundational skill that allows you to write type translation logic.

Primitive Data Types

BEGINNER
18
81
@dimitropoulos

Your TypeScript journey starts with these building blocks.

Type Aliases

BEGINNER
6
57
@dimitropoulos

You can create multiple names for the same type.

The `typeof` Operator

BEGINNER
8
55
@dimitropoulos

When you need to create a type from existing JavaScript values, typeof is the tool for the job.

Default Generic Arguments

BEGINNER
5
90
@dimitropoulos

Default generic arguments allow you to optionally pass a generic argument.

Type Unions

BEGINNER
3
22
@dimitropoulos

Type unions are a powerful tool that allow you to create a type that's many values all at once.