const EnumHelper = {
    ParseToEnum(TEnum, value, comparison = '') {
        if (Object.isFrozen) {
            let t = Object.values(TEnum)
            console.log(t, Symbol(1) == 1)
            let r = t.find(x => (comparison != '' && x[comparison] == value) || (comparison == '' && x == value))
            return r
        } else {
            throw new Error("这不是一个枚举类型");
        }
    }
}

export default EnumHelper