mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
7 lines
214 B
TypeScript
7 lines
214 B
TypeScript
export function checkEnum<T extends string, TEnumValue extends string>(
|
|
enumVariable: { [key in T]: TEnumValue },
|
|
value: string,
|
|
): value is TEnumValue {
|
|
return Object.values(enumVariable).includes(value);
|
|
}
|