Skip to content

Commit 4fd22be

Browse files
Merge pull request microsoft#469 from vgrigoriu/patch-1
Fix mismatch in description of discriminated unions
2 parents 6426c52 + afc0dbe commit 4fd22be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pages/Advanced Types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ function createElement(tagName: string): Element {
517517
You can combine string literal types, union types, type guards, and type aliases to build an advanced pattern called *discriminated unions*, also known as *tagged unions* or *algebraic data types*.
518518
Discriminated unions are useful in functional programming.
519519
Some languages automatically discriminate unions for you; TypeScript instead builds on JavaScript patterns as they exist today.
520-
There are four ingredients:
520+
There are three ingredients:
521521

522522
1. Types that have a common, string literal property — the *discriminant*.
523523
2. A type alias that takes the union of those types — the *union*.

0 commit comments

Comments
 (0)