Lets assume I have:
type Channels = 'Main' | 'Secondary' | 'Misc'
var argChannel: string = 'Main'
How do i check if argChannel
is a valid Channel
in typescript?
Typescript does not allow direct comparison as it will report 'Channels' only refers to a type, but is being used as a value here.