Created
August 27, 2021 10:19
-
-
Save eamonnboyle/f123e47346f2778f2dd78a541d22772c to your computer and use it in GitHub Desktop.
Large Discriminated Union
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface A { | |
kind: 'A'; | |
child: Node; | |
} | |
interface B { | |
kind: 'B'; | |
child: Node; | |
} | |
interface C { | |
kind: 'C'; | |
child: Node; | |
} | |
interface D { | |
kind: 'D'; | |
child: Node; | |
} | |
interface E { | |
kind: 'E'; | |
child: Node; | |
} | |
interface F { | |
kind: 'F'; | |
child: Node; | |
} | |
interface Terminal { | |
kind: 'Terminal'; | |
} | |
type Node = A | B | C | D | E | F | Terminal; | |
declare const root: Node; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment