Most model it as an actual enum, if backed by strings. Typescript, by comparison, requires being able to indicate a type just from a string argument
foo(get_some_myenum_value(), …)
{type:get_another(), …}
These are as unguessable as if myenum was a string.