Beginner

Hello World

BEGINNER
20
93
@typehero

Hello, World!

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

For this ch

Generic Function Arguments

BEGINNER
24
145
@dimitropoulos

Give generic function types to your functions

Generic Type Arguments

BEGINNER
10
70
@dimitropoulos

Generic types are like function arguments.

Generic Type Constraints

BEGINNER
4
59
@dimitropoulos

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

Index Signatures

BEGINNER
8
62
@dimitropoulos

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

Indexed Types

BEGINNER
12
44
@dimitropoulos

Some types can be indexed to lookup a particular value.

The `keyof` operator

BEGINNER
5
37
@dimitropoulos

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

Literal Types

BEGINNER
23
47
@dimitropoulos

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

Mapped Object Types

BEGINNER
9
51
@dimitropoulos

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

Primitive Data Types

BEGINNER
18
86
@dimitropoulos

Your TypeScript journey starts with these building blocks.

Type Aliases

BEGINNER
6
60
@dimitropoulos

You can create multiple names for the same type.

The `typeof` Operator

BEGINNER
8
62
@dimitropoulos

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

Default Generic Arguments

BEGINNER
5
108
@dimitropoulos

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

Type Unions

BEGINNER
4
27
@dimitropoulos

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