Question · JavaScript and React course · Module 12: React and TypeScript
Discriminated Union in TypeScript
What is a discriminated union in TypeScript?
Answer options
- An abstract class with multiple implementations
- A method of multiple inheritance in TypeScript
- A special type for forms with many fields
- A type that combines multiple interfaces using a common discriminator field
You can check the correct answer by solving this task in the CodeWorlds game.