Is it possible to define in an interface that a variable can only equal to a string from an array of strings, when an array is quite large and using union types don't seem to be feasible?
I have a list of country codes like ['US','GB','CY', 'PL'] and so on, about 200 in total.
Is it possible to do it something like
interface ICountryInfo {
countryCode: CountryCodes;
}
Where CountryCodes
is an array of codes?