I have a string type like this:
export type Event =
| 'AttachmentAdded'
| 'AttachmentRemoved'
| 'FieldUpdate'
| 'Pause'
| 'ReferenceAdded'
| 'StateTransition'
| 'Unpause';
I want to write a condition that checks that a value matches one of these types:
UpdateEvent.includes(value)
However I don't want to create a new array called const UpdateEvent: Event = ["AttachementAdded", ...]
Is there a way to use the type to check value
or do I have to duplicate that list of options?