Function
enumValueFromString<T extends EnumLike>(str: string, enumType: T): T[keyof T]
Creates an enum instance from a string value. Throws an error if the provided enum does not have a value that matches the string.
the string value
the enum type in which the string is a value
↑↓ move↵ openEsc close