Explore Library
TypeScriptTypes & Basic Syntax

56 items

1

Union Types in TypeScript

Slides / Video
2

Literal Types in TypeScript

Slides / Video
3

The never Type in TypeScript

Slides / Video
4

The unknown Type in TypeScript

Slides / Video
5

The void Type in TypeScript

Slides / Video
6

The null and undefined Types

Slides / Video
7

Tuple Types in TypeScript

Slides / Video
8

Array Types in TypeScript

Slides / Video
9

Enums: Numeric and String

Slides / Video
10

Type Assertions in TypeScript

Slides / Video
11

The bigint and symbol Primitives

Slides / Video
12

Optional Properties in Object Types

Slides / Video
13

Inline Object Type Annotations

Slides / Video
14

The Object Type in TypeScript

Slides / Video
15

Type Aliases with the type Keyword

Slides / Video
16

bigint Type

Code Quiz
17

Optional Object Properties

Code Quiz
18

Readonly Property Modifier

Code Quiz
19

The symbol Type

Code Quiz
20

The never Type

Code Quiz
21

Variable Declarations with Types

Code Quiz
22

Function Parameter Type Annotations

Code Quiz
23

Function Parameter Annotations

Quiz
24

The bigint Type

Quiz
25

The symbol Type

Quiz
26

Type Assertions with as

Quiz
27

Enum Types

Quiz
28

The never Type

Quiz
29

Optional and Default Parameters

Quiz
30

Function Return Type Annotations

Quiz
31

Type Aliases

Quiz
32

Literal Types

Quiz
33

Union Types

Quiz
34

Inline Object Type Annotations

Quiz
35

Tuple Types Basics

Quiz
36

Optional Properties

Quiz
37

The enum type

Flashcard
38

Function parameter types

Flashcard
39

The void return type

Flashcard
40

Union types

Flashcard
41

const and readonly basics

Flashcard
42

The undefined type

Flashcard
43

Tuple types

Flashcard
44

Type assertions

Flashcard
45

Type aliases

Flashcard
46

The never type

Flashcard
47

The null type

Flashcard
48

Array type syntax

Flashcard
49

Default parameter values

Flashcard
50

any vs unknown

Flashcard
51

Literal types

Flashcard
52

The unknown type

Flashcard
53

Optional function parameters

Flashcard
54

Generic array syntax

Flashcard
55

Function return types

Flashcard
56

Optional properties

Flashcard
FlashcardBeginner

Type assertions

The as keyword tells the compiler to treat a value as a specific type.

Question

What is a type assertion using `as`?

Click to reveal answer