【发布时间】:2019-09-23 06:25:59
【问题描述】:
我有一些类似这样的枚举
export enum Types {
advance = 'lolipo',
test = 'testing',
city = 'cityNumber'
}
我检查了枚举中是否存在值
const description = 'advance';
const isProperType = Object.values(Types).includes(description);
我得到的错误是这样的
“字符串”类型的参数不能分配给“类型”类型的参数。
【问题讨论】:
标签: angular typescript object include