Created
August 27, 2019 20:41
-
-
Save jbmilgrom/09691a2870b99ca1c1ca664bce82d569 to your computer and use it in GitHub Desktop.
"Sameness" in the context of immutability
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
enum PrimaryColor { | |
Red = "RED", | |
Yellow = "YELLOW", | |
Blue = "BLUE" | |
} | |
const green1 = [ | |
{ color: PrimaryColor.Yellow, weight: 1 / 2 }, | |
{ color: PrimaryColor.Blue, weight: 1 / 2 } | |
] as const; | |
const green2 = [ | |
{ color: PrimaryColor.Yellow, weight: 1 / 2 }, | |
{ color: PrimaryColor.Blue, weight: 1 / 2 } | |
] as const; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment