This file contains hidden or 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
| /** | |
| Create a discriminating union type from two or more object types. | |
| Why?: | |
| - Saves you a few keystrokes. | |
| - Esp. helpful for distinguishing between type aliases you don’t own. | |
| Caveats: | |
| - Discriminator property might clobber an existing property. |