Union from data?
Originally I had designed the table schema with the possible options for the task type like this:
That's working fine. I'm now at the point in the app design where I want to display a color swatch on each task depending on the task type. What I'd like to do is start with something like this so that I only have to define the names and colors in one place:
...and then use the labels to define the schema. However, my initial attempt:
...led to this error:
I'm still fairly new to TypeScript, so I don't yet understand if/how this could be tweaked to do what I want. Is this even possible?
