I have a union type made of string literals in a third party types definition:
type Alphabet = "a" | "b" | "c"
Now I would like to know if a string is of the given type:
const letterCandidate = "b"
// doesn't work: Alphabet.includes(letterCandidate)
One way to achieve that would be to make a string array out of the type:
// somehow get to: const arr: string[] = ["a", "b", "c"]
// then could: arr.includes(letterCandidate)
Is there any way to create some kind of iterable out of the Alphabet type? Or some other solution to the problem?