Перейти к основному содержимому
0

Этот урок пока на английском.

This or that

Real values are not always one type. An id can be a string or a number; a lookup can find a user or return null. A union type lists every possibility, and TypeScript makes sure you handle each one.