Created
July 1, 2020 20:11
-
-
Save guillaumewuip/26138cfced091b35db1e8d1d10afa3b2 to your computer and use it in GitHub Desktop.
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
type $Text = { | |
text: string; | |
}; | |
type $Image = { | |
url: string; | |
description: string; | |
}; | |
const MessageUnion = Union.of({ | |
Text: Union.type<$Text>(), | |
Image: Union.type<$Image>(), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment