If I have a type:
type CategoryContent =
| "Physical activity"
| "Health"
| "Nutrition"
| "All categories";
export type { CategoryContent };
How can I extract all those values into an array, but retain the type?
Right now I just have an array with the values hardcoded:
const categories = ["Physical", "Health", "Nutrition" etc]
But when I iterate through it, the component that I'm passing it to expects the "CategoryContent" type. Not string.
How can I build the array from the actual type?