📅  最后修改于: 2022-03-11 14:48:20.436000             🧑  作者: Mango
Enum Vehicle {
Car = 'car',
Bike = 'bike',
Truck = 'truck'
}
// becomes:
{
Car: 'car',
Bike: 'bike',
Truck: 'truck'
}
// So you just need to do:
if (Object.values(Vehicle).includes('car')) {
// Do stuff here
}