I'm loading a JSON file from a remote API and I know a certain property is one of ~20 strings:
type SequenceType = "rna"|"dna"|"extended"
const i = data.sequenceType as SequenceType
How can I also check the value really matches the type? Do I need to move this type declaration data out of the type system? How? Is it something to do with keyof?