【发布时间】:2022-02-03 23:30:12
【问题描述】:
我有一些这样的常量
export class CustomerType {
static readonly main = 'mainCustomer';
static readonly additional = 'additionalCustomer';
}
我有
const value = 'main'
是否可以检查 CustomerType 中是否存在值并返回 true 或 false? 我知道我可以使用 include when 是一个数组,但这是一个类?
【问题讨论】:
标签: javascript typescript