Regarding the type with possible value of action
type PersistentAction = 'park' | 'retry' | 'skip' | 'stop'
I would like to create an enum that corresponds to these actions
enum PersistentActions {
PARK = 'park' ,
RETRY = 'retry',
SKIP = 'skip',
STOP = 'stop',
}
Is there a way to restrict the enum values to match the PersistentAction
type?
Could it be possible that an enum is not the right choice for this scenario?