Returns the validated & existing number value part of a "numeric" enum (the right hand-side), given either side (the string or number part) of a "numeric" enum.
Features / Notes:
The number part can be given as a number or parseable string number.
The string part can be given the exact string key, or lower, upper or capitalized form of the string. // @todo: make this optional
It should maintain the right types of Enum / Enum keys, eg keyof TEnumType as a string
Returns the validated & existing
number value
part of a "numeric" enum (the right hand-side), given either side (the string or number part) of a "numeric" enum.Features / Notes:
keyof TEnumType
as a stringSee
z.numberEnumToStringKey()
for the reverse function@todo: Curry this function, maintain types: