How can I convert a type union into an array of values?
I'm trying to create this:
const sportsArray = ['Football', 'Baseball', 'Hockey'];
...from this:
type Sports = 'Football' | 'Baseball' | 'Hockey';
How can I convert a type union into an array of values?
I'm trying to create this:
const sportsArray = ['Football', 'Baseball', 'Hockey'];
...from this:
type Sports = 'Football' | 'Baseball' | 'Hockey';