← All quizzes

💻 Computer Science & IT

TypeScript essentials

Structural typing, narrowing, generics, and what the compiler does and does not check at runtime.

8questions

mediumdifficulty

+16max XP (1st try)

not rated yet

Question 1 of 8

TypeScript's type system is:

Question 2 of 8

What happens to types at runtime?

Question 3 of 8

`unknown` differs from `any` because:

Question 4 of 8

Which narrows `x: string | number` to `string`?

Question 5 of 8

In `function first<T>(items: T[]): T | undefined`, T is:

Question 6 of 8

A discriminated union is useful because:

Question 7 of 8

`readonly` on an array property means:

Question 8 of 8

`strictNullChecks` makes:

0/8 answered

Part of