Zadanie z kodem · Kurs JavaScript i TypeScript · Moduł 6: Podstawy TypeScript

Praktyka: Union i Intersection types

Praktyka z typami union i intersection do opisu dinozaurów.

Zadanie

Stwórz typ union DietType = 'herbivore' | 'carnivore' | 'omnivore' i intersection type AquaticDino = Dinosaur & SwimmingAbility.